From 66b554ede78f9b39c51cef65b703dd7dc494126c Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Fri, 3 Aug 2018 13:18:28 +0200 Subject: [PATCH 01/27] update readme --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b1bbfece..09d48dcf 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,22 @@ RobotlegsJS Phaser Extension [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) Integrate [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS) -framework with [Phaser](http://phaser.io). +framework with [Phaser](https://github.com/photonstorm/phaser). + +Installation +--- + +You can get the latest release and the type definitions using [NPM](https://www.npmjs.com/): + +```bash +npm install @robotlegsjs/phaser --save-prod +``` + +Or using [Yarn](https://yarnpkg.com/en/): + +```bash +yarn add @robotlegsjs/phaser +```` Usage --- @@ -66,6 +81,13 @@ new Game(); [See example](example) +RobotlegsJS integration with Phaser CE (Community Edition) +--- + +The `@robotlegsjs/phaser` package was updated to support [Phaser v3](https://www.npmjs.com/package/phaser) plugin. + +If you are looking for integration with [Phaser CE](https://github.com/photonstorm/phaser-ce) you can use the [RobotlegsJS-Phaser-CE](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-CE) plugin. + License --- From d6e143a03319cf116da507b18d227f7954927255 Mon Sep 17 00:00:00 2001 From: Sargis Sargsyan Date: Sat, 4 Aug 2018 18:23:12 +0400 Subject: [PATCH 02/27] preparing class for phaser3 --- .gitignore | 7 +- .npmignore | 5 +- definitions/phaser.d.ts | 59671 ++++++++++++++++ example/index.ts | 8 +- karma.conf.js | 122 +- package-lock.json | 13053 ++++ package.json | 204 +- src/index.ts | 38 +- .../bender/bundles/phaser/PhaserBundle.ts | 16 +- .../ContextSceneManagerExtension.ts} | 27 +- .../api/IContextSceneManager.ts} | 8 +- .../impl/ContextSceneManager.ts} | 29 +- .../ContextSceneManagerListenerConfig.ts} | 22 +- .../SceneManagerExtension.ts} | 30 +- .../SceneManagerObserverExtension.ts} | 21 +- .../api/ISceneHandler.ts} | 12 +- .../sceneManager/api/ISceneManager.ts | 49 + .../impl/ConfigureSceneEvent.ts} | 26 +- .../impl/SceneManager.ts} | 78 +- .../impl/SceneManagerBinding.ts} | 36 +- .../impl/SceneManagerBindingEvent.ts} | 6 +- .../impl/SceneManagerEvent.ts} | 38 +- .../sceneManager/impl/SceneManagerObserver.ts | 119 + .../impl/SceneRegistry.ts} | 67 +- .../impl/SceneRegistryEvent.ts} | 32 +- .../SceneMediatorMapExtension.ts} | 38 +- .../api/ISceneMediator.ts} | 4 +- .../api/ISceneMediatorMap.ts} | 23 +- .../api/ISceneMediatorMapping.ts} | 4 +- .../dsl/ISceneMediatorConfigurator.ts} | 10 +- .../dsl/ISceneMediatorMapper.ts} | 8 +- .../dsl/ISceneMediatorUnmapper.ts} | 4 +- .../impl/NullSceneMediatorUnmapper.ts} | 6 +- .../impl/SceneMediator.ts} | 26 +- .../impl/SceneMediatorFactory.ts} | 26 +- .../impl/SceneMediatorManager.ts} | 55 +- .../impl/SceneMediatorMap.ts} | 62 +- .../impl/SceneMediatorMapper.ts} | 42 +- .../impl/SceneMediatorMapping.ts} | 28 +- .../impl/SceneMediatorStateHandler.ts} | 40 +- .../stateManager/api/IStateManager.ts | 49 - .../stateManager/impl/StateManagerObserver.ts | 93 - test/README.md | 0 test/entry.ts | 16 +- .../bundles/phaser/phaserBundle.test.ts | 8 +- .../contextStateManagerExtension.test.ts | 42 +- .../impl/contextStateManager.test.ts | 28 +- .../contextStateManagerListenerConfig.test.ts | 41 +- .../support/CallbackLogTarget.ts | 3 +- .../contextStateManager/support/LogParams.ts | 2 +- .../impl/configureStateEvent.test.ts | 28 +- ...vent.test.ts => stateBindingEvent.test.ts} | 20 +- .../impl/stateManagerEvent.test.ts | 39 +- .../support/CallbackStateHandler.ts | 11 +- tsconfig.json | 53 +- webpack.example.config.js | 97 +- 56 files changed, 73662 insertions(+), 968 deletions(-) create mode 100644 definitions/phaser.d.ts create mode 100644 package-lock.json mode change 100644 => 100755 src/index.ts mode change 100644 => 100755 src/robotlegs/bender/bundles/phaser/PhaserBundle.ts rename src/robotlegs/bender/extensions/{contextStateManager/ContextStateManagerExtension.ts => contextSceneManager/ContextSceneManagerExtension.ts} (64%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{contextStateManager/api/IContextStateManager.ts => contextSceneManager/api/IContextSceneManager.ts} (60%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{contextStateManager/impl/ContextStateManager.ts => contextSceneManager/impl/ContextSceneManager.ts} (54%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{contextStateManager/impl/ContextStateManagerListenerConfig.ts => contextSceneManager/impl/ContextSceneManagerListenerConfig.ts} (66%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateManager/StateManagerExtension.ts => sceneManager/SceneManagerExtension.ts} (71%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateManager/StateManagerObserverExtension.ts => sceneManager/SceneManagerObserverExtension.ts} (76%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateManager/api/IStateHandler.ts => sceneManager/api/ISceneHandler.ts} (58%) mode change 100644 => 100755 create mode 100755 src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts rename src/robotlegs/bender/extensions/{stateManager/impl/ConfigureStateEvent.ts => sceneManager/impl/ConfigureSceneEvent.ts} (73%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateManager/impl/StateManager.ts => sceneManager/impl/SceneManager.ts} (53%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateManager/impl/StateManagerBinding.ts => sceneManager/impl/SceneManagerBinding.ts} (68%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateManager/impl/StateManagerBindingEvent.ts => sceneManager/impl/SceneManagerBindingEvent.ts} (89%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateManager/impl/StateManagerEvent.ts => sceneManager/impl/SceneManagerEvent.ts} (64%) mode change 100644 => 100755 create mode 100755 src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts rename src/robotlegs/bender/extensions/{stateManager/impl/StateRegistry.ts => sceneManager/impl/SceneRegistry.ts} (54%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateManager/impl/StateRegistryEvent.ts => sceneManager/impl/SceneRegistryEvent.ts} (65%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/StateMediatorMapExtension.ts => sceneMediatorMap/SceneMediatorMapExtension.ts} (63%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/api/IStateMediator.ts => sceneMediatorMap/api/ISceneMediator.ts} (89%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/api/IStateMediatorMap.ts => sceneMediatorMap/api/ISceneMediatorMap.ts} (75%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/api/IStateMediatorMapping.ts => sceneMediatorMap/api/ISceneMediatorMapping.ts} (89%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/dsl/IStateMediatorConfigurator.ts => sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts} (74%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/dsl/IStateMediatorMapper.ts => sceneMediatorMap/dsl/ISceneMediatorMapper.ts} (72%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/dsl/IStateMediatorUnmapper.ts => sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts} (85%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/impl/NullStateMediatorUnmapper.ts => sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts} (80%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/impl/StateMediator.ts => sceneMediatorMap/impl/SceneMediator.ts} (82%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/impl/StateMediatorFactory.ts => sceneMediatorMap/impl/SceneMediatorFactory.ts} (86%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/impl/StateMediatorManager.ts => sceneMediatorMap/impl/SceneMediatorManager.ts} (62%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/impl/StateMediatorMap.ts => sceneMediatorMap/impl/SceneMediatorMap.ts} (55%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/impl/StateMediatorMapper.ts => sceneMediatorMap/impl/SceneMediatorMapper.ts} (70%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/impl/StateMediatorMapping.ts => sceneMediatorMap/impl/SceneMediatorMapping.ts} (72%) mode change 100644 => 100755 rename src/robotlegs/bender/extensions/{stateMediatorMap/impl/StateMediatorStateHandler.ts => sceneMediatorMap/impl/SceneMediatorStateHandler.ts} (72%) mode change 100644 => 100755 delete mode 100644 src/robotlegs/bender/extensions/stateManager/api/IStateManager.ts delete mode 100644 src/robotlegs/bender/extensions/stateManager/impl/StateManagerObserver.ts mode change 100644 => 100755 test/README.md mode change 100644 => 100755 test/entry.ts mode change 100644 => 100755 test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts mode change 100644 => 100755 test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts mode change 100644 => 100755 test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts mode change 100644 => 100755 test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts mode change 100644 => 100755 test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts mode change 100644 => 100755 test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts mode change 100644 => 100755 test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts rename test/robotlegs/bender/extensions/stateManager/impl/{stateManagerBindingEvent.test.ts => stateBindingEvent.test.ts} (58%) mode change 100644 => 100755 mode change 100644 => 100755 test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts mode change 100644 => 100755 test/robotlegs/bender/extensions/stateManager/support/CallbackStateHandler.ts diff --git a/.gitignore b/.gitignore index 6d52b23a..2940b2b8 100644 --- a/.gitignore +++ b/.gitignore @@ -68,4 +68,9 @@ lib-test src/**/*.js src/**/*.js.map test/**/*.js -test/**/*.js.map \ No newline at end of file +test/**/*.js.map + +#os +.DS_Store +.AppleDouble +.LSOverride \ No newline at end of file diff --git a/.npmignore b/.npmignore index f6ca59fc..16a684cf 100644 --- a/.npmignore +++ b/.npmignore @@ -30,4 +30,7 @@ yarn.lock .npmignore .prettierrc .publishrc -.travis.yml \ No newline at end of file +.travis.yml +.DS_Store +.AppleDouble +.LSOverride \ No newline at end of file diff --git a/definitions/phaser.d.ts b/definitions/phaser.d.ts new file mode 100644 index 00000000..2487d023 --- /dev/null +++ b/definitions/phaser.d.ts @@ -0,0 +1,59671 @@ +declare type CallCallback = (item: Phaser.GameObjects.GameObject) => void; + +declare type GridAlignConfig = { + /** + * The width of the grid in items (not pixels). -1 means lay all items out horizontally, regardless of quantity. + * If both this value and height are set to -1 then this value overrides it and the `height` value is ignored. + */ + width?: integer; + /** + * The height of the grid in items (not pixels). -1 means lay all items out vertically, regardless of quantity. + * If both this value and `width` are set to -1 then `width` overrides it and this value is ignored. + */ + height?: integer; + /** + * The width of the cell, in pixels, in which the item is positioned. + */ + cellWidth?: integer; + /** + * The height of the cell, in pixels, in which the item is positioned. + */ + cellHeight?: integer; + /** + * The alignment position. One of the Phaser.Display.Align consts such as `TOP_LEFT` or `RIGHT_CENTER`. + */ + position?: integer; + /** + * Optionally place the top-left of the final grid at this coordinate. + */ + x?: number; + /** + * Optionally place the top-left of the final grid at this coordinate. + */ + y?: number; +}; + +declare type JSONAnimation = { + /** + * The key that the animation will be associated with. i.e. sprite.animations.play(key) + */ + key: string; + /** + * A frame based animation (as opposed to a bone based animation) + */ + type: string; + /** + * [description] + */ + frames: JSONAnimationFrame[]; + /** + * The frame rate of playback in frames per second (default 24 if duration is null) + */ + frameRate: integer; + /** + * How long the animation should play for in milliseconds. If not given its derived from frameRate. + */ + duration: integer; + /** + * Skip frames if the time lags, or always advanced anyway? + */ + skipMissedFrames: boolean; + /** + * Delay before starting playback. Value given in milliseconds. + */ + delay: integer; + /** + * Number of times to repeat the animation (-1 for infinity) + */ + repeat: integer; + /** + * Delay before the animation repeats. Value given in milliseconds. + */ + repeatDelay: integer; + /** + * Should the animation yoyo? (reverse back down to the start) before repeating? + */ + yoyo: boolean; + /** + * Should sprite.visible = true when the animation starts to play? + */ + showOnStart: boolean; + /** + * Should sprite.visible = false when the animation finishes? + */ + hideOnComplete: boolean; +}; + +declare type AnimationFrameConfig = { + /** + * The key that the animation will be associated with. i.e. sprite.animations.play(key) + */ + key: string; + /** + * [description] + */ + frame: string | number; + /** + * [description] + */ + duration?: number; + /** + * [description] + */ + visible?: boolean; +}; + +declare type AnimationConfig = { + /** + * The key that the animation will be associated with. i.e. sprite.animations.play(key) + */ + key?: string; + /** + * An object containing data used to generate the frames for the animation + */ + frames?: AnimationFrameConfig[]; + /** + * The key of the texture all frames of the animation will use. Can be overridden on a per frame basis. + */ + defaultTextureKey?: string; + /** + * The frame rate of playback in frames per second (default 24 if duration is null) + */ + frameRate?: integer; + /** + * How long the animation should play for in milliseconds. If not given its derived from frameRate. + */ + duration?: integer; + /** + * Skip frames if the time lags, or always advanced anyway? + */ + skipMissedFrames?: boolean; + /** + * Delay before starting playback. Value given in milliseconds. + */ + delay?: integer; + /** + * Number of times to repeat the animation (-1 for infinity) + */ + repeat?: integer; + /** + * Delay before the animation repeats. Value given in milliseconds. + */ + repeatDelay?: integer; + /** + * Should the animation yoyo? (reverse back down to the start) before repeating? + */ + yoyo?: boolean; + /** + * Should sprite.visible = true when the animation starts to play? + */ + showOnStart?: boolean; + /** + * Should sprite.visible = false when the animation finishes? + */ + hideOnComplete?: boolean; +}; + +declare type JSONAnimationFrame = { + /** + * The key of the Texture this AnimationFrame uses. + */ + key: string; + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + */ + frame: string | integer; + /** + * Additional time (in ms) that this frame should appear for during playback. + */ + duration: number; +}; + +declare type JSONAnimationManager = { + /** + * [description] + */ + anims: JSONAnimation[]; + /** + * [description] + */ + globalTimeScale: number; +}; + +declare type GenerateFrameNamesConfig = { + /** + * [description] + */ + prefix?: string; + /** + * [description] + */ + start?: integer; + /** + * [description] + */ + end?: integer; + /** + * [description] + */ + suffix?: string; + /** + * [description] + */ + zeroPad?: integer; + /** + * [description] + */ + outputArray?: AnimationFrameConfig[]; + /** + * [description] + */ + frames?: boolean; +}; + +declare type GenerateFrameNumbersConfig = { + /** + * [description] + */ + start?: integer; + /** + * [description] + */ + end?: integer; + /** + * [description] + */ + first?: boolean; + /** + * [description] + */ + outputArray?: AnimationFrameConfig[]; + /** + * [description] + */ + frames?: boolean; +}; + +/** + * This callback type is completely empty, a no-operation. + */ +declare type NOOP = () => void; + +declare type BootCallback = (game: Phaser.Game) => void; + +declare type FPSConfig = { + /** + * [description] + */ + min?: integer; + /** + * [description] + */ + target?: integer; + /** + * [description] + */ + forceSetTimeOut?: boolean; + /** + * [description] + */ + deltaHistory?: integer; + /** + * [description] + */ + panicMax?: integer; +}; + +declare type LoaderConfig = { + /** + * [description] + */ + baseURL?: string; + /** + * [description] + */ + path?: string; + /** + * [description] + */ + maxParallelDownloads?: integer; + /** + * [description] + */ + crossOrigin?: string | undefined; + /** + * [description] + */ + responseType?: string; + /** + * [description] + */ + async?: boolean; + /** + * [description] + */ + user?: string; + /** + * [description] + */ + password?: string; + /** + * [description] + */ + timeout?: integer; +}; + +declare type GameConfig = { + /** + * [description] + */ + width?: integer | string; + /** + * [description] + */ + height?: integer | string; + /** + * [description] + */ + zoom?: number; + /** + * [description] + */ + resolution?: number; + /** + * [description] + */ + type?: number; + /** + * [description] + */ + parent?: any; + /** + * Provide your own Canvas element for Phaser to use instead of creating one. + */ + canvas?: HTMLCanvasElement; + /** + * [description] + */ + canvasStyle?: string; + /** + * Provide your own Canvas Context for Phaser to use, instead of creating one. + */ + context?: CanvasRenderingContext2D; + /** + * [description] + */ + scene?: object; + /** + * [description] + */ + seed?: string[]; + /** + * [description] + */ + title?: string; + /** + * [description] + */ + url?: string; + /** + * [description] + */ + version?: string; + /** + * Automatically call window.focus() when the game boots. + */ + autoFocus?: boolean; + /** + * [description] + */ + input?: boolean | object; + /** + * [description] + */ + "input.keyboard"?: boolean; + /** + * [description] + */ + "input.keyboard.target"?: any; + /** + * [description] + */ + "input.mouse"?: boolean | object; + /** + * [description] + */ + "input.mouse.target"?: any; + /** + * [description] + */ + "input.touch"?: boolean; + /** + * [description] + */ + "input.activePointers"?: integer; + /** + * [description] + */ + "input.touch.target"?: any; + /** + * [description] + */ + "input.touch.capture"?: boolean; + /** + * [description] + */ + "input.gamepad"?: boolean | object; + /** + * [description] + */ + disableContextMenu?: boolean; + /** + * [description] + */ + banner?: boolean | object; + /** + * [description] + */ + "banner.hidePhaser"?: boolean; + /** + * [description] + */ + "banner.text"?: string; + /** + * [description] + */ + "banner.background"?: string[]; + /** + * [description] + */ + fps?: FPSConfig; + /** + * [description] + */ + "render.antialias"?: boolean; + /** + * [description] + */ + "render.pixelArt"?: boolean; + /** + * [description] + */ + "render.autoResize"?: boolean; + /** + * [description] + */ + "render.roundPixels"?: boolean; + /** + * [description] + */ + "render.transparent"?: boolean; + /** + * [description] + */ + "render.clearBeforeRender"?: boolean; + /** + * [description] + */ + "render.premultipliedAlpha"?: boolean; + /** + * [description] + */ + "render.preserveDrawingBuffer"?: boolean; + /** + * [description] + */ + "render.failIfMajorPerformanceCaveat"?: boolean; + /** + * "high-performance", "low-power" or "default" + */ + "render.powerPreference"?: string; + /** + * The default WebGL batch size. + */ + "render.batchSize"?: integer; + /** + * [description] + */ + backgroundColor?: string | number; + /** + * [description] + */ + callbacks?: object; + /** + * [description] + */ + "callbacks.preBoot"?: BootCallback; + /** + * [description] + */ + "callbacks.postBoot"?: BootCallback; + /** + * [description] + */ + loader?: LoaderConfig; + /** + * [description] + */ + images?: object; + /** + * [description] + */ + "images.default"?: string; + /** + * [description] + */ + "images.missing"?: string; + /** + * [description] + */ + physics?: object; +}; + +declare type TimeStepCallback = (time: number, average: number, interpolation: number) => void; + +declare type JSONCameraBounds = { + /** + * The horizontal position of camera + */ + x: number; + /** + * The vertical position of camera + */ + y: number; + /** + * The width size of camera + */ + width: number; + /** + * The height size of camera + */ + height: number; +}; + +declare type JSONCamera = { + /** + * The name of the camera + */ + name: string; + /** + * The horizontal position of camera + */ + x: number; + /** + * The vertical position of camera + */ + y: number; + /** + * The width size of camera + */ + width: number; + /** + * The height size of camera + */ + height: number; + /** + * The zoom of camera + */ + zoom: number; + /** + * The rotation of camera + */ + rotation: number; + /** + * The round pixels st status of camera + */ + roundPixels: boolean; + /** + * The horizontal scroll of camera + */ + scrollX: number; + /** + * The vertical scroll of camera + */ + scrollY: number; + /** + * The background color of camera + */ + backgroundColor: string; + /** + * The bounds of camera + */ + bounds?: JSONCameraBounds | undefined; +}; + +declare type InputJSONCameraObject = { + /** + * The name of the Camera. + */ + name?: string; + /** + * The horizontal position of the Camera viewport. + */ + x?: integer; + /** + * The vertical position of the Camera viewport. + */ + y?: integer; + /** + * The width of the Camera viewport. + */ + width?: integer; + /** + * The height of the Camera viewport. + */ + height?: integer; + /** + * The default zoom level of the Camera. + */ + zoom?: number; + /** + * The rotation of the Camera, in radians. + */ + rotation?: number; + /** + * Should the Camera round pixels before rendering? + */ + roundPixels?: boolean; + /** + * The horizontal scroll position of the Camera. + */ + scrollX?: number; + /** + * The vertical scroll position of the Camera. + */ + scrollY?: number; + /** + * A CSS color string controlling the Camera background color. + */ + backgroundColor?: false | string; + /** + * Defines the Camera bounds. + */ + bounds?: object; + /** + * The top-left extent of the Camera bounds. + */ + "bounds.x"?: number; + /** + * The top-left extent of the Camera bounds. + */ + "bounds.y"?: number; + /** + * The width of the Camera bounds. + */ + "bounds.width"?: number; + /** + * The height of the Camera bounds. + */ + "bounds.height"?: number; +}; + +declare type CameraFadeCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number) => void; + +declare type CameraFlashCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number) => void; + +declare type CameraPanCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number, x: number, y: number) => void; + +declare type CameraShakeCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number) => void; + +declare type CameraZoomCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number, zoom: number) => void; + +declare type FixedKeyControlConfig = { + /** + * The Camera that this Control will update. + */ + camera?: Phaser.Cameras.Scene2D.Camera; + /** + * The Key to be pressed that will move the Camera left. + */ + left?: Phaser.Input.Keyboard.Key; + /** + * The Key to be pressed that will move the Camera right. + */ + right?: Phaser.Input.Keyboard.Key; + /** + * The Key to be pressed that will move the Camera up. + */ + up?: Phaser.Input.Keyboard.Key; + /** + * The Key to be pressed that will zoom the Camera in. + */ + zoomIn?: Phaser.Input.Keyboard.Key; + /** + * The Key to be pressed that will zoom the Camera out. + */ + zoomOut?: Phaser.Input.Keyboard.Key; + /** + * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed. + */ + zoomSpeed?: number; + /** + * The horizontal and vertical speed the camera will move. + */ + speed?: number | Object; +}; + +declare type SmoothedKeyControlConfig = { + /** + * The Camera that this Control will update. + */ + camera?: Phaser.Cameras.Scene2D.Camera; + /** + * The Key to be pressed that will move the Camera left. + */ + left?: Phaser.Input.Keyboard.Key; + /** + * The Key to be pressed that will move the Camera right. + */ + right?: Phaser.Input.Keyboard.Key; + /** + * The Key to be pressed that will move the Camera up. + */ + up?: Phaser.Input.Keyboard.Key; + /** + * The Key to be pressed that will zoom the Camera in. + */ + zoomIn?: Phaser.Input.Keyboard.Key; + /** + * The Key to be pressed that will zoom the Camera out. + */ + zoomOut?: Phaser.Input.Keyboard.Key; + /** + * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed. + */ + zoomSpeed?: number; + /** + * The horizontal and vertical acceleration the camera will move. + */ + acceleration?: number | Object; + /** + * The horizontal and vertical drag applied to the camera when it is moving. + */ + drag?: number | Object; + /** + * The maximum horizontal and vertical speed the camera will move. + */ + maxSpeed?: number | Object; +}; + +declare type RayDef = { + /** + * [description] + */ + origin: Phaser.Math.Vector3; + /** + * [description] + */ + direction: Phaser.Math.Vector3; +}; + +declare type GenerateTextureRendererCallback = (canvas: HTMLCanvasElement, context: CanvasRenderingContext2D) => void; + +declare type GenerateTextureConfig = { + /** + * [description] + */ + data?: any[]; + /** + * [description] + */ + canvas?: HTMLCanvasElement; + /** + * [description] + */ + palette?: Palette; + /** + * [description] + */ + pixelWidth?: number; + /** + * [description] + */ + pixelHeight?: number; + /** + * [description] + */ + resizeCanvas?: boolean; + /** + * [description] + */ + clearCanvas?: boolean; + /** + * [description] + */ + preRender?: GenerateTextureRendererCallback; + /** + * [description] + */ + postRender?: GenerateTextureRendererCallback; +}; + +declare type Palette = { + /** + * Color value 1. + */ + "0": string; + /** + * Color value 2. + */ + "1": string; + /** + * Color value 3. + */ + "2": string; + /** + * Color value 4. + */ + "3": string; + /** + * Color value 5. + */ + "4": string; + /** + * Color value 6. + */ + "5": string; + /** + * Color value 7. + */ + "6": string; + /** + * Color value 8. + */ + "7": string; + /** + * Color value 9. + */ + "8": string; + /** + * Color value 10. + */ + "9": string; + /** + * Color value 11. + */ + A: string; + /** + * Color value 12. + */ + B: string; + /** + * Color value 13. + */ + C: string; + /** + * Color value 14. + */ + D: string; + /** + * Color value 15. + */ + E: string; + /** + * Color value 16. + */ + F: string; +}; + +declare type JSONEllipseCurve = { + /** + * The of the curve. + */ + type: string; + /** + * [description] + */ + x: number; + /** + * [description] + */ + y: number; + /** + * The horizontal radius of ellipse. + */ + xRadius: number; + /** + * The vertical radius of ellipse. + */ + yRadius: number; + /** + * The start angle of ellipse. + */ + startAngle: integer; + /** + * The end angle of ellipse. + */ + endAngle: integer; + /** + * The clockwise of ellipse. + */ + clockwise: boolean; + /** + * The rotation of ellipse. + */ + rotation: integer; +}; + +declare type EllipseCurveConfig = { + /** + * [description] + */ + x?: number; + /** + * [description] + */ + y?: number; + /** + * [description] + */ + xRadius?: number; + /** + * [description] + */ + yRadius?: number; + /** + * [description] + */ + startAngle?: integer; + /** + * [description] + */ + endAngle?: integer; + /** + * [description] + */ + clockwise?: boolean; + /** + * [description] + */ + rotation?: integer; +}; + +declare type JSONCurve = { + /** + * The of the curve + */ + type: string; + /** + * The arrays of points like `[x1, y1, x2, y2]` + */ + points: number[]; +}; + +declare type JSONPath = { + /** + * The of the curve. + */ + type: string; + /** + * [description] + */ + x: number; + /** + * [description] + */ + y: number; + /** + * The path is auto closed. + */ + autoClose: boolean; + /** + * The list of the curves + */ + curves: JSONCurve[]; +}; + +declare type DataEachCallback = (parent: any, key: string, value: any, ...args: any[]) => void; + +/** + * Checks for support of the Full Screen API. + */ +declare function init(): void; + +declare namespace Phaser.Display.Color { + /** + * Interpolates color values + */ + namespace Interpolate { + /** + * Interpolates between the two given color ranges over the length supplied. + * @param r1 Red value. + * @param g1 Blue value. + * @param b1 Green value. + * @param r2 Red value. + * @param g2 Blue value. + * @param b2 Green value. + * @param length Distance to interpolate over. Default 100. + * @param index Index to start from. Default 0. + */ + function RGBWithRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, length?: number, index?: number): ColorObject; + + /** + * Interpolates between the two given color objects over the length supplied. + * @param color1 The first Color object. + * @param color2 The second Color object. + * @param length Distance to interpolate over. Default 100. + * @param index Index to start from. Default 0. + */ + function ColorWithColor(color1: Phaser.Display.Color, color2: Phaser.Display.Color, length?: number, index?: number): ColorObject; + + /** + * Interpolates between the Color object and color values over the length supplied. + * @param color1 The first Color object. + * @param r Red value. + * @param g Blue value. + * @param b Green value. + * @param length Distance to interpolate over. Default 100. + * @param index Index to start from. Default 0. + */ + function ColorWithRGB(color1: Phaser.Display.Color, r: number, g: number, b: number, length?: number, index?: number): ColorObject; + + } + +} + +declare type HSLColorObject = { + /** + * The hue color value. A number between 0 and 1 + */ + h: number; + /** + * The saturation color value. A number between 0 and 1 + */ + s: number; + /** + * The lightness color value. A number between 0 and 1 + */ + l: number; +}; + +declare type InputColorObject = { + /** + * The red color value in the range 0 to 255. + */ + r?: number; + /** + * The green color value in the range 0 to 255. + */ + g?: number; + /** + * The blue color value in the range 0 to 255. + */ + b?: number; + /** + * The alpha color value in the range 0 to 255. + */ + a?: number; +}; + +declare type ColorObject = () => void; + +declare type ContentLoadedCallback = () => void; + +declare type GameObjectConfig = { + /** + * The x position of the Game Object. + */ + x?: number; + /** + * The y position of the Game Object. + */ + y?: number; + /** + * The depth of the GameObject. + */ + depth?: number; + /** + * The horizontally flipped state of the Game Object. + */ + flipX?: boolean; + /** + * The vertically flipped state of the Game Object. + */ + flipY?: boolean; + /** + * The scale of the GameObject. + */ + scale?: number | object; + /** + * The scroll factor of the GameObject. + */ + scrollFactor?: number | object; + /** + * The rotation angle of the Game Object, in radians. + */ + rotation?: number; + /** + * The rotation angle of the Game Object, in degrees. + */ + angle?: number; + /** + * The alpha (opacity) of the Game Object. + */ + alpha?: number; + /** + * The origin of the Game Object. + */ + origin?: number | object; + /** + * The scale mode of the GameObject. + */ + scaleMode?: number; + /** + * The blend mode of the GameObject. + */ + blendMode?: number; + /** + * The visible state of the Game Object. + */ + visible?: boolean; + /** + * Add the GameObject to the scene. + */ + add?: boolean; +}; + +declare type BitmapTextSize = { + /** + * The position and size of the BitmapText, taking into account the position and scale of the Game Object. + */ + global: GlobalBitmapTextSize; + /** + * The position and size of the BitmapText, taking just the font size into account. + */ + local: LocalBitmapTextSize; +}; + +/** + * The position and size of the Bitmap Text in global space, taking into account the Game Object's scale and world position. + */ +declare type GlobalBitmapTextSize = { + /** + * The x position of the BitmapText, taking into account the x position and scale of the Game Object. + */ + x: number; + /** + * The y position of the BitmapText, taking into account the y position and scale of the Game Object. + */ + y: number; + /** + * The width of the BitmapText, taking into account the x scale of the Game Object. + */ + width: number; + /** + * The height of the BitmapText, taking into account the y scale of the Game Object. + */ + height: number; +}; + +/** + * The position and size of the Bitmap Text in local space, taking just the font size into account. + */ +declare type LocalBitmapTextSize = { + /** + * The x position of the BitmapText. + */ + x: number; + /** + * The y position of the BitmapText. + */ + y: number; + /** + * The width of the BitmapText. + */ + width: number; + /** + * The height of the BitmapText. + */ + height: number; +}; + +declare type DisplayCallbackConfig = { + /** + * The tint of the character being rendered. + */ + tint: Object; + /** + * The index of the character being rendered. + */ + index: number; + /** + * The character code of the character being rendered. + */ + charCode: number; + /** + * The x position of the character being rendered. + */ + x: number; + /** + * The y position of the character being rendered. + */ + y: number; + /** + * The scale of the character being rendered. + */ + scale: number; + /** + * The rotation of the character being rendered. + */ + rotation: number; + /** + * Custom data stored with the character being rendered. + */ + data: any; +}; + +declare type DisplayCallback = (display: DisplayCallbackConfig) => void; + +declare type BitmapTextConfig = GameObjectConfig & { + /** + * The key of the font to use from the BitmapFont cache. + */ + font?: string; + /** + * The string, or array of strings, to be set as the content of this Bitmap Text. + */ + text?: string; + /** + * The font size to set. + */ + size?: number | false; +}; + +/** + * The font data for an individual character of a Bitmap Font. + * + * Describes the character's position, size, offset and kerning. + */ +declare type BitmapFontCharacterData = { + /** + * The x position of the character. + */ + x: number; + /** + * The y position of the character. + */ + y: number; + /** + * The width of the character. + */ + width: number; + /** + * The height of the character. + */ + height: number; + /** + * The center x position of the character. + */ + centerX: number; + /** + * The center y position of the character. + */ + centerY: number; + /** + * The x offset of the character. + */ + xOffset: number; + /** + * The y offset of the character. + */ + yOffset: number; + /** + * Extra data for the character. + */ + data: object; + /** + * Kerning values, keyed by character code. + */ + kerning: { [key: string]: number }; +}; + +/** + * Bitmap Font data that can be used by a BitmapText Game Object. + */ +declare type BitmapFontData = { + /** + * The name of the font. + */ + font: string; + /** + * The size of the font. + */ + size: number; + /** + * The line height of the font. + */ + lineHeight: number; + /** + * Whether this font is a retro font (monospace). + */ + retroFont: boolean; + /** + * The character data of the font, keyed by character code. Each character datum includes a position, size, offset and more. + */ + chars: { [key: number]: BitmapFontCharacterData }; +}; + +declare type JSONBitmapText = JSONGameObject & { + /** + * The name of the font. + */ + font: string; + /** + * The text that this Bitmap Text displays. + */ + text: string; + /** + * The size of the font. + */ + fontSize: number; + /** + * Adds / Removes spacing between characters. + */ + letterSpacing: number; + /** + * The alignment of the text in a multi-line BitmapText object. + */ + align: integer; +}; + +declare namespace Phaser.GameObjects.Blitter { + type CreateCallback = (bob: Phaser.GameObjects.Blitter.Bob, index: integer) => void; + + /** + * A Bob Game Object. + * + * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object. + * + * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle + * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it + * must be a Frame within the Texture used by the parent Blitter. + * + * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will + * have their positions impacted by this change as well. + * + * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be + * handled via the Blitter parent. + */ + class Bob { + /** + * + * @param blitter The parent Blitter object is responsible for updating this Bob. + * @param x The horizontal position of this Game Object in the world, relative to the parent Blitter position. + * @param y The vertical position of this Game Object in the world, relative to the parent Blitter position. + * @param frame The Frame this Bob will render with, as defined in the Texture the parent Blitter is using. + * @param visible Should the Bob render visible or not to start with? + */ + constructor(blitter: Phaser.GameObjects.Blitter, x: number, y: number, frame: string | integer, visible: boolean); + + /** + * The Blitter object that this Bob belongs to. + */ + parent: Phaser.GameObjects.Blitter; + + /** + * The x position of this Bob, relative to the x position of the Blitter. + */ + x: number; + + /** + * The y position of this Bob, relative to the y position of the Blitter. + */ + y: number; + + /** + * The frame that the Bob uses to render with. + * To change the frame use the `Bob.setFrame` method. + */ + protected frame: Phaser.Textures.Frame; + + /** + * A blank object which can be used to store data related to this Bob in. + */ + data: object; + + /** + * The horizontally flipped state of the Bob. + * A Bob that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Bob. + * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture. + */ + flipY: boolean; + + /** + * Changes the Texture Frame being used by this Bob. + * The frame must be part of the Texture the parent Blitter is using. + * If no value is given it will use the default frame of the Blitter parent. + * @param frame The frame to be used during rendering. + */ + setFrame(frame?: string | integer | Phaser.Textures.Frame): Phaser.GameObjects.Blitter.Bob; + + /** + * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state. + */ + resetFlip(): Phaser.GameObjects.Blitter.Bob; + + /** + * Resets this Bob. + * + * Changes the position to the values given, and optionally changes the frame. + * + * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true. + * @param x The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param y The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param frame The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. + */ + reset(x: number, y: number, frame?: string | integer | Phaser.Textures.Frame): Phaser.GameObjects.Blitter.Bob; + + /** + * Sets the horizontal flipped state of this Bob. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): Phaser.GameObjects.Blitter.Bob; + + /** + * Sets the vertical flipped state of this Bob. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): Phaser.GameObjects.Blitter.Bob; + + /** + * Sets the horizontal and vertical flipped state of this Bob. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): Phaser.GameObjects.Blitter.Bob; + + /** + * Sets the visibility of this Bob. + * + * An invisible Bob will skip rendering. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): Phaser.GameObjects.Blitter.Bob; + + /** + * Set the Alpha level of this Bob. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * A Bob with alpha 0 will skip rendering. + * @param value The alpha value used for this Bob. Between 0 and 1. + */ + setAlpha(value: number): Phaser.GameObjects.Blitter.Bob; + + /** + * Destroys this Bob instance. + * Removes itself from the Blitter and clears the parent, frame and data properties. + */ + destroy(): void; + + /** + * The visible state of the Bob. + * + * An invisible Bob will skip rendering. + */ + visible: boolean; + + /** + * The alpha value of the Bob, between 0 and 1. + * + * A Bob with alpha 0 will skip rendering. + */ + alpha: number; + + } + +} + +declare type JSONGameObject = { + /** + * The name of this Game Object. + */ + name: string; + /** + * A textual representation of this Game Object, i.e. `sprite`. + */ + type: string; + /** + * The x position of this Game Object. + */ + x: number; + /** + * The y position of this Game Object. + */ + y: number; + /** + * The scale of this Game Object + */ + scale: object; + /** + * The horizontal scale of this Game Object. + */ + "scale.x": number; + /** + * The vertical scale of this Game Object. + */ + "scale.y": number; + /** + * The origin of this Game Object. + */ + origin: object; + /** + * The horizontal origin of this Game Object. + */ + "origin.x": number; + /** + * The vertical origin of this Game Object. + */ + "origin.y": number; + /** + * The horizontally flipped state of the Game Object. + */ + flipX: boolean; + /** + * The vertically flipped state of the Game Object. + */ + flipY: boolean; + /** + * The angle of this Game Object in radians. + */ + rotation: number; + /** + * The alpha value of the Game Object. + */ + alpha: number; + /** + * The visible state of the Game Object. + */ + visible: boolean; + /** + * The Scale Mode being used by this Game Object. + */ + scaleMode: integer; + /** + * Sets the Blend Mode being used by this Game Object. + */ + blendMode: integer | string; + /** + * The texture key of this Game Object. + */ + textureKey: string; + /** + * The frame key of this Game Object. + */ + frameKey: string; + /** + * The data of this Game Object. + */ + data: object; +}; + +declare type EachContainerCallback = (item: any, ...args: any[]) => void; + +declare namespace Phaser.GameObjects.Graphics { + namespace Commands { + } + +} + +/** + * Graphics line style (or stroke style) settings. + */ +declare type GraphicsLineStyle = { + /** + * The stroke width. + */ + width?: number; + /** + * The stroke color. + */ + color?: number; + /** + * The stroke alpha. + */ + alpha?: number; +}; + +/** + * Graphics fill style settings. + */ +declare type GraphicsFillStyle = { + /** + * The fill color. + */ + color?: number; + /** + * The fill alpha. + */ + alpha?: number; +}; + +/** + * Graphics style settings. + */ +declare type GraphicsStyles = { + /** + * The style applied to shape outlines. + */ + lineStyle?: GraphicsLineStyle; + /** + * The style applied to shape areas. + */ + fillStyle?: GraphicsFillStyle; +}; + +/** + * Options for the Graphics game Object. + */ +declare type GraphicsOptions = GraphicsStyles & { + /** + * The x coordinate of the Graphics. + */ + x?: number; + /** + * The y coordinate of the Graphics. + */ + y?: number; +}; + +declare type GroupCallback = (item: Phaser.GameObjects.GameObject) => void; + +declare type GroupMultipleCreateCallback = (items: Phaser.GameObjects.GameObject[]) => void; + +declare type GroupConfig = { + /** + * Sets {@link Phaser.GameObjects.Group#classType}. + */ + classType?: object; + /** + * Sets {@link Phaser.GameObjects.Group#active}. + */ + active?: boolean; + /** + * Sets {@link Phaser.GameObjects.Group#maxSize}. + */ + maxSize?: number; + /** + * Sets {@link Phaser.GameObjects.Group#defaultKey}. + */ + defaultKey?: string; + /** + * Sets {@link Phaser.GameObjects.Group#defaultFrame}. + */ + defaultFrame?: string | integer; + /** + * Sets {@link Phaser.GameObjects.Group#runChildUpdate}. + */ + runChildUpdate?: boolean; + /** + * Sets {@link Phaser.GameObjects.Group#createCallback}. + */ + createCallback?: GroupCallback; + /** + * Sets {@link Phaser.GameObjects.Group#removeCallback}. + */ + removeCallback?: GroupCallback; + /** + * Sets {@link Phaser.GameObjects.Group#createMultipleCallback}. + */ + createMultipleCallback?: GroupMultipleCreateCallback; +}; + +/** + * The total number of objects created will be + * + * key.length * frame.length * frameQuantity * (yoyo ? 2 : 1) * (1 + repeat) + * + * In the simplest case, 1 + `repeat` objects will be created. + * + * If `max` is positive, then the total created will not exceed `max`. + * + * `key` is required. {@link Phaser.GameObjects.Group#defaultKey} is not used. + */ +declare type GroupCreateConfig = { + /** + * The class of each new Game Object. + */ + classType?: object; + /** + * The texture key of each new Game Object. + */ + key?: string; + /** + * The texture frame of each new Game Object. + */ + frame?: string | integer; + /** + * The visible state of each new Game Object. + */ + visible?: boolean; + /** + * The active state of each new Game Object. + */ + active?: boolean; + /** + * The number of times each `key` × `frame` combination will be *repeated* (after the first combination). + */ + repeat?: number; + /** + * Select a `key` at random. + */ + randomKey?: boolean; + /** + * Select a `frame` at random. + */ + randomFrame?: boolean; + /** + * Select keys and frames by moving forward then backward through `key` and `frame`. + */ + yoyo?: boolean; + /** + * The number of times each `frame` should be combined with one `key`. + */ + frameQuantity?: number; + /** + * The maximum number of new Game Objects to create. 0 is no maximum. + */ + max?: number; + setXY?: object; + /** + * The horizontal position of each new Game Object. + */ + "setXY.x"?: number; + /** + * The vertical position of each new Game Object. + */ + "setXY.y"?: number; + /** + * Increment each Game Object's horizontal position from the previous by this amount, starting from `setXY.x`. + */ + "setXY.stepX"?: number; + /** + * Increment each Game Object's vertical position from the previous by this amount, starting from `setXY.y`. + */ + "setXY.stepY"?: number; + setRotation?: object; + /** + * Rotation of each new Game Object. + */ + "setRotation.value"?: number; + /** + * Increment each Game Object's rotation from the previous by this amount, starting at `setRotation.value`. + */ + "setRotation.step"?: number; + setScale?: object; + /** + * The horizontal scale of each new Game Object. + */ + "setScale.x"?: number; + /** + * The vertical scale of each new Game Object. + */ + "setScale.y"?: number; + /** + * Increment each Game Object's horizontal scale from the previous by this amount, starting from `setScale.x`. + */ + "setScale.stepX"?: number; + /** + * Increment each Game object's vertical scale from the previous by this amount, starting from `setScale.y`. + */ + "setScale.stepY"?: number; + setAlpha?: object; + /** + * The alpha value of each new Game Object. + */ + "setAlpha.value"?: number; + /** + * Increment each Game Object's alpha from the previous by this amount, starting from `setAlpha.value`. + */ + "setAlpha.step"?: number; + /** + * A geometric shape that defines the hit area for the Game Object. + */ + hitArea?: any; + /** + * A callback to be invoked when the Game Object is interacted with. + */ + hitAreaCallback?: HitAreaCallback; + /** + * Align the new Game Objects in a grid using these settings. + */ + gridAlign?: false | GridAlignConfig; +}; + +declare type LightForEach = (light: Phaser.GameObjects.Light) => void; + +/** + * The returned value sets what the property will be at the START of the particle's life, on emit. + */ +declare type EmitterOpOnEmitCallback = (particle: Phaser.GameObjects.Particles.Particle, key: string, value: number) => void; + +/** + * The returned value updates the property for the duration of the particle's life. + */ +declare type EmitterOpOnUpdateCallback = (particle: Phaser.GameObjects.Particles.Particle, key: string, t: number, value: number) => void; + +/** + * Defines an operation yielding a random value within a range. + */ +declare type EmitterOpRandomConfig = { + /** + * The minimum and maximum values, as [min, max]. + */ + random: number[]; +}; + +/** + * Defines an operation yielding a random value within a range. + */ +declare type EmitterOpRandomMinMaxConfig = { + /** + * The minimum value. + */ + min: number; + /** + * The maximum value. + */ + max: number; +}; + +/** + * Defines an operation yielding a random value within a range. + */ +declare type EmitterOpRandomStartEndConfig = { + /** + * The starting value. + */ + start: number; + /** + * The ending value. + */ + end: number; + /** + * If false, this becomes {@link EmitterOpEaseConfig}. + */ + random: boolean; +}; + +/** + * Defines an operation yielding a value incremented continuously across a range. + */ +declare type EmitterOpEaseConfig = { + /** + * The starting value. + */ + start: number; + /** + * The ending value. + */ + end: number; + /** + * The name of the easing function. + */ + ease?: string; +}; + +/** + * Defines an operation yielding a value incremented by steps across a range. + */ +declare type EmitterOpSteppedConfig = { + /** + * The starting value. + */ + start: number; + /** + * The ending value. + */ + end: number; + /** + * The number of steps between start and end. + */ + steps: number; +}; + +declare type EmitterOpCustomEmitConfig = { + /** + * [description] + */ + onEmit: EmitterOpOnEmitCallback; +}; + +declare type EmitterOpCustomUpdateConfig = { + /** + * [description] + */ + onEmit?: EmitterOpOnEmitCallback; + /** + * [description] + */ + onUpdate: EmitterOpOnUpdateCallback; +}; + +declare type GravityWellConfig = { + /** + * The x coordinate of the Gravity Well, in world space. + */ + x?: number; + /** + * The y coordinate of the Gravity Well, in world space. + */ + y?: number; + /** + * The power of the Gravity Well. + */ + power?: number; + /** + * [description] + */ + epsilon?: number; + /** + * The gravitational force of this Gravity Well. + */ + gravity?: number; +}; + +declare type ParticleEmitterCallback = (particle: Phaser.GameObjects.Particles.Particle, emitter: Phaser.GameObjects.Particles.ParticleEmitter) => void; + +declare type ParticleDeathCallback = (particle: Phaser.GameObjects.Particles.Particle) => void; + +declare type ParticleEmitterBounds = { + /** + * The left edge of the rectangle. + */ + x: number; + /** + * The top edge of the rectangle. + */ + y: number; + /** + * The width of the rectangle. + */ + width: number; + /** + * The height of the rectangle. + */ + height: number; +}; + +declare type ParticleEmitterBoundsAlt = { + /** + * The left edge of the rectangle. + */ + x: number; + /** + * The top edge of the rectangle. + */ + y: number; + /** + * The width of the rectangle. + */ + w: number; + /** + * The height of the rectangle. + */ + h: number; +}; + +declare type ParticleEmitterDeathZoneConfig = { + /** + * A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.DeathZone#source}. + */ + source: DeathZoneSource; + /** + * 'onEnter' or 'onLeave'. + */ + type?: string; +}; + +declare type ParticleEmitterEdgeZoneConfig = { + /** + * A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}. + */ + source: EdgeZoneSource; + /** + * 'edge'. + */ + type: string; + /** + * The number of particles to place on the source edge. Set to 0 to use `stepRate` instead. + */ + quantity: integer; + /** + * The distance between each particle. When set, `quantity` is implied and should be set to 0. + */ + stepRate?: number; + /** + * Whether particles are placed from start to end and then end to start. + */ + yoyo?: boolean; + /** + * Whether one endpoint will be removed if it's identical to the other. + */ + seamless?: boolean; +}; + +declare type ParticleEmitterRandomZoneConfig = { + /** + * A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.RandomZone#source}. + */ + source: RandomZoneSource; + /** + * 'random'. + */ + type?: string; +}; + +declare type ParticleEmitterConfig = { + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#active}. + */ + active?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#blendMode}. + */ + blendMode?: integer; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope} and {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope}. + */ + callbackScope?: any; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#collideBottom}. + */ + collideBottom?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#collideLeft}. + */ + collideLeft?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#collideRight}. + */ + collideRight?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#collideTop}. + */ + collideTop?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallback}. + */ + deathCallback?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope}. + */ + deathCallbackScope?: any; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallback}. + */ + emitCallback?: Function; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope}. + */ + emitCallbackScope?: any; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#follow}. + */ + follow?: Phaser.GameObjects.GameObject; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency}. + */ + frequency?: number; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#gravityX}. + */ + gravityX?: number; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#gravityY}. + */ + gravityY?: number; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxParticles}. + */ + maxParticles?: integer; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#name}. + */ + name?: string; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#on}. + */ + on?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop}. + */ + particleBringToTop?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleClass}. + */ + particleClass?: Phaser.GameObjects.Particles.Particle; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#radial}. + */ + radial?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#timeScale}. + */ + timeScale?: number; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#trackVisible}. + */ + trackVisible?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#visible}. + */ + visible?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationX} (emit only). + */ + accelerationX?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationY} (emit only). + */ + accelerationY?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#alpha}. + */ + alpha?: number | number[] | EmitterOpOnUpdateCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#angle} (emit only) + */ + angle?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#bounce} (emit only). + */ + bounce?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#delay} (emit only). + */ + delay?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#lifespan} (emit only). + */ + lifespan?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX} (emit only). + */ + maxVelocityX?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY} (emit only). + */ + maxVelocityY?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToX} (emit only). + */ + moveToX?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToY} (emit only). + */ + moveToY?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity} (emit only). + */ + quantity?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#rotate}. + */ + rotate?: number | number[] | EmitterOpOnUpdateCallback | object; + /** + * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setScale}. + */ + scale?: number | number[] | EmitterOpOnUpdateCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#scaleX}. + */ + scaleX?: number | number[] | EmitterOpOnUpdateCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#scaleY}. + */ + scaleY?: number | number[] | EmitterOpOnUpdateCallback | object; + /** + * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setSpeed} (emit only). + */ + speed?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#speedX} (emit only). + */ + speedX?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#speedY} (emit only). + */ + speedY?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#tint}. + */ + tint?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#x} (emit only). + */ + x?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#y} (emit only). + */ + y?: number | number[] | EmitterOpOnEmitCallback | object; + /** + * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone}. + */ + emitZone?: object; + /** + * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setBounds}. + */ + bounds?: ParticleEmitterBounds | ParticleEmitterBoundsAlt; + /** + * Assigns to {@link Phaser.GameObjects.Particles.ParticleEmitter#followOffset}. + */ + followOffset?: object; + /** + * x-coordinate of the offset. + */ + "followOffset.x"?: number; + /** + * y-coordinate of the offset. + */ + "followOffset.y"?: number; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + */ + frames?: number | number[] | string | string[] | Phaser.Textures.Frame | Phaser.Textures.Frame[] | ParticleEmitterFrameConfig; +}; + +declare type ParticleEmitterFrameConfig = { + /** + * One or more texture frames. + */ + frames?: number | number[] | string | string[] | Phaser.Textures.Frame | Phaser.Textures.Frame[]; + /** + * Whether texture frames will be assigned consecutively (true) or at random (false). + */ + cycle?: boolean; + /** + * The number of consecutive particles receiving each texture frame, when `cycle` is true. + */ + quantity?: integer; +}; + +declare type DeathZoneSourceCallback = (x: number, y: number) => void; + +declare type DeathZoneSource = { + contains: DeathZoneSourceCallback; +}; + +declare type EdgeZoneSourceCallback = (quantity: integer, stepRate?: number) => void; + +declare type EdgeZoneSource = { + /** + * A function placing points on the source's edge or edges. + */ + getPoints: EdgeZoneSourceCallback; +}; + +declare type RandomZoneSourceCallback = (point: Phaser.Math.Vector2) => void; + +declare type RandomZoneSource = { + /** + * A function modifying its point argument. + */ + getRandomPoint: RandomZoneSourceCallback; +}; + +/** + * Settings for a PathFollower. + */ +declare type PathConfig = { + /** + * The duration of the path follow. + */ + duration: number; + /** + * The start position of the path follow, between 0 and 1. + */ + from: number; + /** + * The end position of the path follow, between 0 and 1. + */ + to: number; + /** + * Whether to position the PathFollower on the Path using its path offset. + */ + positionOnPath?: boolean; + /** + * Should the PathFollower automatically rotate to point in the direction of the Path? + */ + rotateToPath?: boolean; + /** + * If the PathFollower is rotating to match the Path, this value is added to the rotation value. This allows you to rotate objects to a path but control the angle of the rotation as well. + */ + rotationOffset?: number; + /** + * [description] + */ + verticalAdjust?: boolean; +}; + +declare type RenderTextureConfig = { + /** + * The x coordinate of the RenderTexture's position. + */ + x?: number; + /** + * The y coordinate of the RenderTexture's position. + */ + y?: number; + /** + * The width of the RenderTexture. + */ + width?: number; + /** + * The height of the RenderTexture. + */ + height?: number; +}; + +/** + * A custom function that will be responsible for wrapping the text. + */ +declare type TextStyleWordWrapCallback = (text: string, textObject: Phaser.GameObjects.Text) => void; + +/** + * Font metrics for a Text Style object. + */ +declare type BitmapTextMetrics = { + /** + * The ascent of the font. + */ + ascent: number; + /** + * The descent of the font. + */ + descent: number; + /** + * The size of the font. + */ + fontSize: number; +}; + +declare namespace Phaser.GameObjects.Text { + /** + * Style settings for a Text object. + */ + class TextStyle { + /** + * + * @param text The Text object that this TextStyle is styling. + * @param style The style settings to set. + */ + constructor(text: Phaser.GameObjects.Text, style: object); + + /** + * The Text object that this TextStyle is styling. + */ + parent: Phaser.GameObjects.Text; + + /** + * The font family. + */ + fontFamily: string; + + /** + * The font size. + */ + fontSize: string; + + /** + * The font style. + */ + fontStyle: string; + + /** + * The background color. + */ + backgroundColor: string; + + /** + * The text fill color. + */ + color: string; + + /** + * The text stroke color. + */ + stroke: string; + + /** + * The text stroke thickness. + */ + strokeThickness: number; + + /** + * The horizontal shadow offset. + */ + shadowOffsetX: number; + + /** + * The vertical shadow offset. + */ + shadowOffsetY: number; + + /** + * The shadow color. + */ + shadowColor: string; + + /** + * The shadow blur radius. + */ + shadowBlur: number; + + /** + * Whether shadow stroke is enabled or not. + */ + shadowStroke: boolean; + + /** + * Whether shadow fill is enabled or not. + */ + shadowFill: boolean; + + /** + * The text alignment. + */ + align: string; + + /** + * The maximum number of lines to draw. + */ + maxLines: integer; + + /** + * The fixed width of the text. + * + * `0` means no fixed with. + */ + fixedWidth: number; + + /** + * The fixed height of the text. + * + * `0` means no fixed height. + */ + fixedHeight: number; + + /** + * Whether the text should render right to left. + */ + rtl: boolean; + + /** + * The test string to use when measuring the font. + */ + testString: string; + + /** + * The amount of horizontal padding adding to the width of the text when calculating the font metrics. + */ + baselineX: number; + + /** + * The amount of vertical padding adding to the width of the text when calculating the font metrics. + */ + baselineY: number; + + /** + * Set the text style. + * @param style The style settings to set. + * @param updateText Whether to update the text immediately. Default true. + */ + setStyle(style: object, updateText?: boolean): Phaser.GameObjects.Text; + + /** + * Synchronize the font settings to the given Canvas Rendering Context. + * @param canvas The Canvas Element. + * @param context The Canvas Rendering Context. + */ + syncFont(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; + + /** + * Synchronize the text style settings to the given Canvas Rendering Context. + * @param canvas The Canvas Element. + * @param context The Canvas Rendering Context. + */ + syncStyle(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; + + /** + * Synchronize the shadow settings to the given Canvas Rendering Context. + * @param context The Canvas Rendering Context. + * @param enabled Whether shadows are enabled or not. + */ + syncShadow(context: CanvasRenderingContext2D, enabled: boolean): void; + + /** + * Update the style settings for the parent Text object. + * @param recalculateMetrics Whether to recalculate font and text metrics. + */ + update(recalculateMetrics: boolean): Phaser.GameObjects.Text; + + /** + * Set the font. + * + * If a string is given, the font family is set. + * + * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` + * properties of that object are set. + * @param font The font family or font settings to set. + */ + setFont(font: string | object): Phaser.GameObjects.Text; + + /** + * Set the font family. + * @param family The font family. + */ + setFontFamily(family: string): Phaser.GameObjects.Text; + + /** + * Set the font style. + * @param style The font style. + */ + setFontStyle(style: string): Phaser.GameObjects.Text; + + /** + * Set the font size. + * @param size The font size. + */ + setFontSize(size: number | string): Phaser.GameObjects.Text; + + /** + * Set the test string to use when measuring the font. + * @param string The test string to use when measuring the font. + */ + setTestString(string: string): Phaser.GameObjects.Text; + + /** + * Set a fixed width and height for the text. + * + * Pass in `0` for either of these parameters to disable fixed width or height respectively. + * @param width The fixed width to set. + * @param height The fixed height to set. + */ + setFixedSize(width: number, height: number): Phaser.GameObjects.Text; + + /** + * Set the background color. + * @param color The background color. + */ + setBackgroundColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the text fill color. + * @param color The text fill color. + */ + setFill(color: string): Phaser.GameObjects.Text; + + /** + * Set the text fill color. + * @param color The text fill color. + */ + setColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the stroke settings. + * @param color The stroke color. + * @param thickness The stroke thickness. + */ + setStroke(color: string, thickness: number): Phaser.GameObjects.Text; + + /** + * Set the shadow settings. + * @param x The horizontal shadow offset. Default 0. + * @param y The vertical shadow offset. Default 0. + * @param color The shadow color. Default '#000'. + * @param blur The shadow blur radius. Default 0. + * @param shadowStroke Whether to stroke the shadow. Default false. + * @param shadowFill Whether to fill the shadow. Default true. + */ + setShadow(x?: number, y?: number, color?: string, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): Phaser.GameObjects.Text; + + /** + * Set the shadow offset. + * @param x The horizontal shadow offset. Default 0. + * @param y The vertical shadow offset. Default 0. + */ + setShadowOffset(x?: number, y?: number): Phaser.GameObjects.Text; + + /** + * Set the shadow color. + * @param color The shadow color. Default '#000'. + */ + setShadowColor(color?: string): Phaser.GameObjects.Text; + + /** + * Set the shadow blur radius. + * @param blur The shadow blur radius. Default 0. + */ + setShadowBlur(blur?: number): Phaser.GameObjects.Text; + + /** + * Enable or disable shadow stroke. + * @param enabled Whether shadow stroke is enabled or not. + */ + setShadowStroke(enabled: boolean): Phaser.GameObjects.Text; + + /** + * Enable or disable shadow fill. + * @param enabled Whether shadow fill is enabled or not. + */ + setShadowFill(enabled: boolean): Phaser.GameObjects.Text; + + /** + * Set the width (in pixels) to use for wrapping lines. + * + * Pass in null to remove wrapping by width. + * @param width The maximum width of a line in pixels. Set to null to remove wrapping. + * @param useAdvancedWrap Whether or not to use the advanced wrapping + * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, + * spaces and whitespace are left as is. Default false. + */ + setWordWrapWidth(width: number, useAdvancedWrap?: boolean): Phaser.GameObjects.Text; + + /** + * Set a custom callback for wrapping lines. + * + * Pass in null to remove wrapping by callback. + * @param callback A custom function that will be responsible for wrapping the + * text. It will receive two arguments: text (the string to wrap), textObject (this Text + * instance). It should return the wrapped lines either as an array of lines or as a string with + * newline characters in place to indicate where breaks should happen. + * @param scope The scope that will be applied when the callback is invoked. Default null. + */ + setWordWrapCallback(callback: TextStyleWordWrapCallback, scope?: object): Phaser.GameObjects.Text; + + /** + * Set the text alignment. + * + * Expects values like `'left'`, `'right'`, `'center'` or `'justified'`. + * @param align The text alignment. + */ + setAlign(align: string): Phaser.GameObjects.Text; + + /** + * Set the maximum number of lines to draw. + * @param max The maximum number of lines to draw. Default 0. + */ + setMaxLines(max?: integer): Phaser.GameObjects.Text; + + /** + * Get the current text metrics. + */ + getTextMetrics(): BitmapTextMetrics; + + /** + * Build a JSON representation of this Text Style. + */ + toJSON(): object; + + /** + * Destroy this Text Style. + */ + destroy(): void; + + } + +} + +declare type TileSprite = GameObjectConfig & { + /** + * The x coordinate of the Tile Sprite. + */ + x?: number; + /** + * The y coordinate of the Tile Sprite. + */ + y?: number; + /** + * The width of the Tile Sprite. + */ + width?: number; + /** + * The height of the Tile Sprite. + */ + height?: number; + /** + * The key of the Texture this Tile Sprite will use to render with, as stored in the Texture Manager. + */ + key?: string; + /** + * An optional frame from the Texture this Tile Sprite is rendering with. + */ + frame?: string; +}; + +declare type CenterFunction = (triangle: Phaser.Geom.Triangle) => void; + +declare type HitAreaCallback = (hitArea: any, x: number, y: number, gameObject: Phaser.GameObjects.GameObject) => void; + +declare type InputPluginContainer = { + /** + * The unique name of this plugin in the input plugin cache. + */ + key: string; + /** + * The plugin to be stored. Should be the source object, not instantiated. + */ + plugin: Function; + /** + * If this plugin is to be injected into the Input Plugin, this is the property key map used. + */ + mapping?: string; +}; + +declare namespace Phaser.Input.InputPluginCache { + /** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * @param key A reference used to get this plugin from the plugin cache. + * @param plugin The plugin to be stored. Should be the core object, not instantiated. + * @param mapping If this plugin is to be injected into the Input Plugin, this is the property key used. + * @param settingsKey The key in the Scene Settings to check to see if this plugin should install or not. + * @param configKey The key in the Game Config to check to see if this plugin should install or not. + */ + function register(key: string, plugin: Function, mapping: string, settingsKey: string, configKey: string): void; + + /** + * Returns the input plugin object from the cache based on the given key. + * @param key The key of the input plugin to get. + */ + function getCore(key: string): InputPluginContainer; + + /** + * Installs all of the registered Input Plugins into the given target. + * @param target The target InputPlugin to install the plugins into. + */ + function install(target: Phaser.Input.InputPlugin): void; + + /** + * Removes an input plugin based on the given key. + * @param key The key of the input plugin to remove. + */ + function remove(key: string): void; + +} + +declare type Pad = { + /** + * The ID of the Gamepad. + */ + id: string; + /** + * The index of the Gamepad. + */ + index: integer; +}; + +declare type CursorKeys = { + /** + * A Key object mapping to the UP arrow key. + */ + up?: Phaser.Input.Keyboard.Key; + /** + * A Key object mapping to the DOWN arrow key. + */ + down?: Phaser.Input.Keyboard.Key; + /** + * A Key object mapping to the LEFT arrow key. + */ + left?: Phaser.Input.Keyboard.Key; + /** + * A Key object mapping to the RIGHT arrow key. + */ + right?: Phaser.Input.Keyboard.Key; + /** + * A Key object mapping to the SPACE BAR key. + */ + space?: Phaser.Input.Keyboard.Key; + /** + * A Key object mapping to the SHIFT key. + */ + shift?: Phaser.Input.Keyboard.Key; +}; + +declare type KeyboardKeydownCallback = (event: KeyboardEvent) => void; + +declare type KeyComboConfig = { + /** + * If they press the wrong key do we reset the combo? + */ + resetOnWrongKey?: boolean; + /** + * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled. + */ + maxKeyDelay?: number; + /** + * If previously matched and they press the first key of the combo again, will it reset? + */ + resetOnMatch?: boolean; + /** + * If the combo matches, will it delete itself? + */ + deleteOnMatch?: boolean; +}; + +declare type FileConfig = { + /** + * The file type string (image, json, etc) for sorting within the Loader. + */ + type: string; + /** + * Unique cache key (unique within its file type) + */ + key: string; + /** + * The URL of the file, not including baseURL. + */ + url?: string; + /** + * The path of the file, not including the baseURL. + */ + path?: string; + /** + * The default extension this file uses. + */ + extension?: string; + /** + * The responseType to be used by the XHR request. + */ + responseType?: XMLHttpRequestResponseType; + /** + * Custom XHR Settings specific to this file and merged with the Loader defaults. + */ + xhrSettings?: XHRSettingsObject | false; + /** + * A config object that can be used by file types to store transitional data. + */ + config?: any; +}; + +declare namespace Phaser.Loader.FileTypesManager { + /** + * Static method called when a LoaderPlugin is created. + * + * Loops through the local types object and injects all of them as + * properties into the LoaderPlugin instance. + * @param loader The LoaderPlugin to install the types into. + */ + function register(loader: Phaser.Loader.LoaderPlugin): void; + + /** + * Removed all associated file types. + */ + function destroy(): void; + +} + +declare type XHRSettingsObject = { + /** + * The response type of the XHR request, i.e. `blob`, `text`, etc. + */ + responseType: XMLHttpRequestResponseType; + /** + * Should the XHR request use async or not? + */ + async?: boolean; + /** + * Optional username for the XHR request. + */ + user?: string; + /** + * Optional password for the XHR request. + */ + password?: string; + /** + * Optional XHR timeout value. + */ + timeout?: integer; + /** + * This value is used to populate the XHR `setRequestHeader` and is undefined by default. + */ + header?: string | undefined; + /** + * This value is used to populate the XHR `setRequestHeader` and is undefined by default. + */ + headerValue?: string | undefined; + /** + * This value is used to populate the XHR `setRequestHeader` and is undefined by default. + */ + requestedWith?: string | undefined; + /** + * Provide a custom mime-type to use instead of the default. + */ + overrideMimeType?: string | undefined; +}; + +declare namespace Phaser.Loader.AudioSpriteFile { + /** + * Called by each File when it finishes loading. + * @param file The File that has completed processing. + */ + function onFileComplete(file: Phaser.Loader.File): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + function addToCache(): void; + +} + +declare type SinCosTable = { + /** + * The sine value. + */ + sin: number; + /** + * The cosine value. + */ + cos: number; + /** + * The length. + */ + length: number; +}; + +declare type Vector2Like = { + /** + * The x component. + */ + x: number; + /** + * The y component. + */ + y: number; +}; + +declare namespace Phaser { + namespace Actions { + /** + * Takes an array of Game Objects, or any objects that have a public `angle` property, + * and then adds the given value to each of their `angle` properties. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `Angle(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to be added to the `angle` property. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function Angle(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of objects and passes each of them to the given callback. + * @param items The array of items to be updated by this action. + * @param callback The callback to be invoked. It will be passed just one argument: the item from the array. + * @param context The scope in which the callback will be invoked. + */ + function Call(items: G, callback: CallCallback, context: any): G; + + /** + * Takes an array of objects and returns the first element in the array that has properties which match + * all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }` + * then it would return the first item which had the property `scaleX` set to 0.5 and `alpha` set to 1. + * + * To use this with a Group: `GetFirst(group.getChildren(), compare, index)` + * @param items The array of items to be searched by this action. + * @param compare The comparison object. Each property in this object will be checked against the items of the array. + * @param index An optional offset to start searching from within the items array. Default 0. + */ + function GetFirst(items: G, compare: object, index?: integer): object | Phaser.GameObjects.GameObject; + + /** + * Takes an array of objects and returns the last element in the array that has properties which match + * all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }` + * then it would return the last item which had the property `scaleX` set to 0.5 and `alpha` set to 1. + * + * To use this with a Group: `GetLast(group.getChildren(), compare, index)` + * @param items The array of items to be searched by this action. + * @param compare The comparison object. Each property in this object will be checked against the items of the array. + * @param index An optional offset to start searching from within the items array. Default 0. + */ + function GetLast(items: G, compare: object, index?: integer): object | Phaser.GameObjects.GameObject; + + /** + * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, + * and then aligns them based on the grid configuration given to this action. + * @param items The array of items to be updated by this action. + * @param options The GridAlign Configuration object. + */ + function GridAlign(items: G, options: GridAlignConfig): G; + + /** + * Takes an array of Game Objects, or any objects that have a public `alpha` property, + * and then adds the given value to each of their `alpha` properties. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `IncAlpha(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to be added to the `alpha` property. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function IncAlpha(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have a public `x` property, + * and then adds the given value to each of their `x` properties. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `IncX(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to be added to the `x` property. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function IncX(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, + * and then adds the given value to each of them. + * + * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `IncXY(group.getChildren(), x, y, stepX, stepY)` + * @param items The array of items to be updated by this action. + * @param x The amount to be added to the `x` property. + * @param y The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value. Default x. + * @param stepX This is added to the `x` amount, multiplied by the iteration counter. Default 0. + * @param stepY This is added to the `y` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function IncXY(items: G, x: number, y?: number, stepX?: number, stepY?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have a public `y` property, + * and then adds the given value to each of their `y` properties. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `IncY(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to be added to the `y` property. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function IncY(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param circle [description] + * @param startAngle [description] Default 0. + * @param endAngle [description] Default 6.28. + */ + function PlaceOnCircle(items: G, circle: Phaser.Geom.Circle, startAngle?: number, endAngle?: number): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param ellipse [description] + * @param startAngle [description] Default 0. + * @param endAngle [description] Default 6.28. + */ + function PlaceOnEllipse(items: G, ellipse: Phaser.Geom.Ellipse, startAngle?: number, endAngle?: number): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param line [description] + */ + function PlaceOnLine(items: G, line: Phaser.Geom.Line): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param rect [description] + * @param shift [description] Default 1. + */ + function PlaceOnRectangle(items: G, rect: Phaser.Geom.Rectangle, shift?: integer): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param triangle [description] + * @param stepRate [description] Default 1. + */ + function PlaceOnTriangle(items: G, triangle: Phaser.Geom.Triangle, stepRate?: number): G; + + /** + * Play an animation with the given key, starting at the given startFrame on all Game Objects in items. + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param key The name of the animation to play. + * @param startFrame The starting frame of the animation with the given key. + */ + function PlayAnimation(items: G, key: string, startFrame?: string | integer): G; + + /** + * Takes an array of Game Objects, or any objects that have a public property as defined in `key`, + * and then adds the given value to it. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `PropertyValueInc(group.getChildren(), key, value, step)` + * @param items The array of items to be updated by this action. + * @param key The property to be updated. + * @param value The amount to be added to the property. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function PropertyValueInc(items: G, key: string, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have a public property as defined in `key`, + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `PropertyValueSet(group.getChildren(), key, value, step)` + * @param items The array of items to be updated by this action. + * @param key The property to be updated. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function PropertyValueSet(items: G, key: string, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param circle [description] + */ + function RandomCircle(items: G, circle: Phaser.Geom.Circle): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param ellipse [description] + */ + function RandomEllipse(items: G, ellipse: Phaser.Geom.Ellipse): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param line [description] + */ + function RandomLine(items: G, line: Phaser.Geom.Line): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param rect [description] + */ + function RandomRectangle(items: G, rect: Phaser.Geom.Rectangle): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param triangle [description] + */ + function RandomTriangle(items: G, triangle: Phaser.Geom.Triangle): G; + + /** + * Takes an array of Game Objects, or any objects that have a public `rotation` property, + * and then adds the given value to each of their `rotation` properties. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `Rotate(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to be added to the `rotation` property (in radians). + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function Rotate(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Rotates each item around the given point by the given angle. + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param point Any object with public `x` and `y` properties. + * @param angle The angle to rotate by, in radians. + */ + function RotateAround(items: G, point: object, angle: number): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param point Any object with public `x` and `y` properties. + * @param angle The angle to rotate by, in radians. + * @param distance The distance from the point of rotation in pixels. + */ + function RotateAroundDistance(items: G, point: object, angle: number, distance: number): G; + + /** + * Takes an array of Game Objects, or any objects that have a public `scaleX` property, + * and then adds the given value to each of their `scaleX` properties. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `ScaleX(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to be added to the `scaleX` property. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function ScaleX(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties, + * and then adds the given value to each of them. + * + * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `ScaleXY(group.getChildren(), scaleX, scaleY, stepX, stepY)` + * @param items The array of items to be updated by this action. + * @param scaleX The amount to be added to the `scaleX` property. + * @param scaleY The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value. + * @param stepX This is added to the `scaleX` amount, multiplied by the iteration counter. Default 0. + * @param stepY This is added to the `y` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function ScaleXY(items: G, scaleX: number, scaleY?: number, stepX?: number, stepY?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have a public `scaleY` property, + * and then adds the given value to each of their `scaleY` properties. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `ScaleY(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to be added to the `scaleY` property. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function ScaleY(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `alpha` + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetAlpha(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetAlpha(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `blendMode` + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetBlendMode(group.getChildren(), value)` + * @param items The array of items to be updated by this action. + * @param value The amount to set the property to. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetBlendMode(items: G, value: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `depth` + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetDepth(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetDepth(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param hitArea [description] + * @param hitAreaCallback [description] + */ + function SetHitArea(items: G, hitArea: any, hitAreaCallback: HitAreaCallback): G; + + /** + * Takes an array of Game Objects, or any objects that have the public properties `originX` and `originY` + * and then sets them to the given values. + * + * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetOrigin(group.getChildren(), originX, originY, stepX, stepY)` + * @param items The array of items to be updated by this action. + * @param originX The amount to set the `originX` property to. + * @param originY The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value. + * @param stepX This is added to the `originX` amount, multiplied by the iteration counter. Default 0. + * @param stepY This is added to the `originY` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetOrigin(items: G, originX: number, originY?: number, stepX?: number, stepY?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `rotation` + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetRotation(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetRotation(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public properties `scaleX` and `scaleY` + * and then sets them to the given values. + * + * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetScale(group.getChildren(), scaleX, scaleY, stepX, stepY)` + * @param items The array of items to be updated by this action. + * @param scaleX The amount to set the `scaleX` property to. + * @param scaleY The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value. + * @param stepX This is added to the `scaleX` amount, multiplied by the iteration counter. Default 0. + * @param stepY This is added to the `scaleY` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetScale(items: G, scaleX: number, scaleY?: number, stepX?: number, stepY?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `scaleX` + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetScaleX(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetScaleX(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `scaleY` + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetScaleY(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetScaleY(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param topLeft [description] + * @param topRight [description] + * @param bottomLeft [description] + * @param bottomRight [description] + */ + function SetTint(items: G, topLeft: number, topRight?: number, bottomLeft?: number, bottomRight?: number): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `visible` + * and then sets it to the given value. + * + * To use this with a Group: `SetVisible(group.getChildren(), value)` + * @param items The array of items to be updated by this action. + * @param value The value to set the property to. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetVisible(items: G, value: boolean, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `x` + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetX(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetX(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public properties `x` and `y` + * and then sets them to the given values. + * + * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetXY(group.getChildren(), x, y, stepX, stepY)` + * @param items The array of items to be updated by this action. + * @param x The amount to set the `x` property to. + * @param y The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value. Default x. + * @param stepX This is added to the `x` amount, multiplied by the iteration counter. Default 0. + * @param stepY This is added to the `y` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetXY(items: G, x: number, y?: number, stepX?: number, stepY?: number, index?: integer, direction?: integer): G; + + /** + * Takes an array of Game Objects, or any objects that have the public property `y` + * and then sets it to the given value. + * + * The optional `step` property is applied incrementally, multiplied by each item in the array. + * + * To use this with a Group: `SetY(group.getChildren(), value, step)` + * @param items The array of items to be updated by this action. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0. + * @param index An optional offset to start searching from within the items array. Default 0. + * @param direction The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. Default 1. + */ + function SetY(items: G, value: number, step?: number, index?: integer, direction?: integer): G; + + /** + * Iterate through items changing the position of each element to + * be that of the element that came before it in the array (or after it if direction = 1) + * The first items position is set to x/y. + * The final x/y coords are returned + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param x [description] + * @param y [description] + * @param direction [description] Default 0. + * @param output [description] + */ + function ShiftPosition(items: G, x: number, y: number, direction?: integer, output?: O): O; + + /** + * Shuffles the array in place. The shuffled array is both modified and returned. + * @param items An array of Game Objects. The contents of this array are updated by this Action. + */ + function Shuffle(items: G): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param property [description] + * @param min [description] + * @param max [description] + * @param inc [description] + */ + function SmoothStep(items: G, property: string, min: number, max: number, inc: number): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param property [description] + * @param min [description] + * @param max [description] + * @param inc [description] + */ + function SmootherStep(items: G, property: string, min: number, max: number, inc: number): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param property [description] + * @param min [description] + * @param max [description] + * @param inc [description] Default false. + */ + function Spread(items: G, property: string, min: number, max: number, inc?: number): G; + + /** + * [description] + * @param items An array of Game Objects. The contents of this array are updated by this Action. + */ + function ToggleVisible(items: G): G; + + /** + * Wrap each item's coordinates within a rectangle's area. + * @param items An array of Game Objects. The contents of this array are updated by this Action. + * @param rect The rectangle. + * @param padding An amount added to each side of the rectangle during the operation. Default 0. + */ + function WrapInRectangle(items: G, rect: Phaser.Geom.Rectangle, padding?: number): G; + + } + + namespace Animations { + /** + * A Frame based Animation. + * + * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * + * The Animation Manager creates these. Game Objects don't own an instance of these directly. + * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) + * So multiple Game Objects can have playheads all pointing to this one Animation instance. + */ + class Animation { + /** + * + * @param manager [description] + * @param key [description] + * @param config [description] + */ + constructor(manager: Phaser.Animations.AnimationManager, key: string, config: AnimationConfig); + + /** + * A reference to the global Animation Manager + */ + manager: Phaser.Animations.AnimationManager; + + /** + * The unique identifying string for this animation + */ + key: string; + + /** + * A frame based animation (as opposed to a bone based animation) + */ + type: string; + + /** + * Extract all the frame data into the frames array + */ + frames: Phaser.Animations.AnimationFrame[]; + + /** + * The frame rate of playback in frames per second (default 24 if duration is null) + */ + frameRate: integer; + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + */ + duration: integer; + + /** + * How many ms per frame, not including frame specific modifiers. + */ + msPerFrame: integer; + + /** + * Skip frames if the time lags, or always advanced anyway? + */ + skipMissedFrames: boolean; + + /** + * The delay in ms before the playback will begin. + */ + delay: integer; + + /** + * Number of times to repeat the animation. Set to -1 to repeat forever. + */ + repeat: integer; + + /** + * The delay in ms before the a repeat playthrough starts. + */ + repeatDelay: integer; + + /** + * Should the animation yoyo? (reverse back down to the start) before repeating? + */ + yoyo: boolean; + + /** + * Should sprite.visible = true when the animation starts to play? + */ + showOnStart: boolean; + + /** + * Should sprite.visible = false when the animation finishes? + */ + hideOnComplete: boolean; + + /** + * Global pause. All Game Objects using this Animation instance are impacted by this property. + */ + paused: boolean; + + /** + * Add frames to the end of the animation. + * @param config [description] + */ + addFrame(config: string | AnimationFrameConfig[]): Phaser.Animations.Animation; + + /** + * Add frame/s into the animation. + * @param index [description] + * @param config [description] + */ + addFrameAt(index: integer, config: string | AnimationFrameConfig[]): Phaser.Animations.Animation; + + /** + * Check if the given frame index is valid. + * @param index The index to be checked. + */ + checkFrame(index: integer): boolean; + + /** + * [description] + * @param component [description] + */ + protected completeAnimation(component: Phaser.GameObjects.Components.Animation): void; + + /** + * [description] + * @param component [description] + * @param includeDelay [description] Default true. + */ + protected getFirstTick(component: Phaser.GameObjects.Components.Animation, includeDelay?: boolean): void; + + /** + * Returns the AnimationFrame at the provided index + * @param index The index in the AnimationFrame array + */ + protected getFrameAt(index: integer): Phaser.Animations.AnimationFrame; + + /** + * [description] + * @param textureManager [description] + * @param frames [description] + * @param defaultTextureKey [description] + */ + getFrames(textureManager: Phaser.Textures.TextureManager, frames: string | AnimationFrameConfig[], defaultTextureKey?: string): Phaser.Animations.AnimationFrame[]; + + /** + * [description] + * @param component [description] + */ + getNextTick(component: Phaser.GameObjects.Components.Animation): void; + + /** + * Returns the frame closest to the given progress value between 0 and 1. + * @param value A value between 0 and 1. + */ + getFrameByProgress(value: number): Phaser.Animations.AnimationFrame; + + /** + * Advance the animation frame. + * @param component The Animation Component to advance. + */ + nextFrame(component: Phaser.GameObjects.Components.Animation): void; + + /** + * [description] + * @param component [description] + */ + previousFrame(component: Phaser.GameObjects.Components.Animation): void; + + /** + * [description] + * @param frame [description] + */ + removeFrame(frame: Phaser.Animations.AnimationFrame): Phaser.Animations.Animation; + + /** + * Removes a frame from the AnimationFrame array at the provided index + * and updates the animation accordingly. + * @param index The index in the AnimationFrame array + */ + removeFrameAt(index: integer): Phaser.Animations.Animation; + + /** + * [description] + * @param component [description] + */ + repeatAnimation(component: Phaser.GameObjects.Components.Animation): void; + + /** + * [description] + * @param component [description] + */ + setFrame(component: Phaser.GameObjects.Components.Animation): void; + + /** + * [description] + */ + toJSON(): JSONAnimation; + + /** + * [description] + */ + updateFrameSequence(): Phaser.Animations.Animation; + + /** + * [description] + */ + pause(): Phaser.Animations.Animation; + + /** + * [description] + */ + resume(): Phaser.Animations.Animation; + + /** + * [description] + */ + destroy(): void; + + } + + /** + * A single frame in an Animation sequence. + * + * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other + * frames in the animation, and index data. It also has the ability to fire its own `onUpdate` callback + * and modify the animation timing. + * + * AnimationFrames are generated automatically by the Animation class. + */ + class AnimationFrame { + /** + * + * @param textureKey The key of the Texture this AnimationFrame uses. + * @param textureFrame The key of the Frame within the Texture that this AnimationFrame uses. + * @param index The index of this AnimationFrame within the Animation sequence. + * @param frame A reference to the Texture Frame this AnimationFrame uses for rendering. + */ + constructor(textureKey: string, textureFrame: string | integer, index: integer, frame: Phaser.Textures.Frame); + + /** + * The key of the Texture this AnimationFrame uses. + */ + textureKey: string; + + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + */ + textureFrame: string | integer; + + /** + * The index of this AnimationFrame within the Animation sequence. + */ + index: integer; + + /** + * A reference to the Texture Frame this AnimationFrame uses for rendering. + */ + frame: Phaser.Textures.Frame; + + /** + * Is this the first frame in an animation sequence? + */ + readonly isFirst: boolean; + + /** + * Is this the last frame in an animation sequence? + */ + readonly isLast: boolean; + + /** + * A reference to the AnimationFrame that comes before this one in the animation, if any. + */ + readonly prevFrame: Phaser.Animations.AnimationFrame; + + /** + * A reference to the AnimationFrame that comes after this one in the animation, if any. + */ + readonly nextFrame: Phaser.Animations.AnimationFrame; + + /** + * Additional time (in ms) that this frame should appear for during playback. + * The value is added onto the msPerFrame set by the animation. + */ + duration: number; + + /** + * What % through the animation does this frame come? + * This value is generated when the animation is created and cached here. + */ + readonly progress: number; + + /** + * Generates a JavaScript object suitable for converting to JSON. + */ + toJSON(): JSONAnimationFrame; + + /** + * Destroys this object by removing references to external resources and callbacks. + */ + destroy(): void; + + } + + /** + * The Animation Manager. + * + * Animations are managed by the global Animation Manager. This is a singleton class that is + * responsible for creating and delivering animations and their corresponding data to all Game Objects. + * Unlike plugins it is owned by the Game instance, not the Scene. + * + * Sprites and other Game Objects get the data they need from the AnimationManager. + */ + class AnimationManager extends Phaser.Events.EventEmitter { + /** + * + * @param game [description] + */ + constructor(game: Phaser.Game); + + /** + * [description] + */ + protected game: Phaser.Game; + + /** + * [description] + */ + protected textureManager: Phaser.Textures.TextureManager; + + /** + * [description] + */ + globalTimeScale: number; + + /** + * [description] + */ + protected anims: Phaser.Structs.Map; + + /** + * [description] + */ + paused: boolean; + + /** + * [description] + */ + name: string; + + /** + * [description] + */ + boot(): void; + + /** + * [description] + * @param key [description] + * @param animation [description] + */ + add(key: string, animation: Phaser.Animations.Animation): Phaser.Animations.AnimationManager; + + /** + * [description] + * @param config [description] + */ + create(config: AnimationConfig): Phaser.Animations.Animation; + + /** + * [description] + * @param data [description] + * @param clearCurrentAnimations [description] Default false. + */ + fromJSON(data: string | JSONAnimationManager | JSONAnimation, clearCurrentAnimations?: boolean): Phaser.Animations.Animation[]; + + /** + * [description] + * @param key [description] + * @param config [description] + */ + generateFrameNames(key: string, config?: GenerateFrameNamesConfig): AnimationFrameConfig[]; + + /** + * [description] + * @param key [description] + * @param config [description] + */ + generateFrameNumbers(key: string, config: GenerateFrameNumbersConfig): AnimationFrameConfig[]; + + /** + * [description] + * @param key [description] + */ + get(key: string): Phaser.Animations.Animation; + + /** + * Load an Animation into a Game Objects Animation Component. + * @param child [description] + * @param key [description] + * @param startFrame [description] + */ + load(child: Phaser.GameObjects.GameObject, key: string, startFrame?: string | integer): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + pauseAll(): Phaser.Animations.AnimationManager; + + /** + * [description] + * @param key [description] + * @param child [description] + */ + play(key: string, child: Phaser.GameObjects.GameObject): Phaser.Animations.AnimationManager; + + /** + * [description] + * @param key [description] + */ + remove(key: string): Phaser.Animations.Animation; + + /** + * [description] + */ + resumeAll(): Phaser.Animations.AnimationManager; + + /** + * Takes an array of Game Objects that have the Animation Component and then + * starts the given animation playing on them, each one offset by the + * `stagger` amount given to this method. + * @param key The key of the animation to play on the Game Objects. + * @param children An array of Game Objects to play the animation on. They must have the Animation Component. + * @param stagger The amount of time, in milliseconds, to offset each play time by. Default 0. + */ + staggerPlay(key: string, children: Phaser.GameObjects.GameObject[], stagger?: number): G; + + /** + * [description] + * @param key [description] + */ + toJSON(key: string): JSONAnimationManager; + + /** + * [description] + */ + destroy(): void; + + } + + } + + /** + * The Phaser.Game instance is the main controller for the entire Phaser game. It is responsible + * for handling the boot process, parsing the configuration values, creating the renderer, + * and setting-up all of the global Phaser systems, such as sound and input. + * Once that is complete it will start the Scene Manager and then begin the main game loop. + * + * You should generally avoid accessing any of the systems created by Game, and instead use those + * made available to you via the Phaser.Scene Systems class instead. + */ + class Game { + /** + * + * @param GameConfig The configuration object for your Phaser Game instance. + */ + constructor(GameConfig?: GameConfig); + + /** + * The parsed Game Configuration object. + * + * The values stored within this object are read-only and should not be changed at run-time. + */ + readonly config: Phaser.Boot.Config; + + /** + * A reference to either the Canvas or WebGL Renderer that this Game is using. + */ + renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * A reference to the HTML Canvas Element that Phaser uses to render the game. + * This is created automatically by Phaser unless you provide a `canvas` property + * in your Game Config. + */ + canvas: HTMLCanvasElement; + + /** + * A reference to the Rendering Context belonging to the Canvas Element this game is rendering to. + * If the game is running under Canvas it will be a 2d Canvas Rendering Context. + * If the game is running under WebGL it will be a WebGL Rendering Context. + * This context is created automatically by Phaser unless you provide a `context` property + * in your Game Config. + */ + context: CanvasRenderingContext2D | WebGLRenderingContext; + + /** + * A flag indicating when this Game instance has finished its boot process. + */ + readonly isBooted: boolean; + + /** + * A flag indicating if this Game is currently running its game step or not. + */ + readonly isRunning: boolean; + + /** + * An Event Emitter which is used to broadcast game-level events from the global systems. + */ + events: Phaser.Events.EventEmitter; + + /** + * An instance of the Animation Manager. + * + * The Animation Manager is a global system responsible for managing all animations used within your game. + */ + anims: Phaser.Animations.AnimationManager; + + /** + * An instance of the Texture Manager. + * + * The Texture Manager is a global system responsible for managing all textures being used by your game. + */ + textures: Phaser.Textures.TextureManager; + + /** + * An instance of the Cache Manager. + * + * The Cache Manager is a global system responsible for caching, accessing and releasing external game assets. + */ + cache: Phaser.Cache.CacheManager; + + /** + * An instance of the Data Manager + */ + registry: Phaser.Data.DataManager; + + /** + * An instance of the Input Manager. + * + * The Input Manager is a global system responsible for the capture of browser-level input events. + */ + input: Phaser.Input.InputManager; + + /** + * An instance of the Scene Manager. + * + * The Scene Manager is a global system responsible for creating, modifying and updating the Scenes in your game. + */ + scene: Phaser.Scenes.SceneManager; + + /** + * A reference to the Device inspector. + * + * Contains information about the device running this game, such as OS, browser vendor and feature support. + * Used by various systems to determine capabilities and code paths. + */ + device: Phaser.DeviceConf; + + /** + * An instance of the base Sound Manager. + * + * The Sound Manager is a global system responsible for the playback and updating of all audio in your game. + */ + sound: Phaser.Sound.BaseSoundManager; + + /** + * An instance of the Time Step. + * + * The Time Step is a global system responsible for setting-up and responding to the browser frame events, processing + * them and calculating delta values. It then automatically calls the game step. + */ + loop: Phaser.Boot.TimeStep; + + /** + * An instance of the Plugin Manager. + * + * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install + * those plugins into Scenes as required. + */ + plugins: Phaser.Plugins.PluginManager; + + /** + * Does the window the game is running in currently have focus or not? + * This is modified by the VisibilityHandler. + */ + readonly hasFocus: boolean; + + /** + * Is the mouse pointer currently over the game canvas or not? + * This is modified by the VisibilityHandler. + */ + readonly isOver: boolean; + + /** + * This method is called automatically when the DOM is ready. It is responsible for creating the renderer, + * displaying the Debug Header, adding the game canvas to the DOM and emitting the 'boot' event. + * It listens for a 'ready' event from the base systems and once received it will call `Game.start`. + */ + protected boot(): void; + + /** + * Called automatically by Game.boot once all of the global systems have finished setting themselves up. + * By this point the Game is now ready to start the main loop running. + * It will also enable the Visibility Handler. + */ + protected start(): void; + + /** + * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of + * Request Animation Frame, or Set Timeout on very old browsers.) + * + * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager. + * + * It will then render each Scene in turn, via the Renderer. This process emits `prerender` and `postrender` events. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + step(time: integer, delta: number): void; + + /** + * A special version of the Game Step for the HEADLESS renderer only. + * + * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of + * Request Animation Frame, or Set Timeout on very old browsers.) + * + * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager. + * + * This process emits `prerender` and `postrender` events, even though nothing actually displays. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time elapsed since the last frame. + */ + headlessStep(time: integer, delta: number): void; + + /** + * Called automatically by the Visibility Handler. + * This will pause the main loop and then emit a pause event. + */ + protected onHidden(): void; + + /** + * Called automatically by the Visibility Handler. + * This will resume the main loop and then emit a resume event. + */ + protected onVisible(): void; + + /** + * Called automatically by the Visibility Handler. + * This will set the main loop into a 'blurred' state, which pauses it. + */ + protected onBlur(): void; + + /** + * Called automatically by the Visibility Handler. + * This will set the main loop into a 'focused' state, which resumes it. + */ + protected onFocus(): void; + + /** + * Updates the Game Config with the new width and height values given. + * Then resizes the Renderer and Input Manager scale. + * @param width The new width of the game. + * @param height The new height of the game. + */ + resize(width: number, height: number): void; + + /** + * Flags this Game instance as needing to be destroyed on the next frame. + * It will wait until the current frame has completed and then call `runDestroy` internally. + * @param removeCanvas Set to `true` if you would like the parent canvas element removed from the DOM, or `false` to leave it in place. + */ + destroy(removeCanvas: boolean): void; + + } + + namespace Boot { + /** + * [description] + */ + class Config { + /** + * + * @param GameConfig The configuration object for your Phaser Game instance. + */ + constructor(GameConfig?: GameConfig); + + /** + * [description] + */ + readonly width: integer | string; + + /** + * [description] + */ + readonly height: integer | string; + + /** + * [description] + */ + readonly zoom: number; + + /** + * [description] + */ + readonly resolution: number; + + /** + * [description] + */ + readonly renderType: number; + + /** + * [description] + */ + readonly parent: any; + + /** + * Force Phaser to use your own Canvas element instead of creating one. + */ + readonly canvas: HTMLCanvasElement; + + /** + * Force Phaser to use your own Canvas context instead of creating one. + */ + readonly context: CanvasRenderingContext2D | WebGLRenderingContext; + + /** + * [description] + */ + readonly canvasStyle: string; + + /** + * [description] + */ + readonly sceneConfig: object; + + /** + * [description] + */ + readonly seed: string[]; + + /** + * [description] + */ + readonly gameTitle: string; + + /** + * [description] + */ + readonly gameURL: string; + + /** + * [description] + */ + readonly gameVersion: string; + + /** + * [description] + */ + readonly autoFocus: boolean; + + /** + * [description] + */ + readonly inputKeyboard: boolean; + + /** + * [description] + */ + readonly inputKeyboardEventTarget: any; + + /** + * [description] + */ + readonly inputMouse: boolean | object; + + /** + * [description] + */ + readonly inputMouseEventTarget: any; + + /** + * [description] + */ + readonly inputMouseCapture: boolean; + + /** + * [description] + */ + readonly inputTouch: boolean; + + /** + * [description] + */ + readonly inputTouchEventTarget: any; + + /** + * [description] + */ + readonly inputTouchCapture: boolean; + + /** + * [description] + */ + readonly inputActivePointers: integer; + + /** + * [description] + */ + readonly inputGamepad: boolean; + + /** + * [description] + */ + readonly inputGamepadEventTarget: any; + + /** + * [description] + */ + readonly disableContextMenu: boolean; + + /** + * [description] + */ + readonly audio: any; + + /** + * [description] + */ + readonly hideBanner: boolean; + + /** + * [description] + */ + readonly hidePhaser: boolean; + + /** + * [description] + */ + readonly bannerTextColor: string; + + /** + * [description] + */ + readonly bannerBackgroundColor: string[]; + + /** + * [description] + */ + readonly fps: FPSConfig; + + /** + * [description] + */ + readonly autoResize: boolean; + + /** + * [description] + */ + readonly antialias: boolean; + + /** + * [description] + */ + readonly roundPixels: boolean; + + /** + * [description] + */ + readonly pixelArt: boolean; + + /** + * [description] + */ + readonly transparent: boolean; + + /** + * [description] + */ + readonly clearBeforeRender: boolean; + + /** + * [description] + */ + readonly premultipliedAlpha: boolean; + + /** + * [description] + */ + readonly preserveDrawingBuffer: boolean; + + /** + * [description] + */ + readonly failIfMajorPerformanceCaveat: boolean; + + /** + * [description] + */ + readonly powerPreference: string; + + /** + * The default WebGL Batch size. + */ + readonly batchSize: integer; + + /** + * [description] + */ + readonly backgroundColor: Phaser.Display.Color; + + /** + * [description] + */ + readonly preBoot: BootCallback; + + /** + * [description] + */ + readonly postBoot: BootCallback; + + /** + * [description] + */ + readonly physics: object; + + /** + * [description] + */ + readonly defaultPhysicsSystem: boolean; + + /** + * [description] + */ + readonly loaderBaseURL: string; + + /** + * [description] + */ + readonly loaderPath: string; + + /** + * [description] + */ + readonly loaderMaxParallelDownloads: integer; + + /** + * [description] + */ + readonly loaderCrossOrigin: string | undefined; + + /** + * [description] + */ + readonly loaderResponseType: string; + + /** + * [description] + */ + readonly loaderAsync: boolean; + + /** + * [description] + */ + readonly loaderUser: string; + + /** + * [description] + */ + readonly loaderPassword: string; + + /** + * [description] + */ + readonly loaderTimeout: integer; + + /** + * [description] + */ + readonly installGlobalPlugins: any; + + /** + * [description] + */ + readonly installScenePlugins: any; + + /** + * The plugins installed into every Scene (in addition to CoreScene and Global). + */ + readonly defaultPlugins: any; + + /** + * [description] + */ + readonly defaultImage: string; + + /** + * [description] + */ + readonly missingImage: string; + + } + + /** + * Called automatically by Phaser.Game and responsible for creating the renderer it will use. + * + * Relies upon two webpack global flags to be defined: `WEBGL_RENDERER` and `CANVAS_RENDERER` during build time, but not at run-time. + * @param game The Phaser.Game instance on which the renderer will be set. + */ + function CreateRenderer(game: Phaser.Game): void; + + /** + * Called automatically by Phaser.Game and responsible for creating the console.log debug header. + * + * You can customize or disable the header via the Game Config object. + * @param game The Phaser.Game instance which will output this debug header. + */ + function DebugHeader(game: Phaser.Game): void; + + /** + * [description] + */ + class TimeStep { + /** + * + * @param game A reference to the Phaser.Game instance that owns this Time Step. + */ + constructor(game: Phaser.Game, config: FPSConfig); + + /** + * A reference to the Phaser.Game instance. + */ + readonly game: Phaser.Game; + + /** + * [description] + */ + readonly raf: Phaser.DOM.RequestAnimationFrame; + + /** + * A flag that is set once the TimeStep has started running and toggled when it stops. + */ + readonly started: boolean; + + /** + * A flag that is set once the TimeStep has started running and toggled when it stops. + * The difference between this value and `started` is that `running` is toggled when + * the TimeStep is sent to sleep, where-as `started` remains `true`, only changing if + * the TimeStep is actually stopped, not just paused. + */ + readonly running: boolean; + + /** + * The minimum fps rate you want the Time Step to run at. + */ + minFps: integer; + + /** + * The target fps rate for the Time Step to run at. + * + * Setting this value will not actually change the speed at which the browser runs, that is beyond + * the control of Phaser. Instead, it allows you to determine performance issues and if the Time Step + * is spiraling out of control. + */ + targetFps: integer; + + /** + * An exponential moving average of the frames per second. + */ + readonly actualFps: integer; + + /** + * [description] + */ + readonly nextFpsUpdate: integer; + + /** + * The number of frames processed this second. + */ + readonly framesThisSecond: integer; + + /** + * A callback to be invoked each time the Time Step steps. + */ + callback: TimeStepCallback; + + /** + * You can force the Time Step to use Set Timeout instead of Request Animation Frame by setting + * the `forceSetTimeOut` property to `true` in the Game Configuration object. It cannot be changed at run-time. + */ + readonly forceSetTimeOut: boolean; + + /** + * [description] + */ + time: integer; + + /** + * [description] + */ + startTime: integer; + + /** + * [description] + */ + lastTime: integer; + + /** + * [description] + */ + readonly frame: integer; + + /** + * [description] + */ + readonly inFocus: boolean; + + /** + * [description] + */ + delta: integer; + + /** + * [description] + */ + deltaIndex: integer; + + /** + * [description] + */ + deltaHistory: integer[]; + + /** + * [description] + */ + deltaSmoothingMax: integer; + + /** + * [description] + */ + panicMax: integer; + + /** + * The actual elapsed time in ms between one update and the next. + * Unlike with `delta` no smoothing, capping, or averaging is applied to this value. + * So please be careful when using this value in calculations. + */ + rawDelta: number; + + /** + * Called when the DOM window.onBlur event triggers. + */ + blur(): void; + + /** + * Called when the DOM window.onFocus event triggers. + */ + focus(): void; + + /** + * Called when the visibility API says the game is 'hidden' (tab switch out of view, etc) + */ + pause(): void; + + /** + * Called when the visibility API says the game is 'visible' again (tab switch back into view, etc) + */ + resume(): void; + + /** + * [description] + */ + resetDelta(): void; + + /** + * Starts the Time Step running, if it is not already doing so. + * Called automatically by the Game Boot process. + * @param callback The callback to be invoked each time the Time Step steps. + */ + start(callback: TimeStepCallback): void; + + /** + * The main step method. This is called each time the browser updates, either by Request Animation Frame, + * or by Set Timeout. It is responsible for calculating the delta values, frame totals, cool down history and more. + * You generally should never call this method directly. + * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + */ + step(time: number): void; + + /** + * Manually calls TimeStep.step, passing in the performance.now value to it. + */ + tick(): void; + + /** + * Sends the TimeStep to sleep, stopping Request Animation Frame (or SetTimeout) and toggling the `running` flag to false. + */ + sleep(): void; + + /** + * Wakes-up the TimeStep, restarting Request Animation Frame (or SetTimeout) and toggling the `running` flag to true. + * The `seamless` argument controls if the wake-up should adjust the start time or not. + * @param seamless Adjust the startTime based on the lastTime values. Default false. + */ + wake(seamless?: boolean): void; + + /** + * Stops the TimeStep running. + */ + stop(): Phaser.Boot.TimeStep; + + /** + * Destroys the TimeStep. This will stop Request Animation Frame, stop the step, clear the callbacks and null + * any objects. + */ + destroy(): void; + + } + + /** + * The Visibility Handler is responsible for listening out for document level visibility change events. + * This includes `visibilitychange` if the browser supports it, and blur and focus events. It then uses + * the provided Event Emitter and fires the related events. + * @param game The Game instance this Visibility Handler is working on. + */ + function VisibilityHandler(game: Phaser.Game): void; + + } + + namespace Cache { + /** + * The BaseCache is a base Cache class that can be used for storing references to any kind of data. + * + * Data can be added, retrieved and removed based on the given keys. + * + * Keys are string-based. + */ + class BaseCache { + /** + * The Map in which the cache objects are stored. + * + * You can query the Map directly or use the BaseCache methods. + */ + entries: Phaser.Structs.Map; + + /** + * An instance of EventEmitter used by the cache to emit related events. + */ + events: Phaser.Events.EventEmitter; + + /** + * Adds an item to this cache. The item is referenced by a unique string, which you are responsible + * for setting and keeping track of. The item can only be retrieved by using this string. + * @param key The unique key by which the data added to the cache will be referenced. + * @param data The data to be stored in the cache. + */ + add(key: string, data: any): Phaser.Cache.BaseCache; + + /** + * Checks if this cache contains an item matching the given key. + * This performs the same action as `BaseCache.exists`. + * @param key The unique key of the item to be checked in this cache. + */ + has(key: string): boolean; + + /** + * Checks if this cache contains an item matching the given key. + * This performs the same action as `BaseCache.has` and is called directly by the Loader. + * @param key The unique key of the item to be checked in this cache. + */ + exists(key: string): boolean; + + /** + * Gets an item from this cache based on the given key. + * @param key The unique key of the item to be retrieved from this cache. + */ + get(key: string): any; + + /** + * Removes and item from this cache based on the given key. + * + * If an entry matching the key is found it is removed from the cache and a `remove` event emitted. + * No additional checks are done on the item removed. If other systems or parts of your game code + * are relying on this item, it is up to you to sever those relationships prior to removing the item. + * @param key The unique key of the item to remove from the cache. + */ + remove(key: string): Phaser.Cache.BaseCache; + + /** + * Destroys this cache and all items within it. + */ + destroy(): void; + + } + + /** + * The Cache Manager is the global cache owned and maintained by the Game instance. + * + * Various systems, such as the file Loader, rely on this cache in order to store the files + * it has loaded. The manager itself doesn't store any files, but instead owns multiple BaseCache + * instances, one per type of file. You can also add your own custom caches. + */ + class CacheManager { + /** + * + * @param game A reference to the Phaser.Game instance that owns this CacheManager. + */ + constructor(game: Phaser.Game); + + /** + * A reference to the Phaser.Game instance that owns this CacheManager. + */ + protected game: Phaser.Game; + + /** + * A Cache storing all binary files, typically added via the Loader. + */ + binary: Phaser.Cache.BaseCache; + + /** + * A Cache storing all bitmap font data files, typically added via the Loader. + * Only the font data is stored in this cache, the textures are part of the Texture Manager. + */ + bitmapFont: Phaser.Cache.BaseCache; + + /** + * A Cache storing all JSON data files, typically added via the Loader. + */ + json: Phaser.Cache.BaseCache; + + /** + * A Cache storing all physics data files, typically added via the Loader. + */ + physics: Phaser.Cache.BaseCache; + + /** + * A Cache storing all shader source files, typically added via the Loader. + */ + shader: Phaser.Cache.BaseCache; + + /** + * A Cache storing all non-streaming audio files, typically added via the Loader. + */ + audio: Phaser.Cache.BaseCache; + + /** + * A Cache storing all text files, typically added via the Loader. + */ + text: Phaser.Cache.BaseCache; + + /** + * A Cache storing all WaveFront OBJ files, typically added via the Loader. + */ + obj: Phaser.Cache.BaseCache; + + /** + * A Cache storing all tilemap data files, typically added via the Loader. + * Only the data is stored in this cache, the textures are part of the Texture Manager. + */ + tilemap: Phaser.Cache.BaseCache; + + /** + * A Cache storing all xml data files, typically added via the Loader. + */ + xml: Phaser.Cache.BaseCache; + + /** + * An object that contains your own custom BaseCache entries. + * Add to this via the `addCustom` method. + */ + custom: { [key: string]: Phaser.Cache.BaseCache }; + + /** + * Add your own custom Cache for storing your own files. + * The cache will be available under `Cache.custom.key`. + * The cache will only be created if the key is not already in use. + * @param key The unique key of your custom cache. + */ + addCustom(key: string): Phaser.Cache.BaseCache; + + /** + * Removes all entries from all BaseCaches and destroys all custom caches. + */ + destroy(): void; + + } + + } + + namespace Cameras { + namespace Scene2D { + /** + * A Camera. + * + * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, + * and can be positioned, rotated, zoomed and scrolled accordingly. + * + * A Camera consists of two elements: The viewport and the scroll values. + * + * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are + * created the same size as your game, but their position and size can be set to anything. This means if you + * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, + * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). + * + * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this + * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the + * viewport, and changing the viewport has no impact on the scrolling. + * + * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, + * allowing you to filter Game Objects out on a per-Camera basis. + * + * A Camera also has built-in special effects including Fade, Flash and Camera Shake. + */ + class Camera extends Phaser.Events.EventEmitter { + /** + * + * @param x The x position of the Camera, relative to the top-left of the game canvas. + * @param y The y position of the Camera, relative to the top-left of the game canvas. + * @param width The width of the Camera, in pixels. + * @param height The height of the Camera, in pixels. + */ + constructor(x: number, y: number, width: number, height: number); + + /** + * A reference to the Scene this camera belongs to. + */ + scene: Phaser.Scene; + + /** + * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion. + * This value is a bitmask. + */ + readonly id: integer; + + /** + * The name of the Camera. This is left empty for your own use. + */ + name: string; + + /** + * The x position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollX` value. + */ + x: number; + + /** + * The y position of the Camera, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollY` value. + */ + y: number; + + /** + * Should this camera round its pixel values to integers? + */ + roundPixels: boolean; + + /** + * Is this Camera visible or not? + * + * A visible camera will render and perform input tests. + * An invisible camera will not render anything and will skip input tests. + */ + visible: boolean; + + /** + * Is this Camera using a bounds to restrict scrolling movement? + * + * Set this property along with the bounds via `Camera.setBounds`. + */ + useBounds: boolean; + + /** + * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at. + * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step. + * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly. + * You can use it for culling or intersection checks. + */ + readonly worldView: Phaser.Geom.Rectangle; + + /** + * Is this Camera dirty? + * + * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame. + * + * This flag is cleared during the `postRenderCamera` method of the renderer. + */ + dirty: boolean; + + /** + * Does this Camera allow the Game Objects it renders to receive input events? + */ + inputEnabled: boolean; + + /** + * Does this Camera have a transparent background? + */ + transparent: boolean; + + /** + * The background color of this Camera. Only used if `transparent` is `false`. + */ + backgroundColor: Phaser.Display.Color; + + /** + * The Camera alpha value. Setting this property impacts every single object that this Camera + * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out, + * or via the chainable `setAlpha` method instead. + */ + alpha: number; + + /** + * The Camera Fade effect handler. + * To fade this camera see the `Camera.fade` methods. + */ + fadeEffect: Phaser.Cameras.Scene2D.Effects.Fade; + + /** + * The Camera Flash effect handler. + * To flash this camera see the `Camera.flash` method. + */ + flashEffect: Phaser.Cameras.Scene2D.Effects.Flash; + + /** + * The Camera Shake effect handler. + * To shake this camera see the `Camera.shake` method. + */ + shakeEffect: Phaser.Cameras.Scene2D.Effects.Shake; + + /** + * The Camera Pan effect handler. + * To pan this camera see the `Camera.pan` method. + */ + panEffect: Phaser.Cameras.Scene2D.Effects.Pan; + + /** + * The Camera Zoom effect handler. + * To zoom this camera see the `Camera.zoom` method. + */ + zoomEffect: Phaser.Cameras.Scene2D.Effects.Zoom; + + /** + * Should the camera cull Game Objects before checking them for input hit tests? + * In some special cases it may be beneficial to disable this. + */ + disableCull: boolean; + + /** + * The linear interpolation value to use when following a target. + * + * Can also be set via `setLerp` or as part of the `startFollow` call. + * + * The default values of 1 means the camera will instantly snap to the target coordinates. + * A lower value, such as 0.1 means the camera will more slowly track the target, giving + * a smooth transition. You can set the horizontal and vertical values independently, and also + * adjust this value in real-time during your game. + * + * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. + */ + lerp: Phaser.Math.Vector2; + + /** + * The values stored in this property are subtracted from the Camera targets position, allowing you to + * offset the camera from the actual target x/y coordinates by this amount. + * Can also be set via `setFollowOffset` or as part of the `startFollow` call. + */ + followOffset: Phaser.Math.Vector2; + + /** + * The mid-point of the Camera in 'world' coordinates. + * + * Use it to obtain exactly where in the world the center of the camera is currently looking. + * + * This value is updated in the preRender method, after the scroll values and follower + * have been processed. + */ + readonly midPoint: Phaser.Math.Vector2; + + /** + * The horizontal origin of rotation for this Camera. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * See `setOrigin` to set both origins in a single, chainable call. + */ + originX: number; + + /** + * The vertical origin of rotation for this Camera. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * See `setOrigin` to set both origins in a single, chainable call. + */ + originY: number; + + /** + * The Camera dead zone. + * + * The deadzone is only used when the camera is following a target. + * + * It defines a rectangular region within which if the target is present, the camera will not scroll. + * If the target moves outside of this area, the camera will begin scrolling in order to follow it. + * + * The `lerp` values that you can set for a follower target also apply when using a deadzone. + * + * You can directly set this property to be an instance of a Rectangle. Or, you can use the + * `setDeadzone` method for a chainable approach. + * + * The rectangle you provide can have its dimensions adjusted dynamically, however, please + * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point. + * + * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property + * to `null`. + */ + deadzone: Phaser.Geom.Rectangle; + + /** + * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The Camera alpha value. Default 1. + */ + setAlpha(value?: number): this; + + /** + * Sets the rotation origin of this Camera. + * + * The values are given in the range 0 to 1 and are only used when calculating Camera rotation. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the Camera dead zone. + * + * The deadzone is only used when the camera is following a target. + * + * It defines a rectangular region within which if the target is present, the camera will not scroll. + * If the target moves outside of this area, the camera will begin scrolling in order to follow it. + * + * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point + * of the camera. This allows you to use the object for additional game related checks, such as + * testing if an object is within it or not via a Rectangle.contains call. + * + * The `lerp` values that you can set for a follower target also apply when using a deadzone. + * + * Calling this method with no arguments will reset an active deadzone. + * @param width The width of the deadzone rectangle in pixels. If not specified the deadzone is removed. + * @param height The height of the deadzone rectangle in pixels. + */ + setDeadzone(width?: number, height?: number): Phaser.Cameras.Scene2D.Camera; + + /** + * Calculates what the Camera.scrollX and scrollY values would need to be in order to move + * the Camera so it is centered on the given x and y coordinates, without actually moving + * the Camera there. The results are clamped based on the Camera bounds, if set. + * @param x The horizontal coordinate to center on. + * @param y The vertical coordinate to center on. + * @param out A Vec2 to store the values in. If not given a new Vec2 is created. + */ + getScroll(x: number, y: number, out?: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * Moves the Camera so that it is centered on the given coordinates, bounds allowing. + * @param x The horizontal coordinate to center on. + * @param y The vertical coordinate to center on. + */ + centerOn(x: number, y: number): Phaser.Cameras.Scene2D.Camera; + + /** + * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled. + */ + centerToBounds(): Phaser.Cameras.Scene2D.Camera; + + /** + * Moves the Camera so that it is re-centered based on its viewport size. + */ + centerToSize(): Phaser.Cameras.Scene2D.Camera; + + /** + * Takes an array of Game Objects and returns a new array featuring only those objects + * visible by this camera. + * @param renderableObjects An array of Game Objects to cull. + */ + cull(renderableObjects: G): G; + + /** + * Fades the Camera in from the given color over the duration specified. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0. + * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0. + * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + fadeIn(duration?: integer, red?: integer, green?: integer, blue?: integer, callback?: Function, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * Fades the Camera out to the given color over the duration specified. + * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0. + * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0. + * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + fadeOut(duration?: integer, red?: integer, green?: integer, blue?: integer, callback?: Function, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * Fades the Camera from the given color to transparent over the duration specified. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0. + * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0. + * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0. + * @param force Force the effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + fadeFrom(duration?: integer, red?: integer, green?: integer, blue?: integer, force?: boolean, callback?: Function, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * Fades the Camera from transparent to the given color over the duration specified. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0. + * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0. + * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0. + * @param force Force the effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + fade(duration?: integer, red?: integer, green?: integer, blue?: integer, force?: boolean, callback?: Function, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified. + * @param duration The duration of the effect in milliseconds. Default 250. + * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 255. + * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 255. + * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 255. + * @param force Force the effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + flash(duration?: integer, red?: integer, green?: integer, blue?: integer, force?: boolean, callback?: Function, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * Shakes the Camera by the given intensity over the duration specified. + * @param duration The duration of the effect in milliseconds. Default 100. + * @param intensity The intensity of the shake. Default 0.05. + * @param force Force the shake effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + shake(duration?: integer, intensity?: number, force?: boolean, callback?: Function, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, + * over the duration and with the ease specified. + * @param x The destination x coordinate to scroll the center of the Camera viewport to. + * @param y The destination y coordinate to scroll the center of the Camera viewport to. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param ease The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'. + * @param force Force the shake effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera scroll x coordinate and the current camera scroll y coordinate. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + pan(x: number, y: number, duration?: integer, ease?: string | Function, force?: boolean, callback?: CameraPanCallback, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * This effect will zoom the Camera to the given scale, over the duration and with the ease specified. + * @param zoom The target Camera zoom value. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param ease The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'. + * @param force Force the shake effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera scroll x coordinate and the current camera scroll y coordinate. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + zoomTo(zoom: number, duration?: integer, ease?: string | Function, force?: boolean, callback?: CameraPanCallback, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform. + * You can optionally provide a Vector2, or similar object, to store the results in. + * @param x The x position to convert to world space. + * @param y The y position to convert to world space. + * @param output An optional object to store the results in. If not provided a new Vector2 will be created. + */ + getWorldPoint(x: number, y: number, output?: O): O; + + /** + * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings + * so that they are ignored by this Camera. This means they will not be rendered by this Camera. + * @param gameObject The Game Object, or array of Game Objects, to be ignored by this Camera. + */ + ignore(gameObject: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.Cameras.Scene2D.Camera; + + /** + * Internal preRender step. + * @param baseScale The base scale, as set in the Camera Manager. + * @param resolution The game resolution. + */ + protected preRender(baseScale: number, resolution: number): void; + + /** + * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required. + * Do not call this method if you are not using camera bounds. + * @param x The value to horizontally scroll clamp. + */ + clampX(x: number): number; + + /** + * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required. + * Do not call this method if you are not using camera bounds. + * @param y The value to vertically scroll clamp. + */ + clampY(y: number): number; + + /** + * If this Camera has previously had movement bounds set on it, this will remove them. + */ + removeBounds(): Phaser.Cameras.Scene2D.Camera; + + /** + * Set the rotation of this Camera. This causes everything it renders to appear rotated. + * + * Rotating a camera does not rotate the viewport itself, it is applied during rendering. + * @param value The cameras angle of rotation, given in degrees. Default 0. + */ + setAngle(value?: number): Phaser.Cameras.Scene2D.Camera; + + /** + * Sets the linear interpolation value to use when following a target. + * + * The default values of 1 means the camera will instantly snap to the target coordinates. + * A lower value, such as 0.1 means the camera will more slowly track the target, giving + * a smooth transition. You can set the horizontal and vertical values independently, and also + * adjust this value in real-time during your game. + * + * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. + * @param x The amount added to the horizontal linear interpolation of the follow target. Default 1. + * @param y The amount added to the vertical linear interpolation of the follow target. Default 1. + */ + setLerp(x?: number, y?: number): this; + + /** + * Sets the horizontal and vertical offset of the camera from its follow target. + * The values are subtracted from the targets position during the Cameras update step. + * @param x The horizontal offset from the camera follow target.x position. Default 0. + * @param y The vertical offset from the camera follow target.y position. Default 0. + */ + setFollowOffset(x?: number, y?: number): this; + + /** + * Sets the background color for this Camera. + * + * By default a Camera has a transparent background but it can be given a solid color, with any level + * of transparency, via this method. + * + * The color value can be specified using CSS color notation, hex or numbers. + * @param color The color value. In CSS, hex or numeric color notation. Default 'rgba(0,0,0,0)'. + */ + setBackgroundColor(color?: string | number | InputColorObject): Phaser.Cameras.Scene2D.Camera; + + /** + * Set the bounds of the Camera. The bounds are an axis-aligned rectangle. + * + * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the + * edges and into blank space. It does not limit the placement of Game Objects, or where + * the Camera viewport can be positioned. + * + * Temporarily disable the bounds by changing the boolean `Camera.useBounds`. + * + * Clear the bounds entirely by calling `Camera.removeBounds`. + * + * If you set bounds that are smaller than the viewport it will stop the Camera from being + * able to scroll. The bounds can be positioned where-ever you wish. By default they are from + * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of + * the Camera bounds. However, you can position them anywhere. So if you wanted a game world + * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y + * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find + * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle. + * @param x The top-left x coordinate of the bounds. + * @param y The top-left y coordinate of the bounds. + * @param width The width of the bounds, in pixels. + * @param height The height of the bounds, in pixels. + * @param centerOn If `true` the Camera will automatically be centered on the new bounds. + */ + setBounds(x: integer, y: integer, width: integer, height: integer, centerOn?: boolean): Phaser.Cameras.Scene2D.Camera; + + /** + * Sets the name of this Camera. + * This value is for your own use and isn't used internally. + * @param value The name of the Camera. Default ''. + */ + setName(value?: string): Phaser.Cameras.Scene2D.Camera; + + /** + * Set the position of the Camera viewport within the game. + * + * This does not change where the camera is 'looking'. See `setScroll` to control that. + * @param x The top-left x coordinate of the Camera viewport. + * @param y The top-left y coordinate of the Camera viewport. Default x. + */ + setPosition(x: number, y?: number): Phaser.Cameras.Scene2D.Camera; + + /** + * Set the rotation of this Camera. This causes everything it renders to appear rotated. + * + * Rotating a camera does not rotate the viewport itself, it is applied during rendering. + * @param value The rotation of the Camera, in radians. Default 0. + */ + setRotation(value?: number): Phaser.Cameras.Scene2D.Camera; + + /** + * Should the Camera round pixel values to whole integers when rendering Game Objects? + * + * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing. + * @param value `true` to round Camera pixels, `false` to not. + */ + setRoundPixels(value: boolean): Phaser.Cameras.Scene2D.Camera; + + /** + * Sets the Scene the Camera is bound to. + * @param scene The Scene the camera is bound to. + */ + setScene(scene: Phaser.Scene): Phaser.Cameras.Scene2D.Camera; + + /** + * Set the position of where the Camera is looking within the game. + * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly. + * Use this method, or the scroll properties, to move your camera around the game world. + * + * This does not change where the camera viewport is placed. See `setPosition` to control that. + * @param x The x coordinate of the Camera in the game world. + * @param y The y coordinate of the Camera in the game world. Default x. + */ + setScroll(x: number, y?: number): Phaser.Cameras.Scene2D.Camera; + + /** + * Set the size of the Camera viewport. + * + * By default a Camera is the same size as the game, but can be made smaller via this method, + * allowing you to create mini-cam style effects by creating and positioning a smaller Camera + * viewport within your game. + * @param width The width of the Camera viewport. + * @param height The height of the Camera viewport. Default width. + */ + setSize(width: integer, height?: integer): Phaser.Cameras.Scene2D.Camera; + + /** + * This method sets the position and size of the Camera viewport in a single call. + * + * If you're trying to change where the Camera is looking at in your game, then see + * the method `Camera.setScroll` instead. This method is for changing the viewport + * itself, not what the camera can see. + * + * By default a Camera is the same size as the game, but can be made smaller via this method, + * allowing you to create mini-cam style effects by creating and positioning a smaller Camera + * viewport within your game. + * @param x The top-left x coordinate of the Camera viewport. + * @param y The top-left y coordinate of the Camera viewport. + * @param width The width of the Camera viewport. + * @param height The height of the Camera viewport. Default width. + */ + setViewport(x: number, y: number, width: integer, height?: integer): Phaser.Cameras.Scene2D.Camera; + + /** + * Set the zoom value of the Camera. + * + * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'. + * Changing to a larger value, such as 2, will cause the camera to 'zoom in'. + * + * A value of 1 means 'no zoom' and is the default. + * + * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering. + * @param value The zoom value of the Camera. The minimum it can be is 0.001. Default 1. + */ + setZoom(value?: number): Phaser.Cameras.Scene2D.Camera; + + /** + * Sets the visibility of this Camera. + * + * An invisible Camera will skip rendering and input tests of everything it can see. + * @param value The visible state of the Camera. + */ + setVisible(value: boolean): this; + + /** + * Sets the Camera to follow a Game Object. + * + * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object + * in its center. + * + * You can set the linear interpolation value used in the follow code. + * Use low lerp values (such as 0.1) to automatically smooth the camera motion. + * + * If you find you're getting a slight "jitter" effect when following an object it's probably to do with sub-pixel + * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to + * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom + * value on the camera. So be sure to keep the camera zoom to integers. + * @param target The target for the Camera to follow. + * @param roundPixels Round the camera position to whole integers to avoid sub-pixel rendering? Default false. + * @param lerpX A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. Default 1. + * @param lerpY A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. Default 1. + * @param offsetX The horizontal offset from the camera follow target.x position. Default 0. + * @param offsetY The vertical offset from the camera follow target.y position. Default 0. + */ + startFollow(target: Phaser.GameObjects.GameObject | object, roundPixels?: boolean, lerpX?: number, lerpY?: number, offsetX?: number, offsetY?: number): this; + + /** + * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`. + */ + stopFollow(): Phaser.Cameras.Scene2D.Camera; + + /** + * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties. + */ + toJSON(): JSONCamera; + + /** + * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to + * remove the fade. + */ + resetFX(): Phaser.Cameras.Scene2D.Camera; + + /** + * Internal method called automatically by the Camera Manager. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + protected update(time: integer, delta: number): void; + + /** + * Destroys this Camera instance. You rarely need to call this directly. + * + * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as + * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. + */ + destroy(): void; + + /** + * The width of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + */ + width: number; + + /** + * The height of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + */ + height: number; + + /** + * The horizontal scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + */ + scrollX: number; + + /** + * The vertical scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + */ + scrollY: number; + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * + * A value of 0.5 would zoom the Camera out, so you can now see twice as much + * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel + * now takes up 2 pixels when rendered. + * + * Set to 1 to return to the default zoom level. + * + * Be careful to never set this value to zero. + */ + zoom: number; + + /** + * The x position of the center of the Camera's viewport, relative to the top-left of the game canvas. + */ + readonly centerX: number; + + /** + * The y position of the center of the Camera's viewport, relative to the top-left of the game canvas. + */ + readonly centerY: number; + + /** + * The displayed width of the camera viewport, factoring in the camera zoom level. + * + * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width + * would be 1600, as it's displaying twice as many pixels as zoom level 1. + * + * Equally, a camera with a width of 800 and zoom of 2 would have a display width + * of 400 pixels. + */ + readonly displayWidth: number; + + /** + * The displayed height of the camera viewport, factoring in the camera zoom level. + * + * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height + * would be 1200, as it's displaying twice as many pixels as zoom level 1. + * + * Equally, a camera with a height of 600 and zoom of 2 would have a display height + * of 300 pixels. + */ + readonly displayHeight: number; + + } + + /** + * The Camera Manager is a plugin that belongs to a Scene and is responsible for managing all of the Scene Cameras. + * + * By default you can access the Camera Manager from within a Scene using `this.cameras`, although this can be changed + * in your game config. + * + * Create new Cameras using the `add` method. Or extend the Camera class with your own addition code and then add + * the new Camera in using the `addExisting` method. + * + * Cameras provide a view into your game world, and can be positioned, rotated, zoomed and scrolled accordingly. + * + * A Camera consists of two elements: The viewport and the scroll values. + * + * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are + * created the same size as your game, but their position and size can be set to anything. This means if you + * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, + * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). + * + * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this + * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the + * viewport, and changing the viewport has no impact on the scrolling. + * + * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, + * allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique + * 'Game Object ignore capable' Cameras. Any Cameras beyond 31 that you create will all be given a Camera ID of + * zero, meaning that they cannot be used for Game Object exclusion. This means if you need your Camera to ignore + * Game Objects, make sure it's one of the first 31 created. + * + * A Camera also has built-in special effects including Fade, Flash, Camera Shake, Pan and Zoom. + */ + class CameraManager { + /** + * + * @param scene The Scene that owns the Camera Manager plugin. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene that owns the Camera Manager plugin. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems handler for the Scene that owns the Camera Manager. + */ + systems: Phaser.Scenes.Systems; + + /** + * All Cameras created by, or added to, this Camera Manager, will have their `roundPixels` + * property set to match this value. By default it is set to match the value set in the + * game configuration, but can be changed at any point. Equally, individual cameras can + * also be changed as needed. + */ + roundPixels: boolean; + + /** + * An Array of the Camera objects being managed by this Camera Manager. + * The Cameras are updated and rendered in the same order in which they appear in this array. + * Do not directly add or remove entries to this array. However, you can move the contents + * around the array should you wish to adjust the display order. + */ + cameras: Phaser.Cameras.Scene2D.Camera[]; + + /** + * A handy reference to the 'main' camera. By default this is the first Camera the + * Camera Manager creates. You can also set it directly, or use the `makeMain` argument + * in the `add` and `addExisting` methods. It allows you to access it from your game: + * + * ```javascript + * var cam = this.cameras.main; + * ``` + * + * Also see the properties `camera1`, `camera2` and so on. + */ + main: Phaser.Cameras.Scene2D.Camera; + + /** + * This scale affects all cameras. It's used by the Scale Manager. + */ + baseScale: number; + + /** + * Adds a new Camera into the Camera Manager. The Camera Manager can support up to 31 different Cameras. + * + * Each Camera has its own viewport, which controls the size of the Camera and its position within the canvas. + * + * Use the `Camera.scrollX` and `Camera.scrollY` properties to change where the Camera is looking, or the + * Camera methods such as `centerOn`. Cameras also have built in special effects, such as fade, flash, shake, + * pan and zoom. + * + * By default Cameras are transparent and will render anything that they can see based on their `scrollX` + * and `scrollY` values. Game Objects can be set to be ignored by a Camera by using the `Camera.ignore` method. + * + * The Camera will have its `roundPixels` propery set to whatever `CameraManager.roundPixels` is. You can change + * it after creation if required. + * + * See the Camera class documentation for more details. + * @param x The horizontal position of the Camera viewport. Default 0. + * @param y The vertical position of the Camera viewport. Default 0. + * @param width The width of the Camera viewport. If not given it'll be the game config size. + * @param height The height of the Camera viewport. If not given it'll be the game config size. + * @param makeMain Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it. Default false. + * @param name The name of the Camera. Default ''. + */ + add(x?: integer, y?: integer, width?: integer, height?: integer, makeMain?: boolean, name?: string): Phaser.Cameras.Scene2D.Camera; + + /** + * Adds an existing Camera into the Camera Manager. + * + * The Camera should either be a `Phaser.Cameras.Scene2D.Camera` instance, or a class that extends from it. + * + * The Camera will have its `roundPixels` propery set to whatever `CameraManager.roundPixels` is. You can change + * it after addition if required. + * + * The Camera will be assigned an ID, which is used for Game Object exclusion and then added to the + * manager. As long as it doesn't already exist in the manager it will be added then returned. + * + * If this method returns `null` then the Camera already exists in this Camera Manager. + * @param camera The Camera to be added to the Camera Manager. + * @param makeMain Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it. Default false. + */ + addExisting(camera: Phaser.Cameras.Scene2D.Camera, makeMain?: boolean): Phaser.Cameras.Scene2D.Camera; + + /** + * Gets the total number of Cameras in this Camera Manager. + * + * If the optional `isVisible` argument is set it will only count Cameras that are currently visible. + * @param isVisible Set the `true` to only include visible Cameras in the total. Default false. + */ + getTotal(isVisible?: boolean): integer; + + /** + * Populates this Camera Manager based on the given configuration object, or an array of config objects. + * + * See the `InputJSONCameraObject` documentation for details of the object structure. + * @param config A Camera configuration object, or an array of them, to be added to this Camera Manager. + */ + fromJSON(config: InputJSONCameraObject | InputJSONCameraObject[]): Phaser.Cameras.Scene2D.CameraManager; + + /** + * Gets a Camera based on its name. + * + * Camera names are optional and don't have to be set, so this method is only of any use if you + * have given your Cameras unique names. + * @param name The name of the Camera. + */ + getCamera(name: string): Phaser.Cameras.Scene2D.Camera; + + /** + * Returns an array of all cameras below the given Pointer. + * + * The first camera in the array is the top-most camera in the camera list. + * @param pointer The Pointer to check against. + */ + getCamerasBelowPointer(pointer: Phaser.Input.Pointer): Phaser.Cameras.Scene2D.Camera[]; + + /** + * Removes the given Camera, or an array of Cameras, from this Camera Manager. + * + * If found in the Camera Manager it will be immediately removed from the local cameras array. + * If also currently the 'main' camera, 'main' will be reset to be camera 0. + * + * The removed Camera is not destroyed. If you also wish to destroy the Camera, you should call + * `Camera.destroy` on it, so that it clears all references to the Camera Manager. + * @param camera The Camera, or an array of Cameras, to be removed from this Camera Manager. + */ + remove(camera: Phaser.Cameras.Scene2D.Camera | Phaser.Cameras.Scene2D.Camera[]): integer; + + /** + * The internal render method. This is called automatically by the Scene and should not be invoked directly. + * + * It will iterate through all local cameras and render them in turn, as long as they're visible and have + * an alpha level > 0. + * @param renderer The Renderer that will render the children to this camera. + * @param children An array of renderable Game Objects. + * @param interpolation Interpolation value. Reserved for future use. + */ + protected render(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer, children: Phaser.GameObjects.GameObject[], interpolation: number): void; + + /** + * Resets this Camera Manager. + * + * This will iterate through all current Cameras, destroying them all, then it will reset the + * cameras array, reset the ID counter and create 1 new single camera using the default values. + */ + resetAll(): Phaser.Cameras.Scene2D.Camera; + + /** + * The main update loop. Called automatically when the Scene steps. + * @param timestep The timestep value. + * @param delta The delta value since the last frame. + */ + protected update(timestep: number, delta: number): void; + + /** + * Resizes all cameras to the given dimensions. + * @param width The new width of the camera. + * @param height The new height of the camera. + */ + resize(width: number, height: number): void; + + } + + namespace Effects { + /** + * A Camera Fade effect. + * + * This effect will fade the camera viewport to the given color, over the duration specified. + * + * Only the camera viewport is faded. None of the objects it is displaying are impacted, i.e. their colors do + * not change. + * + * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback, + * which is invoked each frame for the duration of the effect, if required. + */ + class Fade { + /** + * + * @param camera The camera this effect is acting upon. + */ + constructor(camera: Phaser.Cameras.Scene2D.Camera); + + /** + * The Camera this effect belongs to. + */ + readonly camera: Phaser.Cameras.Scene2D.Camera; + + /** + * Is this effect actively running? + */ + readonly isRunning: boolean; + + /** + * Has this effect finished running? + * + * This is different from `isRunning` because it remains set to `true` when the effect is over, + * until the effect is either reset or started again. + */ + readonly isComplete: boolean; + + /** + * The direction of the fade. + * `true` = fade out (transparent to color), `false` = fade in (color to transparent) + */ + readonly direction: boolean; + + /** + * The duration of the effect, in milliseconds. + */ + readonly duration: integer; + + /** + * If this effect is running this holds the current percentage of the progress, a value between 0 and 1. + */ + progress: number; + + /** + * Fades the Camera to or from the given color over the duration specified. + * @param direction The direction of the fade. `true` = fade out (transparent to color), `false` = fade in (color to transparent) Default true. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0. + * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0. + * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0. + * @param force Force the effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + start(direction?: boolean, duration?: integer, red?: integer, green?: integer, blue?: integer, force?: boolean, callback?: CameraFadeCallback, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * The main update loop for this effect. Called automatically by the Camera. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + update(time: integer, delta: number): void; + + /** + * Called internally by the Canvas Renderer. + * @param ctx The Canvas context to render to. + */ + postRenderCanvas(ctx: CanvasRenderingContext2D): boolean; + + /** + * Called internally by the WebGL Renderer. + * @param pipeline The WebGL Pipeline to render to. + * @param getTintFunction A function that will return the gl safe tint colors. + */ + postRenderWebGL(pipeline: Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline, getTintFunction: Function): boolean; + + /** + * Called internally when the effect completes. + */ + effectComplete(): void; + + /** + * Resets this camera effect. + * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event. + */ + reset(): void; + + /** + * Destroys this effect, releasing it from the Camera. + */ + destroy(): void; + + } + + /** + * A Camera Flash effect. + * + * This effect will flash the camera viewport to the given color, over the duration specified. + * + * Only the camera viewport is flashed. None of the objects it is displaying are impacted, i.e. their colors do + * not change. + * + * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback, + * which is invoked each frame for the duration of the effect, if required. + */ + class Flash { + /** + * + * @param camera The camera this effect is acting upon. + */ + constructor(camera: Phaser.Cameras.Scene2D.Camera); + + /** + * The Camera this effect belongs to. + */ + readonly camera: Phaser.Cameras.Scene2D.Camera; + + /** + * Is this effect actively running? + */ + readonly isRunning: boolean; + + /** + * The duration of the effect, in milliseconds. + */ + readonly duration: integer; + + /** + * If this effect is running this holds the current percentage of the progress, a value between 0 and 1. + */ + progress: number; + + /** + * Flashes the Camera to or from the given color over the duration specified. + * @param duration The duration of the effect in milliseconds. Default 250. + * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 255. + * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 255. + * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 255. + * @param force Force the effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + start(duration?: integer, red?: integer, green?: integer, blue?: integer, force?: boolean, callback?: CameraFlashCallback, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * The main update loop for this effect. Called automatically by the Camera. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + update(time: integer, delta: number): void; + + /** + * Called internally by the Canvas Renderer. + * @param ctx The Canvas context to render to. + */ + postRenderCanvas(ctx: CanvasRenderingContext2D): boolean; + + /** + * Called internally by the WebGL Renderer. + * @param pipeline The WebGL Pipeline to render to. + * @param getTintFunction A function that will return the gl safe tint colors. + */ + postRenderWebGL(pipeline: Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline, getTintFunction: Function): boolean; + + /** + * Called internally when the effect completes. + */ + effectComplete(): void; + + /** + * Resets this camera effect. + * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event. + */ + reset(): void; + + /** + * Destroys this effect, releasing it from the Camera. + */ + destroy(): void; + + } + + /** + * A Camera Pan effect. + * + * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, + * over the duration and with the ease specified. + * + * Only the camera scroll is moved. None of the objects it is displaying are impacted, i.e. their positions do + * not change. + * + * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback, + * which is invoked each frame for the duration of the effect if required. + */ + class Pan { + /** + * + * @param camera The camera this effect is acting upon. + */ + constructor(camera: Phaser.Cameras.Scene2D.Camera); + + /** + * The Camera this effect belongs to. + */ + readonly camera: Phaser.Cameras.Scene2D.Camera; + + /** + * Is this effect actively running? + */ + readonly isRunning: boolean; + + /** + * The duration of the effect, in milliseconds. + */ + readonly duration: integer; + + /** + * The starting scroll coordinates to pan the camera from. + */ + source: Phaser.Math.Vector2; + + /** + * The constantly updated value based on zoom. + */ + current: Phaser.Math.Vector2; + + /** + * The destination scroll coordinates to pan the camera to. + */ + destination: Phaser.Math.Vector2; + + /** + * The ease function to use during the pan. + */ + ease: Function; + + /** + * If this effect is running this holds the current percentage of the progress, a value between 0 and 1. + */ + progress: number; + + /** + * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, + * over the duration and with the ease specified. + * @param x The destination x coordinate to scroll the center of the Camera viewport to. + * @param y The destination y coordinate to scroll the center of the Camera viewport to. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param ease The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'. + * @param force Force the shake effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera scroll x coordinate and the current camera scroll y coordinate. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + start(x: number, y: number, duration?: integer, ease?: string | Function, force?: boolean, callback?: CameraPanCallback, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * The main update loop for this effect. Called automatically by the Camera. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + update(time: integer, delta: number): void; + + /** + * Called internally when the effect completes. + */ + effectComplete(): void; + + /** + * Resets this camera effect. + * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event. + */ + reset(): void; + + /** + * Destroys this effect, releasing it from the Camera. + */ + destroy(): void; + + } + + /** + * A Camera Shake effect. + * + * This effect will shake the camera viewport by a random amount, bounded by the specified intensity, each frame. + * + * Only the camera viewport is moved. None of the objects it is displaying are impacted, i.e. their positions do + * not change. + * + * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback, + * which is invoked each frame for the duration of the effect if required. + */ + class Shake { + /** + * + * @param camera The camera this effect is acting upon. + */ + constructor(camera: Phaser.Cameras.Scene2D.Camera); + + /** + * The Camera this effect belongs to. + */ + readonly camera: Phaser.Cameras.Scene2D.Camera; + + /** + * Is this effect actively running? + */ + readonly isRunning: boolean; + + /** + * The duration of the effect, in milliseconds. + */ + readonly duration: integer; + + /** + * The intensity of the effect. Use small float values. The default when the effect starts is 0.05. + * This is a Vector2 object, allowing you to control the shake intensity independently across x and y. + * You can modify this value while the effect is active to create more varied shake effects. + */ + intensity: Phaser.Math.Vector2; + + /** + * If this effect is running this holds the current percentage of the progress, a value between 0 and 1. + */ + progress: number; + + /** + * Shakes the Camera by the given intensity over the duration specified. + * @param duration The duration of the effect in milliseconds. Default 100. + * @param intensity The intensity of the shake. Default 0.05. + * @param force Force the shake effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + start(duration?: integer, intensity?: number, force?: boolean, callback?: CameraShakeCallback, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * The pre-render step for this effect. Called automatically by the Camera. + */ + preRender(): void; + + /** + * The main update loop for this effect. Called automatically by the Camera. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + update(time: integer, delta: number): void; + + /** + * Called internally when the effect completes. + */ + effectComplete(): void; + + /** + * Resets this camera effect. + * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event. + */ + reset(): void; + + /** + * Destroys this effect, releasing it from the Camera. + */ + destroy(): void; + + } + + /** + * A Camera Zoom effect. + * + * This effect will zoom the Camera to the given scale, over the duration and with the ease specified. + * + * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback, + * which is invoked each frame for the duration of the effect if required. + */ + class Zoom { + /** + * + * @param camera The camera this effect is acting upon. + */ + constructor(camera: Phaser.Cameras.Scene2D.Camera); + + /** + * The Camera this effect belongs to. + */ + readonly camera: Phaser.Cameras.Scene2D.Camera; + + /** + * Is this effect actively running? + */ + readonly isRunning: boolean; + + /** + * The duration of the effect, in milliseconds. + */ + readonly duration: integer; + + /** + * The starting zoom value; + */ + source: number; + + /** + * The destination zoom value. + */ + destination: number; + + /** + * The ease function to use during the zoom. + */ + ease: Function; + + /** + * If this effect is running this holds the current percentage of the progress, a value between 0 and 1. + */ + progress: number; + + /** + * This effect will zoom the Camera to the given scale, over the duration and with the ease specified. + * @param zoom The target Camera zoom value. + * @param duration The duration of the effect in milliseconds. Default 1000. + * @param ease The ease to use for the Zoom. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'. + * @param force Force the shake effect to start immediately, even if already running. Default false. + * @param callback This callback will be invoked every frame for the duration of the effect. + * It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * and the current camera zoom value. + * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + */ + start(zoom: number, duration?: integer, ease?: string | Function, force?: boolean, callback?: CameraZoomCallback, context?: any): Phaser.Cameras.Scene2D.Camera; + + /** + * The main update loop for this effect. Called automatically by the Camera. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + update(time: integer, delta: number): void; + + /** + * Called internally when the effect completes. + */ + effectComplete(): void; + + /** + * Resets this camera effect. + * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event. + */ + reset(): void; + + /** + * Destroys this effect, releasing it from the Camera. + */ + destroy(): void; + + } + + } + + } + + namespace Controls { + /** + * [description] + */ + class FixedKeyControl { + /** + * + * @param config [description] + */ + constructor(config: FixedKeyControlConfig); + + /** + * The Camera that this Control will update. + */ + camera: Phaser.Cameras.Scene2D.Camera; + + /** + * The Key to be pressed that will move the Camera left. + */ + left: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will move the Camera right. + */ + right: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will move the Camera up. + */ + up: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will move the Camera down. + */ + down: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will zoom the Camera in. + */ + zoomIn: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will zoom the Camera out. + */ + zoomOut: Phaser.Input.Keyboard.Key; + + /** + * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed. + */ + zoomSpeed: number; + + /** + * The horizontal speed the camera will move. + */ + speedX: number; + + /** + * The vertical speed the camera will move. + */ + speedY: number; + + /** + * A flag controlling if the Controls will update the Camera or not. + */ + active: boolean; + + /** + * Starts the Key Control running, providing it has been linked to a camera. + */ + start(): Phaser.Cameras.Controls.FixedKeyControl; + + /** + * Stops this Key Control from running. Call `start` to start it again. + */ + stop(): Phaser.Cameras.Controls.FixedKeyControl; + + /** + * Binds this Key Control to a camera. + * @param camera The camera to bind this Key Control to. + */ + setCamera(camera: Phaser.Cameras.Scene2D.Camera): Phaser.Cameras.Controls.FixedKeyControl; + + /** + * [description] + * @param delta [description] + */ + update(delta: number): void; + + /** + * Destroys this Key Control. + */ + destroy(): void; + + } + + /** + * [description] + */ + class SmoothedKeyControl { + /** + * + * @param config [description] + */ + constructor(config: SmoothedKeyControlConfig); + + /** + * The Camera that this Control will update. + */ + camera: Phaser.Cameras.Scene2D.Camera; + + /** + * The Key to be pressed that will move the Camera left. + */ + left: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will move the Camera right. + */ + right: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will move the Camera up. + */ + up: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will move the Camera down. + */ + down: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will zoom the Camera in. + */ + zoomIn: Phaser.Input.Keyboard.Key; + + /** + * The Key to be pressed that will zoom the Camera out. + */ + zoomOut: Phaser.Input.Keyboard.Key; + + /** + * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed. + */ + zoomSpeed: number; + + /** + * The horizontal acceleration the camera will move. + */ + accelX: number; + + /** + * The vertical acceleration the camera will move. + */ + accelY: number; + + /** + * The horizontal drag applied to the camera when it is moving. + */ + dragX: number; + + /** + * The vertical drag applied to the camera when it is moving. + */ + dragY: number; + + /** + * The maximum horizontal speed the camera will move. + */ + maxSpeedX: number; + + /** + * The maximum vertical speed the camera will move. + */ + maxSpeedY: number; + + /** + * A flag controlling if the Controls will update the Camera or not. + */ + active: boolean; + + /** + * Starts the Key Control running, providing it has been linked to a camera. + */ + start(): Phaser.Cameras.Controls.SmoothedKeyControl; + + /** + * Stops this Key Control from running. Call `start` to start it again. + */ + stop(): Phaser.Cameras.Controls.SmoothedKeyControl; + + /** + * Binds this Key Control to a camera. + * @param camera The camera to bind this Key Control to. + */ + setCamera(camera: Phaser.Cameras.Scene2D.Camera): Phaser.Cameras.Controls.SmoothedKeyControl; + + /** + * [description] + * @param delta The delta time, in ms, elapsed since the last frame. + */ + update(delta: number): void; + + /** + * Destroys this Key Control. + */ + destroy(): void; + + } + + } + + namespace Sprite3D { + /** + * [description] + */ + class Camera { + /** + * + * @param scene [description] + */ + constructor(scene: Phaser.Scene); + + /** + * [description] + * @param x [description] + * @param y [description] + * @param z [description] + */ + setPosition(x: number, y: number, z: number): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param scene [description] + */ + setScene(scene: Phaser.Scene): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param value [description] + */ + setPixelScale(value: number): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param sprite3D [description] + */ + add(sprite3D: Phaser.GameObjects.Sprite3D): Phaser.GameObjects.Sprite3D; + + /** + * [description] + * @param child [description] + */ + remove(child: Phaser.GameObjects.GameObject): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + */ + clear(): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + */ + getChildren(): any[]; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param z [description] + * @param key [description] + * @param frame [description] + * @param visible [description] Default true. + */ + create(x: number, y: number, z: number, key: string, frame: string | number, visible?: boolean): Phaser.GameObjects.Sprite3D; + + /** + * [description] + * @param quantity [description] + * @param key [description] + * @param frame [description] + * @param visible [description] Default true. + */ + createMultiple(quantity: number, key: string, frame: string | number, visible?: boolean): Phaser.GameObjects.Sprite3D[]; + + /** + * [description] + * @param size [description] + * @param spacing [description] + * @param key [description] + * @param frame [description] + */ + createRect(size: number | Object, spacing: number | Object, key: string, frame?: string | number): Phaser.GameObjects.Sprite3D[]; + + /** + * [description] + * @param radius [description] Default 1. + * @param sprites [description] + */ + randomSphere(radius?: number, sprites?: Phaser.GameObjects.Sprite3D[]): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param scale [description] Default 1. + * @param sprites [description] + */ + randomCube(scale?: number, sprites?: Phaser.GameObjects.Sprite3D[]): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param vec3 [description] + * @param sprites [description] + */ + translateChildren(vec3: Phaser.Math.Vector3, sprites: Phaser.GameObjects.Sprite3D[]): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param mat4 [description] + * @param sprites [description] + */ + transformChildren(mat4: Phaser.Math.Matrix4, sprites: Phaser.GameObjects.Sprite3D[]): Phaser.Cameras.Sprite3D.Camera; + + /** + * Sets the width and height of the viewport. Does not update any matrices. + * @param width [description] + * @param height [description] + */ + setViewport(width: number, height: number): Phaser.Cameras.Sprite3D.Camera; + + /** + * Translates this camera by a specified Vector3 object + * or x, y, z parameters. Any undefined x y z values will + * default to zero, leaving that component unaffected. + * If you wish to set the camera position directly call setPosition instead. + * @param x [description] + * @param y [description] + * @param z [description] + */ + translate(x: number | object, y?: number, z?: number): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param z [description] + */ + lookAt(x: number | object, y?: number, z?: number): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param radians [description] + * @param axis [description] + */ + rotate(radians: number, axis: Phaser.Math.Vector3): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param point [description] + * @param radians [description] + * @param axis [description] + */ + rotateAround(point: Phaser.Math.Vector3, radians: number, axis: Phaser.Math.Vector3): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param vec [description] + * @param out [description] + */ + project(vec: Phaser.Math.Vector3, out: Phaser.Math.Vector4): Phaser.Math.Vector4; + + /** + * [description] + * @param vec [description] + * @param out [description] + */ + unproject(vec: Phaser.Math.Vector4, out: Phaser.Math.Vector3): Phaser.Math.Vector3; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + getPickRay(x: number, y?: number): RayDef; + + /** + * [description] + */ + updateChildren(): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + */ + update(): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + */ + updateBillboardMatrix(): void; + + /** + * This is a utility function for canvas 3D rendering, + * which determines the "point size" of a camera-facing + * sprite billboard given its 3D world position + * (origin at center of sprite) and its world width + * and height in x/y. + * + * We place into the output Vector2 the scaled width + * and height. If no `out` is specified, a new Vector2 + * will be created for convenience (this should be avoided + * in tight loops). + * @param vec The position of the 3D Sprite. + * @param size The x and y dimensions. + * @param out The result, scaled x and y dimensions. + */ + getPointSize(vec: Phaser.Math.Vector2, size: Phaser.Math.Vector2, out: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * [description] + */ + destroy(): void; + + /** + * [description] + * @param value [description] + */ + setX(value: number): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param value [description] + */ + setY(value: number): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + * @param value [description] + */ + setZ(value: number): Phaser.Cameras.Sprite3D.Camera; + + /** + * [description] + */ + x: number; + + /** + * [description] + */ + y: number; + + /** + * [description] + */ + z: number; + + } + + /** + * [description] + */ + var scene: Phaser.Scene; + + /** + * [description] + */ + var displayList: Phaser.GameObjects.DisplayList; + + /** + * [description] + */ + var updateList: Phaser.GameObjects.UpdateList; + + /** + * [description] + */ + var name: string; + + /** + * [description] + */ + var direction: Phaser.Math.Vector3; + + /** + * [description] + */ + var up: Phaser.Math.Vector3; + + /** + * [description] + */ + var position: Phaser.Math.Vector3; + + /** + * [description] + */ + var pixelScale: number; + + /** + * [description] + */ + var projection: Phaser.Math.Matrix4; + + /** + * [description] + */ + var view: Phaser.Math.Matrix4; + + /** + * [description] + */ + var combined: Phaser.Math.Matrix4; + + /** + * [description] + */ + var invProjectionView: Phaser.Math.Matrix4; + + /** + * [description] + */ + var near: number; + + /** + * [description] + */ + var far: number; + + /** + * [description] + */ + var ray: RayDef; + + /** + * [description] + */ + var viewportWidth: number; + + /** + * [description] + */ + var viewportHeight: number; + + /** + * [description] + */ + var billboardMatrixDirty: boolean; + + /** + * [description] + */ + var children: Phaser.Structs.Set; + + /** + * [description] + */ + class CameraManager { + /** + * + * @param scene [description] + */ + constructor(scene: Phaser.Scene); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + systems: Phaser.Scenes.Systems; + + /** + * An Array of the Camera objects being managed by this Camera Manager. + */ + cameras: Phaser.Cameras.Sprite3D.Camera[]; + + /** + * [description] + * @param fieldOfView [description] Default 80. + * @param width [description] + * @param height [description] + */ + add(fieldOfView?: number, width?: number, height?: number): Phaser.Cameras.Sprite3D.PerspectiveCamera; + + /** + * [description] + * @param width [description] + * @param height [description] + */ + addOrthographicCamera(width: number, height: number): Phaser.Cameras.Sprite3D.OrthographicCamera; + + /** + * [description] + * @param fieldOfView [description] Default 80. + * @param width [description] + * @param height [description] + */ + addPerspectiveCamera(fieldOfView?: number, width?: number, height?: number): Phaser.Cameras.Sprite3D.PerspectiveCamera; + + /** + * [description] + * @param name [description] + */ + getCamera(name: string): Phaser.Cameras.Sprite3D.OrthographicCamera | Phaser.Cameras.Sprite3D.PerspectiveCamera; + + /** + * [description] + * @param camera [description] + */ + removeCamera(camera: Phaser.Cameras.Sprite3D.OrthographicCamera | Phaser.Cameras.Sprite3D.PerspectiveCamera): void; + + /** + * [description] + */ + removeAll(): Phaser.Cameras.Sprite3D.OrthographicCamera | Phaser.Cameras.Sprite3D.PerspectiveCamera; + + /** + * [description] + * @param timestep [description] + * @param delta [description] + */ + update(timestep: number, delta: number): void; + + } + + /** + * [description] + */ + class OrthographicCamera extends Phaser.Cameras.Sprite3D.Camera { + /** + * + * @param scene [description] + * @param viewportWidth [description] Default 0. + * @param viewportHeight [description] Default 0. + */ + constructor(scene: Phaser.Scene, viewportWidth?: integer, viewportHeight?: integer); + + /** + * [description] + */ + viewportWidth: integer; + + /** + * [description] + */ + viewportHeight: integer; + + /** + * [description] + */ + near: number; + + /** + * [description] + * @param yDown [description] + * @param viewportWidth [description] + * @param viewportHeight [description] + */ + setToOrtho(yDown: number, viewportWidth?: number, viewportHeight?: number): Phaser.Cameras.Sprite3D.OrthographicCamera; + + /** + * [description] + */ + update(): Phaser.Cameras.Sprite3D.OrthographicCamera; + + /** + * [description] + */ + zoom: number; + + } + + /** + * [description] + */ + class PerspectiveCamera extends Phaser.Cameras.Sprite3D.Camera { + /** + * + * @param scene [description] + * @param fieldOfView [description] Default 80. + * @param viewportWidth [description] Default 0. + * @param viewportHeight [description] Default 0. + */ + constructor(scene: Phaser.Scene, fieldOfView?: integer, viewportWidth?: integer, viewportHeight?: integer); + + /** + * [description] + */ + viewportWidth: integer; + + /** + * [description] + */ + viewportHeight: integer; + + /** + * [description] + */ + fieldOfView: integer; + + /** + * [description] + * @param value [description] + */ + setFOV(value: number): Phaser.Cameras.Sprite3D.PerspectiveCamera; + + /** + * [description] + */ + update(): Phaser.Cameras.Sprite3D.PerspectiveCamera; + + } + + } + + } + + /** + * Phaser Release Version + */ + var VERSION: string; + + /** + * AUTO Detect Renderer. + */ + var AUTO: integer; + + /** + * Canvas Renderer. + */ + var CANVAS: integer; + + /** + * WebGL Renderer. + */ + var WEBGL: integer; + + /** + * Headless Renderer. + */ + var HEADLESS: integer; + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + */ + var FOREVER: integer; + + /** + * Direction constant. + */ + var NONE: integer; + + /** + * Direction constant. + */ + var UP: integer; + + /** + * Direction constant. + */ + var DOWN: integer; + + /** + * Direction constant. + */ + var LEFT: integer; + + /** + * Direction constant. + */ + var RIGHT: integer; + + namespace Create { + /** + * [description] + * @param config [description] + */ + function GenerateTexture(config: GenerateTextureConfig): HTMLCanvasElement; + + namespace Palettes { + /** + * A 16 color palette by [Arne](http://androidarts.com/palette/16pal.htm) + */ + var ARNE16: Palette; + + /** + * A 16 color palette inspired by the Commodore 64. + */ + var C64: Palette; + + /** + * A 16 color CGA inspired palette by [Arne](http://androidarts.com/palette/16pal.htm) + */ + var CGA: Palette; + + /** + * A 16 color JMP palette by [Arne](http://androidarts.com/palette/16pal.htm) + */ + var JMP: Palette; + + /** + * A 16 color palette inspired by Japanese computers like the MSX. + */ + var MSX: Palette; + + } + + } + + namespace Curves { + /** + * [description] + */ + class CubicBezier extends Phaser.Curves.Curve { + /** + * + * @param p0 Start point, or an array of point pairs. + * @param p1 Control Point 1. + * @param p2 Control Point 2. + * @param p3 End Point. + */ + constructor(p0: Phaser.Math.Vector2 | Phaser.Math.Vector2[], p1: Phaser.Math.Vector2, p2: Phaser.Math.Vector2, p3: Phaser.Math.Vector2); + + /** + * [description] + */ + p0: Phaser.Math.Vector2; + + /** + * [description] + */ + p1: Phaser.Math.Vector2; + + /** + * [description] + */ + p2: Phaser.Math.Vector2; + + /** + * [description] + */ + p3: Phaser.Math.Vector2; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions The amount of divisions used by this curve. + */ + getResolution(divisions: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + * @param graphics [description] + * @param pointsTotal [description] Default 32. + */ + draw(graphics: G, pointsTotal?: integer): G; + + /** + * [description] + */ + toJSON(): JSONCurve; + + /** + * [description] + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: JSONCurve): Phaser.Curves.CubicBezier; + + } + + /** + * A Base Curve class, which all other curve types extend. + * + * Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) + */ + class Curve { + /** + * + * @param type [description] + */ + constructor(type: string); + + /** + * String based identifier for the type of curve. + */ + type: string; + + /** + * The default number of divisions within the curve. + */ + defaultDivisions: integer; + + /** + * The quantity of arc length divisions within the curve. + */ + arcLengthDivisions: integer; + + /** + * An array of cached arc length values. + */ + cacheArcLengths: number[]; + + /** + * Does the data of this curve need updating? + */ + needsUpdate: boolean; + + /** + * [description] + */ + active: boolean; + + /** + * Draws this curve on the given Graphics object. + * + * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is. + * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it. + * @param graphics The Graphics instance onto which this curve will be drawn. + * @param pointsTotal The resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance. Default 32. + */ + draw(graphics: G, pointsTotal?: integer): G; + + /** + * Returns a Rectangle where the position and dimensions match the bounds of this Curve. + * + * You can control the accuracy of the bounds. The value given is used to work out how many points + * to plot across the curve. Higher values are more accurate at the cost of calculation speed. + * @param out The Rectangle to store the bounds in. If falsey a new object will be created. + * @param accuracy The accuracy of the bounds calculations. Default 16. + */ + getBounds(out?: Phaser.Geom.Rectangle, accuracy?: integer): Phaser.Geom.Rectangle; + + /** + * Returns an array of points, spaced out X distance pixels apart. + * The smaller the distance, the larger the array will be. + * @param distance The distance, in pixels, between each point along the curve. + */ + getDistancePoints(distance: integer): Phaser.Geom.Point[]; + + /** + * [description] + * @param out [description] + */ + getEndPoint(out: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * [description] + */ + getLength(): number; + + /** + * [description] + * @param divisions [description] + */ + getLengths(divisions?: integer): number[]; + + /** + * [description] + * @param u [description] + * @param out [description] + */ + getPointAt(u: number, out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getPoints(divisions?: integer): Phaser.Math.Vector2[]; + + /** + * [description] + * @param out [description] + */ + getRandomPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getSpacedPoints(divisions?: integer): Phaser.Math.Vector2[]; + + /** + * [description] + * @param out [description] + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param t [description] + * @param out [description] + */ + getTangent(t: number, out?: O): O; + + /** + * [description] + * @param u [description] + * @param out [description] + */ + getTangentAt(u: number, out?: O): O; + + /** + * [description] + * @param distance [description] + * @param divisions [description] + */ + getTFromDistance(distance: integer, divisions?: integer): number; + + /** + * [description] + * @param u [description] + * @param distance [description] + * @param divisions [description] + */ + getUtoTmapping(u: number, distance: integer, divisions?: integer): number; + + /** + * [description] + */ + updateArcLengths(): void; + + } + + /** + * [description] + */ + class Ellipse extends Phaser.Curves.Curve { + /** + * + * @param x [description] Default 0. + * @param y [description] Default 0. + * @param xRadius [description] Default 0. + * @param yRadius [description] Default 0. + * @param startAngle [description] Default 0. + * @param endAngle [description] Default 360. + * @param clockwise [description] Default false. + * @param rotation [description] Default 0. + */ + constructor(x?: number | EllipseCurveConfig, y?: number, xRadius?: number, yRadius?: number, startAngle?: integer, endAngle?: integer, clockwise?: boolean, rotation?: integer); + + /** + * [description] + */ + p0: Phaser.Math.Vector2; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getResolution(divisions: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * Sets the horizontal radius of this curve. + * @param value The horizontal radius of this curve. + */ + setXRadius(value: number): Phaser.Curves.Ellipse; + + /** + * Sets the vertical radius of this curve. + * @param value The vertical radius of this curve. + */ + setYRadius(value: number): Phaser.Curves.Ellipse; + + /** + * Sets the width of this curve. + * @param value The width of this curve. + */ + setWidth(value: number): Phaser.Curves.Ellipse; + + /** + * Sets the height of this curve. + * @param value The height of this curve. + */ + setHeight(value: number): Phaser.Curves.Ellipse; + + /** + * Sets the start angle of this curve. + * @param value The start angle of this curve, in radians. + */ + setStartAngle(value: number): Phaser.Curves.Ellipse; + + /** + * Sets the end angle of this curve. + * @param value The end angle of this curve, in radians. + */ + setEndAngle(value: number): Phaser.Curves.Ellipse; + + /** + * Sets if this curve extends clockwise or anti-clockwise. + * @param value The clockwise state of this curve. + */ + setClockwise(value: boolean): Phaser.Curves.Ellipse; + + /** + * Sets the rotation of this curve. + * @param value The rotation of this curve, in radians. + */ + setRotation(value: number): Phaser.Curves.Ellipse; + + /** + * [description] + */ + x: number; + + /** + * [description] + */ + y: number; + + /** + * [description] + */ + xRadius: number; + + /** + * [description] + */ + yRadius: number; + + /** + * [description] + */ + startAngle: number; + + /** + * [description] + */ + endAngle: number; + + /** + * [description] + */ + clockwise: boolean; + + /** + * [description] + */ + rotation: number; + + /** + * [description] + */ + toJSON(): JSONEllipseCurve; + + /** + * [description] + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: JSONEllipseCurve): Phaser.Curves.Ellipse; + + } + + /** + * [description] + */ + class Line extends Phaser.Curves.Curve { + /** + * + * @param p0 [description] + * @param p1 [description] + */ + constructor(p0: Phaser.Math.Vector2 | number[], p1?: Phaser.Math.Vector2); + + /** + * [description] + */ + p0: Phaser.Math.Vector2; + + /** + * [description] + */ + p1: Phaser.Math.Vector2; + + /** + * Returns a Rectangle where the position and dimensions match the bounds of this Curve. + * @param out A Rectangle object to store the bounds in. If not given a new Rectangle will be created. + */ + getBounds(out?: O): O; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] Default 1. + */ + getResolution(divisions?: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + * @param u The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPointAt(u: number, out?: O): O; + + /** + * [description] + */ + getTangent(): O; + + /** + * Draws this curve on the given Graphics object. + * + * The curve is drawn using `Graphics.lineBetween` so will be drawn at whatever the present Graphics line color is. + * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it. + * @param graphics The Graphics instance onto which this curve will be drawn. + */ + draw(graphics: G): G; + + /** + * [description] + */ + toJSON(): JSONCurve; + + /** + * [description] + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: JSONCurve): Phaser.Curves.Line; + + } + + /** + * [description] + */ + class QuadraticBezier extends Phaser.Curves.Curve { + /** + * + * @param p0 Start point, or an array of point pairs. + * @param p1 Control Point 1. + * @param p2 Control Point 2. + */ + constructor(p0: Phaser.Math.Vector2 | number[], p1: Phaser.Math.Vector2, p2: Phaser.Math.Vector2); + + /** + * [description] + */ + p0: Phaser.Math.Vector2; + + /** + * [description] + */ + p1: Phaser.Math.Vector2; + + /** + * [description] + */ + p2: Phaser.Math.Vector2; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getResolution(divisions: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + * @param graphics [description] + * @param pointsTotal [description] Default 32. + */ + draw(graphics: G, pointsTotal?: integer): G; + + /** + * [description] + */ + toJSON(): JSONCurve; + + /** + * [description] + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: JSONCurve): Phaser.Curves.QuadraticBezier; + + } + + /** + * [description] + */ + class Spline extends Phaser.Curves.Curve { + /** + * + * @param points [description] + */ + constructor(points?: Phaser.Math.Vector2[]); + + /** + * [description] + */ + points: Phaser.Math.Vector2[]; + + /** + * [description] + * @param points [description] + */ + addPoints(points: Phaser.Math.Vector2[] | number[] | number[][]): Phaser.Curves.Spline; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + addPoint(x: number, y: number): Phaser.Math.Vector2; + + /** + * Gets the starting point on the curve. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] + */ + getResolution(divisions: number): number; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + */ + toJSON(): JSONCurve; + + /** + * [description] + * @param data The JSON object containing this curve data. + */ + static fromJSON(data: JSONCurve): Phaser.Curves.Spline; + + } + + /** + * [description] + */ + class MoveTo { + /** + * + * @param x [description] + * @param y [description] + */ + constructor(x?: number, y?: number); + + /** + * [description] + */ + active: boolean; + + /** + * [description] + */ + p0: Phaser.Math.Vector2; + + /** + * Get point at relative position in curve according to length. + * @param t The position along the curve to return. Where 0 is the start and 1 is the end. + * @param out A Vector2 object to store the result in. If not given will be created. + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + * @param u [description] + * @param out [description] + */ + getPointAt(u: number, out?: O): O; + + /** + * Gets the resolution of this curve. + */ + getResolution(): number; + + /** + * Gets the length of this curve. + */ + getLength(): number; + + /** + * [description] + */ + toJSON(): JSONCurve; + + } + + /** + * [description] + */ + class Path { + /** + * + * @param x [description] Default 0. + * @param y [description] Default 0. + */ + constructor(x?: number, y?: number); + + /** + * [description] + */ + name: string; + + /** + * [description] + */ + curves: Phaser.Curves.Curve[]; + + /** + * [description] + */ + cacheLengths: number[]; + + /** + * Automatically closes the path. + */ + autoClose: boolean; + + /** + * [description] + */ + startPoint: Phaser.Math.Vector2; + + /** + * [description] + * @param curve [description] + */ + add(curve: Phaser.Curves.Curve): Phaser.Curves.Path; + + /** + * [description] + * @param radius [description] + * @param clockwise [description] Default false. + * @param rotation [description] Default 0. + */ + circleTo(radius: number, clockwise?: boolean, rotation?: number): Phaser.Curves.Path; + + /** + * [description] + */ + closePath(): Phaser.Curves.Path; + + /** + * Creates a cubic bezier curve starting at the previous end point and ending at p3, using p1 and p2 as control points. + * @param x The x coordinate of the end point. Or, if a Vec2, the p1 value. + * @param y The y coordinate of the end point. Or, if a Vec2, the p2 value. + * @param control1X The x coordinate of the first control point. Or, if a Vec2, the p3 value. + * @param control1Y The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments. + * @param control2X The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. + * @param control2Y The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments. + */ + cubicBezierTo(x: number | Phaser.Math.Vector2, y: number | Phaser.Math.Vector2, control1X: number | Phaser.Math.Vector2, control1Y?: number, control2X?: number, control2Y?: number): Phaser.Curves.Path; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param controlX [description] + * @param controlY [description] + */ + quadraticBezierTo(x: number | Phaser.Math.Vector2[], y?: number, controlX?: number, controlY?: number): Phaser.Curves.Path; + + /** + * [description] + * @param graphics [description] + * @param pointsTotal [description] Default 32. + */ + draw(graphics: Phaser.GameObjects.Graphics, pointsTotal?: integer): G; + + /** + * Creates an ellipse curve positioned at the previous end point, using the given parameters. + * @param xRadius [description] + * @param yRadius [description] + * @param startAngle [description] + * @param endAngle [description] + * @param clockwise [description] + * @param rotation [description] + */ + ellipseTo(xRadius: number, yRadius: number, startAngle: number, endAngle: number, clockwise: boolean, rotation: number): Phaser.Curves.Path; + + /** + * [description] + * @param data [description] + */ + fromJSON(data: object): Phaser.Curves.Path; + + /** + * [description] + * @param out [description] + * @param accuracy [description] Default 16. + */ + getBounds(out?: O, accuracy?: integer): O; + + /** + * [description] + */ + getCurveLengths(): number[]; + + /** + * [description] + * @param out [description] + */ + getEndPoint(out?: O): O; + + /** + * [description] + */ + getLength(): number; + + /** + * [description] + * @param t [description] + * @param out [description] + */ + getPoint(t: number, out?: O): O; + + /** + * [description] + * @param divisions [description] Default 12. + */ + getPoints(divisions?: integer): Phaser.Math.Vector2[]; + + /** + * [description] + * @param out [description] + */ + getRandomPoint(out?: O): O; + + /** + * [description] + * @param divisions [description] Default 40. + */ + getSpacedPoints(divisions?: integer): Phaser.Math.Vector2[]; + + /** + * [description] + * @param out [description] + */ + getStartPoint(out?: O): O; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + lineTo(x: number | Phaser.Math.Vector2, y?: number): Phaser.Curves.Path; + + /** + * [description] + * @param points [description] + */ + splineTo(points: Phaser.Math.Vector2[]): Phaser.Curves.Path; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + moveTo(x: number, y: number): Phaser.Curves.Path; + + /** + * [description] + */ + toJSON(): JSONPath; + + /** + * [description] + */ + updateArcLengths(): void; + + /** + * [description] + */ + destroy(): void; + + } + + } + + namespace Data { + /** + * The Data Component features a means to store pieces of data specific to a Game Object, System or Plugin. + * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter, + * or have a property called `events` that is an instance of it. + */ + class DataManager { + /** + * + * @param parent The object that this DataManager belongs to. + * @param eventEmitter The DataManager's event emitter. + */ + constructor(parent: object, eventEmitter: Phaser.Events.EventEmitter); + + /** + * The object that this DataManager belongs to. + */ + parent: any; + + /** + * The DataManager's event emitter. + */ + events: Phaser.Events.EventEmitter; + + /** + * The data list. + */ + list: { [key: string]: any }; + + /** + * The public values list. You can use this to access anything you have stored + * in this Data Manager. For example, if you set a value called `gold` you can + * access it via: + * + * ```javascript + * this.data.values.gold; + * ``` + * + * You can also modify it directly: + * + * ```javascript + * this.data.values.gold += 1000; + * ``` + * + * Doing so will emit a `setdata` event from the parent of this Data Manager. + */ + values: { [key: string]: any }; + + /** + * Retrieves the value for the given key, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * this.data.get('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * this.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * this.data.get([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * @param key The key of the value to retrieve, or an array of keys. + */ + get(key: string | string[]): any; + + /** + * Retrieves all data values in a new object. + */ + getAll(): { [key: string]: any }; + + /** + * Queries the DataManager for the values of keys matching the given regular expression. + * @param search A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj). + */ + query(search: RegExp): { [key: string]: any }; + + /** + * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * data.set('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `get`: + * + * ```javascript + * data.get('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata_PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * @param key The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. + * @param data The value to set for the given key. If an object is provided as the key this argument is ignored. + */ + set(key: string | object, data: any): Phaser.Data.DataManager; + + /** + * Passes all data entries to the given callback. + * @param callback The function to call. + * @param context Value to use as `this` when executing callback. + * @param args Additional arguments that will be passed to the callback, after the game object, key, and data. + */ + each(callback: DataEachCallback, context?: any, ...args: any[]): Phaser.Data.DataManager; + + /** + * Merge the given object of key value pairs into this DataManager. + * + * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument) + * will emit a `changedata` event. + * @param data The data to merge. + * @param overwrite Whether to overwrite existing data. Defaults to true. Default true. + */ + merge(data: { [key: string]: any }, overwrite?: boolean): Phaser.Data.DataManager; + + /** + * Remove the value for the given key. + * + * If the key is found in this Data Manager it is removed from the internal lists and a + * `removedata` event is emitted. + * + * You can also pass in an array of keys, in which case all keys in the array will be removed: + * + * ```javascript + * this.data.remove([ 'gold', 'armor', 'health' ]); + * ``` + * @param key The key to remove, or an array of keys to remove. + */ + remove(key: string | string[]): Phaser.Data.DataManager; + + /** + * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it. + * @param key The key of the value to retrieve and delete. + */ + pop(key: string): any; + + /** + * Determines whether the given key is set in this Data Manager. + * + * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * @param key The key to check. + */ + has(key: string): boolean; + + /** + * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts + * to create new values or update existing ones. + * @param value Whether to freeze or unfreeze the Data Manager. + */ + setFreeze(value: boolean): Phaser.Data.DataManager; + + /** + * Delete all data in this Data Manager and unfreeze it. + */ + reset(): Phaser.Data.DataManager; + + /** + * Destroy this data manager. + */ + destroy(): void; + + /** + * Gets or sets the frozen state of this Data Manager. + * A frozen Data Manager will block all attempts to create new values or update existing ones. + */ + freeze: boolean; + + /** + * Return the total number of entries in this Data Manager. + */ + count: integer; + + } + + /** + * The Data Component features a means to store pieces of data specific to a Game Object, System or Plugin. + * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter, + * or have a property called `events` that is an instance of it. + */ + class DataManagerPlugin extends Phaser.Data.DataManager { + /** + * + * @param scene A reference to the Scene that this DataManager belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * A reference to the Scene that this DataManager belongs to. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene's Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + */ + destroy(): void; + + } + + } + + namespace Device { + /** + * Determines the audio playback capabilities of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.audio` from within any Scene. + */ + type Audio = { + /** + * Can this device play HTML Audio tags? + */ + audioData: boolean; + /** + * Can this device play EC-3 Dolby Digital Plus files? + */ + dolby: boolean; + /** + * Can this device can play m4a files. + */ + m4a: boolean; + /** + * Can this device play mp3 files? + */ + mp3: boolean; + /** + * Can this device play ogg files? + */ + ogg: boolean; + /** + * Can this device play opus files? + */ + opus: boolean; + /** + * Can this device play wav files? + */ + wav: boolean; + /** + * Does this device have the Web Audio API? + */ + webAudio: boolean; + /** + * Can this device play webm files? + */ + webm: boolean; + }; + + /** + * Determines the browser type and version running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.browser` from within any Scene. + */ + type Browser = { + /** + * Set to true if running in Chrome. + */ + chrome: boolean; + /** + * Set to true if running in Microsoft Edge browser. + */ + edge: boolean; + /** + * Set to true if running in Firefox. + */ + firefox: boolean; + /** + * Set to true if running in Internet Explorer 11 or less (not Edge). + */ + ie: boolean; + /** + * Set to true if running in Mobile Safari. + */ + mobileSafari: boolean; + /** + * Set to true if running in Opera. + */ + opera: boolean; + /** + * Set to true if running in Safari. + */ + safari: boolean; + /** + * Set to true if running in the Silk browser (as used on the Amazon Kindle) + */ + silk: boolean; + /** + * Set to true if running a Trident version of Internet Explorer (IE11+) + */ + trident: boolean; + /** + * If running in Chrome this will contain the major version number. + */ + chromeVersion: number; + /** + * If running in Firefox this will contain the major version number. + */ + firefoxVersion: number; + /** + * If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion. + */ + ieVersion: number; + /** + * If running in Safari this will contain the major version number. + */ + safariVersion: number; + /** + * If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx} + */ + tridentVersion: number; + }; + + /** + * Determines the canvas features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.canvasFeatures` from within any Scene. + */ + type CanvasFeatures = { + /** + * Set to true if the browser supports inversed alpha. + */ + supportInverseAlpha: boolean; + /** + * Set to true if the browser supports new canvas blend modes. + */ + supportNewBlendModes: boolean; + }; + + /** + * Determines the features of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.features` from within any Scene. + */ + type Features = { + /** + * True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap. + */ + canvasBitBltShift: boolean; + /** + * Is canvas available? + */ + canvas: boolean; + /** + * Is file available? + */ + file: boolean; + /** + * Is fileSystem available? + */ + fileSystem: boolean; + /** + * Does the device support the getUserMedia API? + */ + getUserMedia: boolean; + /** + * Is the device big or little endian? (only detected if the browser supports TypedArrays) + */ + littleEndian: boolean; + /** + * Is localStorage available? + */ + localStorage: boolean; + /** + * Is Pointer Lock available? + */ + pointerLock: boolean; + /** + * Does the device context support 32bit pixel manipulation using array buffer views? + */ + support32bit: boolean; + /** + * Does the device support the Vibration API? + */ + vibration: boolean; + /** + * Is webGL available? + */ + webGL: boolean; + /** + * Is worker available? + */ + worker: boolean; + }; + + /** + * Determines the full screen support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.fullscreen` from within any Scene. + */ + type Fullscreen = { + /** + * Does the browser support the Full Screen API? + */ + available: boolean; + /** + * Does the browser support access to the Keyboard during Full Screen mode? + */ + keyboard: boolean; + /** + * If the browser supports the Full Screen API this holds the call you need to use to cancel it. + */ + cancel: string; + /** + * If the browser supports the Full Screen API this holds the call you need to use to activate it. + */ + request: string; + }; + + /** + * Determines the input support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.input` from within any Scene. + */ + type Input = { + /** + * The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll' + */ + wheelType: string; + /** + * Is navigator.getGamepads available? + */ + gamepads: boolean; + /** + * Is mspointer available? + */ + mspointer: boolean; + /** + * Is touch available? + */ + touch: boolean; + }; + + /** + * Determines the operating system of the device running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.os` from within any Scene. + */ + type OS = { + /** + * Is running on android? + */ + android: boolean; + /** + * Is running on chromeOS? + */ + chromeOS: boolean; + /** + * Is the game running under CocoonJS? + */ + cocoonJS: boolean; + /** + * Is this game running with CocoonJS.App? + */ + cocoonJSApp: boolean; + /** + * Is the game running under Apache Cordova? + */ + cordova: boolean; + /** + * Is the game running under the Intel Crosswalk XDK? + */ + crosswalk: boolean; + /** + * Is running on a desktop? + */ + desktop: boolean; + /** + * Is the game running under Ejecta? + */ + ejecta: boolean; + /** + * Is the game running under GitHub Electron? + */ + electron: boolean; + /** + * Is running on iOS? + */ + iOS: boolean; + /** + * Is running on iPad? + */ + iPad: boolean; + /** + * Is running on iPhone? + */ + iPhone: boolean; + /** + * Is running on an Amazon Kindle? + */ + kindle: boolean; + /** + * Is running on linux? + */ + linux: boolean; + /** + * Is running on macOS? + */ + macOS: boolean; + /** + * Is the game running under Node.js? + */ + node: boolean; + /** + * Is the game running under Node-Webkit? + */ + nodeWebkit: boolean; + /** + * Set to true if running as a WebApp, i.e. within a WebView + */ + webApp: boolean; + /** + * Is running on windows? + */ + windows: boolean; + /** + * Is running on a Windows Phone? + */ + windowsPhone: boolean; + /** + * If running in iOS this will contain the major version number. + */ + iOSVersion: number; + /** + * PixelRatio of the host device? + */ + pixelRatio: number; + }; + + /** + * Determines the video support of the browser running this Phaser Game instance. + * These values are read-only and populated during the boot sequence of the game. + * They are then referenced by internal game systems and are available for you to access + * via `this.sys.game.device.video` from within any Scene. + */ + type Video = { + /** + * Can this device play h264 mp4 video files? + */ + h264Video: boolean; + /** + * Can this device play hls video files? + */ + hlsVideo: boolean; + /** + * Can this device play h264 mp4 video files? + */ + mp4Video: boolean; + /** + * Can this device play ogg video files? + */ + oggVideo: boolean; + /** + * Can this device play vp9 video files? + */ + vp9Video: boolean; + /** + * Can this device play webm video files? + */ + webmVideo: boolean; + }; + + } + + type DeviceConf = { + /** + * The OS Device functions. + */ + os: Phaser.Device.OS; + /** + * The Browser Device functions. + */ + browser: Phaser.Device.Browser; + /** + * The Features Device functions. + */ + features: Phaser.Device.Features; + /** + * The Input Device functions. + */ + input: Phaser.Device.Input; + /** + * The Audio Device functions. + */ + audio: Phaser.Device.Audio; + /** + * The Video Device functions. + */ + video: Phaser.Device.Video; + /** + * The Fullscreen Device functions. + */ + fullscreen: Phaser.Device.Fullscreen; + /** + * The Canvas Device functions. + */ + canvasFeatures: Phaser.Device.CanvasFeatures; + }; + + namespace Display { + namespace Align { + /** + * A constant representing a top-left alignment or position. + */ + const TOP_LEFT: integer; + + /** + * A constant representing a top-center alignment or position. + */ + const TOP_CENTER: integer; + + /** + * A constant representing a top-right alignment or position. + */ + const TOP_RIGHT: integer; + + /** + * A constant representing a left-top alignment or position. + */ + const LEFT_TOP: integer; + + /** + * A constant representing a left-center alignment or position. + */ + const LEFT_CENTER: integer; + + /** + * A constant representing a left-bottom alignment or position. + */ + const LEFT_BOTTOM: integer; + + /** + * A constant representing a center alignment or position. + */ + const CENTER: integer; + + /** + * A constant representing a right-top alignment or position. + */ + const RIGHT_TOP: integer; + + /** + * A constant representing a right-center alignment or position. + */ + const RIGHT_CENTER: integer; + + /** + * A constant representing a right-bottom alignment or position. + */ + const RIGHT_BOTTOM: integer; + + /** + * A constant representing a bottom-left alignment or position. + */ + const BOTTOM_LEFT: integer; + + /** + * A constant representing a bottom-center alignment or position. + */ + const BOTTOM_CENTER: integer; + + /** + * A constant representing a bottom-right alignment or position. + */ + const BOTTOM_RIGHT: integer; + + namespace In { + /** + * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function BottomCenter(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function BottomLeft(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function BottomRight(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned in the center of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function Center(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned in the left center of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function LeftCenter(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned relative to the other. + * The alignment used is based on the `position` argument, which is an `ALIGN_CONST` value, such as `LEFT_CENTER` or `TOP_RIGHT`. + * @param child The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param position The position to align the Game Object with. This is an align constant, such as `ALIGN_CONST.LEFT_CENTER`. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function QuickSet(child: G, alignIn: Phaser.GameObjects.GameObject, position: integer, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned in the right center of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function RightCenter(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned in the top center of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function TopCenter(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned in the top left of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function TopLeft(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned in the top right of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignIn The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function TopRight(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + } + + namespace To { + /** + * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function BottomCenter(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function BottomLeft(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function BottomRight(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function LeftBottom(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function LeftCenter(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function LeftTop(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function RightBottom(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function RightCenter(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function RightTop(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function TopCenter(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function TopLeft(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + /** + * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. + * @param gameObject The Game Object that will be positioned. + * @param alignTo The Game Object to base the alignment position on. + * @param offsetX Optional horizontal offset from the position. Default 0. + * @param offsetY Optional vertical offset from the position. Default 0. + */ + function TopRight(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G; + + } + + } + + namespace Bounds { + /** + * Positions the Game Object so that it is centered on the given coordinates. + * @param gameObject The Game Object that will be re-positioned. + * @param x The horizontal coordinate to position the Game Object on. + * @param y The vertical coordinate to position the Game Object on. + */ + function CenterOn(gameObject: G, x: number, y: number): G; + + /** + * Returns the bottom coordinate from the bounds of the Game Object. + * @param gameObject The Game Object to get the bounds value from. + */ + function GetBottom(gameObject: Phaser.GameObjects.GameObject): number; + + /** + * Returns the center x coordinate from the bounds of the Game Object. + * @param gameObject The Game Object to get the bounds value from. + */ + function GetCenterX(gameObject: Phaser.GameObjects.GameObject): number; + + /** + * Returns the center y coordinate from the bounds of the Game Object. + * @param gameObject The Game Object to get the bounds value from. + */ + function GetCenterY(gameObject: Phaser.GameObjects.GameObject): number; + + /** + * Returns the left coordinate from the bounds of the Game Object. + * @param gameObject The Game Object to get the bounds value from. + */ + function GetLeft(gameObject: Phaser.GameObjects.GameObject): number; + + /** + * Returns the amount the Game Object is visually offset from its x coordinate. + * This is the same as `width * origin.x`. + * This value will only be > 0 if `origin.x` is not equal to zero. + * @param gameObject The Game Object to get the bounds value from. + */ + function GetOffsetX(gameObject: Phaser.GameObjects.GameObject): number; + + /** + * Returns the amount the Game Object is visually offset from its y coordinate. + * This is the same as `width * origin.y`. + * This value will only be > 0 if `origin.y` is not equal to zero. + * @param gameObject The Game Object to get the bounds value from. + */ + function GetOffsetY(gameObject: Phaser.GameObjects.GameObject): number; + + /** + * Returns the right coordinate from the bounds of the Game Object. + * @param gameObject The Game Object to get the bounds value from. + */ + function GetRight(gameObject: Phaser.GameObjects.GameObject): number; + + /** + * Returns the top coordinate from the bounds of the Game Object. + * @param gameObject The Game Object to get the bounds value from. + */ + function GetTop(gameObject: Phaser.GameObjects.GameObject): number; + + /** + * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. + * @param gameObject The Game Object that will be re-positioned. + * @param value The coordinate to position the Game Object bounds on. + */ + function SetBottom(gameObject: G, value: number): G; + + /** + * Positions the Game Object so that the center top of its bounds aligns with the given coordinate. + * @param gameObject The Game Object that will be re-positioned. + * @param x The coordinate to position the Game Object bounds on. + */ + function SetCenterX(gameObject: G, x: number): G; + + /** + * Positions the Game Object so that the center top of its bounds aligns with the given coordinate. + * @param gameObject The Game Object that will be re-positioned. + * @param y The coordinate to position the Game Object bounds on. + */ + function SetCenterY(gameObject: G, y: number): G; + + /** + * Positions the Game Object so that the left of its bounds aligns with the given coordinate. + * @param gameObject The Game Object that will be re-positioned. + * @param value The coordinate to position the Game Object bounds on. + */ + function SetLeft(gameObject: G, value: number): G; + + /** + * Positions the Game Object so that the left of its bounds aligns with the given coordinate. + * @param gameObject The Game Object that will be re-positioned. + * @param value The coordinate to position the Game Object bounds on. + */ + function SetRight(gameObject: G, value: number): G; + + /** + * Positions the Game Object so that the top of its bounds aligns with the given coordinate. + * @param gameObject The Game Object that will be re-positioned. + * @param value The coordinate to position the Game Object bounds on. + */ + function SetTop(gameObject: G, value: number): G; + + } + + namespace Canvas { + namespace CanvasInterpolation { + /** + * Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit). + * @param canvas The canvas object to have the style set on. + */ + function setCrisp(canvas: HTMLCanvasElement): HTMLCanvasElement; + + /** + * Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto'). + * @param canvas The canvas object to have the style set on. + */ + function setBicubic(canvas: HTMLCanvasElement): HTMLCanvasElement; + + } + + /** + * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements. + * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, + * which is useless for some of the Phaser pipelines / renderer. + * + * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created. + * Which means all instances of Phaser Games on the same page can share the one single pool. + */ + namespace CanvasPool { + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * @param parent The parent of the Canvas object. + * @param width The width of the Canvas. Default 1. + * @param height The height of the Canvas. Default 1. + * @param canvasType The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. Default Phaser.CANVAS. + * @param selfParent Use the generated Canvas element as the parent? Default false. + */ + function create(parent: any, width?: integer, height?: integer, canvasType?: integer, selfParent?: boolean): HTMLCanvasElement; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * @param parent The parent of the Canvas object. + * @param width The width of the Canvas. Default 1. + * @param height The height of the Canvas. Default 1. + */ + function create2D(parent: any, width?: integer, height?: integer): HTMLCanvasElement; + + /** + * Creates a new Canvas DOM element, or pulls one from the pool if free. + * @param parent The parent of the Canvas object. + * @param width The width of the Canvas. Default 1. + * @param height The height of the Canvas. Default 1. + */ + function createWebGL(parent: any, width?: integer, height?: integer): HTMLCanvasElement; + + /** + * Gets the first free canvas index from the pool. + * @param canvasType The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. Default Phaser.CANVAS. + */ + function first(canvasType?: integer): HTMLCanvasElement; + + /** + * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use. + * The canvas has its width and height set to 1, and its parent attribute nulled. + * @param parent [description] + */ + function remove(parent: any): void; + + /** + * Gets the total number of used canvas elements in the pool. + */ + function total(): integer; + + /** + * Gets the total number of free canvas elements in the pool. + */ + function free(): integer; + + /** + * Disable context smoothing on any new Canvas element created. + */ + function disableSmoothing(): void; + + /** + * Enable context smoothing on any new Canvas element created. + */ + function enableSmoothing(): void; + + } + + namespace Smoothing { + /** + * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set. + * @param context [description] + */ + function getPrefix(context: CanvasRenderingContext2D | WebGLRenderingContext): string; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * @param context [description] + */ + function enable(context: CanvasRenderingContext2D | WebGLRenderingContext): CanvasRenderingContext2D | WebGLRenderingContext; + + /** + * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. + * By default browsers have image smoothing enabled, which isn't always what you visually want, especially + * when using pixel art in a game. Note that this sets the property on the context itself, so that any image + * drawn to the context will be affected. This sets the property across all current browsers but support is + * patchy on earlier browsers, especially on mobile. + * @param context [description] + */ + function disable(context: CanvasRenderingContext2D | WebGLRenderingContext): CanvasRenderingContext2D | WebGLRenderingContext; + + /** + * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`. + * Returns null if no smoothing prefix is available. + * @param context [description] + */ + function isEnabled(context: CanvasRenderingContext2D | WebGLRenderingContext): boolean; + + } + + /** + * Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions. + * @param canvas The canvas element to have the style applied to. + * @param value The touch action value to set on the canvas. Set to `none` to disable touch actions. Default 'none'. + */ + function TouchAction(canvas: HTMLCanvasElement, value?: string): HTMLCanvasElement; + + /** + * Sets the user-select property on the canvas style. Can be used to disable default browser selection actions. + * @param canvas The canvas element to have the style applied to. + * @param value The touch callout value to set on the canvas. Set to `none` to disable touch callouts. Default 'none'. + */ + function UserSelect(canvas: HTMLCanvasElement, value?: string): HTMLCanvasElement; + + } + + /** + * The Color class holds a single color value and allows for easy modification and reading of it. + */ + class Color { + /** + * + * @param red The red color value. A number between 0 and 255. Default 0. + * @param green The green color value. A number between 0 and 255. Default 0. + * @param blue The blue color value. A number between 0 and 255. Default 0. + * @param alpha The alpha value. A number between 0 and 255. Default 255. + */ + constructor(red?: integer, green?: integer, blue?: integer, alpha?: integer); + + /** + * An array containing the calculated color values for WebGL use. + */ + gl: number[]; + + /** + * Sets this color to be transparent. Sets all values to zero. + */ + transparent(): Phaser.Display.Color; + + /** + * Sets the color of this Color component. + * @param red The red color value. A number between 0 and 255. + * @param green The green color value. A number between 0 and 255. + * @param blue The blue color value. A number between 0 and 255. + * @param alpha The alpha value. A number between 0 and 255. Default 255. + */ + setTo(red: integer, green: integer, blue: integer, alpha?: integer): Phaser.Display.Color; + + /** + * Sets the red, green, blue and alpha GL values of this Color component. + * @param red The red color value. A number between 0 and 1. + * @param green The green color value. A number between 0 and 1. + * @param blue The blue color value. A number between 0 and 1. + * @param alpha The alpha value. A number between 0 and 1. Default 1. + */ + setGLTo(red: number, green: number, blue: number, alpha?: number): Phaser.Display.Color; + + /** + * Sets the color based on the color object given. + * @param color An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255. + */ + setFromRGB(color: InputColorObject): Phaser.Display.Color; + + /** + * Updates the internal cache values. + */ + update(): Phaser.Display.Color; + + /** + * Returns a new Color component using the values from this one. + */ + clone(): Phaser.Display.Color; + + /** + * The color of this Color component, not including the alpha channel. + */ + readonly color: number; + + /** + * The color of this Color component, including the alpha channel. + */ + readonly color32: number; + + /** + * The color of this Color component as a string which can be used in CSS color values. + */ + readonly rgba: string; + + /** + * The red color value, normalized to the range 0 to 1. + */ + redGL: number; + + /** + * The green color value, normalized to the range 0 to 1. + */ + greenGL: number; + + /** + * The blue color value, normalized to the range 0 to 1. + */ + blueGL: number; + + /** + * The alpha color value, normalized to the range 0 to 1. + */ + alphaGL: number; + + /** + * The red color value, normalized to the range 0 to 255. + */ + red: number; + + /** + * The green color value, normalized to the range 0 to 255. + */ + green: number; + + /** + * The blue color value, normalized to the range 0 to 255. + */ + blue: number; + + /** + * The alpha color value, normalized to the range 0 to 255. + */ + alpha: number; + + /** + * Converts the given color value into an Object containing r,g,b and a properties. + * @param color A color value, optionally including the alpha value. + */ + static ColorToRGBA(color: number): ColorObject; + + /** + * Returns a string containing a hex representation of the given color component. + * @param color The color channel to get the hex value for, must be a value between 0 and 255. + */ + static ComponentToHex(color: integer): string; + + /** + * Given 3 separate color values this will return an integer representation of it. + * @param red The red color value. A number between 0 and 255. + * @param green The green color value. A number between 0 and 255. + * @param blue The blue color value. A number between 0 and 255. + */ + static GetColor(red: integer, green: integer, blue: integer): number; + + /** + * Given an alpha and 3 color values this will return an integer representation of it. + * @param red The red color value. A number between 0 and 255. + * @param green The green color value. A number between 0 and 255. + * @param blue The blue color value. A number between 0 and 255. + * @param alpha The alpha color value. A number between 0 and 255. + */ + static GetColor32(red: integer, green: integer, blue: integer, alpha: integer): number; + + /** + * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. + * @param h The hue value in the range 0 to 1. + * @param s The saturation value in the range 0 to 1. + * @param l The lightness value in the range 0 to 1. + */ + static HSLToColor(h: number, s: number, l: number): Phaser.Display.Color; + + /** + * Get HSV color wheel values in an array which will be 360 elements in size. + * @param s The saturation, in the range 0 - 1. Default 1. + * @param v The value, in the range 0 - 1. Default 1. + */ + static HSVColorWheel(s?: number, v?: number): ColorObject[]; + + /** + * Converts an HSV (hue, saturation and value) color value to RGB. + * Conversion formula from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes HSV values are contained in the set [0, 1]. + * Based on code by Michael Jackson (https://github.com/mjijackson) + * @param h The hue, in the range 0 - 1. + * @param s The saturation, in the range 0 - 1. + * @param v The value, in the range 0 - 1. + */ + static HSVToRGB(h: number, s: number, v: number): ColorObject; + + /** + * Converts a hex string into a Phaser Color object. + * + * The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed. + * + * An alpha channel is _not_ supported. + * @param hex The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`. + */ + static HexStringToColor(hex: string): Phaser.Display.Color; + + /** + * Converts a hue to an RGB color. + * Based on code by Michael Jackson (https://github.com/mjijackson) + */ + static HueToComponent(p: number, q: number, t: number): number; + + /** + * Converts the given color value into an instance of a Color object. + * @param input The color value to convert into a Color object. + */ + static IntegerToColor(input: integer): Phaser.Display.Color; + + /** + * Return the component parts of a color as an Object with the properties alpha, red, green, blue. + * + * Alpha will only be set if it exists in the given color (0xAARRGGBB) + * @param input The color value to convert into a Color object. + */ + static IntegerToRGB(input: integer): ColorObject; + + /** + * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. + * @param input An object containing `r`, `g`, `b` and `a` properties in the range 0 to 255. + */ + static ObjectToColor(input: InputColorObject): Phaser.Display.Color; + + /** + * Converts a CSS 'web' string into a Phaser Color object. + * + * The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1]. + * @param rgb The CSS format color string, using the `rgb` or `rgba` format. + */ + static RGBStringToColor(rgb: string): Phaser.Display.Color; + + /** + * Converts an RGB color value to HSV (hue, saturation and value). + * Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1]. + * Based on code by Michael Jackson (https://github.com/mjijackson) + * @param r The red color value. A number between 0 and 255. + * @param g The green color value. A number between 0 and 255. + * @param b The blue color value. A number between 0 and 255. + */ + static RGBToHSV(r: integer, g: integer, b: integer): HSLColorObject; + + /** + * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. + * @param r The red color value. A number between 0 and 255. + * @param g The green color value. A number between 0 and 255. + * @param b The blue color value. A number between 0 and 255. + * @param a The alpha value. A number between 0 and 255. Default 255. + * @param prefix The prefix of the string. Either `#` or `0x`. Default #. + */ + static RGBToString(r: integer, g: integer, b: integer, a?: integer, prefix?: string): string; + + /** + * Creates a new Color object where the r, g, and b values have been set to random values + * based on the given min max values. + * @param min The minimum value to set the random range from (between 0 and 255) Default 0. + * @param max The maximum value to set the random range from (between 0 and 255) Default 255. + */ + static RandomRGB(min?: integer, max?: integer): Phaser.Display.Color; + + /** + * Converts the given source color value into an instance of a Color class. + * The value can be either a string, prefixed with `rgb` or a hex string, a number or an Object. + * @param input The source color value to convert. + */ + static ValueToColor(input: string | number | InputColorObject): Phaser.Display.Color; + + } + + namespace Masks { + /** + * [description] + */ + class BitmapMask { + /** + * + * @param scene [description] + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + constructor(scene: Phaser.Scene, renderable: Phaser.GameObjects.GameObject); + + /** + * A reference to either the Canvas or WebGL Renderer that this Mask is using. + */ + renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * A renderable Game Object that uses a texture, such as a Sprite. + */ + bitmapMask: Phaser.GameObjects.GameObject; + + /** + * [description] + */ + maskTexture: WebGLTexture; + + /** + * [description] + */ + mainTexture: WebGLTexture; + + /** + * [description] + */ + dirty: boolean; + + /** + * [description] + */ + mainFramebuffer: WebGLFramebuffer; + + /** + * [description] + */ + maskFramebuffer: WebGLFramebuffer; + + /** + * [description] + */ + invertAlpha: boolean; + + /** + * [description] + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + setBitmap(renderable: Phaser.GameObjects.GameObject): void; + + /** + * [description] + * @param renderer [description] + * @param maskedObject [description] + * @param camera The Camera to render to. + */ + preRenderWebGL(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer, maskedObject: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * [description] + * @param renderer [description] + */ + postRenderWebGL(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer): void; + + /** + * [description] + * @param renderer [description] + * @param mask [description] + * @param camera The Camera to render to. + */ + preRenderCanvas(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer, mask: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * [description] + * @param renderer [description] + */ + postRenderCanvas(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer): void; + + /** + * Destroys this BitmapMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + */ + destroy(): void; + + } + + /** + * [description] + */ + class GeometryMask { + /** + * + * @param scene [description] + * @param graphicsGeometry [description] + */ + constructor(scene: Phaser.Scene, graphicsGeometry: Phaser.GameObjects.Graphics); + + /** + * [description] + */ + geometryMask: Phaser.GameObjects.Graphics; + + /** + * [description] + * @param graphicsGeometry [description] + */ + setShape(graphicsGeometry: Phaser.GameObjects.Graphics): void; + + /** + * [description] + * @param renderer [description] + * @param mask [description] + * @param camera [description] + */ + preRenderWebGL(renderer: Phaser.Renderer.WebGL.WebGLRenderer, mask: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * [description] + * @param renderer [description] + */ + postRenderWebGL(renderer: Phaser.Renderer.WebGL.WebGLRenderer): void; + + /** + * [description] + * @param renderer [description] + * @param mask [description] + * @param camera [description] + */ + preRenderCanvas(renderer: Phaser.Renderer.Canvas.CanvasRenderer, mask: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * [description] + * @param renderer [description] + */ + postRenderCanvas(renderer: Phaser.Renderer.Canvas.CanvasRenderer): void; + + /** + * Destroys this GeometryMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + */ + destroy(): void; + + } + + } + + } + + namespace DOM { + /** + * Adds the given element to the DOM. If a parent is provided the element is added as a child of the parent, providing it was able to access it. + * If no parent was given or falls back to using `document.body`. + * @param element The element to be added to the DOM. Usually a Canvas object. + * @param parent The parent in which to add the element. Can be a string which is passed to `getElementById` or an actual DOM object. + * @param overflowHidden Whether or not to hide overflowing content inside the parent. Default true. + */ + function AddToDOM(element: HTMLElement, parent?: string | HTMLElement, overflowHidden?: boolean): HTMLElement; + + /** + * Inspects the readyState of the document. If the document is already complete then it invokes the given callback. + * If not complete it sets up several event listeners such as `deviceready`, and once those fire, it invokes the callback. + * Called automatically by the Phaser.Game instance. Should not usually be accessed directly. + * @param callback The callback to be invoked when the device is ready and the DOM content is loaded. + */ + function DOMContentLoaded(callback: ContentLoadedCallback): void; + + /** + * Takes the given data string and parses it as XML. + * First tries to use the window.DOMParser and reverts to the Microsoft.XMLDOM if that fails. + * The parsed XML object is returned, or `null` if there was an error while parsing the data. + * @param data The XML source stored in a string. + */ + function ParseXML(data: string): DOMParser | ActiveXObject; + + /** + * Attempts to remove the element from its parentNode in the DOM. + * @param element The DOM element to remove from its parent node. + */ + function RemoveFromDOM(element: HTMLElement): void; + + /** + * Abstracts away the use of RAF or setTimeOut for the core game update loop. + * This is invoked automatically by the Phaser.Game instance. + */ + class RequestAnimationFrame { + /** + * True if RequestAnimationFrame is running, otherwise false. + */ + isRunning: boolean; + + /** + * The callback to be invoked each step. + */ + callback: FrameRequestCallback; + + /** + * The most recent timestamp. Either a DOMHighResTimeStamp under RAF or `Date.now` under SetTimeout. + */ + tick: number; + + /** + * True if the step is using setTimeout instead of RAF. + */ + isSetTimeOut: boolean; + + /** + * The setTimeout or RAF callback ID used when canceling them. + */ + timeOutID: number; + + /** + * The previous time the step was called. + */ + lastTime: number; + + /** + * The RAF step function. + * Updates the local tick value, invokes the callback and schedules another call to requestAnimationFrame. + */ + step: FrameRequestCallback; + + /** + * The SetTimeout step function. + * Updates the local tick value, invokes the callback and schedules another call to setTimeout. + */ + stepTimeout: Function; + + /** + * Starts the requestAnimationFrame or setTimeout process running. + * @param callback The callback to invoke each step. + * @param forceSetTimeOut Should it use SetTimeout, even if RAF is available? + */ + start(callback: FrameRequestCallback, forceSetTimeOut: boolean): void; + + /** + * Stops the requestAnimationFrame or setTimeout from running. + */ + stop(): void; + + /** + * Stops the step from running and clears the callback reference. + */ + destroy(): void; + + } + + } + + namespace Events { + /** + * EventEmitter is a Scene Systems plugin compatible version of eventemitter3. + */ + class EventEmitter { + /** + * Removes all listeners. + */ + shutdown(): void; + + /** + * Removes all listeners. + */ + destroy(): void; + + /** + * Return an array listing the events for which the emitter has registered listeners. + */ + eventNames(): any[]; + + /** + * Return the listeners registered for a given event. + * @param event The event name. + */ + listeners(event: string | symbol): any[]; + + /** + * Return the number of listeners listening to a given event. + * @param event The event name. + */ + listenerCount(event: string | symbol): number; + + /** + * Calls each of the listeners registered for a given event. + * @param event The event name. + * @param args Additional arguments that will be passed to the event handler. + */ + emit(event: string | symbol, ...args: any[]): boolean; + + /** + * Add a listener for a given event. + * @param event The event name. + * @param fn The listener function. + * @param context The context to invoke the listener with. Default this. + */ + on(event: string | symbol, fn: Function, context?: any): Phaser.Events.EventEmitter; + + /** + * Add a listener for a given event. + * @param event The event name. + * @param fn The listener function. + * @param context The context to invoke the listener with. Default this. + */ + addListener(event: string | symbol, fn: Function, context?: any): Phaser.Events.EventEmitter; + + /** + * Add a one-time listener for a given event. + * @param event The event name. + * @param fn The listener function. + * @param context The context to invoke the listener with. Default this. + */ + once(event: string | symbol, fn: Function, context?: any): Phaser.Events.EventEmitter; + + /** + * Remove the listeners of a given event. + * @param event The event name. + * @param fn Only remove the listeners that match this function. + * @param context Only remove the listeners that have this context. + * @param once Only remove one-time listeners. + */ + removeListener(event: string | symbol, fn: Function, context: any, once: boolean): Phaser.Events.EventEmitter; + + /** + * Remove the listeners of a given event. + * @param event The event name. + * @param fn Only remove the listeners that match this function. + * @param context Only remove the listeners that have this context. + * @param once Only remove one-time listeners. + */ + off(event: string | symbol, fn: Function, context: any, once: boolean): Phaser.Events.EventEmitter; + + /** + * Remove all listeners, or those of the specified event. + * @param event The event name. + */ + removeAllListeners(event?: string | symbol): Phaser.Events.EventEmitter; + + } + + } + + namespace GameObjects { + /** + * Builds a Game Object using the provided configuration object. + * @param scene A reference to the Scene. + * @param gameObject The initial GameObject. + * @param config The config to build the GameObject with. + */ + function BuildGameObject(scene: Phaser.Scene, gameObject: Phaser.GameObjects.GameObject, config: GameObjectConfig): Phaser.GameObjects.GameObject; + + /** + * Adds an Animation component to a Sprite and populates it based on the given config. + * @param sprite The sprite to add an Animation component to. + * @param config The animation config. + */ + function BuildGameObjectAnimation(sprite: Phaser.GameObjects.Sprite, config: object): Phaser.GameObjects.Sprite; + + /** + * The Display List plugin. + * + * Display Lists belong to a Scene and maintain the list of Game Objects to render every frame. + * + * Some of these Game Objects may also be part of the Scene's [Update List]{@link Phaser.GameObjects.UpdateList}, for updating. + */ + class DisplayList extends Phaser.Structs.List { + /** + * + * @param scene The Scene that this Display List belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * The flag the determines whether Game Objects should be sorted when `depthSort()` is called. + */ + sortChildrenFlag: boolean; + + /** + * The Scene that this Display List belongs to. + */ + scene: Phaser.Scene; + + /** + * The Scene's Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * Force a sort of the display list on the next call to depthSort. + */ + queueDepthSort(): void; + + /** + * Immediately sorts the display list if the flag is set. + */ + depthSort(): void; + + /** + * Compare the depth of two Game Objects. + * @param childA The first Game Object. + * @param childB The second Game Object. + */ + sortByDepth(childA: Phaser.GameObjects.GameObject, childB: Phaser.GameObjects.GameObject): integer; + + /** + * Given an array of Game Objects, sort the array and return it, so that + * the objects are in index order with the lowest at the bottom. + * @param gameObjects The array of Game Objects to sort. + */ + sortGameObjects(gameObjects: Phaser.GameObjects.GameObject[]): any[]; + + /** + * Get the top-most Game Object in the given array of Game Objects, after sorting it. + * + * Note that the given array is sorted in place, even though it isn't returned directly it will still be updated. + * @param gameObjects The array of Game Objects. + */ + getTopGameObject(gameObjects: Phaser.GameObjects.GameObject[]): Phaser.GameObjects.GameObject; + + } + + /** + * The base class that all Game Objects extend. + * You don't create GameObjects directly and they cannot be added to the display list. + * Instead, use them as the base for your own custom classes. + */ + class GameObject extends Phaser.Events.EventEmitter { + /** + * + * @param scene The Scene to which this Game Object belongs. + * @param type A textual representation of the type of Game Object, i.e. `sprite`. + */ + constructor(scene: Phaser.Scene, type: string); + + /** + * The Scene to which this Game Object belongs. + * Game Objects can only belong to one Scene. + */ + protected scene: Phaser.Scene; + + /** + * A textual representation of this Game Object, i.e. `sprite`. + * Used internally by Phaser but is available for your own custom classes to populate. + */ + type: string; + + /** + * The parent Container of this Game Object, if it has one. + */ + parentContainer: Phaser.GameObjects.Container; + + /** + * The name of this Game Object. + * Empty by default and never populated by Phaser, this is left for developers to use. + */ + name: string; + + /** + * The active state of this Game Object. + * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. + * An active object is one which is having its logic and internal systems updated. + */ + active: boolean; + + /** + * The Tab Index of the Game Object. + * Reserved for future use by plugins and the Input Manager. + */ + tabIndex: integer; + + /** + * A Data Manager. + * It allows you to store, query and get key/value paired information specific to this Game Object. + * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. + */ + data: Phaser.Data.DataManager; + + /** + * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. + * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. + * If those components are not used by your custom class then you can use this bitmask as you wish. + */ + renderFlags: integer; + + /** + * A bitmask that controls if this Game Object is drawn by a Camera or not. + * Not usually set directly, instead call `Camera.ignore`, however you can + * set this property directly using the Camera.id property: + */ + cameraFilter: number; + + /** + * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. + * Not usually set directly. Instead call `GameObject.setInteractive()`. + */ + input: Phaser.Input.InteractiveObject; + + /** + * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + */ + body: object | Phaser.Physics.Arcade.Body | Phaser.Physics.Impact.Body; + + /** + * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. + * This includes calls that may come from a Group, Container or the Scene itself. + * While it allows you to persist a Game Object across Scenes, please understand you are entirely + * responsible for managing references to and from this Game Object. + */ + ignoreDestroy: boolean; + + /** + * Sets the `active` property of this Game Object and returns this Game Object for further chaining. + * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. + * @param value True if this Game Object should be set as active, false if not. + */ + setActive(value: boolean): this; + + /** + * Sets the `name` property of this Game Object and returns this Game Object for further chaining. + * The `name` property is not populated by Phaser and is presented for your own use. + * @param value The name to be given to this Game Object. + */ + setName(value: string): this; + + /** + * Adds a Data Manager component to this Game Object. + */ + setDataEnabled(): this; + + /** + * Allows you to store a key value pair within this Game Objects Data Manager. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * sprite.setData('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `getData`: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * sprite.data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata_PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * @param key The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. + * @param data The value to set for the given key. If an object is provided as the key this argument is ignored. + */ + setData(key: string | object, data: any): this; + + /** + * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * sprite.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * sprite.getData([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * @param key The key of the value to retrieve, or an array of keys. + */ + getData(key: string | string[]): any; + + /** + * Pass this Game Object to the Input Manager to enable it for Input. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. + * @param dropZone Should this Game Object be treated as a drop zone target? Default false. + */ + setInteractive(shape?: Phaser.Input.InputConfiguration | any, callback?: HitAreaCallback, dropZone?: boolean): this; + + /** + * If this Game Object has previously been enabled for input, this will disable it. + * + * An object that is disabled for input stops processing or being considered for + * input events, but can be turned back on again at any time by simply calling + * `setInteractive()` with no arguments provided. + * + * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. + */ + disableInteractive(): this; + + /** + * If this Game Object has previously been enabled for input, this will remove it. + * + * The Interactive Object that was assigned to this Game Object will be destroyed, + * removed from the Input Manager and cleared from this Game Object. + * + * If you wish to re-enable this Game Object at a later date you will need to + * re-create its InteractiveOobject by calling `setInteractive` again. + * + * If you wish to only temporarily stop an object from receiving input then use + * `disableInteractive` instead, as that toggles the interactive state, where-as + * this erases it completely. + */ + removeInteractive(): this; + + /** + * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. + */ + update(): void; + + /** + * Returns a JSON representation of the Game Object. + */ + toJSON(): JSONGameObject; + + /** + * Compares the renderMask with the renderFlags to see if this Game Object will render or not. + */ + willRender(): boolean; + + /** + * Returns an array containing the display list index of either this Game Object, or if it has one, + * its parent Container. It then iterates up through all of the parent containers until it hits the + * root of the display list (which is index 0 in the returned array). + * + * Used internally by the InputPlugin but also useful if you wish to find out the display depth of + * this Game Object and all of its ancestors. + */ + getIndexList(): integer[]; + + /** + * Destroys this Game Object removing it from the Display List and Update List and + * severing all ties to parent resources. + * + * Also removes itself from the Input Manager and Physics Manager if previously enabled. + * + * Use this to remove a Game Object from your game if you don't ever plan to use it again. + * As long as no reference to it exists within your own code it should become free for + * garbage collection by the browser. + * + * If you just want to temporarily disable an object then look at using the + * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. + */ + destroy(): void; + + /** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + */ + static readonly RENDER_MASK: integer; + + } + + /** + * The Game Object Creator is a Scene plugin that allows you to quickly create many common + * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically + * added to the Scene. + * + * Game Objects directly register themselves with the Creator and inject their own creation + * methods into the class. + */ + class GameObjectCreator { + /** + * + * @param scene The Scene to which this Game Object Factory belongs. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene to which this Game Object Creator belongs. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Display List. + */ + protected displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Update List. + */ + protected "updateList;": Phaser.GameObjects.UpdateList; + + /** + * Creates a new Dynamic Bitmap Text Game Object and returns it. + * + * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + dynamicBitmapText(config: BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.DynamicBitmapText; + + /** + * Creates a new Bitmap Text Game Object and returns it. + * + * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + bitmapText(config: BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.BitmapText; + + /** + * Creates a new Blitter Game Object and returns it. + * + * Note: This method will only be available if the Blitter Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + blitter(config: object, addToScene?: boolean): Phaser.GameObjects.Blitter; + + /** + * Creates a new Container Game Object and returns it. + * + * Note: This method will only be available if the Container Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + container(config: object, addToScene?: boolean): Phaser.GameObjects.Container; + + /** + * Creates a new Graphics Game Object and returns it. + * + * Note: This method will only be available if the Graphics Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + graphics(config: object, addToScene?: boolean): Phaser.GameObjects.Graphics; + + /** + * Creates a new Group Game Object and returns it. + * + * Note: This method will only be available if the Group Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + */ + group(config: GroupConfig): Phaser.GameObjects.Group; + + /** + * Creates a new Image Game Object and returns it. + * + * Note: This method will only be available if the Image Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + image(config: object, addToScene?: boolean): Phaser.GameObjects.Image; + + /** + * Creates a new Mesh Game Object and returns it. + * + * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + mesh(config: object, addToScene?: boolean): Phaser.GameObjects.Mesh; + + /** + * Creates a new Particle Emitter Manager Game Object and returns it. + * + * Note: This method will only be available if the Particles Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + particles(config: object, addToScene?: boolean): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Creates a new Quad Game Object and returns it. + * + * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + quad(config: object, addToScene?: boolean): Phaser.GameObjects.Quad; + + /** + * Creates a new Render Texture Game Object and returns it. + * + * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + renderTexture(config: RenderTextureConfig, addToScene?: boolean): Phaser.GameObjects.RenderTexture; + + /** + * Creates a new Sprite Game Object and returns it. + * + * Note: This method will only be available if the Sprite Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + sprite(config: object, addToScene?: boolean): Phaser.GameObjects.Sprite; + + /** + * Creates a new Sprite3D Game Object and returns it. + * + * Note: This method will only be available if the Sprite3D Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + sprite3D(config: object, addToScene?: boolean): Phaser.GameObjects.Sprite3D; + + /** + * Creates a new Text Game Object and returns it. + * + * Note: This method will only be available if the Text Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + text(config: object, addToScene?: boolean): Phaser.GameObjects.Text; + + /** + * Creates a new TileSprite Game Object and returns it. + * + * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. + */ + tileSprite(config: TileSprite, addToScene?: boolean): Phaser.GameObjects.TileSprite; + + /** + * Creates a new Zone Game Object and returns it. + * + * Note: This method will only be available if the Zone Game Object has been built into Phaser. + * @param config The configuration object this Game Object will use to create itself. + */ + zone(config: object): Phaser.GameObjects.Zone; + + /** + * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. + * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing + * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map + * data. For an empty map, you should specify tileWidth, tileHeight, width & height. + * @param config The config options for the Tilemap. + */ + tilemap(config?: TilemapConfig): Phaser.Tilemaps.Tilemap; + + /** + * Creates a new Tween object and returns it. + * + * Note: This method will only be available if Tweens have been built into Phaser. + * @param config The Tween configuration. + */ + tween(config: object): Phaser.Tweens.Tween; + + } + + /** + * The Game Object Factory is a Scene plugin that allows you to quickly create many common + * types of Game Objects and have them automatically registered with the Scene. + * + * Game Objects directly register themselves with the Factory and inject their own creation + * methods into the class. + */ + class GameObjectFactory { + /** + * + * @param scene The Scene to which this Game Object Factory belongs. + */ + constructor(scene: Phaser.Scene); + + /** + * Creates a new Path Object. + * @param x The horizontal position of this Path. + * @param y The vertical position of this Path. + */ + path(x: number, y: number): Phaser.Curves.Path; + + /** + * The Scene to which this Game Object Factory belongs. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Display List. + */ + protected displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Update List. + */ + protected "updateList;": Phaser.GameObjects.UpdateList; + + /** + * Adds an existing Game Object to this Scene. + * + * If the Game Object renders, it will be added to the Display List. + * If it has a `preUpdate` method, it will be added to the Update List. + * @param child The child to be added to this Scene. + */ + existing(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject; + + /** + * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param font The key of the font to use from the BitmapFont cache. + * @param text The string, or array of strings, to be set as the content of this Bitmap Text. + * @param size The font size to set. + */ + dynamicBitmapText(x: number, y: number, font: string, text?: string | string[], size?: number): Phaser.GameObjects.DynamicBitmapText; + + /** + * Creates a new Bitmap Text Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param font The key of the font to use from the BitmapFont cache. + * @param text The string, or array of strings, to be set as the content of this Bitmap Text. + * @param size The font size to set. + * @param align The alignment of the text in a multi-line BitmapText object. Default 0. + */ + bitmapText(x: number, y: number, font: string, text?: string | string[], size?: number, align?: integer): Phaser.GameObjects.BitmapText; + + /** + * Creates a new Blitter Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Blitter Game Object has been built into Phaser. + * @param x The x position of the Game Object. + * @param y The y position of the Game Object. + * @param key The key of the Texture the Blitter object will use. + * @param frame The default Frame children of the Blitter will use. + */ + blitter(x: number, y: number, key: string, frame?: string | integer): Phaser.GameObjects.Blitter; + + /** + * Creates a new Container Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Container Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param children An optional array of Game Objects to add to this Container. + */ + container(x: number, y: number, children?: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.GameObjects.Container; + + /** + * Creates a new Graphics Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Graphics Game Object has been built into Phaser. + * @param config The Graphics configuration. + */ + graphics(config?: GraphicsOptions): Phaser.GameObjects.Graphics; + + /** + * Creates a new Group Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Group Game Object has been built into Phaser. + * @param children Game Objects to add to this Group; or the `config` argument. + * @param config A Group Configuration object. + */ + group(children?: Phaser.GameObjects.GameObject[] | GroupConfig, config?: GroupConfig): Phaser.GameObjects.Group; + + /** + * Creates a new Image Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Image Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + image(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Image; + + /** + * Creates a new Mesh Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param vertices An array containing the vertices data for this Mesh. + * @param uv An array containing the uv data for this Mesh. + * @param colors An array containing the color data for this Mesh. + * @param alphas An array containing the alpha data for this Mesh. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + mesh(x: number, y: number, vertices: number[], uv: number[], colors: number[], alphas: number[], texture: string, frame?: string | integer): Phaser.GameObjects.Mesh; + + /** + * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Particles Game Object has been built into Phaser. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + * @param emitters Configuration settings for one or more emitters to create. + */ + particles(texture: string, frame?: string | integer | object, emitters?: ParticleEmitterConfig | ParticleEmitterConfig[]): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Creates a new PathFollower Game Object and adds it to the Scene. + * + * Note: This method will only be available if the PathFollower Game Object has been built into Phaser. + * @param path The Path this PathFollower is connected to. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + follower(path: Phaser.Curves.Path, x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.PathFollower; + + /** + * Creates a new Quad Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + quad(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Quad; + + /** + * Creates a new Render Texture Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Render Texture Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Render Texture. Default 32. + * @param height The height of the Render Texture. Default 32. + */ + renderTexture(x: number, y: number, width?: integer, height?: integer): Phaser.GameObjects.RenderTexture; + + /** + * Creates a new Sprite Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Sprite Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + sprite(x: number, y: number, texture: string, frame?: string | integer): Phaser.GameObjects.Sprite; + + /** + * Creates a new Sprite3D Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Sprite3D Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object. + * @param y The vertical position of this Game Object. + * @param z The z position of this Game Object. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + sprite3D(x: number, y: number, z: number, texture: string, frame?: string | integer): Phaser.GameObjects.Sprite3D; + + /** + * Creates a new Text Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Text Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param text The text this Text object will display. + * @param style The Text style configuration object. + */ + text(x: number, y: number, text: string | string[], style?: object): Phaser.GameObjects.Text; + + /** + * Creates a new TileSprite Game Object and adds it to the Scene. + * + * Note: This method will only be available if the TileSprite Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Game Object. + * @param height The height of the Game Object. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + tileSprite(x: number, y: number, width: number, height: number, texture: string, frame?: string | integer): Phaser.GameObjects.TileSprite; + + /** + * Creates a new Zone Game Object and adds it to the Scene. + * + * Note: This method will only be available if the Zone Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Game Object. + * @param height The height of the Game Object. + */ + zone(x: number, y: number, width: number, height: number): Phaser.GameObjects.Zone; + + /** + * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. + * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing + * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map + * data. For an empty map, you should specify tileWidth, tileHeight, width & height. + * @param key The key in the Phaser cache that corresponds to the loaded tilemap data. + * @param tileWidth The width of a tile in pixels. Pass in `null` to leave as the + * default. Default 32. + * @param tileHeight The height of a tile in pixels. Pass in `null` to leave as the + * default. Default 32. + * @param width The width of the map in tiles. Pass in `null` to leave as the + * default. Default 10. + * @param height The height of the map in tiles. Pass in `null` to leave as the + * default. Default 10. + * @param data Instead of loading from the cache, you can also load directly from + * a 2D array of tile indexes. Pass in `null` for no data. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the + * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. Default false. + */ + tilemap(key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; + + /** + * Creates a new Tween object. + * + * Note: This method will only be available Tweens have been built into Phaser. + * @param config The Tween configuration. + */ + tween(config: object): Phaser.Tweens.Tween; + + } + + /** + * The Update List plugin. + * + * Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame. + * + * Some or all of these Game Objects may also be part of the Scene's [Display List]{@link Phaser.GameObjects.DisplayList}, for Rendering. + */ + class UpdateList { + /** + * + * @param scene The Scene that the Update List belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene that the Update List belongs to. + */ + scene: Phaser.Scene; + + /** + * The Scene's Systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * Add a Game Object to the Update List. + * @param child The Game Object to add. + */ + add(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject; + + /** + * The pre-update step. + * + * Handles Game Objects that are pending insertion to and removal from the list. + */ + preUpdate(): void; + + /** + * The update step. + * + * Pre-updates every active Game Object in the list. + * @param time The current timestamp. + * @param delta The delta time elapsed since the last frame. + */ + update(time: number, delta: number): void; + + /** + * Remove a Game Object from the list. + * @param child The Game Object to remove from the list. + */ + remove(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject; + + /** + * Remove all Game Objects from the list. + */ + removeAll(): Phaser.GameObjects.UpdateList; + + /** + * The Scene that owns this plugin is shutting down. + * We need to kill and reset all internal properties as well as stop listening to Scene events. + */ + shutdown(): void; + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + */ + destroy(): void; + + /** + * The length of the list. + */ + readonly length: integer; + + } + + namespace RetroFont { + /** + * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor + * and create a BitmapText object using a fixed-width retro font. + * @param scene A reference to the Phaser Scene. + * @param config The font configuration object. + */ + function Parse(scene: Phaser.Scene, config: Phaser.GameObjects.RetroFont.Config): object; + + type Config = { + /** + * The key of the image containing the font. + */ + image: string; + /** + * If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. + */ + "offset.x": number; + /** + * If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. + */ + "offset.y": number; + /** + * The width of each character in the font set. + */ + width: number; + /** + * The height of each character in the font set. + */ + height: number; + /** + * The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. + */ + chars: string; + /** + * The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth. + */ + charsPerRow: number; + /** + * If the characters in the font set have horizontal spacing between them set the required amount here. + */ + "spacing.x": number; + /** + * If the characters in the font set have vertical spacing between them set the required amount here. + */ + "spacing.y": number; + }; + + /** + * Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + */ + var TEXT_SET1: string; + + /** + * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET2: string; + + /** + * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 + */ + var TEXT_SET3: string; + + /** + * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 + */ + var TEXT_SET4: string; + + /** + * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 + */ + var TEXT_SET5: string; + + /** + * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' + */ + var TEXT_SET6: string; + + /** + * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 + */ + var TEXT_SET7: string; + + /** + * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET8: string; + + /** + * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! + */ + var TEXT_SET9: string; + + /** + * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ + */ + var TEXT_SET10: string; + + /** + * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 + */ + var TEXT_SET11: string; + + } + + /** + * [description] + */ + class DynamicBitmapText extends Phaser.GameObjects.BitmapText { + /** + * + * @param scene The Scene to which this Game Object belongs. It can only belong to one Scene at any given time. + * @param x The x coordinate of this Game Object in world space. + * @param y The y coordinate of this Game Object in world space. + * @param font The key of the font to use from the Bitmap Font cache. + * @param text The string, or array of strings, to be set as the content of this Bitmap Text. + * @param size The font size of this Bitmap Text. + * @param align The alignment of the text in a multi-line BitmapText object. Default 0. + */ + constructor(scene: Phaser.Scene, x: number, y: number, font: string, text?: string | string[], size?: number, align?: integer); + + /** + * The horizontal scroll position of the Bitmap Text. + */ + scrollX: number; + + /** + * The vertical scroll position of the Bitmap Text. + */ + scrollY: number; + + /** + * The crop width of the Bitmap Text. + */ + cropWidth: number; + + /** + * The crop height of the Bitmap Text. + */ + cropHeight: number; + + /** + * A callback that alters how each character of the Bitmap Text is rendered. + */ + displayCallback: DisplayCallback; + + /** + * The data object that is populated during rendering, then passed to the displayCallback. + * You should modify this object then return it back from the callback. It's updated values + * will be used to render the specific glyph. + * + * Please note that if you need a reference to this object locally in your game code then you + * should shallow copy it, as it's updated and re-used for every glyph in the text. + */ + callbackData: DisplayCallbackConfig; + + /** + * Set the crop size of this Bitmap Text. + * @param width The width of the crop. + * @param height The height of the crop. + */ + setSize(width: number, height: number): Phaser.GameObjects.DynamicBitmapText; + + /** + * Set a callback that alters how each character of the Bitmap Text is rendered. + * + * The callback receives a {@link DisplayCallbackConfig} object that contains information about the character that's + * about to be rendered. + * + * It should return an object with `x`, `y`, `scale` and `rotation` properties that will be used instead of the + * usual values when rendering. + * @param callback The display callback to set. + */ + setDisplayCallback(callback: DisplayCallback): Phaser.GameObjects.DynamicBitmapText; + + /** + * Set the horizontal scroll position of this Bitmap Text. + * @param value The horizontal scroll position to set. + */ + setScrollX(value: number): Phaser.GameObjects.DynamicBitmapText; + + /** + * Set the vertical scroll position of this Bitmap Text. + * @param value The vertical scroll position to set. + */ + setScrollY(value: number): Phaser.GameObjects.DynamicBitmapText; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * [description] + */ + class BitmapText extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. It can only belong to one Scene at any given time. + * @param x The x coordinate of this Game Object in world space. + * @param y The y coordinate of this Game Object in world space. + * @param font The key of the font to use from the Bitmap Font cache. + * @param text The string, or array of strings, to be set as the content of this Bitmap Text. + * @param size The font size of this Bitmap Text. + * @param align The alignment of the text in a multi-line BitmapText object. Default 0. + */ + constructor(scene: Phaser.Scene, x: number, y: number, font: string, text?: string | string[], size?: number, align?: integer); + + /** + * The key of the Bitmap Font used by this Bitmap Text. + * To change the font after creation please use `setFont`. + */ + readonly font: string; + + /** + * The data of the Bitmap Font used by this Bitmap Text. + */ + readonly fontData: BitmapFontData; + + /** + * Set the lines of text in this BitmapText to be left-aligned. + * This only has any effect if this BitmapText contains more than one line of text. + */ + setLeftAlign(): this; + + /** + * Set the lines of text in this BitmapText to be center-aligned. + * This only has any effect if this BitmapText contains more than one line of text. + */ + setCenterAlign(): this; + + /** + * Set the lines of text in this BitmapText to be right-aligned. + * This only has any effect if this BitmapText contains more than one line of text. + */ + setRightAlign(): this; + + /** + * Set the font size of this Bitmap Text. + * @param size The font size to set. + */ + setFontSize(size: number): this; + + /** + * Sets the letter spacing between each character of this Bitmap Text. + * Can be a positive value to increase the space, or negative to reduce it. + * Spacing is applied after the kerning values have been set. + * @param spacing The amount of horizontal space to add between each character. Default 0. + */ + setLetterSpacing(spacing?: number): this; + + /** + * Set the textual content of this BitmapText. + * + * An array of strings will be converted into multi-line text. Use the align methods to change multi-line alignment. + * @param value The string, or array of strings, to be set as the content of this BitmapText. + */ + setText(value: string | string[]): this; + + /** + * Calculate the bounds of this Bitmap Text. + * + * An object is returned that contains the position, width and height of the Bitmap Text in local and global + * contexts. + * + * Local size is based on just the font size and a [0, 0] position. + * + * Global size takes into account the Game Object's scale, world position and display origin. + * + * Also in the object is data regarding the length of each line, should this be a multi-line BitmapText. + * @param round Whether to round the results to the nearest integer. + */ + getTextBounds(round?: boolean): BitmapTextSize; + + /** + * Changes the font this BitmapText is using to render. + * + * The new texture is loaded and applied to the BitmapText. The existing test, size and alignment are preserved, + * unless overridden via the arguments. + * @param font The key of the font to use from the Bitmap Font cache. + * @param size The font size of this Bitmap Text. If not specified the current size will be used. + * @param align The alignment of the text in a multi-line BitmapText object. If not specified the current alignment will be used. Default 0. + */ + setFont(font: string, size?: number, align?: integer): this; + + /** + * Controls the alignment of each line of text in this BitmapText object. + * + * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns. + * Has no effect with single-lines of text. + * + * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`. + * + * 0 = Left aligned (default) + * 1 = Middle aligned + * 2 = Right aligned + * + * The alignment position is based on the longest line of text. + */ + align: integer; + + /** + * The text that this Bitmap Text object displays. + * + * You can also use the method `setText` if you want a chainable way to change the text content. + */ + text: string; + + /** + * The font size of this Bitmap Text. + * + * You can also use the method `setFontSize` if you want a chainable way to change the font size. + */ + fontSize: number; + + /** + * Adds / Removes spacing between characters. + * + * Can be a negative or positive number. + * + * You can also use the method `setLetterSpacing` if you want a chainable way to change the letter spacing. + */ + letterSpacing: number; + + /** + * The width of this Bitmap Text. + */ + readonly width: number; + + /** + * The height of this bitmap text. + */ + readonly height: number; + + /** + * Build a JSON representation of this Bitmap Text. + */ + toJSON(): JSONBitmapText; + + /** + * Left align the text characters in a multi-line BitmapText object. + */ + static ALIGN_LEFT: integer; + + /** + * Center align the text characters in a multi-line BitmapText object. + */ + static ALIGN_CENTER: integer; + + /** + * Right align the text characters in a multi-line BitmapText object. + */ + static ALIGN_RIGHT: integer; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Blitter Game Object. + * + * The Blitter Game Object is a special kind of container that creates, updates and manages Bob objects. + * Bobs are designed for rendering speed rather than flexibility. They consist of a texture, or frame from a texture, + * a position and an alpha value. You cannot scale or rotate them. They use a batched drawing method for speed + * during rendering. + * + * A Blitter Game Object has one texture bound to it. Bobs created by the Blitter can use any Frame from this + * Texture to render with, but they cannot use any other Texture. It is this single texture-bind that allows + * them their speed. + * + * If you have a need to blast a large volume of frames around the screen then Blitter objects are well worth + * investigating. They are especially useful for using as a base for your own special effects systems. + */ + class Blitter extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. It can only belong to one Scene at any given time. + * @param x The x coordinate of this Game Object in world space. Default 0. + * @param y The y coordinate of this Game Object in world space. Default 0. + * @param texture The key of the texture this Game Object will use for rendering. The Texture must already exist in the Texture Manager. Default '__DEFAULT'. + * @param frame The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet. Default 0. + */ + constructor(scene: Phaser.Scene, x?: number, y?: number, texture?: string, frame?: string | integer); + + /** + * The children of this Blitter. + * This List contains all of the Bob objects created by the Blitter. + */ + children: Phaser.Structs.List; + + /** + * Is the Blitter considered dirty? + * A 'dirty' Blitter has had its child count changed since the last frame. + */ + dirty: boolean; + + /** + * Creates a new Bob in this Blitter. + * + * The Bob is created at the given coordinates, relative to the Blitter and uses the given frame. + * A Bob can use any frame belonging to the texture bound to the Blitter. + * @param x The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param y The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param frame The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. + * @param visible Should the created Bob render or not? Default true. + * @param index The position in the Blitters Display List to add the new Bob at. Defaults to the top of the list. + */ + create(x: number, y: number, frame?: string | integer | Phaser.Textures.Frame, visible?: boolean, index?: integer): Phaser.GameObjects.Blitter.Bob; + + /** + * Creates multiple Bob objects within this Blitter and then passes each of them to the specified callback. + * @param callback The callback to invoke after creating a bob. It will be sent two arguments: The Bob and the index of the Bob. + * @param quantity The quantity of Bob objects to create. + * @param frame The Frame the Bobs will use. It must be part of the Blitter Texture. + * @param visible Should the created Bob render or not? Default true. + */ + createFromCallback(callback: Phaser.GameObjects.Blitter.CreateCallback, quantity: integer, frame?: string | integer | Phaser.Textures.Frame | string[] | integer[] | Phaser.Textures.Frame[], visible?: boolean): Phaser.GameObjects.Blitter.Bob[]; + + /** + * Creates multiple Bobs in one call. + * + * The amount created is controlled by a combination of the `quantity` argument and the number of frames provided. + * + * If the quantity is set to 10 and you provide 2 frames, then 20 Bobs will be created. 10 with the first + * frame and 10 with the second. + * @param quantity The quantity of Bob objects to create. + * @param frame The Frame the Bobs will use. It must be part of the Blitter Texture. + * @param visible Should the created Bob render or not? Default true. + */ + createMultiple(quantity: integer, frame?: string | integer | Phaser.Textures.Frame | string[] | integer[] | Phaser.Textures.Frame[], visible?: boolean): Phaser.GameObjects.Blitter.Bob[]; + + /** + * Checks if the given child can render or not, by checking its `visible` and `alpha` values. + * @param child The Bob to check for rendering. + */ + childCanRender(child: Phaser.GameObjects.Blitter.Bob): boolean; + + /** + * Returns an array of Bobs to be rendered. + * If the Blitter is dirty then a new list is generated and stored in `renderList`. + */ + getRenderList(): Phaser.GameObjects.Blitter.Bob[]; + + /** + * Removes all Bobs from the children List and clears the dirty flag. + */ + clear(): void; + + /** + * Internal destroy handler, called as part of the destroy process. + */ + protected preDestroy(): void; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + namespace Components { + /** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Alpha { + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + } + + interface Animation { + /** + * The Game Object to which this animation controller belongs. + */ + parent: Phaser.GameObjects.GameObject; + /** + * A reference to the global Animation Manager. + */ + animationManager: Phaser.Animations.AnimationManager; + /** + * Is an animation currently playing or not? + */ + isPlaying: boolean; + /** + * The current Animation loaded into this Animation Controller. + */ + currentAnim: Phaser.Animations.Animation; + /** + * The current AnimationFrame being displayed by this Animation Controller. + */ + currentFrame: Phaser.Animations.AnimationFrame; + /** + * The frame rate of playback in frames per second. + * The default is 24 if the `duration` property is `null`. + */ + frameRate: number; + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + */ + duration: number; + /** + * ms per frame, not including frame specific modifiers that may be present in the Animation data. + */ + msPerFrame: number; + /** + * Skip frames if the time lags, or always advanced anyway? + */ + skipMissedFrames: boolean; + /** + * Will the playhead move forwards (`true`) or in reverse (`false`) + */ + forward: boolean; + /** + * Internal time overflow accumulator. + */ + accumulator: number; + /** + * The time point at which the next animation frame will change. + */ + nextTick: number; + /** + * An internal counter keeping track of how many repeats are left to play. + */ + repeatCounter: number; + /** + * An internal flag keeping track of pending repeats. + */ + pendingRepeat: boolean; + /** + * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. + * @param value The amount of time, in milliseconds, to wait before starting playback. Default 0. + */ + setDelay(value?: integer): Phaser.GameObjects.GameObject; + /** + * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. + */ + getDelay(): integer; + /** + * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * @param delay The delay, in milliseconds, to wait before starting the animation playing. + * @param key The key of the animation to play. + * @param startFrame The frame of the animation to start from. Default 0. + */ + delayedPlay(delay: integer, key: string, startFrame?: integer): Phaser.GameObjects.GameObject; + /** + * Returns the key of the animation currently loaded into this component. + */ + getCurrentKey(): string; + /** + * Internal method used to load an animation into this component. + * @param key The key of the animation to load. + * @param startFrame The start frame of the animation to load. Default 0. + */ + load(key: string, startFrame?: integer): Phaser.GameObjects.GameObject; + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * @param atFrame An optional frame to set after pausing the animation. + */ + pause(atFrame?: Phaser.Animations.AnimationFrame): Phaser.GameObjects.GameObject; + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * @param fromFrame An optional frame to set before restarting playback. + */ + resume(fromFrame?: Phaser.Animations.AnimationFrame): Phaser.GameObjects.GameObject; + /** + * `true` if the current animation is paused, otherwise `false`. + */ + readonly isPaused: boolean; + /** + * Plays an Animation on the Game Object that owns this Animation Component. + * @param key The string-based key of the animation to play, as defined previously in the Animation Manager. + * @param ignoreIfPlaying If an animation is already playing then ignore this call. Default false. + * @param startFrame Optionally start the animation playing from this frame index. Default 0. + */ + play(key: string, ignoreIfPlaying?: boolean, startFrame?: integer): Phaser.GameObjects.GameObject; + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different + * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. + */ + getProgress(): number; + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * @param value The progress value, between 0 and 1. Default 0. + */ + setProgress(value?: number): Phaser.GameObjects.GameObject; + /** + * Handle the removal of an animation from the Animation Manager. + * @param key The key of the removed Animation. + * @param animation The removed Animation. + */ + remove(key?: string, animation?: Phaser.Animations.Animation): void; + /** + * Gets the number of times that the animation will repeat + * after its first iteration. For example, if returns 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * A value of -1 means the animation will repeat indefinitely. + */ + getRepeat(): integer; + /** + * Sets the number of times that the animation should repeat + * after its first iteration. For example, if repeat is 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * To repeat indefinitely, use -1. repeat should always be an integer. + * @param value The number of times that the animation should repeat. + */ + setRepeat(value: integer): Phaser.GameObjects.GameObject; + /** + * Gets the amount of delay between repeats, if any. + */ + getRepeatDelay(): number; + /** + * Sets the amount of time in seconds between repeats. + * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, + * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds + * before doing its final repeat. + * @param value The delay to wait between repeats, in seconds. + */ + setRepeatDelay(value: number): Phaser.GameObjects.GameObject; + /** + * Restarts the current animation from its beginning, optionally including its delay value. + * @param includeDelay Whether to include the delay value of the animation when restarting. Default false. + */ + restart(includeDelay?: boolean): Phaser.GameObjects.GameObject; + /** + * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. + */ + stop(): Phaser.GameObjects.GameObject; + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * @param delay The number of milliseconds to wait before stopping this animation. + */ + stopAfterDelay(delay: integer): Phaser.GameObjects.GameObject; + /** + * Stops the current animation from playing when it next repeats. + */ + stopOnRepeat(): Phaser.GameObjects.GameObject; + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * @param delay The frame to check before stopping this animation. + */ + stopOnFrame(delay: Phaser.Animations.AnimationFrame): Phaser.GameObjects.GameObject; + /** + * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. + * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + * @param value The time scale factor, where 1 is no change, 0.5 is half speed, etc. Default 1. + */ + setTimeScale(value?: number): Phaser.GameObjects.GameObject; + /** + * Gets the Time Scale factor. + */ + getTimeScale(): number; + /** + * Returns the total number of frames in this animation. + */ + getTotalFrames(): integer; + /** + * The internal update loop for the Animation Component. + * @param time The current timestamp. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + update(time: number, delta: number): void; + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting its size and origin as needed. + * @param animationFrame The Animation Frame to set as being current. + */ + setCurrentFrame(animationFrame: Phaser.Animations.AnimationFrame): Phaser.GameObjects.GameObject; + /** + * Sets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * @param value `true` if the animation should yoyo, `false` to not. Default false. + */ + setYoyo(value?: boolean): Phaser.GameObjects.GameObject; + /** + * Gets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + */ + getYoyo(): boolean; + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + */ + destroy(): void; + } + + /** + * Provides methods used for setting the blend mode of a Game Object. + * Should be applied as a mixin and not used directly. + */ + interface BlendMode { + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + } + + /** + * Provides methods used for calculating and setting the size of a non-Frame based Game Object. + * Should be applied as a mixin and not used directly. + */ + interface ComputedSize { + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + } + + /** + * Provides methods used for setting the depth of a Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Depth { + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + } + + /** + * Provides methods used for visually flipping a Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Flip { + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + } + + /** + * Provides methods used for obtaining the bounds of a Game Object. + * Should be applied as a mixin and not used directly. + */ + interface GetBounds { + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + } + + /** + * Provides methods used for getting and setting the mask of a Game Object. + */ + interface Mask { + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + } + + /** + * Provides methods used for getting and setting the transform values of a Game Object. + * Should be applied as a mixin and not used directly. + */ + interface MatrixStack { + /** + * Initialize the matrix stack. + */ + initMatrixStack(): this; + /** + * Push the current matrix onto the matrix stack. + */ + save(): this; + /** + * Pop the top of the matrix stack into the current matrix. + */ + restore(): this; + /** + * Reset the current matrix to the identity matrix. + */ + loadIdentity(): this; + /** + * Transform the current matrix. + * @param a The Scale X value. + * @param b The Shear Y value. + * @param c The Shear X value. + * @param d The Scale Y value. + * @param tx The Translate X value. + * @param ty The Translate Y value. + */ + transform(a: number, b: number, c: number, d: number, tx: number, ty: number): this; + /** + * Set a transform matrix as the current matrix. + * @param a The Scale X value. + * @param b The Shear Y value. + * @param c The Shear X value. + * @param d The Scale Y value. + * @param tx The Translate X value. + * @param ty The Translate Y value. + */ + setTransform(a: number, b: number, c: number, d: number, tx: number, ty: number): this; + /** + * Translate the current matrix. + * @param x The horizontal translation value. + * @param y The vertical translation value. + */ + translate(x: number, y: number): this; + /** + * Scale the current matrix. + * @param x The horizontal scale value. + * @param y The vertical scale value. + */ + scale(x: number, y: number): this; + /** + * Rotate the current matrix. + * @param t The angle of rotation in radians. + */ + rotate(t: number): this; + } + + /** + * Provides methods used for getting and setting the origin of a Game Object. + * Values are normalized, given in the range 0 to 1. + * Display values contain the calculated pixel values. + * Should be applied as a mixin and not used directly. + */ + interface Origin { + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + } + + /** + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + */ + interface Pipeline { + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + } + + /** + * Provides methods used for getting and setting the scale of a Game Object. + */ + interface ScaleMode { + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + } + + /** + * Provides methods used for getting and setting the Scroll Factor of a Game Object. + */ + interface ScrollFactor { + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + } + + /** + * Provides methods used for getting and setting the size of a Game Object. + */ + interface Size { + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + } + + /** + * Provides methods used for getting and setting the texture of a Game Object. + */ + interface Texture { + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + } + + /** + * Provides methods used for getting and setting the texture of a Game Object. + */ + interface TextureCrop { + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + } + + /** + * Provides methods used for setting the tint of a Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Tint { + /** + * Fill or additive? + */ + tintFill: boolean; + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + } + + /** + * Build a JSON representation of the given Game Object. + * + * This is typically extended further by Game Object specific implementations. + * @param gameObject The Game Object to export as JSON. + */ + function ToJSON(gameObject: Phaser.GameObjects.GameObject): JSONGameObject; + + /** + * Provides methods used for getting and setting the position, scale and rotation of a Game Object. + */ + interface Transform { + /** + * The x position of this Game Object. + */ + x: number; + /** + * The y position of this Game Object. + */ + y: number; + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + /** + * The w position of this Game Object. + */ + w: number; + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + } + + /** + * A Matrix used for display transformations for rendering. + * + * It is represented like so: + * + * ``` + * | a | c | tx | + * | b | d | ty | + * | 0 | 0 | 1 | + * ``` + */ + class TransformMatrix { + /** + * + * @param a The Scale X value. Default 1. + * @param b The Shear Y value. Default 0. + * @param c The Shear X value. Default 0. + * @param d The Scale Y value. Default 1. + * @param tx The Translate X value. Default 0. + * @param ty The Translate Y value. Default 0. + */ + constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number); + + /** + * The matrix values. + */ + matrix: Float32Array; + + /** + * The decomposed matrix. + */ + decomposedMatrix: object; + + /** + * The Scale X value. + */ + a: number; + + /** + * The Shear Y value. + */ + b: number; + + /** + * The Shear X value. + */ + c: number; + + /** + * The Scale Y value. + */ + d: number; + + /** + * The Translate X value. + */ + e: number; + + /** + * The Translate Y value. + */ + f: number; + + /** + * The Translate X value. + */ + tx: number; + + /** + * The Translate Y value. + */ + ty: number; + + /** + * The rotation of the Matrix. + */ + readonly rotation: number; + + /** + * The horizontal scale of the Matrix. + */ + readonly scaleX: number; + + /** + * The vertical scale of the Matrix. + */ + readonly scaleY: number; + + /** + * Reset the Matrix to an identity matrix. + */ + loadIdentity(): this; + + /** + * Translate the Matrix. + * @param x The horizontal translation value. + * @param y The vertical translation value. + */ + translate(x: number, y: number): this; + + /** + * Scale the Matrix. + * @param x The horizontal scale value. + * @param y The vertical scale value. + */ + scale(x: number, y: number): this; + + /** + * Rotate the Matrix. + * @param radian The angle of rotation in radians. + */ + rotate(radian: number): this; + + /** + * Multiply this Matrix by the given Matrix. + * + * If an `out` Matrix is given then the results will be stored in it. + * If it is not given, this matrix will be updated in place instead. + * Use an `out` Matrix if you do not wish to mutate this matrix. + * @param rhs The Matrix to multiply by. + * @param out An optional Matrix to store the results in. + */ + multiply(rhs: Phaser.GameObjects.Components.TransformMatrix, out?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Multiply this Matrix by the matrix given, including the offset. + * + * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. + * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. + * @param src The source Matrix to copy from. + * @param offsetX Horizontal offset to factor in to the multiplication. + * @param offsetY Vertical offset to factor in to the multiplication. + */ + multiplyWithOffset(src: Phaser.GameObjects.Components.TransformMatrix, offsetX: number, offsetY: number): this; + + /** + * Transform the Matrix. + * @param a The Scale X value. + * @param b The Shear Y value. + * @param c The Shear X value. + * @param d The Scale Y value. + * @param tx The Translate X value. + * @param ty The Translate Y value. + */ + transform(a: number, b: number, c: number, d: number, tx: number, ty: number): this; + + /** + * Transform a point using this Matrix. + * @param x The x coordinate of the point to transform. + * @param y The y coordinate of the point to transform. + * @param point The Point object to store the transformed coordinates. + */ + transformPoint(x: number, y: number, point: Phaser.Geom.Point | Phaser.Math.Vector2 | object): Phaser.Geom.Point | Phaser.Math.Vector2 | object; + + /** + * Invert the Matrix. + */ + invert(): this; + + /** + * Set the values of this Matrix to copy those of the matrix given. + * @param src The source Matrix to copy from. + */ + copyFrom(src: Phaser.GameObjects.Components.TransformMatrix): this; + + /** + * Set the values of this Matrix to copy those of the array given. + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * @param src The array of values to set into this matrix. + */ + copyFromArray(src: any[]): this; + + /** + * Set the values of this Matrix. + * @param a The Scale X value. + * @param b The Shear Y value. + * @param c The Shear X value. + * @param d The Scale Y value. + * @param tx The Translate X value. + * @param ty The Translate Y value. + */ + setTransform(a: number, b: number, c: number, d: number, tx: number, ty: number): this; + + /** + * Decompose this Matrix into its translation, scale and rotation values. + */ + decomposeMatrix(): object; + + /** + * Apply the identity, translate, rotate and scale operations on the Matrix. + * @param x The horizontal translation. + * @param y The vertical translation. + * @param rotation The angle of rotation in radians. + * @param scaleX The horizontal scale. + * @param scaleY The vertical scale. + */ + applyITRS(x: number, y: number, rotation: number, scaleX: number, scaleY: number): this; + + /** + * Destroys this Transform Matrix. + */ + destroy(): void; + + } + + /** + * Provides methods used for setting the visibility of a Game Object. + * Should be applied as a mixin and not used directly. + */ + interface Visible { + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + } + + } + + /** + * A Container Game Object. + * + * A Container, as the name implies, can 'contain' other types of Game Object. + * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it. + * By default it will be removed from the Display List and instead added to the Containers own internal list. + * + * The position of the Game Object automatically becomes relative to the position of the Container. + * + * When the Container is rendered, all of its children are rendered as well, in the order in which they exist + * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`. + * + * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will + * automatically influence all children as well. + * + * Containers can include other Containers for deeply nested transforms. + * + * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked. + * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask. + * + * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them + * to use as their hit area. Container children can also be enabled for input, independent of the Container. + * + * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However, + * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies, + * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children + * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure + * your game to work around this. + * + * It's important to understand the impact of using Containers. They add additional processing overhead into + * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true + * for input events. You also loose the ability to set the display depth of Container children in the same + * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost + * every time you create one, try to structure your game around avoiding that where possible. + */ + class Container extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. Default 0. + * @param y The vertical position of this Game Object in the world. Default 0. + * @param children An optional array of Game Objects to add to this Container. + */ + constructor(scene: Phaser.Scene, x?: number, y?: number, children?: Phaser.GameObjects.GameObject[]); + + /** + * An array holding the children of this Container. + */ + list: Phaser.GameObjects.GameObject[]; + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + */ + exclusive: boolean; + + /** + * Containers can have an optional maximum size. If set to anything above 0 it + * will constrict the addition of new Game Objects into the Container, capping off + * the maximum limit the Container can grow in size to. + */ + maxSize: integer; + + /** + * The cursor position. + */ + position: integer; + + /** + * Internal Transform Matrix used for local space conversion. + */ + localTransform: Phaser.GameObjects.Components.TransformMatrix; + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + */ + readonly originX: number; + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + */ + readonly originY: number; + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + */ + readonly displayOriginX: number; + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + */ + readonly displayOriginY: number; + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * @param value The exclusive state of this Container. Default true. + */ + setExclusive(value?: boolean): Phaser.GameObjects.Container; + + /** + * Gets the bounds of this Container. It works by iterating all children of the Container, + * getting their respective bounds, and then working out a min-max rectangle from that. + * It does not factor in if the children render or not, all are included. + * + * Some children are unable to return their bounds, such as Graphics objects, in which case + * they are skipped. + * + * Depending on the quantity of children in this Container it could be a really expensive call, + * so cache it and only poll it as needed. + * + * The values are stored and returned in a Rectangle object. + * @param output A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle; + + /** + * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties, + * and transforms it into the space of this Container, then returns it in the output object. + * @param source The Source Point to be transformed. + * @param output A destination object to store the transformed point in. If none given a Vector2 will be created and returned. + */ + pointToContainer(source: object | Phaser.Geom.Point | Phaser.Math.Vector2, output?: object | Phaser.Geom.Point | Phaser.Math.Vector2): object | Phaser.Geom.Point | Phaser.Math.Vector2; + + /** + * Returns the world transform matrix as used for Bounds checks. + * The returned matrix is temporal and shouldn't be stored. + */ + getBoundsTransformMatrix(): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Adds the given Game Object, or array of Game Objects, to this Container. + * + * Each Game Object must be unique within the Container. + * @param child The Game Object, or array of Game Objects, to add to the Container. + */ + add(child: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.GameObjects.Container; + + /** + * Adds the given Game Object, or array of Game Objects, to this Container at the specified position. + * + * Existing Game Objects in the Container are shifted up. + * + * Each Game Object must be unique within the Container. + * @param child The Game Object, or array of Game Objects, to add to the Container. + * @param index The position to insert the Game Object/s at. Default 0. + */ + addAt(child: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], index?: integer): Phaser.GameObjects.Container; + + /** + * Returns the Game Object at the given position in this Container. + * @param index The position to get the Game Object from. + */ + getAt(index: integer): Phaser.GameObjects.GameObject; + + /** + * Returns the index of the given Game Object in this Container. + * @param child The Game Object to search for in this Container. + */ + getIndex(child: Phaser.GameObjects.GameObject): integer; + + /** + * Sort the contents of this Container so the items are in order based on the given property. + * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property. + * @param property The property to lexically sort by. + */ + sort(property: string): Phaser.GameObjects.Container; + + /** + * Searches for the first instance of a child with its `name` property matching the given argument. + * Should more than one child have the same name only the first is returned. + * @param name The name to search for. + */ + getByName(name: string): Phaser.GameObjects.GameObject; + + /** + * Returns a random Game Object from this Container. + * @param startIndex An optional start index. Default 0. + * @param length An optional length, the total number of elements (from the startIndex) to choose from. + */ + getRandom(startIndex?: integer, length?: integer): Phaser.GameObjects.GameObject; + + /** + * Gets the first Game Object in this Container. + * + * You can also specify a property and value to search for, in which case it will return the first + * Game Object in this Container with a matching property and / or value. + * + * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set. + * + * You can limit the search to the `startIndex` - `endIndex` range. + * @param property The property to test on each Game Object in the Container. + * @param value The value to test the property against. Must pass a strict (`===`) comparison check. + * @param startIndex An optional start index to search from. Default 0. + * @param endIndex An optional end index to search up to (but not included) Default Container.length. + */ + getFirst(property?: string, value?: any, startIndex?: integer, endIndex?: integer): Phaser.GameObjects.GameObject; + + /** + * Returns all Game Objects in this Container. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('body')` would return only Game Objects that have a body property. + * + * You can also specify a value to compare the property to: + * + * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * @param property The property to test on each Game Object in the Container. + * @param value If property is set then the `property` must strictly equal this value to be included in the results. + * @param startIndex An optional start index to search from. Default 0. + * @param endIndex An optional end index to search up to (but not included) Default Container.length. + */ + getAll(property?: string, value?: any, startIndex?: integer, endIndex?: integer): Phaser.GameObjects.GameObject[]; + + /** + * Returns the total number of Game Objects in this Container that have a property + * matching the given value. + * + * For example: `count('visible', true)` would count all the elements that have their visible property set. + * + * You can optionally limit the operation to the `startIndex` - `endIndex` range. + * @param property The property to check. + * @param value The value to check. + * @param startIndex An optional start index to search from. Default 0. + * @param endIndex An optional end index to search up to (but not included) Default Container.length. + */ + count(property: string, value: any, startIndex?: integer, endIndex?: integer): integer; + + /** + * Swaps the position of two Game Objects in this Container. + * Both Game Objects must belong to this Container. + * @param child1 The first Game Object to swap. + * @param child2 The second Game Object to swap. + */ + swap(child1: Phaser.GameObjects.GameObject, child2: Phaser.GameObjects.GameObject): Phaser.GameObjects.Container; + + /** + * Moves a Game Object to a new position within this Container. + * + * The Game Object must already be a child of this Container. + * + * The Game Object is removed from its old position and inserted into the new one. + * Therefore the Container size does not change. Other children will change position accordingly. + * @param child The Game Object to move. + * @param index The new position of the Game Object in this Container. + */ + moveTo(child: Phaser.GameObjects.GameObject, index: integer): Phaser.GameObjects.Container; + + /** + * Removes the given Game Object, or array of Game Objects, from this Container. + * + * The Game Objects must already be children of this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * @param child The Game Object, or array of Game Objects, to be removed from the Container. + * @param destroyChild Optionally call `destroy` on each child successfully removed from this Container. Default false. + */ + remove(child: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], destroyChild?: boolean): Phaser.GameObjects.Container; + + /** + * Removes the Game Object at the given position in this Container. + * + * You can also optionally call `destroy` on the Game Object, if one is found. + * @param index The index of the Game Object to be removed. + * @param destroyChild Optionally call `destroy` on the Game Object if successfully removed from this Container. Default false. + */ + removeAt(index: integer, destroyChild?: boolean): Phaser.GameObjects.Container; + + /** + * Removes the Game Objects between the given positions in this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * @param startIndex An optional start index to search from. Default 0. + * @param endIndex An optional end index to search up to (but not included) Default Container.length. + * @param destroyChild Optionally call `destroy` on each Game Object successfully removed from this Container. Default false. + */ + removeBetween(startIndex?: integer, endIndex?: integer, destroyChild?: boolean): Phaser.GameObjects.Container; + + /** + * Removes all Game Objects from this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * @param destroyChild Optionally call `destroy` on each Game Object successfully removed from this Container. Default false. + */ + removeAll(destroyChild?: boolean): Phaser.GameObjects.Container; + + /** + * Brings the given Game Object to the top of this Container. + * This will cause it to render on-top of any other objects in the Container. + * @param child The Game Object to bring to the top of the Container. + */ + bringToTop(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.Container; + + /** + * Sends the given Game Object to the bottom of this Container. + * This will cause it to render below any other objects in the Container. + * @param child The Game Object to send to the bottom of the Container. + */ + sendToBack(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.Container; + + /** + * Moves the given Game Object up one place in this Container, unless it's already at the top. + * @param child The Game Object to be moved in the Container. + */ + moveUp(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.Container; + + /** + * Moves the given Game Object down one place in this Container, unless it's already at the bottom. + * @param child The Game Object to be moved in the Container. + */ + moveDown(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.Container; + + /** + * Reverses the order of all Game Objects in this Container. + */ + reverse(): Phaser.GameObjects.Container; + + /** + * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation. + */ + shuffle(): Phaser.GameObjects.Container; + + /** + * Replaces a Game Object in this Container with the new Game Object. + * The new Game Object cannot already be a child of this Container. + * @param oldChild The Game Object in this Container that will be replaced. + * @param newChild The Game Object to be added to this Container. + * @param destroyChild Optionally call `destroy` on the Game Object if successfully removed from this Container. Default false. + */ + replace(oldChild: Phaser.GameObjects.GameObject, newChild: Phaser.GameObjects.GameObject, destroyChild?: boolean): Phaser.GameObjects.Container; + + /** + * Returns `true` if the given Game Object is a direct child of this Container. + * + * This check does not scan nested Containers. + * @param child The Game Object to check for within this Container. + */ + exists(child: Phaser.GameObjects.GameObject): boolean; + + /** + * Sets the property to the given value on all Game Objects in this Container. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * @param property The property that must exist on the Game Object. + * @param value The value to get the property to. + * @param startIndex An optional start index to search from. Default 0. + * @param endIndex An optional end index to search up to (but not included) Default Container.length. + */ + setAll(property: string, value: any, startIndex?: integer, endIndex?: integer): Phaser.GameObjects.Container; + + /** + * Passes all Game Objects in this Container to the given callback. + * + * A copy of the Container is made before passing each entry to your callback. + * This protects against the callback itself modifying the Container. + * + * If you know for sure that the callback will not change the size of this Container + * then you can use the more performant `Container.iterate` method instead. + * @param callback The function to call. + * @param context Value to use as `this` when executing callback. + * @param args Additional arguments that will be passed to the callback, after the child. + */ + each(callback: Function, context?: object, ...args: any[]): Phaser.GameObjects.Container; + + /** + * Passes all Game Objects in this Container to the given callback. + * + * Only use this method when you absolutely know that the Container will not be modified during + * the iteration, i.e. by removing or adding to its contents. + * @param callback The function to call. + * @param context Value to use as `this` when executing callback. + * @param args Additional arguments that will be passed to the callback, after the child. + */ + iterate(callback: Function, context?: object, ...args: any[]): Phaser.GameObjects.Container; + + /** + * The number of Game Objects inside this Container. + */ + readonly length: integer; + + /** + * Returns the first Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + */ + readonly first: Phaser.GameObjects.GameObject; + + /** + * Returns the last Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + */ + readonly last: Phaser.GameObjects.GameObject; + + /** + * Returns the next Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + */ + readonly next: Phaser.GameObjects.GameObject; + + /** + * Returns the previous Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + */ + readonly previous: Phaser.GameObjects.GameObject; + + /** + * Internal destroy handler, called as part of the destroy process. + */ + protected preDestroy(): void; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Graphics object is a way to draw primitive shapes to you game. Primitives include forms of geometry, such as + * Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics + * object it will be empty. + * + * To draw to it you must first specify a line style or fill style (or both), draw shapes using paths, and finally + * fill or stroke them. For example: + * + * ```javascript + * graphics.lineStyle(5, 0xFF00FF, 1.0); + * graphics.beginPath(); + * graphics.moveTo(100, 100); + * graphics.lineTo(200, 200); + * graphics.closePath(); + * graphics.strokePath(); + * ``` + * + * There are also many helpful methods that draw and fill/stroke common shapes for you. + * + * ```javascript + * graphics.lineStyle(5, 0xFF00FF, 1.0); + * graphics.fillStyle(0xFFFFFF, 1.0); + * graphics.fillRect(50, 50, 400, 200); + * graphics.strokeRect(50, 50, 400, 200); + * ``` + * + * When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL. + * Under Canvas it will use the HTML Canvas context drawing operations to draw the path. + * Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with + * complex shapes. + * + * If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help + * performance by calling {@link Phaser.GameObjects.Graphics#generateTexture}. This will 'bake' the Graphics object into + * a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object + * updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume + * memory. + * + * As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful + * in their complexity and quantity of them in your game. + */ + class Graphics extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { + /** + * + * @param scene The Scene to which this Graphics object belongs. + * @param options Options that set the position and default style of this Graphics object. + */ + constructor(scene: Phaser.Scene, options?: GraphicsOptions); + + /** + * The horizontal display origin of the Graphics. + */ + displayOriginX: number; + + /** + * The vertical display origin of the Graphics. + */ + displayOriginY: number; + + /** + * The array of commands used to render the Graphics. + */ + commandBuffer: any[]; + + /** + * The default fill color for shapes rendered by this Graphics object. + */ + defaultFillColor: number; + + /** + * The default fill alpha for shapes rendered by this Graphics object. + */ + defaultFillAlpha: number; + + /** + * The default stroke width for shapes rendered by this Graphics object. + */ + defaultStrokeWidth: number; + + /** + * The default stroke color for shapes rendered by this Graphics object. + */ + defaultStrokeColor: number; + + /** + * The default stroke alpha for shapes rendered by this Graphics object. + */ + defaultStrokeAlpha: number; + + /** + * Set the default style settings for this Graphics object. + * @param options The styles to set as defaults. + */ + setDefaultStyles(options: GraphicsStyles): Phaser.GameObjects.Graphics; + + /** + * Set the current line style. + * @param lineWidth The stroke width. + * @param color The stroke color. + * @param alpha The stroke alpha. Default 1. + */ + lineStyle(lineWidth: number, color: number, alpha?: number): Phaser.GameObjects.Graphics; + + /** + * Set the current fill style. + * @param color The fill color. + * @param alpha The fill alpha. Default 1. + */ + fillStyle(color: number, alpha?: number): Phaser.GameObjects.Graphics; + + /** + * Start a new shape path. + */ + beginPath(): Phaser.GameObjects.Graphics; + + /** + * Close the current path. + */ + closePath(): Phaser.GameObjects.Graphics; + + /** + * Fill the current path. + */ + fillPath(): Phaser.GameObjects.Graphics; + + /** + * Stroke the current path. + */ + strokePath(): Phaser.GameObjects.Graphics; + + /** + * Fill the given circle. + * @param circle The circle to fill. + */ + fillCircleShape(circle: Phaser.Geom.Circle): Phaser.GameObjects.Graphics; + + /** + * Stroke the given circle. + * @param circle The circle to stroke. + */ + strokeCircleShape(circle: Phaser.Geom.Circle): Phaser.GameObjects.Graphics; + + /** + * Fill a circle with the given position and radius. + * @param x The x coordinate of the center of the circle. + * @param y The y coordinate of the center of the circle. + * @param radius The radius of the circle. + */ + fillCircle(x: number, y: number, radius: number): Phaser.GameObjects.Graphics; + + /** + * Stroke a circle with the given position and radius. + * @param x The x coordinate of the center of the circle. + * @param y The y coordinate of the center of the circle. + * @param radius The radius of the circle. + */ + strokeCircle(x: number, y: number, radius: number): Phaser.GameObjects.Graphics; + + /** + * Fill the given rectangle. + * @param rect The rectangle to fill. + */ + fillRectShape(rect: Phaser.Geom.Rectangle): Phaser.GameObjects.Graphics; + + /** + * Stroke the given rectangle. + * @param rect The rectangle to stroke. + */ + strokeRectShape(rect: Phaser.Geom.Rectangle): Phaser.GameObjects.Graphics; + + /** + * Fill a rectangle with the given position and size. + * @param x The x coordinate of the top-left of the rectangle. + * @param y The y coordinate of the top-left of the rectangle. + * @param width The width of the rectangle. + * @param height The height of the rectangle. + */ + fillRect(x: number, y: number, width: number, height: number): Phaser.GameObjects.Graphics; + + /** + * Stroke a rectangle with the given position and size. + * @param x The x coordinate of the top-left of the rectangle. + * @param y The y coordinate of the top-left of the rectangle. + * @param width The width of the rectangle. + * @param height The height of the rectangle. + */ + strokeRect(x: number, y: number, width: number, height: number): Phaser.GameObjects.Graphics; + + /** + * Fill a rounded rectangle with the given position, size and radius. + * @param x The x coordinate of the top-left of the rectangle. + * @param y The y coordinate of the top-left of the rectangle. + * @param width The width of the rectangle. + * @param height The height of the rectangle. + * @param radius The corner radius; It can also be an object to specify different radii for corners Default 20. + * @param radius.tl Top left Default 20. + * @param radius.tr Top right Default 20. + * @param radius.br Bottom right Default 20. + * @param radius.bl Bottom left Default 20. + */ + fillRoundedRect(x: number, y: number, width: number, height: number, radius?: number): Phaser.GameObjects.Graphics; + + /** + * Stroke a rounded rectangle with the given position, size and radius. + * @param x The x coordinate of the top-left of the rectangle. + * @param y The y coordinate of the top-left of the rectangle. + * @param width The width of the rectangle. + * @param height The height of the rectangle. + * @param radius The corner radius; It can also be an object to specify different radii for corners Default 20. + * @param radius.tl Top left Default 20. + * @param radius.tr Top right Default 20. + * @param radius.br Bottom right Default 20. + * @param radius.bl Bottom left Default 20. + */ + strokeRoundedRect(x: number, y: number, width: number, height: number, radius?: number): Phaser.GameObjects.Graphics; + + /** + * Fill the given point. + * + * Draws a square at the given position, 1 pixel in size by default. + * @param point The point to fill. + * @param size The size of the square to draw. Default 1. + */ + fillPointShape(point: Phaser.Geom.Point | Phaser.Math.Vector2 | object, size?: number): Phaser.GameObjects.Graphics; + + /** + * Fill a point at the given position. + * + * Draws a square at the given position, 1 pixel in size by default. + * @param x The x coordinate of the point. + * @param y The y coordinate of the point. + * @param size The size of the square to draw. Default 1. + */ + fillPoint(x: number, y: number, size?: number): Phaser.GameObjects.Graphics; + + /** + * Fill the given triangle. + * @param triangle The triangle to fill. + */ + fillTriangleShape(triangle: Phaser.Geom.Triangle): Phaser.GameObjects.Graphics; + + /** + * Stroke the given triangle. + * @param triangle The triangle to stroke. + */ + strokeTriangleShape(triangle: Phaser.Geom.Triangle): Phaser.GameObjects.Graphics; + + /** + * Fill a triangle with the given points. + * @param x0 The x coordinate of the first point. + * @param y0 The y coordinate of the first point. + * @param x1 The x coordinate of the second point. + * @param y1 The y coordinate of the second point. + * @param x2 The x coordinate of the third point. + * @param y2 The y coordinate of the third point. + */ + fillTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number): Phaser.GameObjects.Graphics; + + /** + * Stroke a triangle with the given points. + * @param x0 The x coordinate of the first point. + * @param y0 The y coordinate of the first point. + * @param x1 The x coordinate of the second point. + * @param y1 The y coordinate of the second point. + * @param x2 The x coordinate of the third point. + * @param y2 The y coordinate of the third point. + */ + strokeTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number): Phaser.GameObjects.Graphics; + + /** + * Draw the given line. + * @param line The line to stroke. + */ + strokeLineShape(line: Phaser.Geom.Line): Phaser.GameObjects.Graphics; + + /** + * Draw a line between the given points. + * @param x1 The x coordinate of the start point of the line. + * @param y1 The y coordinate of the start point of the line. + * @param x2 The x coordinate of the end point of the line. + * @param y2 The y coordinate of the end point of the line. + */ + lineBetween(x1: number, y1: number, x2: number, y2: number): Phaser.GameObjects.Graphics; + + /** + * Draw a line from the current drawing position to the given position. + * + * Moves the current drawing position to the given position. + * @param x The x coordinate to draw the line to. + * @param y The y coordinate to draw the line to. + */ + lineTo(x: number, y: number): Phaser.GameObjects.Graphics; + + /** + * Move the current drawing position to the given position. + * @param x The x coordinate to move to. + * @param y The y coordinate to move to. + */ + moveTo(x: number, y: number): Phaser.GameObjects.Graphics; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param rgb [description] + */ + lineFxTo(x: number, y: number, width: number, rgb: number): Phaser.GameObjects.Graphics; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param rgb [description] + */ + moveFxTo(x: number, y: number, width: number, rgb: number): Phaser.GameObjects.Graphics; + + /** + * Stroke the shape represented by the given array of points. + * + * Pass `true` to `autoClose` to close the shape automatically. + * @param points The points to stroke. + * @param autoClose When `true`, the shape is closed by joining the last point to the first point. Default false. + * @param endIndex The index of `points` to stop drawing at. Defaults to `points.length`. + */ + strokePoints(points: any[] | Phaser.Geom.Point[], autoClose?: boolean, endIndex?: integer): Phaser.GameObjects.Graphics; + + /** + * Fill the shape represented by the given array of points. + * + * Pass `true` to `autoClose` to close the shape automatically. + * @param points The points to fill. + * @param autoClose Whether to automatically close the polygon. Default false. + * @param endIndex The index of `points` to stop at. Defaults to `points.length`. + */ + fillPoints(points: any[] | Phaser.Geom.Point[], autoClose?: boolean, endIndex?: integer): Phaser.GameObjects.Graphics; + + /** + * Stroke the given ellipse. + * @param ellipse The ellipse to stroke. + * @param smoothness The number of points to draw the ellipse with. Default 32. + */ + strokeEllipseShape(ellipse: Phaser.Geom.Ellipse, smoothness?: integer): Phaser.GameObjects.Graphics; + + /** + * Stroke an ellipse with the given position and size. + * @param x The x coordinate of the center of the ellipse. + * @param y The y coordinate of the center of the ellipse. + * @param width The width of the ellipse. + * @param height The height of the ellipse. + * @param smoothness The number of points to draw the ellipse with. Default 32. + */ + strokeEllipse(x: number, y: number, width: number, height: number, smoothness?: integer): Phaser.GameObjects.Graphics; + + /** + * Fill the given ellipse. + * @param ellipse The ellipse to fill. + * @param smoothness The number of points to draw the ellipse with. Default 32. + */ + fillEllipseShape(ellipse: Phaser.Geom.Ellipse, smoothness?: integer): Phaser.GameObjects.Graphics; + + /** + * Fill an ellipse with the given position and size. + * @param x The x coordinate of the center of the ellipse. + * @param y The y coordinate of the center of the ellipse. + * @param width The width of the ellipse. + * @param height The height of the ellipse. + * @param smoothness The number of points to draw the ellipse with. Default 32. + */ + fillEllipse(x: number, y: number, width: number, height: number, smoothness?: integer): Phaser.GameObjects.Graphics; + + /** + * Draw an arc. + * + * This method can be used to create circles, or parts of circles. + * + * Use the optional `overshoot` argument to allow the arc to extend beyond 360 degrees. This is useful if you're drawing + * an arc with an especially thick line, as it will allow the arc to fully join-up. Try small values at first, i.e. 0.01. + * + * Call {@link Phaser.GameObjects.Graphics#fillPath} or {@link Phaser.GameObjects.Graphics#strokePath} after calling + * this method to draw the arc. + * @param x The x coordinate of the center of the circle. + * @param y The y coordinate of the center of the circle. + * @param radius The radius of the circle. + * @param startAngle The starting angle, in radians. + * @param endAngle The ending angle, in radians. + * @param anticlockwise Whether the drawing should be anticlockwise or clockwise. Default false. + * @param overshoot This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Default 0. + */ + arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean, overshoot?: number): Phaser.GameObjects.Graphics; + + /** + * Creates a pie-chart slice shape centered at `x`, `y` with the given radius. + * You must define the start and end angle of the slice. + * + * Setting the `anticlockwise` argument to `true` creates a shape similar to Pacman. + * Setting it to `false` creates a shape like a slice of pie. + * + * This method will begin a new path and close the path at the end of it. + * To display the actual slice you need to call either `strokePath` or `fillPath` after it. + * @param x The horizontal center of the slice. + * @param y The vertical center of the slice. + * @param radius The radius of the slice. + * @param startAngle The start angle of the slice, given in radians. + * @param endAngle The end angle of the slice, given in radians. + * @param anticlockwise Whether the drawing should be anticlockwise or clockwise. Default false. + * @param overshoot This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Default 0. + */ + slice(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean, overshoot?: number): Phaser.GameObjects.Graphics; + + /** + * Saves the state of the Graphics by pushing the current state onto a stack. + * + * The most recently saved state can then be restored with {@link Phaser.GameObjects.Graphics#restore}. + */ + save(): Phaser.GameObjects.Graphics; + + /** + * Restores the most recently saved state of the Graphics by popping from the state stack. + * + * Use {@link Phaser.GameObjects.Graphics#save} to save the current state, and call this afterwards to restore that state. + * + * If there is no saved state, this command does nothing. + */ + restore(): Phaser.GameObjects.Graphics; + + /** + * Translate the graphics. + * @param x The horizontal translation to apply. + * @param y The vertical translation to apply. + */ + translate(x: number, y: number): Phaser.GameObjects.Graphics; + + /** + * Scale the graphics. + * @param x The horizontal scale to apply. + * @param y The vertical scale to apply. + */ + scale(x: number, y: number): Phaser.GameObjects.Graphics; + + /** + * Rotate the graphics. + * @param radians The rotation angle, in radians. + */ + rotate(radians: number): Phaser.GameObjects.Graphics; + + /** + * Clear the command buffer and reset the fill style and line style to their defaults. + */ + clear(): Phaser.GameObjects.Graphics; + + /** + * Generate a texture from this Graphics object. + * + * If `key` is a string it'll generate a new texture using it and add it into the + * Texture Manager (assuming no key conflict happens). + * + * If `key` is a Canvas it will draw the texture to that canvas context. Note that it will NOT + * automatically upload it to the GPU in WebGL mode. + * @param key The key to store the texture with in the Texture Manager, or a Canvas to draw to. + * @param width The width of the graphics to generate. + * @param height The height of the graphics to generate. + */ + generateTexture(key: string | HTMLCanvasElement, width?: integer, height?: integer): Phaser.GameObjects.Graphics; + + /** + * Internal destroy handler, called as part of the destroy process. + */ + protected preDestroy(): void; + + /** + * A Camera used specifically by the Graphics system for rendering to textures. + */ + static TargetCamera: Phaser.Cameras.Scene2D.Camera; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + } + + /** + * A Group is a way for you to create, manipulate, or recycle similar Game Objects. + * + * Group membership is non-exclusive. A Game Object can belong to several groups, one group, or none. + * + * Groups themselves aren't displayable, and can't be positioned, rotated, scaled, or hidden. + */ + class Group { + /** + * + * @param scene The scene this group belongs to. + * @param children Game objects to add to this group; or the `config` argument. + * @param config Settings for this group. If `key` is set, Phaser.GameObjects.Group#createMultiple is also called with these settings. + */ + constructor(scene: Phaser.Scene, children?: Phaser.GameObjects.GameObject[] | GroupConfig, config?: GroupConfig | GroupCreateConfig); + + /** + * This scene this group belongs to. + */ + scene: Phaser.Scene; + + /** + * Members of this group. + */ + children: Phaser.Structs.Set; + + /** + * A flag identifying this object as a group. + */ + isParent: boolean; + + /** + * The class to create new group members from. + */ + classType: object; + + /** + * Whether this group runs its {@link Phaser.GameObjects.Group#preUpdate} method + * (which may update any members). + */ + active: boolean; + + /** + * The maximum size of this group, if used as a pool. -1 is no limit. + */ + maxSize: integer; + + /** + * A default texture key to use when creating new group members. + * + * This is used in {@link Phaser.GameObjects.Group#create} + * but not in {@link Phaser.GameObjects.Group#createMultiple}. + */ + defaultKey: string; + + /** + * A default texture frame to use when creating new group members. + */ + defaultFrame: string | integer; + + /** + * Whether to call the update method of any members. + */ + runChildUpdate: boolean; + + /** + * A function to be called when adding or creating group members. + */ + createCallback: GroupCallback; + + /** + * A function to be called when removing group members. + */ + removeCallback: GroupCallback; + + /** + * A function to be called when creating several group members at once. + */ + createMultipleCallback: GroupMultipleCreateCallback; + + /** + * Creates a new Game Object and adds it to this group, unless the group {@link Phaser.GameObjects.Group#isFull is full}. + * + * Calls {@link Phaser.GameObjects.Group#createCallback}. + * @param x The horizontal position of the new Game Object in the world. Default 0. + * @param y The vertical position of the new Game Object in the world. Default 0. + * @param key The texture key of the new Game Object. Default defaultKey. + * @param frame The texture frame of the new Game Object. Default defaultFrame. + * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of the new Game Object. Default true. + * @param active The {@link Phaser.GameObjects.GameObject#active} state of the new Game Object. Default true. + */ + create(x?: number, y?: number, key?: string, frame?: string | integer, visible?: boolean, active?: boolean): any; + + /** + * Creates several Game Objects and adds them to this group. + * + * If the group becomes {@link Phaser.GameObjects.Group#isFull}, no further Game Objects are created. + * + * Calls {@link Phaser.GameObjects.Group#createMultipleCallback} and {@link Phaser.GameObjects.Group#createCallback}. + * @param config Creation settings. This can be a single configuration object or an array of such objects, which will be applied in turn. + */ + createMultiple(config: GroupCreateConfig | GroupCreateConfig[]): any[]; + + /** + * A helper for {@link Phaser.GameObjects.Group#createMultiple}. + * @param options Creation settings. + */ + createFromConfig(options: GroupCreateConfig): any[]; + + /** + * Updates any group members, if {@link Phaser.GameObjects.Group#runChildUpdate} is enabled. + * @param time The current timestamp. + * @param delta The delta time elapsed since the last frame. + */ + preUpdate(time: number, delta: number): void; + + /** + * Adds a Game Object to this group. + * + * Calls {@link Phaser.GameObjects.Group#createCallback}. + * @param child The Game Object to add. + * @param addToScene Also add the Game Object to the scene. Default false. + */ + add(child: Phaser.GameObjects.GameObject, addToScene?: boolean): Phaser.GameObjects.Group; + + /** + * Adds several Game Objects to this group. + * + * Calls {@link Phaser.GameObjects.Group#createCallback}. + * @param children The Game Objects to add. + * @param addToScene Also add the Game Objects to the scene. Default false. + */ + addMultiple(children: Phaser.GameObjects.GameObject[], addToScene?: boolean): Phaser.GameObjects.Group; + + /** + * Removes a member of this Group and optionally removes it from the Scene and / or destroys it. + * + * Calls {@link Phaser.GameObjects.Group#removeCallback}. + * @param child The Game Object to remove. + * @param removeFromScene Optionally remove the Group member from the Scene it belongs to. Default false. + * @param destroyChild Optionally call destroy on the removed Group member. Default false. + */ + remove(child: Phaser.GameObjects.GameObject, removeFromScene?: boolean, destroyChild?: boolean): Phaser.GameObjects.Group; + + /** + * Removes all members of this Group and optionally removes them from the Scene and / or destroys them. + * + * Does not call {@link Phaser.GameObjects.Group#removeCallback}. + * @param removeFromScene Optionally remove each Group member from the Scene. Default false. + * @param destroyChild Optionally call destroy on the removed Group members. Default false. + */ + clear(removeFromScene?: boolean, destroyChild?: boolean): Phaser.GameObjects.Group; + + /** + * Tests if a Game Object is a member of this group. + * @param child A Game Object. + */ + contains(child: Phaser.GameObjects.GameObject): boolean; + + /** + * All members of the group. + */ + getChildren(): Phaser.GameObjects.GameObject[]; + + /** + * The number of members of the group. + */ + getLength(): integer; + + /** + * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * @param state The {@link Phaser.GameObjects.GameObject#active} value to match. Default false. + * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false. + * @param x The horizontal position of the Game Object in the world. + * @param y The vertical position of the Game Object in the world. + * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey. + * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame. + * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true. + */ + getFirst(state?: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | integer, visible?: boolean): any; + + /** + * Scans the Group, from top to bottom, for the nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * @param nth The nth matching Group member to search for. + * @param state The {@link Phaser.GameObjects.GameObject#active} value to match. Default false. + * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false. + * @param x The horizontal position of the Game Object in the world. + * @param y The vertical position of the Game Object in the world. + * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey. + * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame. + * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true. + */ + getFirstNth(nth: integer, state?: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | integer, visible?: boolean): any; + + /** + * Scans the Group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * @param state The {@link Phaser.GameObjects.GameObject#active} value to match. Default false. + * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false. + * @param x The horizontal position of the Game Object in the world. + * @param y The vertical position of the Game Object in the world. + * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey. + * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame. + * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true. + */ + getLast(state?: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | integer, visible?: boolean): any; + + /** + * Scans the Group for the last nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * @param nth The nth matching Group member to search for. + * @param state The {@link Phaser.GameObjects.GameObject#active} value to match. Default false. + * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false. + * @param x The horizontal position of the Game Object in the world. + * @param y The vertical position of the Game Object in the world. + * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey. + * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame. + * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true. + */ + getLastNth(nth: integer, state?: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | integer, visible?: boolean): any; + + /** + * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`, + * assigns `x` and `y`, and returns the member. + * + * If no inactive member is found and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * The new Game Object will have its active state set to `true`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * @param x The horizontal position of the Game Object in the world. + * @param y The vertical position of the Game Object in the world. + * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey. + * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame. + * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true. + */ + get(x?: number, y?: number, key?: string, frame?: string | integer, visible?: boolean): any; + + /** + * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `true`, + * assigns `x` and `y`, and returns the member. + * + * If no active member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false. + * @param x The horizontal position of the Game Object in the world. + * @param y The vertical position of the Game Object in the world. + * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey. + * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame. + * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true. + */ + getFirstAlive(createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | integer, visible?: boolean): any; + + /** + * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`, + * assigns `x` and `y`, and returns the member. + * + * If no inactive member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`. + * The new Game Object will have an active state set to `true`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false. + * @param x The horizontal position of the Game Object in the world. + * @param y The vertical position of the Game Object in the world. + * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey. + * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame. + * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true. + */ + getFirstDead(createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | integer, visible?: boolean): any; + + /** + * {@link Phaser.GameObjects.Components.Animation#play Plays} an animation for all members of this group. + * @param key The string-based key of the animation to play. + * @param startFrame Optionally start the animation playing from this frame index. Default 0. + */ + playAnimation(key: string, startFrame?: string): Phaser.GameObjects.Group; + + /** + * Whether this group's size at its {@link Phaser.GameObjects.Group#maxSize maximum}. + */ + isFull(): boolean; + + /** + * Counts the number of active (or inactive) group members. + * @param value Count active (true) or inactive (false) group members. Default true. + */ + countActive(value?: boolean): integer; + + /** + * Counts the number of in-use (active) group members. + */ + getTotalUsed(): integer; + + /** + * The difference of {@link Phaser.GameObjects.Group#maxSize} and the number of active group members. + * + * This represents the number of group members that could be created or reactivated before reaching the size limit. + */ + getTotalFree(): integer; + + /** + * Sets the depth of each group member. + * @param value The amount to set the property to. + * @param step This is added to the `value` amount, multiplied by the iteration counter. + */ + setDepth(value: number, step: number): Phaser.GameObjects.Group; + + /** + * Deactivates a member of this group. + * @param gameObject A member of this group. + */ + kill(gameObject: Phaser.GameObjects.GameObject): void; + + /** + * Deactivates and hides a member of this group. + * @param gameObject A member of this group. + */ + killAndHide(gameObject: Phaser.GameObjects.GameObject): void; + + /** + * Toggles (flips) the visible state of each member of this group. + */ + toggleVisible(): Phaser.GameObjects.Group; + + /** + * Empties this group and removes it from the Scene. + * + * Does not call {@link Phaser.GameObjects.Group#removeCallback}. + * @param destroyChildren Also {@link Phaser.GameObjects.GameObject#destroy} each group member. Default false. + */ + destroy(destroyChildren?: boolean): void; + + } + + /** + * An Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. + */ + class Image extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.TextureCrop, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, x: number, y: number, texture: string, frame?: string | integer); + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A 2D point light. + * + * These are typically created by a {@link Phaser.GameObjects.LightsManager}, available from within a scene via `this.lights`. + * + * Any Game Objects using the Light2D pipeline will then be affected by these Lights. + * + * They can also simply be used to represent a point light for your own purposes. + */ + class Light { + /** + * + * @param x The horizontal position of the light. + * @param y The vertical position of the light. + * @param radius The radius of the light. + * @param r The red color of the light. A value between 0 and 1. + * @param g The green color of the light. A value between 0 and 1. + * @param b The blue color of the light. A value between 0 and 1. + * @param intensity The intensity of the light. + */ + constructor(x: number, y: number, radius: number, r: number, g: number, b: number, intensity: number); + + /** + * The horizontal position of the light. + */ + x: number; + + /** + * The vertical position of the light. + */ + y: number; + + /** + * The radius of the light. + */ + radius: number; + + /** + * The red color of the light. A value between 0 and 1. + */ + r: number; + + /** + * The green color of the light. A value between 0 and 1. + */ + g: number; + + /** + * The blue color of the light. A value between 0 and 1. + */ + b: number; + + /** + * The intensity of the light. + */ + intensity: number; + + /** + * The horizontal scroll factor of the light. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of the light. + */ + scrollFactorY: number; + + /** + * Set the properties of the light. + * + * Sets both horizontal and vertical scroll factor to 1. Use {@link Phaser.GameObjects.Light#setScrollFactor} to set + * the scroll factor. + * @param x The horizontal position of the light. + * @param y The vertical position of the light. + * @param radius The radius of the light. + * @param r The red color. A value between 0 and 1. + * @param g The green color. A value between 0 and 1. + * @param b The blue color. A value between 0 and 1. + * @param intensity The intensity of the light. + */ + set(x: number, y: number, radius: number, r: number, g: number, b: number, intensity: number): Phaser.GameObjects.Light; + + /** + * Set the scroll factor of the light. + * @param x The horizontal scroll factor of the light. + * @param y The vertical scroll factor of the light. + */ + setScrollFactor(x: number, y: number): Phaser.GameObjects.Light; + + /** + * Set the color of the light from a single integer RGB value. + * @param rgb The integer RGB color of the light. + */ + setColor(rgb: number): Phaser.GameObjects.Light; + + /** + * Set the intensity of the light. + * @param intensity The intensity of the light. + */ + setIntensity(intensity: number): Phaser.GameObjects.Light; + + /** + * Set the position of the light. + * @param x The horizontal position of the light. + * @param y The vertical position of the light. + */ + setPosition(x: number, y: number): Phaser.GameObjects.Light; + + /** + * Set the radius of the light. + * @param radius The radius of the light. + */ + setRadius(radius: number): Phaser.GameObjects.Light; + + } + + /** + * Manages Lights for a Scene. + * + * Affects the rendering of Game Objects using the `Light2D` pipeline. + */ + class LightsManager { + /** + * The pool of Lights. + * + * Used to recycle removed Lights for a more efficient use of memory. + */ + lightPool: Phaser.GameObjects.Light[]; + + /** + * The Lights in the Scene. + */ + lights: Phaser.GameObjects.Light[]; + + /** + * Lights that have been culled from a Camera's viewport. + * + * Lights in this list will not be rendered. + */ + culledLights: Phaser.GameObjects.Light[]; + + /** + * The ambient color. + */ + ambientColor: Object; + + /** + * Whether the Lights Manager is enabled. + */ + active: boolean; + + /** + * Enable the Lights Manager. + */ + enable(): Phaser.GameObjects.LightsManager; + + /** + * Disable the Lights Manager. + */ + disable(): Phaser.GameObjects.LightsManager; + + /** + * Cull any Lights that aren't visible to the given Camera. + * + * Culling Lights improves performance by ensuring that only Lights within a Camera's viewport are rendered. + * @param camera The Camera to cull Lights for. + */ + cull(camera: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Light[]; + + /** + * Iterate over each Light with a callback. + * @param callback The callback that is called with each Light. + */ + forEachLight(callback: LightForEach): Phaser.GameObjects.LightsManager; + + /** + * Set the ambient light color. + * @param rgb The integer RGB color of the ambient light. + */ + setAmbientColor(rgb: number): Phaser.GameObjects.LightsManager; + + /** + * Returns the maximum number of Lights allowed to appear at once. + */ + getMaxVisibleLights(): integer; + + /** + * Get the number of Lights managed by this Lights Manager. + */ + getLightCount(): integer; + + /** + * Add a Light. + * @param x The horizontal position of the Light. + * @param y The vertical position of the Light. + * @param radius The radius of the Light. + * @param rgb The integer RGB color of the light. + * @param intensity The intensity of the Light. + */ + addLight(x: number, y: number, radius: number, rgb: number, intensity: number): Phaser.GameObjects.Light; + + /** + * Remove a Light. + * @param light The Light to remove. + */ + removeLight(light: Phaser.GameObjects.Light): Phaser.GameObjects.LightsManager; + + /** + * Shut down the Lights Manager. + * + * Recycles all active Lights into the Light pool, resets ambient light color and clears the lists of Lights and + * culled Lights. + */ + shutdown(): void; + + /** + * Destroy the Lights Manager. + * + * Cleans up all references by calling {@link Phaser.GameObjects.LightsManager#shutdown}. + */ + destroy(): void; + + } + + /** + * A Scene plugin that provides a {@link Phaser.GameObjects.LightsManager} for the Light2D pipeline. + * + * Available from within a Scene via `this.lights`. + * + * Add Lights using the {@link Phaser.GameObjects.LightsManager#addLight} method: + * + * ```javascript + * // Enable the Lights Manager because it is disabled by default + * this.lights.enable(); + * + * // Create a Light at [400, 300] with a radius of 200 + * this.lights.addLight(400, 300, 200); + * ``` + * + * For Game Objects to be affected by the Lights when rendered, you will need to set them to use the `Light2D` pipeline like so: + * + * ```javascript + * sprite.setPipeline('Light2D'); + * ``` + */ + class LightsPlugin extends Phaser.GameObjects.LightsManager { + /** + * + * @param scene The Scene that this Lights Plugin belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * A reference to the Scene that this Lights Plugin belongs to. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene's systems. + */ + systems: Phaser.Scenes.Systems; + + /** + * Boot the Lights Plugin. + */ + boot(): void; + + /** + * Destroy the Lights Plugin. + * + * Cleans up all references. + */ + destroy(): void; + + } + + /** + * A Mesh Game Object. + */ + class Mesh extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param vertices An array containing the vertices data for this Mesh. + * @param uv An array containing the uv data for this Mesh. + * @param colors An array containing the color data for this Mesh. + * @param alphas An array containing the alpha data for this Mesh. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, x: number, y: number, vertices: number[], uv: number[], colors: number[], alphas: number[], texture: string, frame?: string | integer); + + /** + * An array containing the vertices data for this Mesh. + */ + vertices: Float32Array; + + /** + * An array containing the uv data for this Mesh. + */ + uv: Float32Array; + + /** + * An array containing the color data for this Mesh. + */ + colors: Uint32Array; + + /** + * An array containing the alpha data for this Mesh. + */ + alphas: Float32Array; + + /** + * Fill or additive mode used when blending the color values? + */ + tintFill: boolean; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + } + + namespace Particles { + /** + * A Particle Emitter property. + * + * Facilitates changing Particle properties as they are emitted and throughout their lifetime. + */ + class EmitterOp { + /** + * + * @param config Settings for the Particle Emitter that owns this property. + * @param key The name of the property. + * @param defaultValue The default value of the property. + * @param emitOnly Whether the property can only be modified when a Particle is emitted. Default false. + */ + constructor(config: ParticleEmitterConfig, key: string, defaultValue: number, emitOnly?: boolean); + + /** + * The name of this property. + */ + propertyKey: string; + + /** + * The value of this property. + */ + propertyValue: number; + + /** + * The default value of this property. + */ + defaultValue: number; + + /** + * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and + * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit. + */ + steps: number; + + /** + * The step counter for stepped easing, per emit. + */ + counter: number; + + /** + * The start value for this property to ease between. + */ + start: number; + + /** + * The end value for this property to ease between. + */ + end: number; + + /** + * The easing function to use for updating this property. + */ + ease: Function; + + /** + * Whether this property can only be modified when a Particle is emitted. + * + * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and + * affect this property. + * + * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and + * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property. + */ + emitOnly: boolean; + + /** + * The callback to run for Particles when they are emitted from the Particle Emitter. + */ + onEmit: EmitterOpOnEmitCallback; + + /** + * The callback to run for Particles when they are updated. + */ + onUpdate: EmitterOpOnUpdateCallback; + + /** + * Load the property from a Particle Emitter configuration object. + * + * Optionally accepts a new property key to use, replacing the current one. + * @param config Settings for the Particle Emitter that owns this property. + * @param newKey The new key to use for this property, if any. + */ + loadConfig(config?: ParticleEmitterConfig, newKey?: string): void; + + /** + * Build a JSON representation of this Particle Emitter property. + */ + toJSON(): object; + + /** + * Change the current value of the property and update its callback methods. + * @param value The value of the property. + */ + onChange(value: number): Phaser.GameObjects.Particles.EmitterOp; + + /** + * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and + * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the type of the current + * {@link Phaser.GameObjects.Particles.EmitterOp#propertyValue}. + */ + setMethods(): Phaser.GameObjects.Particles.EmitterOp; + + /** + * Check whether an object has the given property. + * @param object The object to check. + * @param key The key of the property to look for in the object. + */ + has(object: object, key: string): boolean; + + /** + * Check whether an object has both of the given properties. + * @param object The object to check. + * @param key1 The key of the first property to check the object for. + * @param key2 The key of the second property to check the object for. + */ + hasBoth(object: object, key1: string, key2: string): boolean; + + /** + * Check whether an object has at least one of the given properties. + * @param object The object to check. + * @param key1 The key of the first property to check the object for. + * @param key2 The key of the second property to check the object for. + */ + hasEither(object: object, key1: string, key2: string): boolean; + + /** + * The returned value sets what the property will be at the START of the particles life, on emit. + * @param particle The particle. + * @param key The name of the property. + * @param value The current value of the property. + */ + defaultEmit(particle: Phaser.GameObjects.Particles.Particle, key: string, value?: number): number; + + /** + * The returned value updates the property for the duration of the particles life. + * @param particle The particle. + * @param key The name of the property. + * @param t The T value (between 0 and 1) + * @param value The current value of the property. + */ + defaultUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number, value: number): number; + + /** + * An `onEmit` callback that returns the current value of the property. + */ + staticValueEmit(): number; + + /** + * An `onUpdate` callback that returns the current value of the property. + */ + staticValueUpdate(): number; + + /** + * An `onEmit` callback that returns a random value from the current value array. + */ + randomStaticValueEmit(): number; + + /** + * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and + * {@link Phaser.GameObjects.Particles.EmitterOp#end} range. + * @param particle The particle. + * @param key The key of the property. + */ + randomRangedValueEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number; + + /** + * An `onEmit` callback that returns a stepped value between the + * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} + * range. + */ + steppedEmit(): number; + + /** + * An `onEmit` callback that returns an eased value between the + * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} + * range. + * @param particle The particle. + * @param key The name of the property. + */ + easedValueEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number; + + /** + * An `onUpdate` callback that returns an eased value between the + * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} + * range. + * @param particle The particle. + * @param key The name of the property. + * @param t The T value (between 0 and 1) + */ + easeValueUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number): number; + + } + + /** + * [description] + */ + class GravityWell { + /** + * + * @param x The x coordinate of the Gravity Well, in world space. Default 0. + * @param y The y coordinate of the Gravity Well, in world space. Default 0. + * @param power The power of the Gravity Well. Default 0. + * @param epsilon [description] Default 100. + * @param gravity The gravitational force of this Gravity Well. Default 50. + */ + constructor(x?: number | GravityWellConfig, y?: number, power?: number, epsilon?: number, gravity?: number); + + /** + * The x coordinate of the Gravity Well, in world space. + */ + x: number; + + /** + * The y coordinate of the Gravity Well, in world space. + */ + y: number; + + /** + * The active state of the Gravity Well. An inactive Gravity Well will not influence any particles. + */ + active: boolean; + + /** + * The power of the Gravity Well. + */ + power: number; + + /** + * [description] + */ + epsilon: number; + + /** + * Takes a Particle and updates it based on the properties of this Gravity Well. + * @param particle The Particle to update. + * @param delta The delta time in ms. + * @param step The delta value divided by 1000. + */ + update(particle: Phaser.GameObjects.Particles.Particle, delta: number, step: number): void; + + } + + /** + * A Particle is a simple Game Object controlled by a Particle Emitter and Manager, and rendered by the Manager. + * It uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones. + */ + class Particle { + /** + * + * @param emitter The Emitter to which this Particle belongs. + */ + constructor(emitter: Phaser.GameObjects.Particles.ParticleEmitter); + + /** + * The Emitter to which this Particle belongs. + * + * A Particle can only belong to a single Emitter and is created, updated and destroyed via it. + */ + emitter: Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * The texture frame used to render this Particle. + */ + frame: Phaser.Textures.Frame; + + /** + * The position of this Particle within its Emitter's particle pool. + */ + index: number; + + /** + * The x coordinate of this Particle. + */ + x: number; + + /** + * The y coordinate of this Particle. + */ + y: number; + + /** + * The x velocity of this Particle. + */ + velocityX: number; + + /** + * The y velocity of this Particle. + */ + velocityY: number; + + /** + * The x acceleration of this Particle. + */ + accelerationX: number; + + /** + * The y acceleration of this Particle. + */ + accelerationY: number; + + /** + * The maximum horizontal velocity this Particle can travel at. + */ + maxVelocityX: number; + + /** + * The maximum vertical velocity this Particle can travel at. + */ + maxVelocityY: number; + + /** + * The bounciness, or restitution, of this Particle. + */ + bounce: number; + + /** + * The horizontal scale of this Particle. + */ + scaleX: number; + + /** + * The vertical scale of this Particle. + */ + scaleY: number; + + /** + * The alpha value of this Particle. + */ + alpha: number; + + /** + * The angle of this Particle in degrees. + */ + angle: number; + + /** + * The angle of this Particle in radians. + */ + rotation: number; + + /** + * The tint applied to this Particle. + */ + tint: integer; + + /** + * The full color of this Particle, computed from its alpha and tint. + */ + color: integer; + + /** + * The lifespan of this Particle in ms. + */ + life: number; + + /** + * The current life of this Particle in ms. + */ + lifeCurrent: number; + + /** + * The delay applied to this Particle upon emission, in ms. + */ + delayCurrent: number; + + /** + * The normalized lifespan T value, where 0 is the start and 1 is the end. + */ + lifeT: number; + + /** + * The data used by the ease equation. + */ + data: object; + + /** + * Checks to see if this Particle is alive and updating. + */ + isAlive(): boolean; + + /** + * Starts this Particle from the given coordinates. + * @param x The x coordinate to launch this Particle from. + * @param y The y coordinate to launch this Particle from. + */ + fire(x: number, y: number): void; + + /** + * An internal method that calculates the velocity of the Particle. + * @param emitter The Emitter that is updating this Particle. + * @param delta The delta time in ms. + * @param step The delta value divided by 1000. + * @param processors Particle processors (gravity wells). + */ + computeVelocity(emitter: Phaser.GameObjects.Particles.ParticleEmitter, delta: number, step: number, processors: any[]): void; + + /** + * Checks if this Particle is still within the bounds defined by the given Emitter. + * + * If not, and depending on the Emitter collision flags, the Particle may either stop or rebound. + * @param emitter The Emitter to check the bounds against. + */ + checkBounds(emitter: Phaser.GameObjects.Particles.ParticleEmitter): void; + + /** + * The main update method for this Particle. + * + * Updates its life values, computes the velocity and repositions the Particle. + * @param delta The delta time in ms. + * @param step The delta value divided by 1000. + * @param processors An optional array of update processors. + */ + update(delta: number, step: number, processors: any[]): boolean; + + } + + /** + * A particle emitter represents a single particle stream. + * It controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles} and is controlled by a {@link Phaser.GameObjects.Particles.ParticleEmitterManager Particle Emitter Manager}. + */ + class ParticleEmitter implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Visible { + /** + * + * @param manager The Emitter Manager this Emitter belongs to. + * @param config Settings for this emitter. + */ + constructor(manager: Phaser.GameObjects.Particles.ParticleEmitterManager, config: ParticleEmitterConfig); + + /** + * The Emitter Manager this Emitter belongs to. + */ + manager: Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * The texture assigned to particles. + */ + texture: Phaser.Textures.Texture; + + /** + * The texture frames assigned to particles. + */ + frames: Phaser.Textures.Frame[]; + + /** + * The default texture frame assigned to particles. + */ + defaultFrame: Phaser.Textures.Frame; + + /** + * Names of simple configuration properties. + */ + configFastMap: object; + + /** + * Names of complex configuration properties. + */ + configOpMap: object; + + /** + * The name of this Particle Emitter. + * + * Empty by default and never populated by Phaser, this is left for developers to use. + */ + name: string; + + /** + * The Particle Class which will be emitted by this Emitter. + */ + particleClass: Phaser.GameObjects.Particles.Particle; + + /** + * The x-coordinate of the particle origin (where particles will be emitted). + */ + x: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The y-coordinate of the particle origin (where particles will be emitted). + */ + y: Phaser.GameObjects.Particles.EmitterOp; + + /** + * A radial emitter will emit particles in all directions between angle min and max, + * using {@link Phaser.GameObjects.Particles.ParticleEmitter#speed} as the value. If set to false then this acts as a point Emitter. + * A point emitter will emit particles only in the direction derived from the speedX and speedY values. + */ + radial: boolean; + + /** + * Horizontal acceleration applied to emitted particles, in pixels per second squared. + */ + gravityX: number; + + /** + * Vertical acceleration applied to emitted particles, in pixels per second squared. + */ + gravityY: number; + + /** + * Whether accelerationX and accelerationY are non-zero. Set automatically during configuration. + */ + acceleration: boolean; + + /** + * Horizontal acceleration applied to emitted particles, in pixels per second squared. + */ + accelerationX: Phaser.GameObjects.Particles.EmitterOp; + + /** + * Vertical acceleration applied to emitted particles, in pixels per second squared. + */ + accelerationY: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The maximum horizontal velocity of emitted particles, in pixels per second squared. + */ + maxVelocityX: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The maximum vertical velocity of emitted particles, in pixels per second squared. + */ + maxVelocityY: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The initial horizontal speed of emitted particles, in pixels per second. + */ + speedX: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The initial vertical speed of emitted particles, in pixels per second. + */ + speedY: Phaser.GameObjects.Particles.EmitterOp; + + /** + * Whether moveToX and moveToY are nonzero. Set automatically during configuration. + */ + moveTo: boolean; + + /** + * The x-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. + */ + moveToX: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The y-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. + */ + moveToY: Phaser.GameObjects.Particles.EmitterOp; + + /** + * Whether particles will rebound when they meet the emitter bounds. + */ + bounce: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The horizontal scale of emitted particles. + */ + scaleX: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The vertical scale of emitted particles. + */ + scaleY: Phaser.GameObjects.Particles.EmitterOp; + + /** + * Color tint applied to emitted particles. Any alpha component (0xAA000000) is ignored. + */ + tint: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The alpha (transparency) of emitted particles. + */ + alpha: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The lifespan of emitted particles, in ms. + */ + lifespan: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The angle of the initial velocity of emitted particles, in degrees. + */ + angle: Phaser.GameObjects.Particles.EmitterOp; + + /** + * The rotation of emitted particles, in degrees. + */ + rotate: Phaser.GameObjects.Particles.EmitterOp; + + /** + * A function to call when a particle is emitted. + */ + emitCallback: ParticleEmitterCallback; + + /** + * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallback}. + */ + emitCallbackScope: any; + + /** + * A function to call when a particle dies. + */ + deathCallback: ParticleDeathCallback; + + /** + * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallback}. + */ + deathCallbackScope: any; + + /** + * Set to hard limit the amount of particle objects this emitter is allowed to create. + * 0 means unlimited. + */ + maxParticles: integer; + + /** + * How many particles are emitted each time particles are emitted (one explosion or one flow cycle). + */ + quantity: Phaser.GameObjects.Particles.EmitterOp; + + /** + * How many ms to wait after emission before the particles start updating. + */ + delay: Phaser.GameObjects.Particles.EmitterOp; + + /** + * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms. + * A value of 0 means there is one particle flow cycle for each logic update (the maximum flow frequency). This is the default setting. + * For an exploding emitter, this value will be -1. + * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} also puts the emitter in flow mode (frequency >= 0). + * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} also puts the emitter in explode mode (frequency = -1). + */ + frequency: number; + + /** + * Controls if the emitter is currently emitting a particle flow (when frequency >= 0). + * Already alive particles will continue to update until they expire. + * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}. + */ + on: boolean; + + /** + * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive. + * Set to false to send them to the back. + */ + particleBringToTop: boolean; + + /** + * The time rate applied to active particles, affecting lifespan, movement, and tweens. Values larger than 1 are faster than normal. + */ + timeScale: number; + + /** + * An object describing a shape to emit particles from. + */ + emitZone: Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone; + + /** + * An object describing a shape that deactivates particles when they interact with it. + */ + deathZone: Phaser.GameObjects.Particles.Zones.DeathZone; + + /** + * A rectangular boundary constraining particle movement. + */ + bounds: Phaser.Geom.Rectangle; + + /** + * Whether particles interact with the left edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}. + */ + collideLeft: boolean; + + /** + * Whether particles interact with the right edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}. + */ + collideRight: boolean; + + /** + * Whether particles interact with the top edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}. + */ + collideTop: boolean; + + /** + * Whether particles interact with the bottom edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}. + */ + collideBottom: boolean; + + /** + * Whether this emitter updates itself and its particles. + * + * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#pause} + * and {@link Phaser.GameObjects.Particles.ParticleEmitter#resume}. + */ + active: boolean; + + /** + * Set this to false to hide any active particles. + */ + visible: boolean; + + /** + * The blend mode of this emitter's particles. + */ + blendMode: integer; + + /** + * A Game Object whose position is used as the particle origin. + */ + follow: Phaser.GameObjects.GameObject; + + /** + * The offset of the particle origin from the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target. + */ + followOffset: Phaser.Math.Vector2; + + /** + * Whether the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#visible} state will track + * the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target's visibility state. + */ + trackVisible: boolean; + + /** + * The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + */ + currentFrame: integer; + + /** + * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random. + */ + randomFrame: boolean; + + /** + * The number of consecutive particles that receive a single texture frame (per frame cycle). + */ + frameQuantity: integer; + + /** + * Merges configuration settings into the emitter's current settings. + * @param config Settings for this emitter. + */ + fromJSON(config: ParticleEmitterConfig): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Creates a description of this emitter suitable for JSON serialization. + * @param output An object to copy output into. + */ + toJSON(output?: object): object; + + /** + * Continuously moves the particle origin to follow a Game Object's position. + * @param target The Game Object to follow. + * @param offsetX Horizontal offset of the particle origin from the Game Object. Default 0. + * @param offsetY Vertical offset of the particle origin from the Game Object. Default 0. + * @param trackVisible Whether the emitter's visible state will track the target's visible state. Default false. + */ + startFollow(target: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number, trackVisible?: boolean): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Stops following a Game Object. + */ + stopFollow(): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Chooses a texture frame from {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + */ + getFrame(): Phaser.Textures.Frame; + + /** + * Sets a pattern for assigning texture frames to emitted particles. + * @param frames One or more texture frames, or a configuration object. + * @param pickRandom Whether frames should be assigned at random from `frames`. Default true. + * @param quantity The number of consecutive particles that will receive each frame. Default 1. + */ + setFrame(frames: any[] | string | integer | ParticleEmitterFrameConfig, pickRandom?: boolean, quantity?: integer): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. + * @param value Radial mode (true) or point mode (true). Default true. + */ + setRadial(value?: boolean): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the position of the emitter's particle origin. + * New particles will be emitted here. + * @param x The x-coordinate of the particle origin. + * @param y The y-coordinate of the particle origin. + */ + setPosition(x: number | number[] | EmitterOpOnEmitCallback | object, y: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets or modifies a rectangular boundary constraining the particles. + * + * To remove the boundary, set {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds} to null. + * @param x The x-coordinate of the left edge of the boundary, or an object representing a rectangle. + * @param y The y-coordinate of the top edge of the boundary. + * @param width The width of the boundary. + * @param height The height of the boundary. + */ + setBounds(x: number | ParticleEmitterBounds | ParticleEmitterBoundsAlt, y: number, width: number, height: number): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the initial horizontal speed of emitted particles. + * Changes the emitter to point mode. + * @param value The speed, in pixels per second. + */ + setSpeedX(value: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the initial vertical speed of emitted particles. + * Changes the emitter to point mode. + * @param value The speed, in pixels per second. + */ + setSpeedY(value: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the initial radial speed of emitted particles. + * Changes the emitter to radial mode. + * @param value The speed, in pixels per second. + */ + setSpeed(value: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the horizontal scale of emitted particles. + * @param value The scale, relative to 1. + */ + setScaleX(value: number | number[] | EmitterOpOnUpdateCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the vertical scale of emitted particles. + * @param value The scale, relative to 1. + */ + setScaleY(value: number | number[] | EmitterOpOnUpdateCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the scale of emitted particles. + * @param value The scale, relative to 1. + */ + setScale(value: number | number[] | EmitterOpOnUpdateCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the horizontal gravity applied to emitted particles. + * @param value Acceleration due to gravity, in pixels per second squared. + */ + setGravityX(value: number): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the vertical gravity applied to emitted particles. + * @param value Acceleration due to gravity, in pixels per second squared. + */ + setGravityY(value: number): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the gravity applied to emitted particles. + * @param x Horizontal acceleration due to gravity, in pixels per second squared. + * @param y Vertical acceleration due to gravity, in pixels per second squared. + */ + setGravity(x: number, y: number): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the opacity of emitted particles. + * @param value A value between 0 (transparent) and 1 (opaque). + */ + setAlpha(value: number | number[] | EmitterOpOnUpdateCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * @param value The angle of the initial velocity of emitted particles. + */ + setEmitterAngle(value: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * @param value The angle of the initial velocity of emitted particles. + */ + setAngle(value: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the lifespan of newly emitted particles. + * @param value The particle lifespan, in ms. + */ + setLifespan(value: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the number of particles released at each flow cycle or explosion. + * @param quantity The number of particles to release at each flow cycle or explosion. + */ + setQuantity(quantity: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} + * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * @param frequency The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. + * @param quantity The number of particles to release at each flow cycle or explosion. + */ + setFrequency(frequency: number, quantity?: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#emitZone}. + * + * An {@link ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. Its {@link EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link EdgeZoneSourceCallback getPoints} method. + * + * A {@link ParticleEmitterRandomZoneConfig RandomZone} places randomly within its interior. Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link RandomZoneSourceCallback getRandomPoint} method. + * @param zoneConfig An object describing the zone, or `undefined` to remove any current emit zone. + */ + setEmitZone(zoneConfig?: ParticleEmitterEdgeZoneConfig | ParticleEmitterRandomZoneConfig): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#deathZone}. + * @param zoneConfig An object describing the zone, or `undefined` to remove any current death zone. + */ + setDeathZone(zoneConfig?: ParticleEmitterDeathZoneConfig): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Creates inactive particles and adds them to this emitter's pool. + * @param particleCount The number of particles to create. + */ + reserve(particleCount: integer): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Gets the number of active (in-use) particles in this emitter. + */ + getAliveParticleCount(): integer; + + /** + * Gets the number of inactive (available) particles in this emitter. + */ + getDeadParticleCount(): integer; + + /** + * Gets the total number of particles in this emitter. + */ + getParticleCount(): integer; + + /** + * Whether this emitter is at its limit (if set). + */ + atLimit(): boolean; + + /** + * Sets a function to call for each newly emitted particle. + * @param callback The function. + * @param context The calling context. + */ + onParticleEmit(callback: ParticleEmitterCallback, context?: any): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sets a function to call for each particle death. + * @param callback The function. + * @param context The function's calling context. + */ + onParticleDeath(callback: ParticleDeathCallback, context?: any): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Deactivates every particle in this emitter. + */ + killAll(): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Calls a function for each active particle in this emitter. + * @param callback The function. + * @param context The function's calling context. + */ + forEachAlive(callback: ParticleEmitterCallback, context: any): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Calls a function for each inactive particle in this emitter. + * @param callback The function. + * @param context The function's calling context. + */ + forEachDead(callback: ParticleEmitterCallback, context: any): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on} the emitter and resets the flow counter. + * + * If this emitter is in flow mode (frequency >= 0; the default), the particle flow will start (or restart). + * + * If this emitter is in explode mode (frequency = -1), nothing will happen. + * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead. + */ + start(): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter. + */ + stop(): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Deactivates} the emitter. + */ + pause(): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Activates} the emitter. + */ + resume(): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}. + */ + depthSort(): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow. + * + * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead. + * @param frequency The time interval (>= 0) of each flow cycle, in ms. + * @param count The number of particles to emit at each flow cycle. Default 1. + */ + flow(frequency: number, count?: number | number[] | EmitterOpOnEmitCallback | object): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once. + * @param count The amount of Particles to emit. + * @param x The x coordinate to emit the Particles from. + * @param y The y coordinate to emit the Particles from. + */ + explode(count: integer, x: number, y: number): Phaser.GameObjects.Particles.Particle; + + /** + * Emits particles at a given position (or the emitter's current position). + * @param x The x coordinate to emit the Particles from. Default this.x. + * @param y The y coordinate to emit the Particles from. Default this.x. + * @param count The number of Particles to emit. Default this.quantity. + */ + emitParticleAt(x?: number, y?: number, count?: integer): Phaser.GameObjects.Particles.Particle; + + /** + * Emits particles at a given position (or the emitter's current position). + * @param count The number of Particles to emit. Default this.quantity. + * @param x The x coordinate to emit the Particles from. Default this.x. + * @param y The y coordinate to emit the Particles from. Default this.x. + */ + emitParticle(count?: integer, x?: number, y?: number): Phaser.GameObjects.Particles.Particle; + + /** + * Updates this emitter and its particles. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + preUpdate(time: integer, delta: number): void; + + /** + * Calculates the difference of two particles, for sorting them by depth. + * @param a The first particle. + * @param b The second particle. + */ + depthSortCallback(a: object, b: object): integer; + + /** + * Calculates the difference of two particles, for sorting them by index. + * @param a The first particle. + * @param b The second particle. + */ + indexSortCallback(a: object, b: object): integer; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Particle Emitter Manager creates and controls {@link Phaser.GameObjects.Particles.ParticleEmitter Particle Emitters} and {@link Phaser.GameObjects.Particles.GravityWell Gravity Wells}. + */ + class ParticleEmitterManager extends Phaser.GameObjects.GameObject { + /** + * + * @param scene The Scene to which this Emitter Manager belongs. + * @param texture The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Emitter Manager will use to render particles. + * @param emitters Configuration settings for one or more emitters to create. + */ + constructor(scene: Phaser.Scene, texture: string, frame?: string | integer, emitters?: ParticleEmitterConfig | ParticleEmitterConfig[]); + + /** + * The time scale applied to all emitters and particles, affecting flow rate, lifespan, and movement. + * Values larger than 1 are faster than normal. + * This is multiplied with any timeScale set on each individual emitter. + */ + timeScale: number; + + /** + * The texture used to render this Emitter Manager's particles. + */ + texture: Phaser.Textures.Texture; + + /** + * The texture frame used to render this Emitter Manager's particles. + */ + frame: Phaser.Textures.Frame; + + /** + * Names of this Emitter Manager's texture frames. + */ + frameNames: string[]; + + /** + * A list of Emitters being managed by this Emitter Manager. + */ + emitters: Phaser.Structs.List; + + /** + * A list of Gravity Wells being managed by this Emitter Manager. + */ + wells: Phaser.Structs.List; + + /** + * Sets the texture and frame this Emitter Manager will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Sets the frame this Emitter Manager will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * @param frame The name or index of the frame within the Texture. + */ + setFrame(frame?: string | integer): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Assigns texture frames to an emitter. + * @param frames The texture frames. + * @param emitter The particle emitter to modify. + */ + setEmitterFrames(frames: Phaser.Textures.Frame | Phaser.Textures.Frame[], emitter: Phaser.GameObjects.Particles.ParticleEmitter): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Adds an existing Particle Emitter to this Emitter Manager. + * @param emitter The Particle Emitter to add to this Emitter Manager. + */ + addEmitter(emitter: Phaser.GameObjects.Particles.ParticleEmitter): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it. + * @param config Configuration settings for the Particle Emitter to create. + */ + createEmitter(config: ParticleEmitterConfig): Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * Adds an existing Gravity Well object to this Emitter Manager. + * @param well The Gravity Well to add to this Emitter Manager. + */ + addGravityWell(well: Phaser.GameObjects.Particles.GravityWell): Phaser.GameObjects.Particles.GravityWell; + + /** + * Creates a new Gravity Well, adds it to this Emitter Manager and returns a reference to it. + * @param config Configuration settings for the Gravity Well to create. + */ + createGravityWell(config: GravityWellConfig): Phaser.GameObjects.Particles.GravityWell; + + /** + * Emits particles from each active emitter. + * @param count The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * @param x The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. + * @param y The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. + */ + emitParticle(count?: integer, x?: number, y?: number): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Emits particles from each active emitter. + * @param x The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. + * @param y The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. + * @param count The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + */ + emitParticleAt(x?: number, y?: number, count?: integer): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Pauses this Emitter Manager. + * + * This has the effect of pausing all emitters, and all particles of those emitters, currently under its control. + * + * The particles will still render, but they will not have any of their logic updated. + */ + pause(): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Resumes this Emitter Manager, should it have been previously paused. + */ + resume(): Phaser.GameObjects.Particles.ParticleEmitterManager; + + /** + * Gets all active particle processors (gravity wells). + */ + getProcessors(): Phaser.GameObjects.Particles.GravityWell[]; + + /** + * Updates all active emitters. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + preUpdate(time: integer, delta: number): void; + + } + + namespace Zones { + /** + * A Death Zone. + * + * A Death Zone is a special type of zone that will kill a Particle as soon as it either enters, or leaves, the zone. + * + * The zone consists of a `source` which could be a Geometric shape, such as a Rectangle or Ellipse, or your own + * object as long as it includes a `contains` method for which the Particles can be tested against. + */ + class DeathZone { + /** + * + * @param source An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments. + * @param killOnEnter Should the Particle be killed when it enters the zone? `true` or leaves it? `false` + */ + constructor(source: DeathZoneSource, killOnEnter: boolean); + + /** + * An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments. + * This could be a Geometry shape, such as `Phaser.Geom.Circle`, or your own custom object. + */ + source: DeathZoneSource; + + /** + * Set to `true` if the Particle should be killed if it enters this zone. + * Set to `false` to kill the Particle if it leaves this zone. + */ + killOnEnter: boolean; + + /** + * Checks if the given Particle will be killed or not by this zone. + * @param particle The Particle to be checked against this zone. + */ + willKill(particle: Phaser.GameObjects.Particles.Particle): boolean; + + } + + /** + * A zone that places particles on a shape's edges. + */ + class EdgeZone { + /** + * + * @param source An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. + * @param quantity The number of particles to place on the source edge. Set to 0 to use `stepRate` instead. + * @param stepRate The distance between each particle. When set, `quantity` is implied and should be set to 0. + * @param yoyo Whether particles are placed from start to end and then end to start. Default false. + * @param seamless Whether one endpoint will be removed if it's identical to the other. Default true. + */ + constructor(source: EdgeZoneSource, quantity: integer, stepRate: number, yoyo?: boolean, seamless?: boolean); + + /** + * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. + */ + source: EdgeZoneSource | RandomZoneSource; + + /** + * The points placed on the source edge. + */ + points: Phaser.Geom.Point[]; + + /** + * The number of particles to place on the source edge. Set to 0 to use `stepRate` instead. + */ + quantity: integer; + + /** + * The distance between each particle. When set, `quantity` is implied and should be set to 0. + */ + stepRate: number; + + /** + * Whether particles are placed from start to end and then end to start. + */ + yoyo: boolean; + + /** + * The counter used for iterating the EdgeZone's points. + */ + counter: number; + + /** + * Whether one endpoint will be removed if it's identical to the other. + */ + seamless: boolean; + + /** + * Update the {@link Phaser.GameObjects.Particles.Zones.EdgeZone#points} from the EdgeZone's + * {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}. + * + * Also updates internal properties. + */ + updateSource(): Phaser.GameObjects.Particles.Zones.EdgeZone; + + /** + * Change the EdgeZone's source. + * @param source An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. + */ + changeSource(source: EdgeZoneSource): Phaser.GameObjects.Particles.Zones.EdgeZone; + + /** + * Get the next point in the Zone and set its coordinates on the given Particle. + * @param particle The Particle. + */ + getPoint(particle: Phaser.GameObjects.Particles.Particle): void; + + } + + /** + * A zone that places particles randomly within a shape's area. + */ + class RandomZone { + /** + * + * @param source An object instance with a `getRandomPoint(point)` method. + */ + constructor(source: RandomZoneSource); + + /** + * An object instance with a `getRandomPoint(point)` method. + */ + source: RandomZoneSource; + + /** + * Get the next point in the Zone and set its coordinates on the given Particle. + * @param particle The Particle. + */ + getPoint(particle: Phaser.GameObjects.Particles.Particle): void; + + } + + } + + } + + /** + * A PathFollower Game Object. + * + * A PathFollower is a Sprite Game Object with some extra helpers to allow it to follow a Path automatically. + * + * Anything you can do with a standard Sprite can be done with this PathFollower, such as animate it, tint it, + * scale it and so on. + * + * PathFollowers are bound to a single Path at any one time and can traverse the length of the Path, from start + * to finish, forwards or backwards, or from any given point on the Path to its end. They can optionally rotate + * to face the direction of the path, be offset from the path coordinates or rotate independently of the Path. + */ + class PathFollower extends Phaser.GameObjects.Sprite { + /** + * + * @param scene The Scene to which this PathFollower belongs. + * @param path The Path this PathFollower is following. It can only follow one Path at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, path: Phaser.Curves.Path, x: number, y: number, texture: string, frame?: string | integer); + + /** + * The Path this PathFollower is following. It can only follow one Path at a time. + */ + path: Phaser.Curves.Path; + + /** + * Should the PathFollower automatically rotate to point in the direction of the Path? + */ + rotateToPath: boolean; + + /** + * [description] + */ + pathRotationVerticalAdjust: boolean; + + /** + * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath) + * this value is added to the rotation value. This allows you to rotate objects to a path but control + * the angle of the rotation as well. + */ + pathRotationOffset: number; + + /** + * An additional vector to add to the PathFollowers position, allowing you to offset it from the + * Path coordinates. + */ + pathOffset: Phaser.Math.Vector2; + + /** + * [description] + */ + pathVector: Phaser.Math.Vector2; + + /** + * The Tween used for following the Path. + */ + pathTween: Phaser.Tweens.Tween; + + /** + * Settings for the PathFollower. + */ + pathConfig: PathConfig; + + /** + * Set the Path that this PathFollower should follow. + * + * Optionally accepts {@link PathConfig} settings. + * @param path The Path this PathFollower is following. It can only follow one Path at a time. + * @param config Settings for the PathFollower. + */ + setPath(path: Phaser.Curves.Path, config?: PathConfig): Phaser.GameObjects.PathFollower; + + /** + * Set whether the PathFollower should automatically rotate to point in the direction of the Path. + * @param value Whether the PathFollower should automatically rotate to point in the direction of the Path. + * @param offset Rotation offset in degrees. Default 0. + * @param verticalAdjust [description] Default false. + */ + setRotateToPath(value: boolean, offset?: number, verticalAdjust?: boolean): Phaser.GameObjects.PathFollower; + + /** + * Is this PathFollower actively following a Path or not? + * + * To be considered as `isFollowing` it must be currently moving on a Path, and not paused. + */ + isFollowing(): boolean; + + /** + * Starts this PathFollower following its given Path. + * @param config The duration of the follow, or a PathFollower config object. Default {}. + * @param startAt Optional start position of the follow, between 0 and 1. Default 0. + */ + startFollow(config?: number | PathConfig, startAt?: number): Phaser.GameObjects.PathFollower; + + /** + * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the + * point on the Path at which you paused it. + */ + pauseFollow(): Phaser.GameObjects.PathFollower; + + /** + * Resumes a previously paused PathFollower. + * + * If the PathFollower was not paused this has no effect. + */ + resumeFollow(): Phaser.GameObjects.PathFollower; + + /** + * Stops this PathFollower from following the path any longer. + * + * This will invoke any 'stop' conditions that may exist on the Path, or for the follower. + */ + stopFollow(): Phaser.GameObjects.PathFollower; + + /** + * Internal update handler that advances this PathFollower along the path. + * + * Called automatically by the Scene step, should not typically be called directly. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + protected preUpdate(time: integer, delta: number): void; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Quad Game Object. + * + * A Quad is a Mesh Game Object pre-configured with two triangles arranged into a rectangle, with a single + * texture spread across them. + * + * You can manipulate the corner points of the quad via the getters and setters such as `topLeftX`, and also + * change their alpha and color values. The quad itself can be moved by adjusting the `x` and `y` properties. + */ + class Quad extends Phaser.GameObjects.Mesh { + /** + * + * @param scene The Scene to which this Quad belongs. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, x: number, y: number, texture: string, frame?: string | integer); + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + */ + setFrame(frame: string | integer): this; + + /** + * The top-left x vertex of this Quad. + */ + topLeftX: number; + + /** + * The top-left y vertex of this Quad. + */ + topLeftY: number; + + /** + * The top-right x vertex of this Quad. + */ + topRightX: number; + + /** + * The top-right y vertex of this Quad. + */ + topRightY: number; + + /** + * The bottom-left x vertex of this Quad. + */ + bottomLeftX: number; + + /** + * The bottom-left y vertex of this Quad. + */ + bottomLeftY: number; + + /** + * The bottom-right x vertex of this Quad. + */ + bottomRightX: number; + + /** + * The bottom-right y vertex of this Quad. + */ + bottomRightY: number; + + /** + * The top-left alpha value of this Quad. + */ + topLeftAlpha: number; + + /** + * The top-right alpha value of this Quad. + */ + topRightAlpha: number; + + /** + * The bottom-left alpha value of this Quad. + */ + bottomLeftAlpha: number; + + /** + * The bottom-right alpha value of this Quad. + */ + bottomRightAlpha: number; + + /** + * The top-left color value of this Quad. + */ + topLeftColor: number; + + /** + * The top-right color value of this Quad. + */ + topRightColor: number; + + /** + * The bottom-left color value of this Quad. + */ + bottomLeftColor: number; + + /** + * The bottom-right color value of this Quad. + */ + bottomRightColor: number; + + /** + * Sets the top-left vertex position of this Quad. + * @param x The horizontal coordinate of the vertex. + * @param y The vertical coordinate of the vertex. + */ + setTopLeft(x: number, y: number): Phaser.GameObjects.Quad; + + /** + * Sets the top-right vertex position of this Quad. + * @param x The horizontal coordinate of the vertex. + * @param y The vertical coordinate of the vertex. + */ + setTopRight(x: number, y: number): Phaser.GameObjects.Quad; + + /** + * Sets the bottom-left vertex position of this Quad. + * @param x The horizontal coordinate of the vertex. + * @param y The vertical coordinate of the vertex. + */ + setBottomLeft(x: number, y: number): Phaser.GameObjects.Quad; + + /** + * Sets the bottom-right vertex position of this Quad. + * @param x The horizontal coordinate of the vertex. + * @param y The vertical coordinate of the vertex. + */ + setBottomRight(x: number, y: number): Phaser.GameObjects.Quad; + + /** + * Resets the positions of the four corner vertices of this Quad. + */ + resetPosition(): Phaser.GameObjects.Quad; + + /** + * Resets the alpha values used by this Quad back to 1. + */ + resetAlpha(): Phaser.GameObjects.Quad; + + /** + * Resets the color values used by this Quad back to 0xffffff. + */ + resetColors(): Phaser.GameObjects.Quad; + + /** + * Resets the position, alpha and color values used by this Quad. + */ + reset(): Phaser.GameObjects.Quad; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + } + + /** + * A Render Texture. + */ + class RenderTexture extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.MatrixStack, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Render Texture. Default 32. + * @param height The height of the Render Texture. Default 32. + */ + constructor(scene: Phaser.Scene, x: number, y: number, width?: integer, height?: integer); + + /** + * A reference to either the Canvas or WebGL Renderer that the Game instance is using. + */ + renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * The tint of the Render Texture when rendered. + */ + globalTint: number; + + /** + * The alpha of the Render Texture when rendered. + */ + globalAlpha: number; + + /** + * The HTML Canvas Element that the Render Texture is drawing to. + * This is only set if Phaser is running with the Canvas Renderer. + */ + canvas: HTMLCanvasElement; + + /** + * A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to. + * This is only set if Phaser is running with the Canvas Renderer. + */ + context: CanvasRenderingContext2D; + + /** + * A reference to the GL Frame Buffer this Render Texture is drawing to. + * This is only set if Phaser is running with the WebGL Renderer. + */ + framebuffer: WebGLFramebuffer; + + /** + * Resizes the Render Texture to the new dimensions given. + * + * In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture. + * In Canvas it will resize the underlying canvas element. + * Both approaches will erase everything currently drawn to the Render Texture. + * + * If the dimensions given are the same as those already being used, calling this method will do nothing. + * @param width The new width of the Render Texture. + * @param height The new height of the Render Texture. If not specified, will be set the same as the `width`. + */ + resize(width: number, height?: number): this; + + /** + * Set the tint to use when rendering this Render Texture. + * @param tint The tint value. + */ + setGlobalTint(tint: integer): this; + + /** + * Set the alpha to use when rendering this Render Texture. + * @param alpha The alpha value. + */ + setGlobalAlpha(alpha: number): this; + + /** + * Internal destroy handler, called as part of the destroy process. + */ + protected preDestroy(): void; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * Initialize the matrix stack. + */ + initMatrixStack(): this; + + /** + * Push the current matrix onto the matrix stack. + */ + save(): this; + + /** + * Pop the top of the matrix stack into the current matrix. + */ + restore(): this; + + /** + * Reset the current matrix to the identity matrix. + */ + loadIdentity(): this; + + /** + * Transform the current matrix. + * @param a The Scale X value. + * @param b The Shear Y value. + * @param c The Shear X value. + * @param d The Scale Y value. + * @param tx The Translate X value. + * @param ty The Translate Y value. + */ + transform(a: number, b: number, c: number, d: number, tx: number, ty: number): this; + + /** + * Set a transform matrix as the current matrix. + * @param a The Scale X value. + * @param b The Shear Y value. + * @param c The Shear X value. + * @param d The Scale Y value. + * @param tx The Translate X value. + * @param ty The Translate Y value. + */ + setTransform(a: number, b: number, c: number, d: number, tx: number, ty: number): this; + + /** + * Translate the current matrix. + * @param x The horizontal translation value. + * @param y The vertical translation value. + */ + translate(x: number, y: number): this; + + /** + * Scale the current matrix. + * @param x The horizontal scale value. + * @param y The vertical scale value. + */ + scale(x: number, y: number): this; + + /** + * Rotate the current matrix. + * @param t The angle of rotation in radians. + */ + rotate(t: number): this; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. + */ + class Sprite extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.TextureCrop, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, x: number, y: number, texture: string, frame?: string | integer); + + /** + * The Animation Controller of this Sprite. + */ + anims: Phaser.GameObjects.Components.Animation; + + /** + * Update this Sprite's animations. + * @param time The current timestamp. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + protected preUpdate(time: number, delta: number): void; + + /** + * Start playing the given animation. + * @param key The string-based key of the animation to play. + * @param ignoreIfPlaying If an animation is already playing then ignore this call. Default false. + * @param startFrame Optionally start the animation playing from this frame index. Default 0. + */ + play(key: string, ignoreIfPlaying?: boolean, startFrame?: integer): Phaser.GameObjects.Sprite; + + /** + * Build a JSON representation of this Sprite. + */ + toJSON(): JSONGameObject; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Sprite 3D Game Object. + * + * The Sprite 3D object is an encapsulation of a standard Sprite object, with additional methods to allow + * it to be rendered by a 3D Camera. The Sprite can be positioned anywhere within 3D space. + */ + class Sprite3D extends Phaser.GameObjects.GameObject { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The x position of this Game Object. + * @param y The y position of this Game Object. + * @param z The z position of this Game Object. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, x: number, y: number, z: number, texture: string, frame?: string | integer); + + /** + * The encapsulated Sprite. + */ + gameObject: Phaser.GameObjects.GameObject; + + /** + * The position of the Sprite. + */ + position: Phaser.Math.Vector4; + + /** + * The 2D size of the Sprite. + */ + size: Phaser.Math.Vector2; + + /** + * The 2D scale of the Sprite. + */ + scale: Phaser.Math.Vector2; + + /** + * Whether to automatically set the horizontal scale of the encapsulated Sprite. + */ + adjustScaleX: boolean; + + /** + * Whether to automatically set the vertical scale of the encapsulated Sprite. + */ + adjustScaleY: boolean; + + /** + * Project this Sprite onto the given 3D Camera. + * @param camera The 3D Camera onto which to project this Sprite. + */ + project(camera: Phaser.Cameras.Sprite3D.Camera): void; + + /** + * Set the visible state of the Game Object. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): Phaser.GameObjects.Sprite3D; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + */ + z: number; + + } + + /** + * [description] + */ + class Text extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param text The text this Text object will display. + * @param style The text style configuration object. + */ + constructor(scene: Phaser.Scene, x: number, y: number, text: string | string[], style: object); + + /** + * Returns an object containing dimensions of the Text object. + * @param text The Text object to calculate the size from. + * @param size The Text metrics to use when calculating the size. + * @param lines The lines of text to calculate the size from. + */ + static GetTextSize(text: Phaser.GameObjects.Text, size: BitmapTextMetrics, lines: any[]): object; + + /** + * Calculates the ascent, descent and fontSize of a given font style. + * @param textStyle The TextStyle object to measure. + */ + static MeasureText(textStyle: Phaser.GameObjects.Text.TextStyle): object; + + /** + * The canvas element that the text is rendered to. + */ + canvas: HTMLCanvasElement; + + /** + * The context of the canvas element that the text is rendered to. + */ + context: CanvasRenderingContext2D; + + /** + * The Text Style object. + * + * Manages the style of this Text object. + */ + style: Phaser.GameObjects.Text.TextStyle; + + /** + * Whether to automatically round line positions. + */ + autoRound: boolean; + + /** + * The Regular Expression that is used to split the text up into lines, in + * multi-line text. By default this is `/(?:\r\n|\r|\n)/`. + * You can change this RegExp to be anything else that you may need. + */ + splitRegExp: object; + + /** + * The text to display. + */ + text: string; + + /** + * The resolution of the text. + */ + resolution: number; + + /** + * Specify a padding value which is added to the line width and height when calculating the Text size. + * Allows you to add extra spacing if the browser is unable to accurately determine the true font dimensions. + */ + padding: Object; + + /** + * The width of this Text object. + */ + width: number; + + /** + * The height of this Text object. + */ + height: number; + + /** + * The Canvas Texture that the text is rendered to for WebGL rendering. + */ + canvasTexture: HTMLCanvasElement; + + /** + * Whether the text or its settings have changed and need updating. + */ + dirty: boolean; + + /** + * Initialize right to left text. + */ + initRTL(): void; + + /** + * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal + * bounds. + * @param text The text to perform word wrap detection against. + */ + runWordWrap(text: string): string; + + /** + * Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal + * bounds. Consecutive spaces will be collapsed and replaced with a single space. Lines will be + * trimmed of white space before processing. Throws an error if wordWrapWidth is less than a + * single character. + * @param text The text to perform word wrap detection against. + * @param context The Canvas Rendering Context. + * @param wordWrapWidth The word wrap width. + */ + advancedWordWrap(text: string, context: CanvasRenderingContext2D, wordWrapWidth: number): string; + + /** + * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal + * bounds. Spaces are not collapsed and whitespace is not trimmed. + * @param text The text to perform word wrap detection against. + * @param context The Canvas Rendering Context. + * @param wordWrapWidth The word wrap width. + */ + basicWordWrap(text: string, context: CanvasRenderingContext2D, wordWrapWidth: number): string; + + /** + * Runs the given text through this Text objects word wrapping and returns the results as an + * array, where each element of the array corresponds to a wrapped line of text. + * @param text The text for which the wrapping will be calculated. If unspecified, the Text objects current text will be used. + */ + getWrappedText(text: string): string[]; + + /** + * Set the text to display. + * + * An array of strings will be joined with `\n` line breaks. + * @param value The string, or array of strings, to be set as the content of this Text object. + */ + setText(value: string | string[]): Phaser.GameObjects.Text; + + /** + * Set the text style. + * @param style The style settings to set. + */ + setStyle(style: object): Phaser.GameObjects.Text; + + /** + * Set the font. + * + * If a string is given, the font family is set. + * + * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` + * properties of that object are set. + * @param font The font family or font settings to set. + */ + setFont(font: string): Phaser.GameObjects.Text; + + /** + * Set the font family. + * @param family The font family. + */ + setFontFamily(family: string): Phaser.GameObjects.Text; + + /** + * Set the font size. + * @param size The font size. + */ + setFontSize(size: number): Phaser.GameObjects.Text; + + /** + * Set the font style. + * @param style The font style. + */ + setFontStyle(style: string): Phaser.GameObjects.Text; + + /** + * Set a fixed width and height for the text. + * + * Pass in `0` for either of these parameters to disable fixed width or height respectively. + * @param width The fixed width to set. `0` disables fixed width. + * @param height The fixed height to set. `0` disables fixed height. + */ + setFixedSize(width: number, height: number): Phaser.GameObjects.Text; + + /** + * Set the background color. + * @param color The background color. + */ + setBackgroundColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the text fill color. + * @param color The text fill color. + */ + setFill(color: string): Phaser.GameObjects.Text; + + /** + * Set the text fill color. + * @param color The text fill color. + */ + setColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the stroke settings. + * @param color The stroke color. + * @param thickness The stroke thickness. + */ + setStroke(color: string, thickness: number): Phaser.GameObjects.Text; + + /** + * Set the shadow settings. + * @param x The horizontal shadow offset. Default 0. + * @param y The vertical shadow offset. Default 0. + * @param color The shadow color. Default '#000'. + * @param blur The shadow blur radius. Default 0. + * @param shadowStroke Whether to stroke the shadow. Default false. + * @param shadowFill Whether to fill the shadow. Default true. + */ + setShadow(x?: number, y?: number, color?: string, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): Phaser.GameObjects.Text; + + /** + * Set the shadow offset. + * @param x The horizontal shadow offset. + * @param y The vertical shadow offset. + */ + setShadowOffset(x: number, y: number): Phaser.GameObjects.Text; + + /** + * Set the shadow color. + * @param color The shadow color. + */ + setShadowColor(color: string): Phaser.GameObjects.Text; + + /** + * Set the shadow blur radius. + * @param blur The shadow blur radius. + */ + setShadowBlur(blur: number): Phaser.GameObjects.Text; + + /** + * Enable or disable shadow stroke. + * @param enabled Whether shadow stroke is enabled or not. + */ + setShadowStroke(enabled: boolean): Phaser.GameObjects.Text; + + /** + * Enable or disable shadow fill. + * @param enabled Whether shadow fill is enabled or not. + */ + setShadowFill(enabled: boolean): Phaser.GameObjects.Text; + + /** + * Set the width (in pixels) to use for wrapping lines. Pass in null to remove wrapping by width. + * @param width The maximum width of a line in pixels. Set to null to remove wrapping. + * @param useAdvancedWrap Whether or not to use the advanced wrapping + * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, + * spaces and whitespace are left as is. Default false. + */ + setWordWrapWidth(width: number, useAdvancedWrap?: boolean): Phaser.GameObjects.Text; + + /** + * Set a custom callback for wrapping lines. Pass in null to remove wrapping by callback. + * @param callback A custom function that will be responsible for wrapping the + * text. It will receive two arguments: text (the string to wrap), textObject (this Text + * instance). It should return the wrapped lines either as an array of lines or as a string with + * newline characters in place to indicate where breaks should happen. + * @param scope The scope that will be applied when the callback is invoked. Default null. + */ + setWordWrapCallback(callback: TextStyleWordWrapCallback, scope?: object): Phaser.GameObjects.Text; + + /** + * Set the text alignment. + * + * Expects values like `'left'`, `'right'`, `'center'` or `'justified'`. + * @param align The text alignment. + */ + setAlign(align: string): Phaser.GameObjects.Text; + + /** + * Set the text padding. + * + * 'left' can be an object. + * + * If only 'left' and 'top' are given they are treated as 'x' and 'y'. + * @param left The left padding value, or a padding config object. + * @param top The top padding value. + * @param right The right padding value. + * @param bottom The bottom padding value. + */ + setPadding(left: number | object, top: number, right: number, bottom: number): Phaser.GameObjects.Text; + + /** + * Set the maximum number of lines to draw. + * @param max The maximum number of lines to draw. Default 0. + */ + setMaxLines(max?: integer): Phaser.GameObjects.Text; + + /** + * Update the displayed text. + */ + updateText(): Phaser.GameObjects.Text; + + /** + * Get the current text metrics. + */ + getTextMetrics(): object; + + /** + * Build a JSON representation of the Text object. + */ + toJSON(): JSONGameObject; + + /** + * Internal destroy handler, called as part of the destroy process. + */ + protected preDestroy(): void; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A TileSprite is a Sprite that has a repeating texture. + * + * The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and + * are designed so that you can create game backdrops using seamless textures as a source. + * + * You shouldn't ever create a TileSprite any larger than your actual screen size. If you want to create a large repeating background + * that scrolls across the whole map of your game, then you create a TileSprite that fits the screen size and then use the `tilePosition` + * property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will + * consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to + * adjust the scale of the texture - don't resize the sprite itself or make it larger than it needs. + * + * An important note about Tile Sprites and NPOT textures: Internally, TileSprite textures use GL_REPEAT to provide + * seamless repeating of the textures. This, combined with the way in which the textures are handled in WebGL, means + * they need to be POT (power-of-two) sizes in order to wrap. If you provide a NPOT (non power-of-two) texture to a + * TileSprite it will generate a POT sized canvas and draw your texture to it, scaled up to the POT size. It's then + * scaled back down again during rendering to the original dimensions. While this works, in that it allows you to use + * any size texture for a Tile Sprite, it does mean that NPOT textures are going to appear anti-aliased when rendered, + * due to the interpolation that took place when it was resized into a POT texture. This is especially visible in + * pixel art graphics. If you notice it and it becomes an issue, the only way to avoid it is to ensure that you + * provide POT textures for Tile Sprites. + */ + class TileSprite extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Game Object. + * @param height The height of the Game Object. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, x: number, y: number, width: number, height: number, texture: string, frame?: string | integer); + + /** + * The horizontal scroll position of the Tile Sprite. + */ + tilePositionX: number; + + /** + * The vertical scroll position of the Tile Sprite. + */ + tilePositionY: number; + + /** + * The horizontal scale of the Tile Sprite texture. + */ + tileScaleX: number; + + /** + * The vertical scale of the Tile Sprite texture. + */ + tileScaleY: number; + + /** + * Whether the Tile Sprite has changed in some way, requiring an re-render of its tile texture. + * + * Such changes include the texture frame and scroll position of the Tile Sprite. + */ + dirty: boolean; + + /** + * The texture that the Tile Sprite is rendered to, which is then rendered to a Scene. + * In WebGL this is a WebGLTexture. In Canvas it's a Canvas Fill Pattern. + */ + tileTexture: WebGLTexture | CanvasPattern; + + /** + * The renderer in use by this Tile Sprite. + */ + renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * The next power of two value from the width of the Frame. + */ + potWidth: integer; + + /** + * The next power of two value from the height of the Frame. + */ + potHeight: integer; + + /** + * The Canvas Pattern used to repeat the TileSprite's texture. + */ + canvasPattern: CanvasPattern; + + /** + * The Canvas that the TileSprite's texture is rendered to. + */ + canvasBuffer: HTMLCanvasElement; + + /** + * The Canvas Context used to render the TileSprite's texture. + */ + canvasBufferCtx: CanvasRenderingContext2D; + + /** + * Sets {@link Phaser.GameObjects.TileSprite#tilePositionX} and {@link Phaser.GameObjects.TileSprite#tilePositionY}. + * @param x The x position of this sprite's tiling texture. + * @param y The y position of this sprite's tiling texture. + */ + setTilePosition(x?: number, y?: number): Phaser.GameObjects.TileSprite; + + /** + * Render the tile texture if it is dirty, or if the frame has changed. + */ + updateTileTexture(): void; + + /** + * Internal destroy handler, called as part of the destroy process. + */ + protected preDestroy(): void; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Zone Game Object. + * + * A Zone is a non-rendering rectangular Game Object that has a position and size. + * It has no texture and never displays, but does live on the display list and + * can be moved, scaled and rotated like any other Game Object. + * + * Its primary use is for creating Drop Zones and Input Hit Areas and it has a couple of helper methods + * specifically for this. It is also useful for object overlap checks, or as a base for your own + * non-displaying Game Objects. + * The default origin is 0.5, the center of the Zone, the same as with Game Objects. + */ + class Zone extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param width The width of the Game Object. Default 1. + * @param height The height of the Game Object. Default 1. + */ + constructor(scene: Phaser.Scene, x: number, y: number, width?: number, height?: number); + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The Blend Mode of the Game Object. + * Although a Zone never renders, it still has a blend mode to allow it to fit seamlessly into + * display lists without causing a batch flush. + */ + blendMode: integer; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + * @param resizeInput If this Zone has a Rectangle for a hit area this argument will resize the hit area as well. Default true. + */ + setSize(width: number, height: number, resizeInput?: boolean): Phaser.GameObjects.Zone; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): Phaser.GameObjects.Zone; + + /** + * Sets this Zone to be a Circular Drop Zone. + * The circle is centered on this Zones `x` and `y` coordinates. + * @param radius The radius of the Circle that will form the Drop Zone. + */ + setCircleDropZone(radius: number): Phaser.GameObjects.Zone; + + /** + * Sets this Zone to be a Rectangle Drop Zone. + * The rectangle is centered on this Zones `x` and `y` coordinates. + * @param width The width of the rectangle drop zone. + * @param height The height of the rectangle drop zone. + */ + setRectangleDropZone(width: number, height: number): Phaser.GameObjects.Zone; + + /** + * Allows you to define your own Geometry shape to be used as a Drop Zone. + * @param shape A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape. + * @param callback A function that will return `true` if the given x/y coords it is sent are within the shape. + */ + setDropZone(shape: object, callback: HitAreaCallback): Phaser.GameObjects.Zone; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + } + + namespace Geom { + /** + * A Circle object. + * + * This is a geometry object, containing numerical values and related methods to inspect and modify them. + * It is not a Game Object, in that you cannot add it to the display list, and it has no texture. + * To render a Circle you should look at the capabilities of the Graphics class. + */ + class Circle { + /** + * + * @param x The x position of the center of the circle. Default 0. + * @param y The y position of the center of the circle. Default 0. + * @param radius The radius of the circle. Default 0. + */ + constructor(x?: number, y?: number, radius?: number); + + /** + * Calculates the area of the circle. + * @param circle The Circle to get the area of. + */ + static Area(circle: Phaser.Geom.Circle): number; + + /** + * The x position of the center of the circle. + */ + x: number; + + /** + * The y position of the center of the circle. + */ + y: number; + + /** + * Check to see if the Circle contains the given x / y coordinates. + * @param x The x coordinate to check within the circle. + * @param y The y coordinate to check within the circle. + */ + contains(x: number, y: number): boolean; + + /** + * Returns a Point object containing the coordinates of a point on the circumference of the Circle + * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point + * at 180 degrees around the circle. + * @param position A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle. + * @param out An object to store the return values in. If not given a Point object will be created. + */ + getPoint(position: number, out?: O): O; + + /** + * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle, + * based on the given quantity or stepRate values. + * @param quantity The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. + * @param stepRate Sets the quantity by getting the circumference of the circle and dividing it by the stepRate. + * @param output An array to insert the points in to. If not provided a new array will be created. + */ + getPoints(quantity: integer, stepRate?: number, output?: O): O; + + /** + * Returns a uniformly distributed random point from anywhere within the Circle. + * @param point A Point or point-like object to set the random `x` and `y` values in. + */ + getRandomPoint(point?: O): O; + + /** + * Sets the x, y and radius of this circle. + * @param x The x position of the center of the circle. Default 0. + * @param y The y position of the center of the circle. Default 0. + * @param radius The radius of the circle. Default 0. + */ + setTo(x?: number, y?: number, radius?: number): Phaser.Geom.Circle; + + /** + * Sets this Circle to be empty with a radius of zero. + * Does not change its position. + */ + setEmpty(): Phaser.Geom.Circle; + + /** + * Sets the position of this Circle. + * @param x The x position of the center of the circle. Default 0. + * @param y The y position of the center of the circle. Default 0. + */ + setPosition(x?: number, y?: number): Phaser.Geom.Circle; + + /** + * Checks to see if the Circle is empty: has a radius of zero. + */ + isEmpty(): boolean; + + /** + * The radius of the Circle. + */ + radius: number; + + /** + * The diameter of the Circle. + */ + diameter: number; + + /** + * The left position of the Circle. + */ + left: number; + + /** + * The right position of the Circle. + */ + right: number; + + /** + * The top position of the Circle. + */ + top: number; + + /** + * The bottom position of the Circle. + */ + bottom: number; + + /** + * Returns the circumference of the given Circle. + * @param circle The Circle to get the circumference of. + */ + static Circumference(circle: Phaser.Geom.Circle): number; + + /** + * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle. + * @param circle The Circle to get the circumference point on. + * @param angle The angle from the center of the Circle to the circumference to return the point from. Given in radians. + * @param out A Point, or point-like object, to store the results in. If not given a Point will be created. + */ + static CircumferencePoint(circle: Phaser.Geom.Circle, angle: number, out?: O): O; + + /** + * Creates a new Circle instance based on the values contained in the given source. + * @param source The Circle to be cloned. Can be an instance of a Circle or a circle-like object, with x, y and radius properties. + */ + static Clone(source: Phaser.Geom.Circle | object): Phaser.Geom.Circle; + + /** + * Check to see if the Circle contains the given x / y coordinates. + * @param circle The Circle to check. + * @param x The x coordinate to check within the circle. + * @param y The y coordinate to check within the circle. + */ + static Contains(circle: Phaser.Geom.Circle, x: number, y: number): boolean; + + /** + * Check to see if the Circle contains the given Point object. + * @param circle The Circle to check. + * @param point The Point object to check if it's within the Circle or not. + */ + static ContainsPoint(circle: Phaser.Geom.Circle, point: Phaser.Geom.Point | object): boolean; + + /** + * Check to see if the Circle contains all four points of the given Rectangle object. + * @param circle The Circle to check. + * @param rect The Rectangle object to check if it's within the Circle or not. + */ + static ContainsRect(circle: Phaser.Geom.Circle, rect: Phaser.Geom.Rectangle | object): boolean; + + /** + * Copies the `x`, `y` and `radius` properties from the `source` Circle + * into the given `dest` Circle, then returns the `dest` Circle. + * @param source The source Circle to copy the values from. + * @param dest The destination Circle to copy the values to. + */ + static CopyFrom(source: Phaser.Geom.Circle, dest: O): O; + + /** + * Compares the `x`, `y` and `radius` properties of the two given Circles. + * Returns `true` if they all match, otherwise returns `false`. + * @param circle The first Circle to compare. + * @param toCompare The second Circle to compare. + */ + static Equals(circle: Phaser.Geom.Circle, toCompare: Phaser.Geom.Circle): boolean; + + /** + * Returns the bounds of the Circle object. + * @param circle The Circle to get the bounds from. + * @param out A Rectangle, or rectangle-like object, to store the circle bounds in. If not given a new Rectangle will be created. + */ + static GetBounds(circle: Phaser.Geom.Circle, out?: O): O; + + /** + * Returns a Point object containing the coordinates of a point on the circumference of the Circle + * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point + * at 180 degrees around the circle. + * @param circle The Circle to get the circumference point on. + * @param position A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle. + * @param out An object to store the return values in. If not given a Point object will be created. + */ + static GetPoint(circle: Phaser.Geom.Circle, position: number, out?: O): O; + + /** + * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle, + * based on the given quantity or stepRate values. + * @param circle The Circle to get the points from. + * @param quantity The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. + * @param stepRate Sets the quantity by getting the circumference of the circle and dividing it by the stepRate. + * @param output An array to insert the points in to. If not provided a new array will be created. + */ + static GetPoints(circle: Phaser.Geom.Circle, quantity: integer, stepRate?: number, output?: any[]): Phaser.Geom.Point[]; + + /** + * Offsets the Circle by the values given. + * @param circle The Circle to be offset (translated.) + * @param x The amount to horizontally offset the Circle by. + * @param y The amount to vertically offset the Circle by. + */ + static Offset(circle: O, x: number, y: number): O; + + /** + * Offsets the Circle by the values given in the `x` and `y` properties of the Point object. + * @param circle The Circle to be offset (translated.) + * @param point The Point object containing the values to offset the Circle by. + */ + static OffsetPoint(circle: O, point: Phaser.Geom.Point | object): O; + + /** + * Returns a uniformly distributed random point from anywhere within the given Circle. + * @param circle The Circle to get a random point from. + * @param out A Point or point-like object to set the random `x` and `y` values in. + */ + static Random(circle: Phaser.Geom.Circle, out?: O): O; + + } + + /** + * An Ellipse object. + * + * This is a geometry object, containing numerical values and related methods to inspect and modify them. + * It is not a Game Object, in that you cannot add it to the display list, and it has no texture. + * To render an Ellipse you should look at the capabilities of the Graphics class. + */ + class Ellipse { + /** + * + * @param x The x position of the center of the ellipse. Default 0. + * @param y The y position of the center of the ellipse. Default 0. + * @param width The width of the ellipse. Default 0. + * @param height The height of the ellipse. Default 0. + */ + constructor(x?: number, y?: number, width?: number, height?: number); + + /** + * Calculates the area of the Ellipse. + * @param ellipse The Ellipse to get the area of. + */ + static Area(ellipse: Phaser.Geom.Ellipse): number; + + /** + * Returns the circumference of the given Ellipse. + * @param ellipse The Ellipse to get the circumference of. + */ + static Circumference(ellipse: Phaser.Geom.Ellipse): number; + + /** + * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse based on the given angle. + * @param ellipse The Ellipse to get the circumference point on. + * @param angle The angle from the center of the Ellipse to the circumference to return the point from. Given in radians. + * @param out A Point, or point-like object, to store the results in. If not given a Point will be created. + */ + static CircumferencePoint(ellipse: Phaser.Geom.Ellipse, angle: number, out?: O): O; + + /** + * Creates a new Ellipse instance based on the values contained in the given source. + * @param source The Ellipse to be cloned. Can be an instance of an Ellipse or a ellipse-like object, with x, y, width and height properties. + */ + static Clone(source: Phaser.Geom.Ellipse): Phaser.Geom.Ellipse; + + /** + * Check to see if the Ellipse contains the given x / y coordinates. + * @param ellipse The Ellipse to check. + * @param x The x coordinate to check within the ellipse. + * @param y The y coordinate to check within the ellipse. + */ + static Contains(ellipse: Phaser.Geom.Ellipse, x: number, y: number): boolean; + + /** + * Check to see if the Ellipse contains the given Point object. + * @param ellipse The Ellipse to check. + * @param point The Point object to check if it's within the Circle or not. + */ + static ContainsPoint(ellipse: Phaser.Geom.Ellipse, point: Phaser.Geom.Point | object): boolean; + + /** + * Check to see if the Ellipse contains all four points of the given Rectangle object. + * @param ellipse The Ellipse to check. + * @param rect The Rectangle object to check if it's within the Ellipse or not. + */ + static ContainsRect(ellipse: Phaser.Geom.Ellipse, rect: Phaser.Geom.Rectangle | object): boolean; + + /** + * Copies the `x`, `y`, `width` and `height` properties from the `source` Ellipse + * into the given `dest` Ellipse, then returns the `dest` Ellipse. + * @param source The source Ellipse to copy the values from. + * @param dest The destination Ellipse to copy the values to. + */ + static CopyFrom(source: Phaser.Geom.Ellipse, dest: O): O; + + /** + * The x position of the center of the ellipse. + */ + x: number; + + /** + * The y position of the center of the ellipse. + */ + y: number; + + /** + * The width of the ellipse. + */ + width: number; + + /** + * The height of the ellipse. + */ + height: number; + + /** + * Check to see if the Ellipse contains the given x / y coordinates. + * @param x The x coordinate to check within the ellipse. + * @param y The y coordinate to check within the ellipse. + */ + contains(x: number, y: number): boolean; + + /** + * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse + * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point + * at 180 degrees around the circle. + * @param position A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse. + * @param out An object to store the return values in. If not given a Point object will be created. + */ + getPoint(position: number, out?: O): O; + + /** + * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse, + * based on the given quantity or stepRate values. + * @param quantity The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. + * @param stepRate Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate. + * @param output An array to insert the points in to. If not provided a new array will be created. + */ + getPoints(quantity: integer, stepRate?: number, output?: any[]): Phaser.Geom.Point[]; + + /** + * Returns a uniformly distributed random point from anywhere within the given Ellipse. + * @param point A Point or point-like object to set the random `x` and `y` values in. + */ + getRandomPoint(point?: O): O; + + /** + * Sets the x, y, width and height of this ellipse. + * @param x The x position of the center of the ellipse. + * @param y The y position of the center of the ellipse. + * @param width The width of the ellipse. + * @param height The height of the ellipse. + */ + setTo(x: number, y: number, width: number, height: number): Phaser.Geom.Ellipse; + + /** + * Sets this Ellipse to be empty with a width and height of zero. + * Does not change its position. + */ + setEmpty(): Phaser.Geom.Ellipse; + + /** + * Sets the position of this Ellipse. + * @param x The x position of the center of the ellipse. + * @param y The y position of the center of the ellipse. + */ + setPosition(x: number, y: number): Phaser.Geom.Ellipse; + + /** + * Sets the size of this Ellipse. + * Does not change its position. + * @param width The width of the ellipse. + * @param height The height of the ellipse. Default width. + */ + setSize(width: number, height?: number): Phaser.Geom.Ellipse; + + /** + * Checks to see if the Ellipse is empty: has a width or height equal to zero. + */ + isEmpty(): boolean; + + /** + * Returns the minor radius of the ellipse. Also known as the Semi Minor Axis. + */ + getMinorRadius(): number; + + /** + * Returns the major radius of the ellipse. Also known as the Semi Major Axis. + */ + getMajorRadius(): number; + + /** + * The left position of the Ellipse. + */ + left: number; + + /** + * The right position of the Ellipse. + */ + right: number; + + /** + * The top position of the Ellipse. + */ + top: number; + + /** + * The bottom position of the Ellipse. + */ + bottom: number; + + /** + * Compares the `x`, `y`, `width` and `height` properties of the two given Ellipses. + * Returns `true` if they all match, otherwise returns `false`. + * @param ellipse The first Ellipse to compare. + * @param toCompare The second Ellipse to compare. + */ + static Equals(ellipse: Phaser.Geom.Ellipse, toCompare: Phaser.Geom.Ellipse): boolean; + + /** + * Returns the bounds of the Ellipse object. + * @param ellipse The Ellipse to get the bounds from. + * @param out A Rectangle, or rectangle-like object, to store the ellipse bounds in. If not given a new Rectangle will be created. + */ + static GetBounds(ellipse: Phaser.Geom.Ellipse, out?: O): O; + + /** + * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse + * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point + * at 180 degrees around the circle. + * @param ellipse The Ellipse to get the circumference point on. + * @param position A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse. + * @param out An object to store the return values in. If not given a Point object will be created. + */ + static GetPoint(ellipse: Phaser.Geom.Ellipse, position: number, out?: O): O; + + /** + * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse, + * based on the given quantity or stepRate values. + * @param ellipse The Ellipse to get the points from. + * @param quantity The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. + * @param stepRate Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate. + * @param out An array to insert the points in to. If not provided a new array will be created. + */ + static GetPoints(ellipse: Phaser.Geom.Ellipse, quantity: integer, stepRate?: number, out?: O): O; + + /** + * Offsets the Ellipse by the values given. + * @param ellipse The Ellipse to be offset (translated.) + * @param x The amount to horizontally offset the Ellipse by. + * @param y The amount to vertically offset the Ellipse by. + */ + static Offset(ellipse: O, x: number, y: number): O; + + /** + * Offsets the Ellipse by the values given in the `x` and `y` properties of the Point object. + * @param ellipse The Ellipse to be offset (translated.) + * @param point The Point object containing the values to offset the Ellipse by. + */ + static OffsetPoint(ellipse: O, point: Phaser.Geom.Point | object): O; + + /** + * Returns a uniformly distributed random point from anywhere within the given Ellipse. + * @param ellipse The Ellipse to get a random point from. + * @param out A Point or point-like object to set the random `x` and `y` values in. + */ + static Random(ellipse: Phaser.Geom.Ellipse, out?: O): O; + + } + + namespace Intersects { + /** + * [description] + * @param circleA [description] + * @param circleB [description] + */ + function CircleToCircle(circleA: Phaser.Geom.Circle, circleB: Phaser.Geom.Circle): boolean; + + /** + * [description] + * @param circle [description] + * @param rect [description] + */ + function CircleToRectangle(circle: Phaser.Geom.Circle, rect: Phaser.Geom.Rectangle): boolean; + + /** + * [description] + * @param rectA [description] + * @param rectB [description] + * @param output [description] + */ + function GetRectangleIntersection(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle, output?: O): O; + + /** + * [description] + * @param line [description] + * @param circle [description] + * @param nearest [description] + */ + function LineToCircle(line: Phaser.Geom.Line, circle: Phaser.Geom.Circle, nearest?: Phaser.Geom.Point): boolean; + + /** + * [description] + * @param line1 [description] + * @param line2 [description] + * @param out [description] + */ + function LineToLine(line1: Phaser.Geom.Line, line2: Phaser.Geom.Line, out?: Phaser.Geom.Point): boolean; + + /** + * Checks for intersection between the Line and a Rectangle shape, or a rectangle-like + * object, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body. + * + * An intersection is considered valid if: + * + * The line starts within, or ends within, the Rectangle. + * The line segment intersects one of the 4 rectangle edges. + * + * The for the purposes of this function rectangles are considered 'solid'. + * @param line [description] + * @param rect [description] + */ + function LineToRectangle(line: Phaser.Geom.Line, rect: Phaser.Geom.Rectangle | object): boolean; + + /** + * [description] + * @param point [description] + * @param line [description] + */ + function PointToLine(point: Phaser.Geom.Point, line: Phaser.Geom.Line): boolean; + + /** + * [description] + * @param point [description] + * @param line [description] + */ + function PointToLineSegment(point: Phaser.Geom.Point, line: Phaser.Geom.Line): boolean; + + /** + * [description] + * @param rectA [description] + * @param rectB [description] + */ + function RectangleToRectangle(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle): boolean; + + /** + * [description] + * @param rect [description] + * @param triangle [description] + */ + function RectangleToTriangle(rect: Phaser.Geom.Rectangle, triangle: Phaser.Geom.Triangle): boolean; + + /** + * [description] + * @param rect [description] + * @param left [description] + * @param right [description] + * @param top [description] + * @param bottom [description] + * @param tolerance [description] Default 0. + */ + function RectangleToValues(rect: Phaser.Geom.Rectangle, left: number, right: number, top: number, bottom: number, tolerance?: number): boolean; + + /** + * [description] + * @param triangle [description] + * @param circle [description] + */ + function TriangleToCircle(triangle: Phaser.Geom.Triangle, circle: Phaser.Geom.Circle): boolean; + + /** + * [description] + * @param triangle [description] + * @param line [description] + */ + function TriangleToLine(triangle: Phaser.Geom.Triangle, line: Phaser.Geom.Line): boolean; + + /** + * [description] + * @param triangleA [description] + * @param triangleB [description] + */ + function TriangleToTriangle(triangleA: Phaser.Geom.Triangle, triangleB: Phaser.Geom.Triangle): boolean; + + } + + /** + * Defines a Line segment, a part of a line between two endpoints. + */ + class Line { + /** + * + * @param x1 The x coordinate of the lines starting point. Default 0. + * @param y1 The y coordinate of the lines starting point. Default 0. + * @param x2 The x coordinate of the lines ending point. Default 0. + * @param y2 The y coordinate of the lines ending point. Default 0. + */ + constructor(x1?: number, y1?: number, x2?: number, y2?: number); + + /** + * Calculate the angle of the line in radians. + * @param line The line to calculate the angle of. + */ + static Angle(line: Phaser.Geom.Line): number; + + /** + * Using Bresenham's line algorithm this will return an array of all coordinates on this line. + * + * The `start` and `end` points are rounded before this runs as the algorithm works on integers. + * @param line The line. + * @param stepRate The optional step rate for the points on the line. Default 1. + * @param results An optional array to push the resulting coordinates into. + */ + static BresenhamPoints(line: Phaser.Geom.Line, stepRate?: integer, results?: any[]): object[]; + + /** + * Center a line on the given coordinates. + * @param line The line to center. + * @param x The horizontal coordinate to center the line on. + * @param y The vertical coordinate to center the line on. + */ + static CenterOn(line: Phaser.Geom.Line, x: number, y: number): Phaser.Geom.Line; + + /** + * Clone the given line. + * @param source The source line to clone. + */ + static Clone(source: Phaser.Geom.Line): Phaser.Geom.Line; + + /** + * Copy the values of one line to a destination line. + * @param source The source line to copy the values from. + * @param dest The destination line to copy the values to. + */ + static CopyFrom(source: Phaser.Geom.Line, dest: O): O; + + /** + * Compare two lines for strict equality. + * @param line The first line to compare. + * @param toCompare The second line to compare. + */ + static Equals(line: Phaser.Geom.Line, toCompare: Phaser.Geom.Line): boolean; + + /** + * Get the midpoint of the given line. + * @param line The line to get the midpoint of. + * @param out An optional point object to store the midpoint in. + */ + static GetMidPoint(line: Phaser.Geom.Line, out?: O): O; + + /** + * Calculate the normal of the given line. + * + * The normal of a line is a vector that points perpendicular from it. + * @param line The line to calculate the normal of. + * @param out An optional point object to store the normal in. + */ + static GetNormal(line: Phaser.Geom.Line, out?: O): O; + + /** + * Get a point on a line that's a given percentage along its length. + * @param line The line. + * @param position A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param out An optional point, or point-like object, to store the coordinates of the point on the line. + */ + static GetPoint(line: Phaser.Geom.Line, position: number, out?: O): O; + + /** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * @param line The line. + * @param quantity The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param stepRate The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param out An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + */ + static GetPoints(line: Phaser.Geom.Line, quantity: integer, stepRate?: number, out?: O): O; + + /** + * Calculate the height of the given line. + * @param line The line to calculate the height of. + */ + static Height(line: Phaser.Geom.Line): number; + + /** + * Calculate the length of the given line. + * @param line The line to calculate the length of. + */ + static Length(line: Phaser.Geom.Line): number; + + /** + * The x coordinate of the lines starting point. + */ + x1: number; + + /** + * The y coordinate of the lines starting point. + */ + y1: number; + + /** + * The x coordinate of the lines ending point. + */ + x2: number; + + /** + * The y coordinate of the lines ending point. + */ + y2: number; + + /** + * Get a point on a line that's a given percentage along its length. + * @param position A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param output An optional point, or point-like object, to store the coordinates of the point on the line. + */ + getPoint(position: number, output?: O): O; + + /** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * @param quantity The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param stepRate The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param output An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + */ + getPoints(quantity: integer, stepRate?: integer, output?: O): O; + + /** + * Get a random Point on the Line. + * @param point An instance of a Point to be modified. + */ + getRandomPoint(point?: O): O; + + /** + * Set new coordinates for the line endpoints. + * @param x1 The x coordinate of the lines starting point. Default 0. + * @param y1 The y coordinate of the lines starting point. Default 0. + * @param x2 The x coordinate of the lines ending point. Default 0. + * @param y2 The y coordinate of the lines ending point. Default 0. + */ + setTo(x1?: number, y1?: number, x2?: number, y2?: number): Phaser.Geom.Line; + + /** + * Returns a Vector2 object that corresponds to the start of this Line. + * @param vec2 A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + */ + getPointA(vec2?: O): O; + + /** + * Returns a Vector2 object that corresponds to the end of this Line. + * @param vec2 A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + */ + getPointB(vec2?: O): O; + + /** + * The left position of the Line. + */ + left: number; + + /** + * The right position of the Line. + */ + right: number; + + /** + * The top position of the Line. + */ + top: number; + + /** + * The bottom position of the Line. + */ + bottom: number; + + /** + * Get the angle of the normal of the given line in radians. + * @param line The line to calculate the angle of the normal of. + */ + static NormalAngle(line: Phaser.Geom.Line): number; + + /** + * [description] + * @param line [description] + */ + static NormalX(line: Phaser.Geom.Line): number; + + /** + * [description] + * @param line [description] + */ + static NormalY(line: Phaser.Geom.Line): number; + + /** + * Offset a line by the given amount. + * @param line The line to offset. + * @param x The horizontal offset to add to the line. + * @param y The vertical offset to add to the line. + */ + static Offset(line: O, x: number, y: number): O; + + /** + * Calculate the perpendicular slope of the given line. + * @param line The line to calculate the perpendicular slope of. + */ + static PerpSlope(line: Phaser.Geom.Line): number; + + /** + * Returns a random point on a given Line. + * @param line The Line to calculate the random Point on. + * @param out An instance of a Point to be modified. + */ + static Random(line: Phaser.Geom.Line, out?: O): O; + + /** + * Calculate the reflected angle between two lines. + * + * This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2. + * @param lineA The first line. + * @param lineB The second line. + */ + static ReflectAngle(lineA: Phaser.Geom.Line, lineB: Phaser.Geom.Line): number; + + /** + * Rotate a line around its midpoint by the given angle in radians. + * @param line The line to rotate. + * @param angle The angle of rotation in radians. + */ + static Rotate(line: O, angle: number): O; + + /** + * Rotate a line around a point by the given angle in radians. + * @param line The line to rotate. + * @param point The point to rotate the line around. + * @param angle The angle of rotation in radians. + */ + static RotateAroundPoint(line: O, point: Phaser.Geom.Point | object, angle: number): O; + + /** + * Rotate a line around the given coordinates by the given angle in radians. + * @param line The line to rotate. + * @param x The horizontal coordinate to rotate the line around. + * @param y The vertical coordinate to rotate the line around. + * @param angle The angle of rotation in radians. + */ + static RotateAroundXY(line: O, x: number, y: number, angle: number): O; + + /** + * Set a line to a given position, angle and length. + * @param line The line to set. + * @param x The horizontal start position of the line. + * @param y The vertical start position of the line. + * @param angle The angle of the line in radians. + * @param length The length of the line. + */ + static SetToAngle(line: O, x: number, y: number, angle: number, length: number): O; + + /** + * Calculate the slope of the given line. + * @param line The line to calculate the slope of. + */ + static Slope(line: Phaser.Geom.Line): number; + + /** + * Calculate the width of the given line. + * @param line The line to calculate the width of. + */ + static Width(line: Phaser.Geom.Line): number; + + } + + /** + * Defines a Point in 2D space, with an x and y component. + */ + class Point { + /** + * + * @param x The x coordinate of this Point. Default 0. + * @param y The y coordinate of this Point. Default x. + */ + constructor(x?: number, y?: number); + + /** + * Apply `Math.ceil()` to each coordinate of the given Point. + * @param point The Point to ceil. + */ + static Ceil(point: O): O; + + /** + * Clone the given Point. + * @param source The source Point to clone. + */ + static Clone(source: Phaser.Geom.Point): Phaser.Geom.Point; + + /** + * Copy the values of one Point to a destination Point. + * @param source The source Point to copy the values from. + * @param dest The destination Point to copy the values to. + */ + static CopyFrom(source: Phaser.Geom.Point, dest: O): O; + + /** + * [description] + * @param point [description] + * @param toCompare [description] + */ + static Equals(point: Phaser.Geom.Point, toCompare: Phaser.Geom.Point): boolean; + + /** + * Apply `Math.ceil()` to each coordinate of the given Point. + * @param point The Point to floor. + */ + static Floor(point: O): O; + + /** + * [description] + * @param points [description] + * @param out [description] + */ + static GetCentroid(points: Phaser.Geom.Point[], out?: O): O; + + /** + * [description] + * @param point [description] + */ + static GetMagnitude(point: Phaser.Geom.Point): number; + + /** + * [description] + * @param point [description] + */ + static GetMagnitudeSq(point: Phaser.Geom.Point): number; + + /** + * Calculates the Axis Aligned Bounding Box (or aabb) from an array of points. + * @param points [description] + * @param out [description] + */ + static GetRectangleFromPoints(points: Phaser.Geom.Point[], out?: O): O; + + /** + * [description] + * @param pointA [description] + * @param pointB [description] + * @param t [description] Default 0. + * @param out [description] + */ + static Interpolate(pointA: Phaser.Geom.Point, pointB: Phaser.Geom.Point, t?: number, out?: O): O; + + /** + * [description] + * @param point [description] + */ + static Invert(point: O): O; + + /** + * [description] + * @param point [description] + * @param out [description] + */ + static Negative(point: Phaser.Geom.Point, out?: O): O; + + /** + * The x coordinate of this Point. + */ + x: number; + + /** + * The y coordinate of this Point. + */ + y: number; + + /** + * Set the x and y coordinates of the point to the given values. + * @param x The x coordinate of this Point. Default 0. + * @param y The y coordinate of this Point. Default x. + */ + setTo(x?: number, y?: number): Phaser.Geom.Point; + + /** + * [description] + * @param pointA [description] + * @param pointB [description] + * @param out [description] + */ + static Project(pointA: Phaser.Geom.Point, pointB: Phaser.Geom.Point, out?: O): O; + + /** + * [description] + * @param pointA [description] + * @param pointB [description] + * @param out [description] + */ + static ProjectUnit(pointA: Phaser.Geom.Point, pointB: Phaser.Geom.Point, out?: O): O; + + /** + * [description] + * @param point [description] + * @param magnitude [description] + */ + static SetMagnitude(point: O, magnitude: number): O; + + } + + /** + * [description] + */ + class Polygon { + /** + * + * @param points [description] + */ + constructor(points?: Phaser.Geom.Point[]); + + /** + * [description] + * @param polygon [description] + */ + static Clone(polygon: Phaser.Geom.Polygon): Phaser.Geom.Polygon; + + /** + * [description] + * @param polygon [description] + * @param x [description] + * @param y [description] + */ + static Contains(polygon: Phaser.Geom.Polygon, x: number, y: number): boolean; + + /** + * [description] + * @param polygon [description] + * @param point [description] + */ + static ContainsPoint(polygon: Phaser.Geom.Polygon, point: Phaser.Geom.Point): boolean; + + /** + * [description] + * @param polygon [description] + * @param out [description] + */ + static GetAABB(polygon: Phaser.Geom.Polygon, out?: O): O; + + /** + * [description] + * @param polygon [description] + * @param output [description] + */ + static GetNumberArray(polygon: Phaser.Geom.Polygon, output?: O): O; + + /** + * The area of this Polygon. + */ + area: number; + + /** + * An array of number pair objects that make up this polygon. I.e. [ {x,y}, {x,y}, {x,y} ] + */ + points: Phaser.Geom.Point[]; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + contains(x: number, y: number): boolean; + + /** + * Sets this Polygon to the given points. + * + * The points can be set from a variety of formats: + * + * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]` + * - An array of objects with public x/y properties: `[obj1, obj2, ...]` + * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` + * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` + * + * `setTo` may also be called without any arguments to remove all points. + * @param points [description] + */ + setTo(points: any[]): Phaser.Geom.Polygon; + + /** + * Calculates the area of the Polygon. This is available in the property Polygon.area + */ + calculateArea(): number; + + /** + * [description] + * @param polygon [description] + */ + static Reverse(polygon: O): O; + + } + + /** + * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + */ + class Rectangle { + /** + * + * @param x [description] Default 0. + * @param y [description] Default 0. + * @param width [description] Default 0. + * @param height [description] Default 0. + */ + constructor(x?: number, y?: number, width?: number, height?: number); + + /** + * [description] + * @param rect [description] + */ + static Area(rect: Phaser.Geom.Rectangle): number; + + /** + * [description] + * @param rect [description] + */ + static Ceil(rect: O): O; + + /** + * [description] + * @param rect [description] + */ + static CeilAll(rect: O): O; + + /** + * [description] + * @param rect [description] + * @param x [description] + * @param y [description] + */ + static CenterOn(rect: O, x: number, y: number): O; + + /** + * [description] + * @param source [description] + */ + static Clone(source: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle; + + /** + * [description] + * @param rect [description] + * @param x [description] + * @param y [description] + */ + static Contains(rect: Phaser.Geom.Rectangle, x: number, y: number): boolean; + + /** + * [description] + * @param rect [description] + * @param point [description] + */ + static ContainsPoint(rect: Phaser.Geom.Rectangle, point: Phaser.Geom.Point): boolean; + + /** + * [description] + * @param rectA [description] + * @param rectB [description] + */ + static ContainsRect(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle): boolean; + + /** + * Copy the values of one Rectangle to a destination Rectangle. + * @param source The source Rectangle to copy the values from. + * @param dest The destination Rectangle to copy the values to. + */ + static CopyFrom(source: Phaser.Geom.Rectangle, dest: O): O; + + /** + * [description] + * @param rect [description] + * @param out [description] + */ + static Decompose(rect: Phaser.Geom.Rectangle, out?: any[]): any[]; + + /** + * [description] + * @param rect [description] + * @param toCompare [description] + */ + static Equals(rect: Phaser.Geom.Rectangle, toCompare: Phaser.Geom.Rectangle): boolean; + + /** + * [description] + * @param target [description] + * @param source [description] + */ + static FitInside(target: O, source: Phaser.Geom.Rectangle): O; + + /** + * [description] + * @param target [description] + * @param source [description] + */ + static FitOutside(target: O, source: Phaser.Geom.Rectangle): O; + + /** + * [description] + * @param rect [description] + */ + static Floor(rect: O): O; + + /** + * [description] + * @param rect [description] + */ + static FloorAll(rect: O): O; + + /** + * [description] + * @param points [description] + * @param out [description] + */ + static FromPoints(points: any[], out?: O): O; + + /** + * [description] + * @param rect [description] + */ + static GetAspectRatio(rect: Phaser.Geom.Rectangle): number; + + /** + * [description] + * @param rect [description] + * @param out [description] + */ + static GetCenter(rect: Phaser.Geom.Rectangle, out?: O): O; + + /** + * Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right. + * @param rectangle [description] + * @param position [description] + * @param out [description] + */ + static GetPoint(rectangle: Phaser.Geom.Rectangle, position: number, out?: O): O; + + /** + * [description] + * @param rectangle [description] + * @param step [description] + * @param quantity [description] + * @param out [description] + */ + static GetPoints(rectangle: Phaser.Geom.Rectangle, step: number, quantity: integer, out?: O): O; + + /** + * [description] + * @param rect [description] + * @param out [description] + */ + static GetSize(rect: Phaser.Geom.Rectangle, out?: O): O; + + /** + * [description] + * @param rect [description] + * @param x [description] + * @param y [description] + */ + static Inflate(rect: O, x: number, y: number): O; + + /** + * Takes two Rectangles and first checks to see if they intersect. + * If they intersect it will return the area of intersection in the `out` Rectangle. + * If they do not intersect, the `out` Rectangle will have a width and height of zero. + * @param rectA The first Rectangle to get the intersection from. + * @param rectB The second Rectangle to get the intersection from. + * @param out A Rectangle to store the intersection results in. + */ + static Intersection(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle, out?: Phaser.Geom.Rectangle): O; + + /** + * [description] + * @param rect [description] + * @param step [description] + * @param quantity [description] + * @param out [description] + */ + static MarchingAnts(rect: Phaser.Geom.Rectangle, step: number, quantity: integer, out?: O): O; + + /** + * [description] + * @param target [description] + * @param points [description] + */ + static MergePoints(target: O, points: Phaser.Geom.Point[]): O; + + /** + * [description] + * @param target [description] + * @param source [description] + */ + static MergeRect(target: O, source: Phaser.Geom.Rectangle): O; + + /** + * [description] + * @param target [description] + * @param x [description] + * @param y [description] + */ + static MergeXY(target: O, x: number, y: number): O; + + /** + * [description] + * @param rect [description] + * @param x [description] + * @param y [description] + */ + static Offset(rect: O, x: number, y: number): O; + + /** + * [description] + * @param rect [description] + * @param point [description] + */ + static OffsetPoint(rect: O, point: Phaser.Geom.Point): O; + + /** + * [description] + * @param rectA [description] + * @param rectB [description] + */ + static Overlaps(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle): boolean; + + /** + * [description] + * @param rect [description] + */ + static Perimeter(rect: Phaser.Geom.Rectangle): number; + + /** + * [description] + * @param rectangle [description] + * @param angle [description] + * @param out [description] + */ + static PerimeterPoint(rectangle: Phaser.Geom.Rectangle, angle: integer, out?: O): O; + + /** + * [description] + * @param rect [description] + * @param out [description] + */ + static Random(rect: Phaser.Geom.Rectangle, out: O): O; + + /** + * Calculates a random point that lies within the `outer` Rectangle, but outside of the `inner` Rectangle. + * The inner Rectangle must be fully contained within the outer rectangle. + * @param outer The outer Rectangle to get the random point within. + * @param inner The inner Rectangle to exclude from the returned point. + * @param out A Point, or Point-like object to store the result in. If not specified, a new Point will be created. + */ + static RandomOutside(outer: Phaser.Geom.Rectangle, inner: Phaser.Geom.Rectangle, out?: O): O; + + /** + * [description] + */ + x: number; + + /** + * [description] + */ + y: number; + + /** + * [description] + */ + width: number; + + /** + * [description] + */ + height: number; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + contains(x: number, y: number): boolean; + + /** + * [description] + * @param position [description] + * @param output [description] + */ + getPoint(position: number, output?: O): O; + + /** + * [description] + * @param quantity [description] + * @param stepRate [description] + * @param output [description] + */ + getPoints(quantity: integer, stepRate?: number, output?: O): O; + + /** + * [description] + * @param point [description] + */ + getRandomPoint(point?: O): O; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + setTo(x: number, y: number, width: number, height: number): Phaser.Geom.Rectangle; + + /** + * [description] + */ + setEmpty(): Phaser.Geom.Rectangle; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setPosition(x: number, y?: number): Phaser.Geom.Rectangle; + + /** + * [description] + * @param width [description] + * @param height [description] Default width. + */ + setSize(width: number, height?: number): Phaser.Geom.Rectangle; + + /** + * [description] + */ + isEmpty(): boolean; + + /** + * Returns a Line object that corresponds to the top of this Rectangle. + * @param line A Line object to set the results in. If `undefined` a new Line will be created. + */ + getLineA(line?: O): O; + + /** + * Returns a Line object that corresponds to the right of this Rectangle. + * @param line A Line object to set the results in. If `undefined` a new Line will be created. + */ + getLineB(line?: O): O; + + /** + * Returns a Line object that corresponds to the bottom of this Rectangle. + * @param line A Line object to set the results in. If `undefined` a new Line will be created. + */ + getLineC(line?: O): O; + + /** + * Returns a Line object that corresponds to the left of this Rectangle. + * @param line A Line object to set the results in. If `undefined` a new Line will be created. + */ + getLineD(line?: O): O; + + /** + * [description] + */ + left: number; + + /** + * [description] + */ + right: number; + + /** + * [description] + */ + top: number; + + /** + * [description] + */ + bottom: number; + + /** + * [description] + */ + centerX: number; + + /** + * [description] + */ + centerY: number; + + /** + * [description] + * @param rect [description] + * @param x [description] + * @param y [description] + */ + static Scale(rect: O, x: number, y: number): O; + + /** + * [description] + * @param rectA [description] + * @param rectB [description] + * @param out [description] + */ + static Union(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle, out?: O): O; + + } + + /** + * A triangle is a plane created by connecting three points. + * The first two arguments specify the first point, the middle two arguments + * specify the second point, and the last two arguments specify the third point. + */ + class Triangle { + /** + * + * @param x1 [description] Default 0. + * @param y1 [description] Default 0. + * @param x2 [description] Default 0. + * @param y2 [description] Default 0. + * @param x3 [description] Default 0. + * @param y3 [description] Default 0. + */ + constructor(x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number); + + /** + * [description] + * @param triangle [description] + */ + static Area(triangle: Phaser.Geom.Triangle): number; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param length [description] + */ + static BuildEquilateral(x: number, y: number, length: number): Phaser.Geom.Triangle; + + /** + * [description] + * @param data A flat array of vertice coordinates like [x0,y0, x1,y1, x2,y2, ...] + * @param holes An array of hole indices if any (e.g. [5, 8] for a 12-vertice input would mean one hole with vertices 5–7 and another with 8–11). Default null. + * @param scaleX [description] Default 1. + * @param scaleY [description] Default 1. + * @param out [description] + */ + static BuildFromPolygon(data: any[], holes?: any[], scaleX?: number, scaleY?: number, out?: O): O; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + static BuildRight(x: number, y: number, width: number, height: number): Phaser.Geom.Triangle; + + /** + * [description] + * @param triangle [description] + * @param x [description] + * @param y [description] + * @param centerFunc [description] + */ + static CenterOn(triangle: O, x: number, y: number, centerFunc?: CenterFunction): O; + + /** + * [description] + * @param triangle [description] + * @param out [description] + */ + static Centroid(triangle: Phaser.Geom.Triangle, out?: O): O; + + /** + * Computes the circumcentre of a triangle. The circumcentre is the centre of + * the circumcircle, the smallest circle which encloses the triangle. It is also + * the common intersection point of the perpendicular bisectors of the sides of + * the triangle, and is the only point which has equal distance to all three + * vertices of the triangle. + * @param triangle [description] + * @param out [description] + */ + static CircumCenter(triangle: Phaser.Geom.Triangle, out?: O): O; + + /** + * [description] + * @param triangle [description] + * @param out [description] + */ + static CircumCircle(triangle: Phaser.Geom.Triangle, out?: O): O; + + /** + * [description] + * @param source [description] + */ + static Clone(source: Phaser.Geom.Triangle): Phaser.Geom.Triangle; + + /** + * [description] + * @param triangle [description] + * @param x [description] + * @param y [description] + */ + static Contains(triangle: Phaser.Geom.Triangle, x: number, y: number): boolean; + + /** + * [description] + * @param triangle [description] + * @param points [description] + * @param returnFirst [description] + * @param out [description] + */ + static ContainsArray(triangle: Phaser.Geom.Triangle, points: Phaser.Geom.Point[], returnFirst?: boolean, out?: any[]): Phaser.Geom.Point[]; + + /** + * [description] + * @param triangle [description] + * @param point [description] + */ + static ContainsPoint(triangle: Phaser.Geom.Triangle, point: Phaser.Geom.Point): boolean; + + /** + * Copy the values of one Triangle to a destination Triangle. + * @param source The source Triangle to copy the values from. + * @param dest The destination Triangle to copy the values to. + */ + static CopyFrom(source: Phaser.Geom.Triangle, dest: O): O; + + /** + * [description] + * @param triangle [description] + * @param out [description] + */ + static Decompose(triangle: Phaser.Geom.Triangle, out?: any[]): any[]; + + /** + * [description] + * @param triangle [description] + * @param toCompare [description] + */ + static Equals(triangle: Phaser.Geom.Triangle, toCompare: Phaser.Geom.Triangle): boolean; + + /** + * [description] + * @param triangle [description] + * @param position [description] + * @param out [description] + */ + static GetPoint(triangle: Phaser.Geom.Triangle, position: number, out?: O): O; + + /** + * [description] + * @param triangle [description] + * @param quantity [description] + * @param stepRate [description] + * @param out [description] + */ + static GetPoints(triangle: Phaser.Geom.Triangle, quantity: integer, stepRate: number, out?: O): O; + + /** + * [description] + * @param triangle [description] + * @param out [description] + */ + static InCenter(triangle: Phaser.Geom.Triangle, out?: O): O; + + /** + * [description] + * @param triangle [description] + * @param x [description] + * @param y [description] + */ + static Offset(triangle: O, x: number, y: number): O; + + /** + * [description] + * @param triangle [description] + */ + static Perimeter(triangle: Phaser.Geom.Triangle): number; + + /** + * [description] + * @param triangle [description] + * @param out [description] + */ + static Random(triangle: Phaser.Geom.Triangle, out?: O): O; + + /** + * [description] + * @param triangle [description] + * @param angle [description] + */ + static Rotate(triangle: O, angle: number): O; + + /** + * [description] + * @param triangle [description] + * @param point [description] + * @param angle [description] + */ + static RotateAroundPoint(triangle: O, point: Phaser.Geom.Point, angle: number): O; + + /** + * [description] + * @param triangle [description] + * @param x [description] + * @param y [description] + * @param angle [description] + */ + static RotateAroundXY(triangle: O, x: number, y: number, angle: number): O; + + /** + * [description] + */ + x1: number; + + /** + * [description] + */ + y1: number; + + /** + * [description] + */ + x2: number; + + /** + * [description] + */ + y2: number; + + /** + * [description] + */ + x3: number; + + /** + * [description] + */ + y3: number; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + contains(x: number, y: number): boolean; + + /** + * [description] + * @param position [description] + * @param output [description] + */ + getPoint(position: number, output?: O): O; + + /** + * [description] + * @param quantity [description] + * @param stepRate [description] + * @param output [description] + */ + getPoints(quantity: integer, stepRate?: number, output?: O): O; + + /** + * [description] + * @param point [description] + */ + getRandomPoint(point?: O): O; + + /** + * [description] + * @param x1 [description] Default 0. + * @param y1 [description] Default 0. + * @param x2 [description] Default 0. + * @param y2 [description] Default 0. + * @param x3 [description] Default 0. + * @param y3 [description] Default 0. + */ + setTo(x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number): Phaser.Geom.Triangle; + + /** + * Returns a Line object that corresponds to Line A of this Triangle. + * @param line A Line object to set the results in. If `undefined` a new Line will be created. + */ + getLineA(line?: O): O; + + /** + * Returns a Line object that corresponds to Line B of this Triangle. + * @param line A Line object to set the results in. If `undefined` a new Line will be created. + */ + getLineB(line?: O): O; + + /** + * Returns a Line object that corresponds to Line C of this Triangle. + * @param line A Line object to set the results in. If `undefined` a new Line will be created. + */ + getLineC(line?: O): O; + + /** + * [description] + */ + left: number; + + /** + * [description] + */ + right: number; + + /** + * [description] + */ + top: number; + + /** + * [description] + */ + bottom: number; + + } + + } + + namespace Input { + type InteractiveObject = { + /** + * The Game Object to which this Interactive Object is bound. + */ + gameObject: Phaser.GameObjects.GameObject; + /** + * Is this Interactive Object currently enabled for input events? + */ + enabled: boolean; + /** + * Is this Interactive Object draggable? Enable with `InputPlugin.setDraggable`. + */ + draggable: boolean; + /** + * Is this Interactive Object a drag-targets drop zone? Set when the object is created. + */ + dropZone: boolean; + /** + * Should this Interactive Object change the cursor (via css) when over? (desktop only) + */ + cursor: boolean | string; + /** + * An optional drop target for a draggable Interactive Object. + */ + target: Phaser.GameObjects.GameObject; + /** + * The most recent Camera to be tested against this Interactive Object. + */ + camera: Phaser.Cameras.Scene2D.Camera; + /** + * The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle. + */ + hitArea: any; + /** + * The 'contains' check callback that the hit area shape will use for all hit tests. + */ + hitAreaCallback: HitAreaCallback; + /** + * The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position. + */ + localX: number; + /** + * The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position. + */ + localY: number; + /** + * The current drag state of this Interactive Object. 0 = Not being dragged, 1 = being checked for drag, or 2 = being actively dragged. + */ + dragState: 0 | 1 | 2; + /** + * The x coordinate that the Pointer started dragging this Interactive Object from. + */ + dragStartX: number; + /** + * The y coordinate that the Pointer started dragging this Interactive Object from. + */ + dragStartY: number; + /** + * The x coordinate that this Interactive Object is currently being dragged to. + */ + dragX: number; + /** + * The y coordinate that this Interactive Object is currently being dragged to. + */ + dragY: number; + }; + + /** + * Creates a new Interactive Object. + * + * This is called automatically by the Input Manager when you enable a Game Object for input. + * + * The resulting Interactive Object is mapped to the Game Object's `input` property. + * @param gameObject The Game Object to which this Interactive Object is bound. + * @param hitArea The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle. + * @param hitAreaCallback The 'contains' check callback that the hit area shape will use for all hit tests. + */ + function CreateInteractiveObject(gameObject: Phaser.GameObjects.GameObject, hitArea: any, hitAreaCallback: HitAreaCallback): Phaser.Input.InteractiveObject; + + /** + * Creates a new Pixel Perfect Handler function. + * + * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. + * @param textureManager A reference to the Texture Manager. + * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. + */ + function CreatePixelPerfectHandler(textureManager: Phaser.Textures.TextureManager, alphaTolerance: integer): Function; + + /** + * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance. + * + * Based on the Game Config it will create handlers for mouse and touch support. + * + * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class. + * + * It then manages the event queue, pointer creation and general hit test related operations. + * + * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods + * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible + * for dealing with all input events for a Scene. + */ + class InputManager { + /** + * + * @param game The Game instance that owns the Input Manager. + * @param config The Input Configuration object, as set in the Game Config. + */ + constructor(game: Phaser.Game, config: object); + + /** + * The Game instance that owns the Input Manager. + * A Game only maintains on instance of the Input Manager at any time. + */ + readonly game: Phaser.Game; + + /** + * The Canvas that is used for all DOM event input listeners. + */ + canvas: HTMLCanvasElement; + + /** + * The Input Configuration object, as set in the Game Config. + */ + config: object; + + /** + * If set, the Input Manager will run its update loop every frame. + */ + enabled: boolean; + + /** + * The Event Emitter instance that the Input Manager uses to emit events from. + */ + events: Phaser.Events.EventEmitter; + + /** + * A standard FIFO queue for the native DOM events waiting to be handled by the Input Manager. + */ + queue: any[]; + + /** + * The default CSS cursor to be used when interacting with your game. + * + * See the `setDefaultCursor` method for more details. + */ + defaultCursor: string; + + /** + * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property. + */ + mouse: Phaser.Input.Mouse.MouseManager; + + /** + * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property. + */ + touch: Phaser.Input.Touch.TouchManager; + + /** + * An array of Pointers that have been added to the game. + * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers. + * + * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them, + * or set the `input.activePointers` property in the Game Config. + */ + pointers: Phaser.Input.Pointer[]; + + /** + * The number of touch objects activated and being processed each update. + * + * You can change this by either calling `addPointer` at run-time, or by + * setting the `input.activePointers` property in the Game Config. + */ + readonly pointersTotal: integer; + + /** + * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. + * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` + * which will always map to the most recently interacted pointer. + */ + mousePointer: Phaser.Input.Pointer; + + /** + * The most recently active Pointer object. + * + * If you've only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse. + * + * If your game doesn't need to support multi-touch then you can safely use this property in all of your game + * code and it will adapt to be either the mouse or the touch, based on device. + */ + activePointer: Phaser.Input.Pointer; + + /** + * Reset every frame. Set to `true` if any of the Pointers are dirty this frame. + */ + dirty: boolean; + + /** + * The Scale factor being applied to input coordinates. + */ + scale: Object; + + /** + * If the top-most Scene in the Scene List receives an input it will stop input from + * propagating any lower down the scene list, i.e. if you have a UI Scene at the top + * and click something on it, that click will not then be passed down to any other + * Scene below. Disable this to have input events passed through all Scenes, all the time. + */ + globalTopOnly: boolean; + + /** + * An internal flag that controls if the Input Manager will ignore or process native DOM events this frame. + * Set via the InputPlugin.stopPropagation method. + */ + ignoreEvents: boolean; + + /** + * The bounds of the Input Manager, used for pointer hit test calculations. + */ + bounds: Phaser.Geom.Rectangle; + + /** + * The Boot handler is called by Phaser.Game when it first starts up. + * The renderer is available by now. + */ + protected boot(): void; + + /** + * Updates the Input Manager bounds rectangle to match the bounding client rectangle of the + * canvas element being used to track input events. + */ + updateBounds(): void; + + /** + * Resizes the Input Manager internal values, including the bounds and scale factor. + */ + resize(): void; + + /** + * Tells the Input system to set a custom cursor. + * + * This cursor will be the default cursor used when interacting with the game canvas. + * + * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. + * + * Any valid CSS cursor value is allowed, including paths to image files, i.e.: + * + * ```javascript + * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); + * ``` + * + * Please read about the differences between browsers when it comes to the file formats and sizes they support: + * + * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor + * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property + * + * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. + * @param cursor The CSS to be used when setting the default cursor. + */ + setDefaultCursor(cursor: string): void; + + /** + * Adds new Pointer objects to the Input Manager. + * + * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. + * + * You can create more either by calling this method, or by setting the `input.activePointers` property + * in the Game Config, up to a maximum of 10 pointers. + * + * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added + * via this method. + * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. + */ + addPointer(quantity?: integer): Phaser.Input.Pointer[]; + + /** + * Adds a callback to be invoked whenever the native DOM `mouseup` or `touchend` events are received. + * By setting the `isOnce` argument you can control if the callback is called once, + * or every time the DOM event occurs. + * + * Callbacks passed to this method are invoked _immediately_ when the DOM event happens, + * within the scope of the DOM event handler. Therefore, they are considered as 'native' + * from the perspective of the browser. This means they can be used for tasks such as + * opening new browser windows, or anything which explicitly requires user input to activate. + * However, as a result of this, they come with their own risks, and as such should not be used + * for general game input, but instead be reserved for special circumstances. + * + * If all you're trying to do is execute a callback when a pointer is released, then + * please use the internal Input event system instead. + * + * Please understand that these callbacks are invoked when the browser feels like doing so, + * which may be entirely out of the normal flow of the Phaser Game Loop. Therefore, you should absolutely keep + * Phaser related operations to a minimum in these callbacks. For example, don't destroy Game Objects, + * change Scenes or manipulate internal systems, otherwise you run a very real risk of creating + * heisenbugs (https://en.wikipedia.org/wiki/Heisenbug) that prove a challenge to reproduce, never mind + * solve. + * @param callback The callback to be invoked on this dom event. + * @param isOnce `true` if the callback will only be invoked once, `false` to call every time this event happens. Default true. + */ + addUpCallback(callback: Function, isOnce?: boolean): this; + + /** + * Adds a callback to be invoked whenever the native DOM `mousedown` or `touchstart` events are received. + * By setting the `isOnce` argument you can control if the callback is called once, + * or every time the DOM event occurs. + * + * Callbacks passed to this method are invoked _immediately_ when the DOM event happens, + * within the scope of the DOM event handler. Therefore, they are considered as 'native' + * from the perspective of the browser. This means they can be used for tasks such as + * opening new browser windows, or anything which explicitly requires user input to activate. + * However, as a result of this, they come with their own risks, and as such should not be used + * for general game input, but instead be reserved for special circumstances. + * + * If all you're trying to do is execute a callback when a pointer is down, then + * please use the internal Input event system instead. + * + * Please understand that these callbacks are invoked when the browser feels like doing so, + * which may be entirely out of the normal flow of the Phaser Game Loop. Therefore, you should absolutely keep + * Phaser related operations to a minimum in these callbacks. For example, don't destroy Game Objects, + * change Scenes or manipulate internal systems, otherwise you run a very real risk of creating + * heisenbugs (https://en.wikipedia.org/wiki/Heisenbug) that prove a challenge to reproduce, never mind + * solve. + * @param callback The callback to be invoked on this dom event. + * @param isOnce `true` if the callback will only be invoked once, `false` to call every time this event happens. Default true. + */ + addDownCallback(callback: Function, isOnce?: boolean): this; + + /** + * Adds a callback to be invoked whenever the native DOM `mousemove` or `touchmove` events are received. + * By setting the `isOnce` argument you can control if the callback is called once, + * or every time the DOM event occurs. + * + * Callbacks passed to this method are invoked _immediately_ when the DOM event happens, + * within the scope of the DOM event handler. Therefore, they are considered as 'native' + * from the perspective of the browser. This means they can be used for tasks such as + * opening new browser windows, or anything which explicitly requires user input to activate. + * However, as a result of this, they come with their own risks, and as such should not be used + * for general game input, but instead be reserved for special circumstances. + * + * If all you're trying to do is execute a callback when a pointer is moved, then + * please use the internal Input event system instead. + * + * Please understand that these callbacks are invoked when the browser feels like doing so, + * which may be entirely out of the normal flow of the Phaser Game Loop. Therefore, you should absolutely keep + * Phaser related operations to a minimum in these callbacks. For example, don't destroy Game Objects, + * change Scenes or manipulate internal systems, otherwise you run a very real risk of creating + * heisenbugs (https://en.wikipedia.org/wiki/Heisenbug) that prove a challenge to reproduce, never mind + * solve. + * @param callback The callback to be invoked on this dom event. + * @param isOnce `true` if the callback will only be invoked once, `false` to call every time this event happens. Default false. + */ + addMoveCallback(callback: Function, isOnce?: boolean): this; + + /** + * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects. + * + * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space + * and used to determine if they fall within the remaining Game Objects hit areas or not. + * + * If nothing is matched an empty array is returned. + * + * This method is called automatically by InputPlugin.hitTestPointer and doesn't usually need to be invoked directly. + * @param pointer The Pointer to test against. + * @param gameObjects An array of interactive Game Objects to check. + * @param camera The Camera which is being tested against. + * @param output An array to store the results in. If not given, a new empty array is created. + */ + hitTest(pointer: Phaser.Input.Pointer, gameObjects: any[], camera: Phaser.Cameras.Scene2D.Camera, output?: any[]): any[]; + + /** + * Checks if the given x and y coordinate are within the hit area of the Game Object. + * + * This method assumes that the coordinate values have already been translated into the space of the Game Object. + * + * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties. + * @param gameObject The interactive Game Object to check against. + * @param x The translated x coordinate for the hit test. + * @param y The translated y coordinate for the hit test. + */ + pointWithinHitArea(gameObject: Phaser.GameObjects.GameObject, x: number, y: number): boolean; + + /** + * Checks if the given x and y coordinate are within the hit area of the Interactive Object. + * + * This method assumes that the coordinate values have already been translated into the space of the Interactive Object. + * + * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties. + * @param object The Interactive Object to check against. + * @param x The translated x coordinate for the hit test. + * @param y The translated y coordinate for the hit test. + */ + pointWithinInteractiveObject(object: Phaser.Input.InteractiveObject, x: number, y: number): boolean; + + /** + * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager. + * @param pointer The Pointer to transform the values for. + */ + transformPointer(pointer: Phaser.Input.Pointer): number; + + /** + * Transforms the pageX value into the scaled coordinate space of the Input Manager. + * @param pageX The DOM pageX value. + */ + transformX(pageX: number): number; + + /** + * Transforms the pageY value into the scaled coordinate space of the Input Manager. + * @param pageY The DOM pageY value. + */ + transformY(pageY: number): number; + + /** + * Returns the left offset of the Input bounds. + */ + getOffsetX(): number; + + /** + * Returns the top offset of the Input bounds. + */ + getOffsetY(): number; + + /** + * Returns the horizontal Input Scale value. + */ + getScaleX(): number; + + /** + * Returns the vertical Input Scale value. + */ + getScaleY(): number; + + /** + * Destroys the Input Manager and all of its systems. + * + * There is no way to recover from doing this. + */ + destroy(): void; + + } + + /** + * The Input Plugin belongs to a Scene and handles all input related events and operations for it. + * + * You can access it from within a Scene using `this.input`. + * + * It emits events directly. For example, you can do: + * + * ```javascript + * this.input.on('pointerdown', callback, context); + * ``` + * + * To listen for a pointer down event anywhere on the game canvas. + * + * Game Objects can be enabled for input by calling their `setInteractive` method. After which they + * will directly emit input events: + * + * ```javascript + * var sprite = this.add.sprite(x, y, texture); + * sprite.setInteractive(); + * sprite.on('pointerdown', callback, context); + * ``` + * + * Please see the Input examples and tutorials for more information. + */ + class InputPlugin extends Phaser.Events.EventEmitter { + /** + * + * @param scene A reference to the Scene that this Input Plugin is responsible for. + */ + constructor(scene: Phaser.Scene); + + /** + * A reference to the Scene that this Input Plugin is responsible for. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene Systems class. + */ + systems: Phaser.Scenes.Systems; + + /** + * A reference to the Scene Systems Settings. + */ + settings: Phaser.Scenes.Settings.Object; + + /** + * A reference to the Game Input Manager. + */ + manager: Phaser.Input.InputManager; + + /** + * If set, the Input Plugin will run its update loop every frame. + */ + enabled: boolean; + + /** + * A reference to the Scene Display List. This property is set during the `boot` method. + */ + displayList: Phaser.GameObjects.DisplayList; + + /** + * A reference to the Scene Cameras Manager. This property is set during the `boot` method. + */ + cameras: Phaser.Cameras.Scene2D.CameraManager; + + /** + * A reference to the Mouse Manager. + * + * This property is only set if Mouse support has been enabled in your Game Configuration file. + * + * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead. + */ + mouse: Phaser.Input.Mouse.MouseManager; + + /** + * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from + * the top-most Game Objects in the Display List. + * + * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. + */ + topOnly: boolean; + + /** + * How often should the Pointers be checked? + * + * The value is a time, given in ms, and is the time that must have elapsed between game steps before + * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game + * Objects are currently below it, or being interacted with it. + * + * Pointers will *always* be checked if they have been moved by the user, or press or released. + * + * This property only controls how often they will be polled if they have not been updated. + * You should set this if you want to have Game Objects constantly check against the pointers, even + * if the pointer didn't move itself. + * + * Set to 0 to poll constantly. Set to -1 to only poll on user movement. + */ + pollRate: integer; + + /** + * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged. + */ + dragDistanceThreshold: number; + + /** + * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging. + */ + dragTimeThreshold: number; + + /** + * Checks to see if both this plugin and the Scene to which it belongs is active. + */ + isActive(): boolean; + + /** + * Clears a Game Object so it no longer has an Interactive Object associated with it. + * The Game Object is then queued for removal from the Input Plugin on the next update. + * @param gameObject The Game Object that will have its Interactive Object removed. + */ + clear(gameObject: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject; + + /** + * Disables Input on a single Game Object. + * + * An input disabled Game Object still retains its Interactive Object component and can be re-enabled + * at any time, by passing it to `InputPlugin.enable`. + * @param gameObject The Game Object to have its input system disabled. + */ + disable(gameObject: Phaser.GameObjects.GameObject): void; + + /** + * Enable a Game Object for interaction. + * + * If the Game Object already has an Interactive Object component, it is enabled and returned. + * + * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * @param gameObject The Game Object to be enabled for input. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. + * @param dropZone Is this Game Object a drop zone or not? Default false. + */ + enable(gameObject: Phaser.GameObjects.GameObject, shape?: Phaser.Input.InputConfiguration | any, callback?: HitAreaCallback, dropZone?: boolean): Phaser.Input.InputPlugin; + + /** + * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects + * it is currently above. + * + * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple + * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list. + * @param pointer The Pointer to check against the Game Objects. + */ + hitTestPointer(pointer: Phaser.Input.Pointer): Phaser.GameObjects.GameObject[]; + + /** + * Sets the draggable state of the given array of Game Objects. + * + * They can either be set to be draggable, or can have their draggable state removed by passing `false`. + * + * A Game Object will not fire drag events unless it has been specifically enabled for drag. + * @param gameObjects An array of Game Objects to change the draggable state on. + * @param value Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. Default true. + */ + setDraggable(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], value?: boolean): Phaser.Input.InputPlugin; + + /** + * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle + * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them. + * + * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1. + * + * ```javascript + * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect()); + * ``` + * + * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150. + * + * ```javascript + * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150)); + * ``` + * + * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up, + * dragstart, drag, etc. + * + * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from + * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on + * Game Objects that really need it. + * + * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText, + * Render Textures, Text, Tilemaps, Containers or Particles. + * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. Default 1. + */ + makePixelPerfect(alphaTolerance?: integer): Function; + + /** + * Sets the hit area for the given array of Game Objects. + * + * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle` + * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback. + * + * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible + * to calculate. + * + * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if + * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this, + * such as `Phaser.Geom.Rectangle.Contains`. + * @param gameObjects An array of Game Objects to set the hit area on. + * @param shape Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. + * @param callback The 'contains' function to invoke to check if the pointer is within the hit area. + */ + setHitArea(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], shape?: Phaser.Input.InputConfiguration | any, callback?: HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using + * the given coordinates and radius to control its position and size. + * @param gameObjects An array of Game Objects to set as having a circle hit area. + * @param x The center of the circle. + * @param y The center of the circle. + * @param radius The radius of the circle. + * @param callback The hit area callback. If undefined it uses Circle.Contains. + */ + setHitAreaCircle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, radius: number, callback?: HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using + * the given coordinates and dimensions to control its position and size. + * @param gameObjects An array of Game Objects to set as having an ellipse hit area. + * @param x The center of the ellipse. + * @param y The center of the ellipse. + * @param width The width of the ellipse. + * @param height The height of the ellipse. + * @param callback The hit area callback. If undefined it uses Ellipse.Contains. + */ + setHitAreaEllipse(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using + * the Game Objects texture frame to define the position and size of the hit area. + * @param gameObjects An array of Game Objects to set as having an ellipse hit area. + * @param callback The hit area callback. If undefined it uses Rectangle.Contains. + */ + setHitAreaFromTexture(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], callback?: HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using + * the given coordinates and dimensions to control its position and size. + * @param gameObjects An array of Game Objects to set as having a rectangular hit area. + * @param x The top-left of the rectangle. + * @param y The top-left of the rectangle. + * @param width The width of the rectangle. + * @param height The height of the rectangle. + * @param callback The hit area callback. If undefined it uses Rectangle.Contains. + */ + setHitAreaRectangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using + * the given coordinates to control the position of its points. + * @param gameObjects An array of Game Objects to set as having a triangular hit area. + * @param x1 The x coordinate of the first point of the triangle. + * @param y1 The y coordinate of the first point of the triangle. + * @param x2 The x coordinate of the second point of the triangle. + * @param y2 The y coordinate of the second point of the triangle. + * @param x3 The x coordinate of the third point of the triangle. + * @param y3 The y coordinate of the third point of the triangle. + * @param callback The hit area callback. If undefined it uses Triangle.Contains. + */ + setHitAreaTriangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, callback?: HitAreaCallback): Phaser.Input.InputPlugin; + + /** + * Sets the Pointers to always poll. + * + * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, + * or being interacted with it, regardless if the Pointer has actually moved or not. + * + * You should enable this if you want objects in your game to fire over / out events, and the objects + * are constantly moving, but the pointer may not have. Polling every frame has additional computation + * costs, especially if there are a large number of interactive objects in your game. + */ + setPollAlways(): Phaser.Input.InputPlugin; + + /** + * Sets the Pointers to only poll when they are moved or updated. + * + * When a pointer is polled it runs a hit test to see which Game Objects are currently below it, + * or being interacted with it. + */ + setPollOnMove(): Phaser.Input.InputPlugin; + + /** + * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer + * will be polled again. See the `setPollAlways` and `setPollOnMove` methods. + * @param value The amount of time, in ms, that should elapsed before re-polling the pointers. + */ + setPollRate(value: number): Phaser.Input.InputPlugin; + + /** + * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from + * the top-most Game Objects in the Display List. + * + * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. + * @param value `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. + */ + setGlobalTopOnly(value: boolean): Phaser.Input.InputPlugin; + + /** + * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from + * the top-most Game Objects in the Display List. + * + * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one. + * @param value `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. + */ + setTopOnly(value: boolean): Phaser.Input.InputPlugin; + + /** + * Given an array of Game Objects, sort the array and return it, so that the objects are in depth index order + * with the lowest at the bottom. + * @param gameObjects An array of Game Objects to be sorted. + */ + sortGameObjects(gameObjects: Phaser.GameObjects.GameObject[]): Phaser.GameObjects.GameObject[]; + + /** + * Causes the Input Manager to stop emitting any events for the remainder of this game step. + */ + stopPropagation(): Phaser.Input.InputPlugin; + + /** + * Adds a callback to be invoked whenever the native DOM `mouseup` or `touchend` events are received. + * By setting the `isOnce` argument you can control if the callback is called once, + * or every time the DOM event occurs. + * + * Callbacks passed to this method are invoked _immediately_ when the DOM event happens, + * within the scope of the DOM event handler. Therefore, they are considered as 'native' + * from the perspective of the browser. This means they can be used for tasks such as + * opening new browser windows, or anything which explicitly requires user input to activate. + * However, as a result of this, they come with their own risks, and as such should not be used + * for general game input, but instead be reserved for special circumstances. + * + * If all you're trying to do is execute a callback when a pointer is released, then + * please use the internal Input event system instead. + * + * Please understand that these callbacks are invoked when the browser feels like doing so, + * which may be entirely out of the normal flow of the Phaser Game Loop. Therefore, you should absolutely keep + * Phaser related operations to a minimum in these callbacks. For example, don't destroy Game Objects, + * change Scenes or manipulate internal systems, otherwise you run a very real risk of creating + * heisenbugs (https://en.wikipedia.org/wiki/Heisenbug) that prove a challenge to reproduce, never mind + * solve. + * @param callback The callback to be invoked on this DOM event. + * @param isOnce `true` if the callback will only be invoked once, `false` to call every time this event happens. Default true. + */ + addUpCallback(callback: Function, isOnce?: boolean): this; + + /** + * Adds a callback to be invoked whenever the native DOM `mousedown` or `touchstart` events are received. + * By setting the `isOnce` argument you can control if the callback is called once, + * or every time the DOM event occurs. + * + * Callbacks passed to this method are invoked _immediately_ when the DOM event happens, + * within the scope of the DOM event handler. Therefore, they are considered as 'native' + * from the perspective of the browser. This means they can be used for tasks such as + * opening new browser windows, or anything which explicitly requires user input to activate. + * However, as a result of this, they come with their own risks, and as such should not be used + * for general game input, but instead be reserved for special circumstances. + * + * If all you're trying to do is execute a callback when a pointer is down, then + * please use the internal Input event system instead. + * + * Please understand that these callbacks are invoked when the browser feels like doing so, + * which may be entirely out of the normal flow of the Phaser Game Loop. Therefore, you should absolutely keep + * Phaser related operations to a minimum in these callbacks. For example, don't destroy Game Objects, + * change Scenes or manipulate internal systems, otherwise you run a very real risk of creating + * heisenbugs (https://en.wikipedia.org/wiki/Heisenbug) that prove a challenge to reproduce, never mind + * solve. + * @param callback The callback to be invoked on this dom event. + * @param isOnce `true` if the callback will only be invoked once, `false` to call every time this event happens. Default true. + */ + addDownCallback(callback: Function, isOnce?: boolean): this; + + /** + * Adds a callback to be invoked whenever the native DOM `mousemove` or `touchmove` events are received. + * By setting the `isOnce` argument you can control if the callback is called once, + * or every time the DOM event occurs. + * + * Callbacks passed to this method are invoked _immediately_ when the DOM event happens, + * within the scope of the DOM event handler. Therefore, they are considered as 'native' + * from the perspective of the browser. This means they can be used for tasks such as + * opening new browser windows, or anything which explicitly requires user input to activate. + * However, as a result of this, they come with their own risks, and as such should not be used + * for general game input, but instead be reserved for special circumstances. + * + * If all you're trying to do is execute a callback when a pointer is moved, then + * please use the internal Input event system instead. + * + * Please understand that these callbacks are invoked when the browser feels like doing so, + * which may be entirely out of the normal flow of the Phaser Game Loop. Therefore, you should absolutely keep + * Phaser related operations to a minimum in these callbacks. For example, don't destroy Game Objects, + * change Scenes or manipulate internal systems, otherwise you run a very real risk of creating + * heisenbugs (https://en.wikipedia.org/wiki/Heisenbug) that prove a challenge to reproduce, never mind + * solve. + * @param callback The callback to be invoked on this dom event. + * @param isOnce `true` if the callback will only be invoked once, `false` to call every time this event happens. Default false. + */ + addMoveCallback(callback: Function, isOnce?: boolean): this; + + /** + * Adds new Pointer objects to the Input Manager. + * + * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`. + * + * You can create more either by calling this method, or by setting the `input.activePointers` property + * in the Game Config, up to a maximum of 10 pointers. + * + * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added + * via this method. + * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1. + */ + addPointer(quantity?: integer): Phaser.Input.Pointer[]; + + /** + * Tells the Input system to set a custom cursor. + * + * This cursor will be the default cursor used when interacting with the game canvas. + * + * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. + * + * Any valid CSS cursor value is allowed, including paths to image files, i.e.: + * + * ```javascript + * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); + * ``` + * + * Please read about the differences between browsers when it comes to the file formats and sizes they support: + * + * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor + * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property + * + * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support. + * @param cursor The CSS to be used when setting the default cursor. + */ + setDefaultCursor(cursor: string): Phaser.Input.InputPlugin; + + /** + * The x coordinates of the ActivePointer based on the first camera in the camera list. + * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. + */ + readonly x: number; + + /** + * The y coordinates of the ActivePointer based on the first camera in the camera list. + * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch. + */ + readonly y: number; + + /** + * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_. + * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer` + * which will always map to the most recently interacted pointer. + */ + readonly mousePointer: Phaser.Input.Pointer; + + /** + * The current active input Pointer. + */ + readonly activePointer: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer1: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer2: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer3: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer4: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer5: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer6: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer7: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer8: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer9: Phaser.Input.Pointer; + + /** + * A touch-based Pointer object. + * This will be `undefined` by default unless you add a new Pointer using `addPointer`. + */ + readonly pointer10: Phaser.Input.Pointer; + + /** + * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property. + * Use this to create access Gamepads connected to the browser and respond to gamepad buttons. + */ + gamepad: Phaser.Input.Gamepad.GamepadPlugin; + + /** + * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property. + * Use this to create Key objects and listen for keyboard specific events. + */ + keyboard: Phaser.Input.Keyboard.KeyboardPlugin; + + } + + type InputConfiguration = { + /** + * The object / shape to use as the Hit Area. If not given it will try to create a Rectangle based on the texture frame. + */ + hitArea?: any; + /** + * The callback that determines if the pointer is within the Hit Area shape or not. + */ + hitAreaCallback?: Function; + /** + * If `true` the Interactive Object will be set to be draggable and emit drag events. + */ + draggable?: boolean; + /** + * If `true` the Interactive Object will be set to be a drop zone for draggable objects. + */ + dropZone?: boolean; + /** + * If `true` the Interactive Object will set the `pointer` hand cursor when a pointer is over it. This is a short-cut for setting `cursor: 'pointer'`. + */ + useHandCursor?: boolean; + /** + * The CSS string to be used when the cursor is over this Interactive Object. + */ + cursor?: string; + /** + * If `true` the a pixel perfect function will be set for the hit area callback. Only works with texture based Game Objects. + */ + pixelPerfect?: boolean; + /** + * If `pixelPerfect` is set, this is the alpha tolerance threshold value used in the callback. + */ + alphaTolerance?: integer; + }; + + /** + * A Pointer object encapsulates both mouse and touch input within Phaser. + * + * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch + * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly, + * otherwise it won't be managed by the input system. + * + * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties + * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game. + * + * The properties of this object are set by the Input Plugin during processing. This object is then sent in all + * input related events that the Input Plugin emits, so you can reference properties from it directly in your + * callbacks. + */ + class Pointer { + /** + * + * @param manager A reference to the Input Manager. + * @param id The internal ID of this Pointer. + */ + constructor(manager: Phaser.Input.InputManager, id: integer); + + /** + * A reference to the Input Manager. + */ + manager: Phaser.Input.InputManager; + + /** + * The internal ID of this Pointer. + */ + readonly id: integer; + + /** + * The most recent native DOM Event this Pointer has processed. + */ + event: TouchEvent | MouseEvent; + + /** + * The camera the Pointer interacted with during its last update. + * + * A Pointer can only ever interact with one camera at once, which will be the top-most camera + * in the list should multiple cameras be positioned on-top of each other. + */ + camera: Phaser.Cameras.Scene2D.Camera; + + /** + * 0: No button or un-initialized + * 1: Left button + * 2: Right button + * 4: Wheel button or middle button + * 8: 4th button (typically the "Browser Back" button) + * 16: 5th button (typically the "Browser Forward" button) + * + * For a mouse configured for left-handed use, the button actions are reversed. + * In this case, the values are read from right to left. + */ + buttons: integer; + + /** + * The position of the Pointer in screen space. + */ + position: Phaser.Math.Vector2; + + /** + * The previous position of the Pointer in screen space. + * + * The old x and y values are stored in here during the InputManager.transformPointer call. + * + * You can use it to track how fast the pointer is moving, or to smoothly interpolate between the old and current position. + * See the `Pointer.getInterpolatedPosition` method to assist in this. + */ + prevPosition: Phaser.Math.Vector2; + + /** + * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. + */ + worldX: number; + + /** + * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. + */ + worldY: number; + + /** + * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downX: number; + + /** + * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downY: number; + + /** + * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects. + */ + downTime: number; + + /** + * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upX: number; + + /** + * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upY: number; + + /** + * Time when Button 1 (left button), or Touch, was released, used for dragging objects. + */ + upTime: number; + + /** + * Is the primary button down? (usually button 0, the left mouse button) + */ + primaryDown: boolean; + + /** + * The Drag State of the Pointer: + * + * 0 = Not dragging anything + * 1 = Being checked if dragging + * 2 = Dragging something + */ + dragState: number; + + /** + * Is _any_ button on this pointer considered as being down? + */ + isDown: boolean; + + /** + * A dirty flag for this Pointer, used internally by the Input Plugin. + */ + dirty: boolean; + + /** + * Is this Pointer considered as being "just down" or not? + */ + justDown: boolean; + + /** + * Is this Pointer considered as being "just up" or not? + */ + justUp: boolean; + + /** + * Is this Pointer considered as being "just moved" or not? + */ + justMoved: boolean; + + /** + * Did the previous input event come from a Touch input (true) or Mouse? (false) + */ + wasTouch: boolean; + + /** + * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame. + */ + movementX: number; + + /** + * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame. + */ + movementY: number; + + /** + * The identifier property of the Pointer as set by the DOM event when this Pointer is started. + */ + identifier: number; + + /** + * The pointerId property of the Pointer as set by the DOM event when this Pointer is started. + * The browser can and will recycle this value. + */ + pointerId: number; + + /** + * An active Pointer is one that is currently pressed down on the display. + * A Mouse is always considered as active. + */ + active: boolean; + + /** + * Takes a Camera and returns a Vector2 containing the translated position of this Pointer + * within that Camera. This can be used to convert this Pointers position into camera space. + * @param camera The Camera to use for the translation. + * @param output A Vector2-like object in which to store the translated position. + */ + positionToCamera(camera: Phaser.Cameras.Scene2D.Camera, output?: Phaser.Math.Vector2 | object): Phaser.Math.Vector2 | object; + + /** + * Checks to see if any buttons are being held down on this Pointer. + */ + noButtonDown(): boolean; + + /** + * Checks to see if the left button is being held down on this Pointer. + */ + leftButtonDown(): boolean; + + /** + * Checks to see if the right button is being held down on this Pointer. + */ + rightButtonDown(): boolean; + + /** + * Checks to see if the middle button is being held down on this Pointer. + */ + middleButtonDown(): boolean; + + /** + * Checks to see if the back button is being held down on this Pointer. + */ + backButtonDown(): boolean; + + /** + * Checks to see if the forward button is being held down on this Pointer. + */ + forwardButtonDown(): boolean; + + /** + * Takes the previous and current Pointer positions and then generates an array of interpolated values between + * the two. The array will be populated up to the size of the `steps` argument. + * + * ```javaScript + * var points = pointer.getInterpolatedPosition(4); + * + * // points[0] = { x: 0, y: 0 } + * // points[1] = { x: 2, y: 1 } + * // points[2] = { x: 3, y: 2 } + * // points[3] = { x: 6, y: 3 } + * ``` + * + * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer + * events can often fire faster than the main browser loop, and this will help you avoid janky movement + * especially if you have an object following a Pointer. + * + * Note that if you provide an output array it will only be populated up to the number of steps provided. + * It will not clear any previous data that may have existed beyond the range of the steps count. + * + * Internally it uses the Smooth Step interpolation calculation. + * @param steps The number of interpolation steps to use. Default 10. + * @param out An array to store the results in. If not provided a new one will be created. + */ + getInterpolatedPosition(steps?: integer, out?: any[]): any[]; + + /** + * Destroys this Pointer instance and resets its external references. + */ + destroy(): void; + + /** + * The x position of this Pointer. + * The value is in screen space. + * See `worldX` to get a camera converted position. + */ + x: number; + + /** + * The y position of this Pointer. + * The value is in screen space. + * See `worldY` to get a camera converted position. + */ + y: number; + + } + + /** + * The mouse pointer is being held down. + */ + var MOUSE_DOWN: integer; + + /** + * The mouse pointer is being moved. + */ + var MOUSE_MOVE: integer; + + /** + * The mouse pointer is released. + */ + var MOUSE_UP: integer; + + /** + * A touch pointer has been started. + */ + var TOUCH_START: integer; + + /** + * A touch pointer has been started. + */ + var TOUCH_MOVE: integer; + + /** + * A touch pointer has been started. + */ + var TOUCH_END: integer; + + /** + * The pointer lock has changed. + */ + var POINTER_LOCK_CHANGE: integer; + + namespace Gamepad { + /** + * Contains information about a specific Gamepad Axis. + * Axis objects are created automatically by the Gamepad as they are needed. + */ + class Axis { + /** + * + * @param pad A reference to the Gamepad that this Axis belongs to. + * @param index The index of this Axis. + */ + constructor(pad: Phaser.Input.Gamepad.Gamepad, index: integer); + + /** + * A reference to the Gamepad that this Axis belongs to. + */ + pad: Phaser.Input.Gamepad.Gamepad; + + /** + * An event emitter to use to emit the axis events. + */ + events: Phaser.Events.EventEmitter; + + /** + * The index of this Axis. + */ + index: integer; + + /** + * The raw axis value, between -1 and 1 with 0 being dead center. + * Use the method `getValue` to get a normalized value with the threshold applied. + */ + value: number; + + /** + * Movement tolerance threshold below which axis values are ignored in `getValue`. + */ + threshold: number; + + /** + * Applies the `threshold` value to the axis and returns it. + */ + getValue(): number; + + /** + * Destroys this Axis instance and releases external references it holds. + */ + destroy(): void; + + } + + /** + * Contains information about a specific button on a Gamepad. + * Button objects are created automatically by the Gamepad as they are needed. + */ + class Button { + /** + * + * @param pad A reference to the Gamepad that this Button belongs to. + * @param index The index of this Button. + */ + constructor(pad: Phaser.Input.Gamepad.Gamepad, index: integer); + + /** + * A reference to the Gamepad that this Button belongs to. + */ + pad: Phaser.Input.Gamepad.Gamepad; + + /** + * An event emitter to use to emit the button events. + */ + events: Phaser.Events.EventEmitter; + + /** + * The index of this Button. + */ + index: integer; + + /** + * Between 0 and 1. + */ + value: number; + + /** + * Can be set for analogue buttons to enable a 'pressure' threshold, + * before a button is considered as being 'pressed'. + */ + threshold: number; + + /** + * Is the Button being pressed down or not? + */ + pressed: boolean; + + /** + * Destroys this Button instance and releases external references it holds. + */ + destroy(): void; + + } + + /** + * A single Gamepad. + * + * These are created, updated and managed by the Gamepad Plugin. + */ + class Gamepad extends Phaser.Events.EventEmitter { + /** + * + * @param manager A reference to the Gamepad Plugin. + * @param pad The Gamepad object, as extracted from GamepadEvent. + */ + constructor(manager: Phaser.Input.Gamepad.GamepadPlugin, pad: Pad); + + /** + * A reference to the Gamepad Plugin. + */ + manager: Phaser.Input.Gamepad.GamepadPlugin; + + /** + * A reference to the native Gamepad object that is connected to the browser. + */ + pad: any; + + /** + * A string containing some information about the controller. + * + * This is not strictly specified, but in Firefox it will contain three pieces of information + * separated by dashes (-): two 4-digit hexadecimal strings containing the USB vendor and + * product id of the controller, and the name of the controller as provided by the driver. + * In Chrome it will contain the name of the controller as provided by the driver, + * followed by vendor and product 4-digit hexadecimal strings. + */ + id: string; + + /** + * An integer that is unique for each Gamepad currently connected to the system. + * This can be used to distinguish multiple controllers. + * Note that disconnecting a device and then connecting a new device may reuse the previous index. + */ + index: number; + + /** + * An array of Gamepad Button objects, corresponding to the different buttons available on the Gamepad. + */ + buttons: Phaser.Input.Gamepad.Button[]; + + /** + * An array of Gamepad Axis objects, corresponding to the different axes available on the Gamepad, if any. + */ + axes: Phaser.Input.Gamepad.Axis[]; + + /** + * The Gamepad's Haptic Actuator (Vibration / Rumble support). + * This is highly experimental and only set if both present on the device, + * and exposed by both the hardware and browser. + */ + vibration: GamepadHapticActuator; + + /** + * A Vector2 containing the most recent values from the Gamepad's left axis stick. + * This is updated automatically as part of the Gamepad.update cycle. + * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property. + * The values are based on the Axis thresholds. + * If the Gamepad does not have a left axis stick, the values will always be zero. + */ + leftStick: Phaser.Math.Vector2; + + /** + * A Vector2 containing the most recent values from the Gamepad's right axis stick. + * This is updated automatically as part of the Gamepad.update cycle. + * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property. + * The values are based on the Axis thresholds. + * If the Gamepad does not have a right axis stick, the values will always be zero. + */ + rightStick: Phaser.Math.Vector2; + + /** + * Gets the total number of axis this Gamepad claims to support. + */ + getAxisTotal(): integer; + + /** + * Gets the value of an axis based on the given index. + * The index must be valid within the range of axes supported by this Gamepad. + * The return value will be a float between 0 and 1. + * @param index The index of the axes to get the value for. + */ + getAxisValue(index: integer): number; + + /** + * Sets the threshold value of all axis on this Gamepad. + * The value is a float between 0 and 1 and is the amount below which the axis is considered as not having been moved. + * @param value A value between 0 and 1. + */ + setAxisThreshold(value: number): void; + + /** + * Gets the total number of buttons this Gamepad claims to have. + */ + getButtonTotal(): integer; + + /** + * Gets the value of a button based on the given index. + * The index must be valid within the range of buttons supported by this Gamepad. + * + * The return value will be either 0 or 1 for an analogue button, or a float between 0 and 1 + * for a pressure-sensitive digital button, such as the shoulder buttons on a Dual Shock. + * @param index The index of the button to get the value for. + */ + getButtonValue(index: integer): number; + + /** + * Returns if the button is pressed down or not. + * The index must be valid within the range of buttons supported by this Gamepad. + * @param index The index of the button to get the value for. + */ + isButtonDown(index: integer): boolean; + + /** + * Destroys this Gamepad instance, its buttons and axes, and releases external references it holds. + */ + destroy(): void; + + /** + * Is this Gamepad currently connected or not? + */ + connected: boolean; + + /** + * A timestamp containing the most recent time this Gamepad was updated. + */ + timestamp: number; + + /** + * Is the Gamepad's Left button being pressed? + * If the Gamepad doesn't have this button it will always return false. + * This is the d-pad left button under standard Gamepad mapping. + */ + left: boolean; + + /** + * Is the Gamepad's Right button being pressed? + * If the Gamepad doesn't have this button it will always return false. + * This is the d-pad right button under standard Gamepad mapping. + */ + right: boolean; + + /** + * Is the Gamepad's Up button being pressed? + * If the Gamepad doesn't have this button it will always return false. + * This is the d-pad up button under standard Gamepad mapping. + */ + up: boolean; + + /** + * Is the Gamepad's Down button being pressed? + * If the Gamepad doesn't have this button it will always return false. + * This is the d-pad down button under standard Gamepad mapping. + */ + down: boolean; + + /** + * Is the Gamepad's bottom button in the right button cluster being pressed? + * If the Gamepad doesn't have this button it will always return false. + * On a Dual Shock controller it's the X button. + * On an XBox controller it's the A button. + */ + A: boolean; + + /** + * Is the Gamepad's top button in the right button cluster being pressed? + * If the Gamepad doesn't have this button it will always return false. + * On a Dual Shock controller it's the Triangle button. + * On an XBox controller it's the Y button. + */ + Y: boolean; + + /** + * Is the Gamepad's left button in the right button cluster being pressed? + * If the Gamepad doesn't have this button it will always return false. + * On a Dual Shock controller it's the Square button. + * On an XBox controller it's the X button. + */ + X: boolean; + + /** + * Is the Gamepad's right button in the right button cluster being pressed? + * If the Gamepad doesn't have this button it will always return false. + * On a Dual Shock controller it's the Circle button. + * On an XBox controller it's the B button. + */ + B: boolean; + + /** + * Returns the value of the Gamepad's top left shoulder button. + * If the Gamepad doesn't have this button it will always return zero. + * The value is a float between 0 and 1, corresponding to how depressed the button is. + * On a Dual Shock controller it's the L1 button. + * On an XBox controller it's the LB button. + */ + L1: number; + + /** + * Returns the value of the Gamepad's bottom left shoulder button. + * If the Gamepad doesn't have this button it will always return zero. + * The value is a float between 0 and 1, corresponding to how depressed the button is. + * On a Dual Shock controller it's the L2 button. + * On an XBox controller it's the LT button. + */ + L2: number; + + /** + * Returns the value of the Gamepad's top right shoulder button. + * If the Gamepad doesn't have this button it will always return zero. + * The value is a float between 0 and 1, corresponding to how depressed the button is. + * On a Dual Shock controller it's the R1 button. + * On an XBox controller it's the RB button. + */ + R1: number; + + /** + * Returns the value of the Gamepad's bottom right shoulder button. + * If the Gamepad doesn't have this button it will always return zero. + * The value is a float between 0 and 1, corresponding to how depressed the button is. + * On a Dual Shock controller it's the R2 button. + * On an XBox controller it's the RT button. + */ + R2: number; + + } + + /** + * The Gamepad Plugin is an input plugin that belongs to the Scene-owned Input system. + * + * Its role is to listen for native DOM Gamepad Events and then process them. + * + * You do not need to create this class directly, the Input system will create an instance of it automatically. + * + * You can access it from within a Scene using `this.input.gamepad`. + * + * To listen for a gamepad being connected: + * + * ```javascript + * this.input.gamepad.once('connected', function (pad) { + * // 'pad' is a reference to the gamepad that was just connected + * }); + * ``` + * + * Note that the browser may require you to press a button on a gamepad before it will allow you to access it, + * this is for security reasons. However, it may also trust the page already, in which case you won't get the + * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads + * already connected. + * + * Once you have received the connected event, or polled the gamepads and found them enabled, you can access + * them via the built-in properties `GamepadPlugin.pad1` to `pad4`, for up to 4 game pads. With a reference + * to the gamepads you can poll its buttons and axis sticks. See the properties and methods available on + * the `Gamepad` class for more details. + * + * For more information about Gamepad support in browsers see the following resources: + * + * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API + * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API + * https://www.smashingmagazine.com/2015/11/gamepad-api-in-web-games/ + * http://html5gamepad.com/ + */ + class GamepadPlugin extends Phaser.Events.EventEmitter { + /** + * + * @param sceneInputPlugin A reference to the Scene Input Plugin that the KeyboardPlugin belongs to. + */ + constructor(sceneInputPlugin: Phaser.Input.InputPlugin); + + /** + * A reference to the Scene that this Input Plugin is responsible for. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene Systems Settings. + */ + settings: Phaser.Scenes.Settings.Object; + + /** + * A reference to the Scene Input Plugin that created this Keyboard Plugin. + */ + sceneInputPlugin: Phaser.Input.InputPlugin; + + /** + * A boolean that controls if the Gamepad Manager is enabled or not. + * Can be toggled on the fly. + */ + enabled: boolean; + + /** + * The Gamepad Event target, as defined in the Game Config. + * Typically the browser window, but can be any interactive DOM element. + */ + target: any; + + /** + * An array of the connected Gamepads. + */ + gamepads: Phaser.Input.Gamepad.Gamepad[]; + + /** + * Checks to see if both this plugin and the Scene to which it belongs is active. + */ + isActive(): boolean; + + /** + * Disconnects all current Gamepads. + */ + disconnectAll(): void; + + /** + * Returns an array of all currently connected Gamepads. + */ + getAll(): Phaser.Input.Gamepad.Gamepad[]; + + /** + * Looks-up a single Gamepad based on the given index value. + * @param index The index of the Gamepad to get. + */ + getPad(index: number): Phaser.Input.Gamepad.Gamepad; + + /** + * The total number of connected game pads. + */ + total: integer; + + /** + * A reference to the first connected Gamepad. + * + * This will be undefined if either no pads are connected, or the browser + * has not yet issued a gamepadconnect, which can happen even if a Gamepad + * is plugged in, but hasn't yet had any buttons pressed on it. + */ + pad1: Phaser.Input.Gamepad.Gamepad; + + /** + * A reference to the second connected Gamepad. + * + * This will be undefined if either no pads are connected, or the browser + * has not yet issued a gamepadconnect, which can happen even if a Gamepad + * is plugged in, but hasn't yet had any buttons pressed on it. + */ + pad2: Phaser.Input.Gamepad.Gamepad; + + /** + * A reference to the third connected Gamepad. + * + * This will be undefined if either no pads are connected, or the browser + * has not yet issued a gamepadconnect, which can happen even if a Gamepad + * is plugged in, but hasn't yet had any buttons pressed on it. + */ + pad3: Phaser.Input.Gamepad.Gamepad; + + /** + * A reference to the fourth connected Gamepad. + * + * This will be undefined if either no pads are connected, or the browser + * has not yet issued a gamepadconnect, which can happen even if a Gamepad + * is plugged in, but hasn't yet had any buttons pressed on it. + */ + pad4: Phaser.Input.Gamepad.Gamepad; + + } + + namespace Configs { + /** + * Tatar SNES USB Controller Gamepad Configuration. + * USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0011) + */ + var SNES_USB: object; + + /** + * PlayStation DualShock 4 Gamepad Configuration. + * Sony PlayStation DualShock 4 (v2) wireless controller + */ + var DUALSHOCK_4: object; + + /** + * XBox 360 Gamepad Configuration. + */ + var XBOX_360: object; + + } + + } + + namespace Keyboard { + /** + * The Keyboard Plugin is an input plugin that belongs to the Scene-owned Input system. + * + * Its role is to listen for native DOM Keyboard Events and then process them. + * + * You do not need to create this class directly, the Input system will create an instance of it automatically. + * + * You can access it from within a Scene using `this.input.keyboard`. For example, you can do: + * + * ```javascript + * this.input.keyboard.on('keydown', callback, context); + * ``` + * + * Or, to listen for a specific key: + * + * ```javascript + * this.input.keyboard.on('keydown_A', callback, context); + * ``` + * + * You can also create Key objects, which you can then poll in your game loop: + * + * ```javascript + * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); + * ``` + * + * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. + * See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details. + * + * Also please be aware that certain browser extensions can disable or override Phaser keyboard handling. + * For example the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key. + * And there are others. So, please check your extensions before opening Phaser issues about keys that don't work. + */ + class KeyboardPlugin extends Phaser.Events.EventEmitter { + /** + * + * @param sceneInputPlugin A reference to the Scene Input Plugin that the KeyboardPlugin belongs to. + */ + constructor(sceneInputPlugin: Phaser.Input.InputPlugin); + + /** + * A reference to the Scene that this Input Plugin is responsible for. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene Systems Settings. + */ + settings: Phaser.Scenes.Settings.Object; + + /** + * A reference to the Scene Input Plugin that created this Keyboard Plugin. + */ + sceneInputPlugin: Phaser.Input.InputPlugin; + + /** + * A boolean that controls if the Keyboard Plugin is enabled or not. + * Can be toggled on the fly. + */ + enabled: boolean; + + /** + * The Keyboard Event target, as defined in the Scene or Game Config. + * Typically the browser window, but can be any interactive DOM element. + */ + target: any; + + /** + * An array of Key objects to process. + */ + keys: Phaser.Input.Keyboard.Key[]; + + /** + * An array of KeyCombo objects to process. + */ + combos: Phaser.Input.Keyboard.KeyCombo[]; + + /** + * Checks to see if both this plugin and the Scene to which it belongs is active. + */ + isActive(): boolean; + + /** + * Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right, and also Space Bar and shift. + */ + createCursorKeys(): CursorKeys; + + /** + * A practical way to create an object containing user selected hotkeys. + * + * For example: + * + * ```javascript + * this.input.keyboard.addKeys({ 'up': Phaser.Input.Keyboard.KeyCodes.W, 'down': Phaser.Input.Keyboard.KeyCodes.S }); + * ``` + * + * would return an object containing the properties (`up` and `down`) mapped to W and S {@link Phaser.Input.Keyboard.Key} objects. + * + * You can also pass in a comma-separated string: + * + * ```javascript + * this.input.keyboard.addKeys('W,S,A,D'); + * ``` + * + * Which will return an object with the properties W, S, A and D mapped to the relevant Key objects. + * + * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'. + * @param keys An object containing Key Codes, or a comma-separated string. + */ + addKeys(keys: object | string): object; + + /** + * Adds a Key object to this Keyboard Plugin. + * + * The given argument can be either an existing Key object, a string, such as `A` or `SPACE`, or a key code value. + * + * If a Key object is given, and one already exists matching the same key code, the existing one is replaced with the new one. + * @param key Either a Key object, a string, such as `A` or `SPACE`, or a key code value. + */ + addKey(key: Phaser.Input.Keyboard.Key | string | integer): Phaser.Input.Keyboard.Key; + + /** + * Removes a Key object from this Keyboard Plugin. + * + * The given argument can be either a Key object, a string, such as `A` or `SPACE`, or a key code value. + * @param key Either a Key object, a string, such as `A` or `SPACE`, or a key code value. + */ + removeKey(key: Phaser.Input.Keyboard.Key | string | integer): void; + + /** + * Creates a new KeyCombo. + * + * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them + * it will emit a `keycombomatch` event from this Keyboard Plugin. + * + * The keys to be listened for can be defined as: + * + * A string (i.e. 'ATARI') + * An array of either integers (key codes) or strings, or a mixture of both + * An array of objects (such as Key objects) with a public 'keyCode' property + * + * For example, to listen for the Konami code (up, up, up, down, down, down, left, left, left, right, right, right) + * you could pass the following array of key codes: + * + * ```javascript + * this.input.keyboard.createCombo([ 38, 38, 38, 40, 40, 40, 37, 37, 37, 39, 39, 39 ], { resetOnMatch: true }); + * + * this.input.keyboard.on('keycombomatch', function (event) { + * console.log('Konami Code entered!'); + * }); + * ``` + * + * Or, to listen for the user entering the word PHASER: + * + * ```javascript + * this.input.keyboard.createCombo('PHASER'); + * ``` + * @param keys The keys that comprise this combo. + * @param config A Key Combo configuration object. + */ + createCombo(keys: string | integer[] | object[], config?: KeyComboConfig): Phaser.Input.Keyboard.KeyCombo; + + /** + * Checks if the given Key object is currently being held down. + * + * The difference between this method and checking the `Key.isDown` property directly is that you can provide + * a duration to this method. For example, if you wanted a key press to fire a bullet, but you only wanted + * it to be able to fire every 100ms, then you can call this method with a `duration` of 100 and it + * will only return `true` every 100ms. + * + * If the Keyboard Plugin has been disabled, this method will always return `false`. + * @param key A Key object. + * @param duration The duration which must have elapsed before this Key is considered as being down. Default 0. + */ + checkDown(key: Phaser.Input.Keyboard.Key, duration?: number): boolean; + + } + + /** + * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them + * it will emit a `keycombomatch` event from the Keyboard Manager. + * + * The keys to be listened for can be defined as: + * + * A string (i.e. 'ATARI') + * An array of either integers (key codes) or strings, or a mixture of both + * An array of objects (such as Key objects) with a public 'keyCode' property + * + * For example, to listen for the Konami code (up, up, up, down, down, down, left, left, left, right, right, right) + * you could pass the following array of key codes: + * + * ```javascript + * this.input.keyboard.createCombo([ 38, 38, 38, 40, 40, 40, 37, 37, 37, 39, 39, 39 ], { resetOnMatch: true }); + * + * this.input.keyboard.on('keycombomatch', function (event) { + * console.log('Konami Code entered!'); + * }); + * ``` + * + * Or, to listen for the user entering the word PHASER: + * + * ```javascript + * this.input.keyboard.createCombo('PHASER'); + * ``` + */ + class KeyCombo { + /** + * + * @param keyboardPlugin A reference to the Keyboard Plugin. + * @param keys The keys that comprise this combo. + * @param config A Key Combo configuration object. + */ + constructor(keyboardPlugin: Phaser.Input.Keyboard.KeyboardPlugin, keys: string | integer[] | object[], config?: KeyComboConfig); + + /** + * A reference to the Keyboard Manager + */ + manager: Phaser.Input.Keyboard.KeyboardPlugin; + + /** + * A flag that controls if this Key Combo is actively processing keys or not. + */ + enabled: boolean; + + /** + * An array of the keycodes that comprise this combo. + */ + keyCodes: any[]; + + /** + * The current keyCode the combo is waiting for. + */ + current: integer; + + /** + * The current index of the key being waited for in the 'keys' string. + */ + index: integer; + + /** + * The length of this combo (in keycodes) + */ + size: number; + + /** + * The time the previous key in the combo was matched. + */ + timeLastMatched: number; + + /** + * Has this Key Combo been matched yet? + */ + matched: boolean; + + /** + * The time the entire combo was matched. + */ + timeMatched: number; + + /** + * If they press the wrong key do we reset the combo? + */ + resetOnWrongKey: boolean; + + /** + * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled. + */ + maxKeyDelay: integer; + + /** + * If previously matched and they press the first key of the combo again, will it reset? + */ + resetOnMatch: boolean; + + /** + * If the combo matches, will it delete itself? + */ + deleteOnMatch: boolean; + + /** + * How far complete is this combo? A value between 0 and 1. + */ + readonly progress: number; + + /** + * Destroys this Key Combo and all of its references. + */ + destroy(): void; + + } + + /** + * Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, + * or was pressed down longer ago than then given duration. + * @param key The Key object to test. + * @param duration The duration, in ms, within which the key must have been pressed down. Default 50. + */ + function DownDuration(key: Phaser.Input.Keyboard.Key, duration?: integer): boolean; + + /** + * The justDown value allows you to test if this Key has just been pressed down or not. + * + * When you check this value it will return `true` if the Key is down, otherwise `false`. + * + * You can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again. + * This allows you to use it in situations where you want to check if this key is down without using an event, such as in a core game loop. + * @param key The Key to check to see if it's just down or not. + */ + function JustDown(key: Phaser.Input.Keyboard.Key): boolean; + + /** + * The justUp value allows you to test if this Key has just been released or not. + * + * When you check this value it will return `true` if the Key is up, otherwise `false`. + * + * You can only call JustUp once per key release. It will only return `true` once, until the Key is pressed down and released again. + * This allows you to use it in situations where you want to check if this key is up without using an event, such as in a core game loop. + * @param key The Key to check to see if it's just up or not. + */ + function JustUp(key: Phaser.Input.Keyboard.Key): boolean; + + /** + * A generic Key object which can be passed to the Process functions (and so on) + * keycode must be an integer + */ + class Key { + /** + * + * @param keyCode The keycode of this key. + */ + constructor(keyCode: integer); + + /** + * The keycode of this key. + */ + keyCode: integer; + + /** + * The original DOM event. + */ + originalEvent: KeyboardEvent; + + /** + * Should this Key prevent event propagation? + */ + preventDefault: boolean; + + /** + * Can this Key be processed? + */ + enabled: boolean; + + /** + * The "down" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down. + */ + isDown: boolean; + + /** + * The "up" state of the key. This will remain `true` for as long as the keyboard thinks this key is up. + */ + isUp: boolean; + + /** + * The down state of the ALT key, if pressed at the same time as this key. + */ + altKey: boolean; + + /** + * The down state of the CTRL key, if pressed at the same time as this key. + */ + ctrlKey: boolean; + + /** + * The down state of the SHIFT key, if pressed at the same time as this key. + */ + shiftKey: boolean; + + /** + * The location of the modifier key. 0 for standard (or unknown), 1 for left, 2 for right, 3 for numpad. + */ + location: number; + + /** + * The timestamp when the key was last pressed down. + */ + timeDown: number; + + /** + * The number of milliseconds this key was held down for in the previous down - up sequence. + */ + duration: number; + + /** + * The timestamp when the key was last released. + */ + timeUp: number; + + /** + * If a key is held down this holds down the number of times the key has 'repeated'. + */ + repeats: number; + + /** + * Resets this Key object back to its default un-pressed state. + */ + static reset(): Phaser.Input.Keyboard.Key; + + } + + /** + * Keyboard Codes. + */ + enum KeyCodes { + BACKSPACE, + TAB, + ENTER, + SHIFT, + CTRL, + ALT, + PAUSE, + CAPS_LOCK, + ESC, + SPACE, + PAGE_UP, + PAGE_DOWN, + END, + HOME, + LEFT, + UP, + RIGHT, + DOWN, + PRINT_SCREEN, + INSERT, + DELETE, + ZERO, + ONE, + TWO, + THREE, + FOUR, + FIVE, + SIX, + SEVEN, + EIGHT, + NINE, + NUMPAD_ZERO, + NUMPAD_ONE, + NUMPAD_TWO, + NUMPAD_THREE, + NUMPAD_FOUR, + NUMPAD_FIVE, + NUMPAD_SIX, + NUMPAD_SEVEN, + NUMPAD_EIGHT, + NUMPAD_NINE, + A, + B, + C, + D, + E, + F, + G, + H, + I, + J, + K, + L, + M, + N, + O, + P, + Q, + R, + S, + T, + U, + V, + W, + X, + Y, + Z, + F1, + F2, + F3, + F4, + F5, + F6, + F7, + F8, + F9, + F10, + F11, + F12, + SEMICOLON, + PLUS, + COMMA, + MINUS, + PERIOD, + FORWARD_SLASH, + BACK_SLASH, + QUOTES, + BACKTICK, + OPEN_BRACKET, + CLOSED_BRACKET, + } + + /** + * Returns `true` if the Key was released within the `duration` value given, or `false` if it either isn't up, + * or was released longer ago than then given duration. + * @param key The Key object to test. + * @param duration The duration, in ms, within which the key must have been released. Default 50. + */ + function UpDuration(key: Phaser.Input.Keyboard.Key, duration?: integer): boolean; + + } + + namespace Mouse { + /** + * The Mouse Manager is a helper class that belongs to the Input Manager. + * + * Its role is to listen for native DOM Mouse Events and then pass them onto the Input Manager for further processing. + * + * You do not need to create this class directly, the Input Manager will create an instance of it automatically. + */ + class MouseManager { + /** + * + * @param inputManager A reference to the Input Manager. + */ + constructor(inputManager: Phaser.Input.InputManager); + + /** + * A reference to the Input Manager. + */ + manager: Phaser.Input.InputManager; + + /** + * If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully. + */ + capture: boolean; + + /** + * A boolean that controls if the Mouse Manager is enabled or not. + * Can be toggled on the fly. + */ + enabled: boolean; + + /** + * The Touch Event target, as defined in the Game Config. + * Typically the canvas to which the game is rendering, but can be any interactive DOM element. + */ + target: any; + + /** + * If the mouse has been pointer locked successfully this will be set to true. + */ + locked: boolean; + + /** + * Attempts to disable the context menu from appearing if you right-click on the browser. + * + * Works by listening for the `contextmenu` event and prevent defaulting it. + * + * Use this if you need to enable right-button mouse support in your game, and the browser + * menu keeps getting in the way. + */ + disableContextMenu(): Phaser.Input.Mouse.MouseManager; + + /** + * If the browser supports it, you can request that the pointer be locked to the browser window. + * + * This is classically known as 'FPS controls', where the pointer can't leave the browser until + * the user presses an exit key. + * + * If the browser successfully enters a locked state, a `POINTER_LOCK_CHANGE_EVENT` will be dispatched, + * from the games Input Manager, with an `isPointerLocked` property. + * + * It is important to note that pointer lock can only be enabled after an 'engagement gesture', + * see: https://w3c.github.io/pointerlock/#dfn-engagement-gesture. + */ + requestPointerLock(): void; + + /** + * Internal pointerLockChange handler. + * @param event The native event from the browser. + */ + pointerLockChange(event: MouseEvent): void; + + /** + * If the browser supports pointer lock, this will request that the pointer lock is released. If + * the browser successfully enters a locked state, a 'POINTER_LOCK_CHANGE_EVENT' will be + * dispatched - from the game's input manager - with an `isPointerLocked` property. + */ + releasePointerLock(): void; + + /** + * The Mouse Move Event Handler. + * @param event The native DOM Mouse Move Event. + */ + onMouseMove(event: MouseEvent): void; + + /** + * The Mouse Down Event Handler. + * @param event The native DOM Mouse Down Event. + */ + onMouseDown(event: MouseEvent): void; + + /** + * The Mouse Up Event Handler. + * @param event The native DOM Mouse Up Event. + */ + onMouseUp(event: MouseEvent): void; + + /** + * Starts the Mouse Event listeners running. + * This is called automatically and does not need to be manually invoked. + */ + startListeners(): void; + + /** + * Stops the Mouse Event listeners. + * This is called automatically and does not need to be manually invoked. + */ + stopListeners(): void; + + /** + * Destroys this Mouse Manager instance. + */ + destroy(): void; + + } + + } + + namespace Touch { + /** + * The Touch Manager is a helper class that belongs to the Input Manager. + * + * Its role is to listen for native DOM Touch Events and then pass them onto the Input Manager for further processing. + * + * You do not need to create this class directly, the Input Manager will create an instance of it automatically. + */ + class TouchManager { + /** + * + * @param inputManager A reference to the Input Manager. + */ + constructor(inputManager: Phaser.Input.InputManager); + + /** + * A reference to the Input Manager. + */ + manager: Phaser.Input.InputManager; + + /** + * If true the DOM events will have event.preventDefault applied to them, if false they will propagate fully. + */ + capture: boolean; + + /** + * A boolean that controls if the Touch Manager is enabled or not. + * Can be toggled on the fly. + */ + enabled: boolean; + + /** + * The Touch Event target, as defined in the Game Config. + * Typically the canvas to which the game is rendering, but can be any interactive DOM element. + */ + target: any; + + /** + * The Touch Start Event Handler. + * @param event The native DOM Touch Start Event. + */ + onTouchStart(event: TouchEvent): void; + + /** + * The Touch Move Event Handler. + * @param event The native DOM Touch Move Event. + */ + onTouchMove(event: TouchEvent): void; + + /** + * The Touch End Event Handler. + * @param event The native DOM Touch End Event. + */ + onTouchEnd(event: TouchEvent): void; + + /** + * Starts the Touch Event listeners running. + * This is called automatically and does not need to be manually invoked. + */ + startListeners(): void; + + /** + * Stops the Touch Event listeners. + * This is called automatically and does not need to be manually invoked. + */ + stopListeners(): void; + + /** + * Destroys this Touch Manager instance. + */ + destroy(): void; + + } + + } + + } + + namespace Loader { + /** + * The base File class used by all File Types that the Loader can support. + * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods. + */ + class File { + /** + * + * @param loader The Loader that is going to load this File. + * @param fileConfig The file configuration object, as created by the file type. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, fileConfig: FileConfig); + + /** + * A reference to the Loader that is going to load this file. + */ + loader: Phaser.Loader.LoaderPlugin; + + /** + * A reference to the Cache, or Texture Manager, that is going to store this file if it loads. + */ + cache: Phaser.Cache.BaseCache | Phaser.Textures.TextureManager; + + /** + * The file type string (image, json, etc) for sorting within the Loader. + */ + type: string; + + /** + * Unique cache key (unique within its file type) + */ + key: string; + + /** + * The URL of the file, not including baseURL. + * Automatically has Loader.path prepended to it. + */ + url: string; + + /** + * The final URL this file will load from, including baseURL and path. + * Set automatically when the Loader calls 'load' on this file. + */ + src: string; + + /** + * The merged XHRSettings for this file. + */ + xhrSettings: XHRSettingsObject; + + /** + * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File. + */ + xhrLoader: XMLHttpRequest; + + /** + * The current state of the file. One of the FILE_CONST values. + */ + state: integer; + + /** + * The total size of this file. + * Set by onProgress and only if loading via XHR. + */ + bytesTotal: number; + + /** + * Updated as the file loads. + * Only set if loading via XHR. + */ + bytesLoaded: number; + + /** + * A percentage value between 0 and 1 indicating how much of this file has loaded. + * Only set if loading via XHR. + */ + percentComplete: number; + + /** + * For CORs based loading. + * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set) + */ + crossOrigin: string | undefined; + + /** + * The processed file data, stored here after the file has loaded. + */ + data: any; + + /** + * A config object that can be used by file types to store transitional data. + */ + config: any; + + /** + * If this is a multipart file, i.e. an atlas and its json together, then this is a reference + * to the parent MultiFile. Set and used internally by the Loader or specific file types. + */ + multiFile: Phaser.Loader.MultiFile; + + /** + * Does this file have an associated linked file? Such as an image and a normal map. + * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't + * actually bound by data, where-as a linkFile is. + */ + linkFile: Phaser.Loader.File; + + /** + * Links this File with another, so they depend upon each other for loading and processing. + * @param fileB The file to link to this one. + */ + setLink(fileB: Phaser.Loader.File): void; + + /** + * Resets the XHRLoader instance this file is using. + */ + resetXHR(): void; + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + */ + load(): void; + + /** + * Called when the file finishes loading, is sent a DOM ProgressEvent. + * @param xhr The XMLHttpRequest that caused this onload event. + * @param event The DOM ProgressEvent that resulted from this load. + */ + onLoad(xhr: XMLHttpRequest, event: ProgressEvent): void; + + /** + * Called if the file errors while loading, is sent a DOM ProgressEvent. + * @param event The DOM ProgressEvent that resulted from this error. + */ + onError(event: ProgressEvent): void; + + /** + * Called during the file load progress. Is sent a DOM ProgressEvent. + * @param event The DOM ProgressEvent. + */ + onProgress(event: ProgressEvent): void; + + /** + * Usually overridden by the FileTypes and is called by Loader.nextFile. + * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage. + */ + onProcess(): void; + + /** + * Called when the File has completed processing. + * Checks on the state of its multifile, if set. + */ + onProcessComplete(): void; + + /** + * Called when the File has completed processing but it generated an error. + * Checks on the state of its multifile, if set. + */ + onProcessError(): void; + + /** + * Checks if a key matching the one used by this file exists in the target Cache or not. + * This is called automatically by the LoaderPlugin to decide if the file can be safely + * loaded or will conflict. + */ + hasCacheConflict(): boolean; + + /** + * Adds this file to its target cache upon successful loading and processing. + * This method is often overridden by specific file types. + */ + addToCache(): void; + + /** + * Called once the file has been added to its cache and is now ready for deletion from the Loader. + * It will emit a `filecomplete` event from the LoaderPlugin. + */ + pendingDestroy(): void; + + /** + * Destroy this File and any references it holds. + */ + destroy(): void; + + /** + * Static method for creating object URL using URL API and setting it as image 'src' attribute. + * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader. + * @param image Image object which 'src' attribute should be set to object URL. + * @param blob A Blob object to create an object URL for. + * @param defaultType Default mime type used if blob type is not available. + */ + static createObjectURL(image: HTMLImageElement, blob: Blob, defaultType: string): void; + + /** + * Static method for releasing an existing object URL which was previously created + * by calling {@link File#createObjectURL} method. + * @param image Image object which 'src' attribute should be revoked. + */ + static revokeObjectURL(image: HTMLImageElement): void; + + } + + /** + * Given a File and a baseURL value this returns the URL the File will use to download from. + * @param file The File object. + * @param baseURL A default base URL. + */ + function GetURL(file: Phaser.Loader.File, baseURL: string): string; + + /** + * The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files. + * You typically interact with it via `this.load` in your Scene. Scenes can have a `preload` method, which is always + * called before the Scenes `create` method, allowing you to preload assets that the Scene may need. + * + * If you call any `this.load` methods from outside of `Scene.preload` then you need to start the Loader going + * yourself by calling `Loader.start()`. It's only automatically started during the Scene preload. + * + * The Loader uses a combination of tag loading (eg. Audio elements) and XHR and provides progress and completion events. + * Files are loaded in parallel by default. The amount of concurrent connections can be controlled in your Game Configuration. + * + * Once the Loader has started loading you are still able to add files to it. These can be injected as a result of a loader + * event, the type of file being loaded (such as a pack file) or other external events. As long as the Loader hasn't finished + * simply adding a new file to it, while running, will ensure it's added into the current queue. + * + * Every Scene has its own instance of the Loader and they are bound to the Scene in which they are created. However, + * assets loaded by the Loader are placed into global game-level caches. For example, loading an XML file will place that + * file inside `Game.cache.xml`, which is accessible from every Scene in your game, no matter who was responsible + * for loading it. The same is true of Textures. A texture loaded in one Scene is instantly available to all other Scenes + * in your game. + * + * The Loader works by using custom File Types. These are stored in the FileTypesManager, which injects them into the Loader + * when it's instantiated. You can create your own custom file types by extending either the File or MultiFile classes. + * See those files for more details. + */ + class LoaderPlugin extends Phaser.Events.EventEmitter { + /** + * + * @param scene The Scene which owns this Loader instance. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene which owns this Loader instance. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene Systems. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * A reference to the global Cache Manager. + */ + protected cacheManager: Phaser.Cache.CacheManager; + + /** + * A reference to the global Texture Manager. + */ + protected textureManager: Phaser.Textures.TextureManager; + + /** + * An optional prefix that is automatically prepended to the start of every file key. + * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. + * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader + * from that point on. It does _not_ change any file already in the load queue. + */ + prefix: string; + + /** + * The value of `path`, if set, is placed before any _relative_ file path given. For example: + * + * ```javascript + * this.load.path = "images/sprites/"; + * this.load.image("ball", "ball.png"); + * this.load.image("tree", "level1/oaktree.png"); + * this.load.image("boom", "http://server.com/explode.png"); + * ``` + * + * Would load the `ball` file from `images/sprites/ball.png` and the tree from + * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL + * given as it's an absolute URL. + * + * Please note that the path is added before the filename but *after* the baseURL (if set.) + * + * If you set this property directly then it _must_ end with a "/". Alternatively, call `setPath()` and it'll do it for you. + */ + path: string; + + /** + * If you want to append a URL before the path of any asset you can set this here. + * + * Useful if allowing the asset base url to be configured outside of the game code. + * + * If you set this property directly then it _must_ end with a "/". Alternatively, call `setBaseURL()` and it'll do it for you. + */ + baseURL: string; + + /** + * The number of concurrent / parallel resources to try and fetch at once. + * + * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all. + * + * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts. + */ + maxParallelDownloads: integer; + + /** + * xhr specific global settings (can be overridden on a per-file basis) + */ + xhr: XHRSettingsObject; + + /** + * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'. + */ + crossOrigin: string; + + /** + * The total number of files to load. It may not always be accurate because you may add to the Loader during the process + * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static. + */ + totalToLoad: integer; + + /** + * The progress of the current load queue, as a float value between 0 and 1. + * This is updated automatically as files complete loading. + * Note that it is possible for this value to go down again if you add content to the current load queue during a load. + */ + progress: number; + + /** + * Files are placed in this Set when they're added to the Loader via `addFile`. + * + * They are moved to the `inflight` Set when they start loading, and assuming a successful + * load, to the `queue` Set for further processing. + * + * By the end of the load process this Set will be empty. + */ + list: Phaser.Structs.Set; + + /** + * Files are stored in this Set while they're in the process of being loaded. + * + * Upon a successful load they are moved to the `queue` Set. + * + * By the end of the load process this Set will be empty. + */ + inflight: Phaser.Structs.Set; + + /** + * Files are stored in this Set while they're being processed. + * + * If the process is successful they are moved to their final destination, which could be + * a Cache or the Texture Manager. + * + * At the end of the load process this Set will be empty. + */ + queue: Phaser.Structs.Set; + + /** + * The total number of files that failed to load during the most recent load. + * This value is reset when you call `Loader.start`. + */ + totalFailed: integer; + + /** + * The total number of files that successfully loaded during the most recent load. + * This value is reset when you call `Loader.start`. + */ + totalComplete: integer; + + /** + * The current state of the Loader. + */ + readonly state: integer; + + /** + * If you want to append a URL before the path of any asset you can set this here. + * + * Useful if allowing the asset base url to be configured outside of the game code. + * + * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any + * file _already_ being loaded. To reset it, call this method with no arguments. + * @param url The URL to use. Leave empty to reset. + */ + setBaseURL(url?: string): Phaser.Loader.LoaderPlugin; + + /** + * The value of `path`, if set, is placed before any _relative_ file path given. For example: + * + * ```javascript + * this.load.setPath("images/sprites/"); + * this.load.image("ball", "ball.png"); + * this.load.image("tree", "level1/oaktree.png"); + * this.load.image("boom", "http://server.com/explode.png"); + * ``` + * + * Would load the `ball` file from `images/sprites/ball.png` and the tree from + * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL + * given as it's an absolute URL. + * + * Please note that the path is added before the filename but *after* the baseURL (if set.) + * + * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any + * file _already_ in the load queue. To reset it, call this method with no arguments. + * @param path The path to use. Leave empty to reset. + */ + setPath(path?: string): Phaser.Loader.LoaderPlugin; + + /** + * An optional prefix that is automatically prepended to the start of every file key. + * + * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`. + * + * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any + * file _already_ in the load queue. To reset it, call this method with no arguments. + * @param prefix The prefix to use. Leave empty to reset. + */ + setPrefix(prefix?: string): Phaser.Loader.LoaderPlugin; + + /** + * Sets the Cross Origin Resource Sharing value used when loading files. + * + * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config. + * + * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have + * their own CORs setting. To reset it, call this method with no arguments. + * + * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + * @param crossOrigin The value to use for the `crossOrigin` property in the load request. + */ + setCORS(crossOrigin?: string): Phaser.Loader.LoaderPlugin; + + /** + * Adds a file, or array of files, into the load queue. + * + * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key + * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache. + * If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already + * started, ready for the next batch of files to be pulled from the list to the inflight queue. + * + * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`, + * however you can call this as long as the file given to it is well formed. + * @param file The file, or array of files, to be added to the load queue. + */ + addFile(file: Phaser.Loader.File | Phaser.Loader.File[]): void; + + /** + * Checks the key and type of the given file to see if it will conflict with anything already + * in a Cache, the Texture Manager, or the list or inflight queues. + * @param file The file to check the key of. + */ + keyExists(file: Phaser.Loader.File): boolean; + + /** + * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call + * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the + * pack data. However, if you've got the data prepared you can pass it to this method. + * + * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into + * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format + * see the `LoaderPlugin.pack` method. + * @param data The Pack File data to be parsed and each entry of it to added to the load queue. + * @param packKey An optional key to use from the pack file data. + */ + addPack(data: any, packKey?: string): boolean; + + /** + * Is the Loader actively loading, or processing loaded files? + */ + isLoading(): boolean; + + /** + * Is the Loader ready to start a new load? + */ + isReady(): boolean; + + /** + * Starts the Loader running. This will reset the progress and totals and then emit a `start` event. + * If there is nothing in the queue the Loader will immediately complete, otherwise it will start + * loading the first batch of files. + * + * The Loader is started automatically if the queue is populated within your Scenes `preload` method. + * + * However, outside of this, you need to call this method to start it. + * + * If the Loader is already running this method will simply return. + */ + start(): void; + + /** + * Called automatically during the load process. + * It updates the `progress` value and then emits a progress event, which you can use to + * display a loading bar in your game. + */ + updateProgress(): void; + + /** + * Called automatically during the load process. + */ + update(): void; + + /** + * An internal method called automatically by the XHRLoader belong to a File. + * + * This method will remove the given file from the inflight Set and update the load progress. + * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue. + * @param file The File that just finished loading, or errored during load. + * @param success `true` if the file loaded successfully, otherwise `false`. + */ + nextFile(file: Phaser.Loader.File, success: boolean): void; + + /** + * An internal method that is called automatically by the File when it has finished processing. + * + * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called. + * + * It this then removed from the queue. If there are no more files to load `loadComplete` is called. + * @param file The file that has finished processing. + */ + fileProcessComplete(file: Phaser.Loader.File): void; + + /** + * Called at the end when the load queue is exhausted and all files have either loaded or errored. + * By this point every loaded file will now be in its associated cache and ready for use. + * + * Also clears down the Sets, puts progress to 1 and clears the deletion queue. + */ + loadComplete(): void; + + /** + * Adds a File into the pending-deletion queue. + * @param file The File to be queued for deletion when the Loader completes. + */ + flagForRemoval(file: Phaser.Loader.File): void; + + /** + * Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally. + * + * The data must be well formed JSON and ready-parsed, not a JavaScript object. + * @param data The JSON data, ready parsed. + * @param filename The name to save the JSON file as. Default file.json. + */ + saveJSON(data: any, filename?: string): Phaser.Loader.LoaderPlugin; + + /** + * Causes the browser to save the given data as a file to its default Downloads folder. + * + * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href + * to be an ObjectURL based on the given data, and then invokes a click event. + * @param data The data to be saved. Will be passed through URL.createObjectURL. + * @param filename The filename to save the file as. Default file.json. + * @param filetype The file type to use when saving the file. Defaults to JSON. Default application/json. + */ + save(data: any, filename?: string, filetype?: string): Phaser.Loader.LoaderPlugin; + + /** + * Resets the Loader. + * + * This will clear all lists and reset the base URL, path and prefix. + * + * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted. + */ + reset(): void; + + /** + * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.animation('baddieAnims', 'files/BaddieAnims.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring + * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. + * + * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the JSON Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.animation({ + * key: 'baddieAnims', + * url: 'files/BaddieAnims.json' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.JSONFileConfig` for more details. + * + * Once the file has finished loading it will automatically be passed to the global Animation Managers `fromJSON` method. + * This will parse all of the JSON data and create animation data from it. This process happens at the very end + * of the Loader, once every other file in the load queue has finished. The reason for this is to allow you to load + * both animation data and the images it relies upon in the same load call. + * + * Once the animation data has been parsed you will be able to play animations using that data. + * Please see the Animation Manager `fromJSON` method for more details about the format and playback. + * + * You can also access the raw animation data from its Cache using its key: + * + * ```javascript + * this.load.animation('baddieAnims', 'files/BaddieAnims.json'); + * // and later in your game ... + * var data = this.cache.json.get('baddieAnims'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and + * this is what you would use to retrieve the text from the JSON Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" + * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, + * rather than the whole file. For example, if your JSON data had a structure like this: + * + * ```json + * { + * "level1": { + * "baddies": { + * "aliens": {}, + * "boss": {} + * } + * }, + * "level2": {}, + * "level3": {} + * } + * ``` + * + * And if you only wanted to create animations from the `boss` data, then you could pass `level1.baddies.boss`as the `dataKey`. + * + * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param dataKey When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + animation(key: string | Phaser.Loader.FileTypes.JSONFileConfig | Phaser.Loader.FileTypes.JSONFileConfig[], url?: string, dataKey?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a JSON based Texture Atlas, or array of atlases, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring + * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. + * + * Phaser expects the atlas data to be provided in a JSON file, using either the JSON Hash or JSON Array format. + * These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate. + * If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader + * instead of this one. + * + * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.atlas({ + * key: 'mainmenu', + * textureURL: 'images/MainMenu.png', + * atlasURL: 'images/MainMenu.json' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.AtlasJSONFileConfig` for more details. + * + * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead. + * + * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: + * + * ```javascript + * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); + * // and later in your game ... + * this.add.image(x, y, 'mainmenu', 'background'); + * ``` + * + * To get a list of all available frames within an atlas please consult your Texture Atlas software. + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, + * then you can specify it by providing an array as the `url` where the second element is the normal map: + * + * ```javascript + * this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json'); + * ``` + * + * Or, if you are using a config object use the `normalMap` property: + * + * ```javascript + * this.load.atlas({ + * key: 'mainmenu', + * textureURL: 'images/MainMenu.png', + * normalMap: 'images/MainMenu-n.png', + * atlasURL: 'images/MainMenu.json' + * }); + * ``` + * + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. + * + * Note: The ability to load this type of file will only be available if the Atlas JSON File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. + */ + atlas(key: string | Phaser.Loader.FileTypes.AtlasJSONFileConfig | Phaser.Loader.FileTypes.AtlasJSONFileConfig[], textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: XHRSettingsObject, atlasXhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds an XML based Texture Atlas, or array of atlases, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring + * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. + * + * Phaser expects the atlas data to be provided in an XML file format. + * These files are created by software such as Shoebox and Adobe Flash / Animate. + * + * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.atlasXML({ + * key: 'mainmenu', + * textureURL: 'images/MainMenu.png', + * atlasURL: 'images/MainMenu.xml' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.AtlasXMLFileConfig` for more details. + * + * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: + * + * ```javascript + * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml'); + * // and later in your game ... + * this.add.image(x, y, 'mainmenu', 'background'); + * ``` + * + * To get a list of all available frames within an atlas please consult your Texture Atlas software. + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, + * then you can specify it by providing an array as the `url` where the second element is the normal map: + * + * ```javascript + * this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml'); + * ``` + * + * Or, if you are using a config object use the `normalMap` property: + * + * ```javascript + * this.load.atlasXML({ + * key: 'mainmenu', + * textureURL: 'images/MainMenu.png', + * normalMap: 'images/MainMenu-n.png', + * atlasURL: 'images/MainMenu.xml' + * }); + * ``` + * + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. + * + * Note: The ability to load this type of file will only be available if the Atlas XML File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. + */ + atlasXML(key: string | Phaser.Loader.FileTypes.AtlasXMLFileConfig | Phaser.Loader.FileTypes.AtlasXMLFileConfig[], textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: XHRSettingsObject, atlasXhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.audio('title', [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Audio Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Audio Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.audio({ + * key: 'title', + * url: [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ] + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.AudioFileConfig` for more details. + * + * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them. + * + * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats. + * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on + * browser support. + * + * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded. + * + * Note: The ability to load this type of file will only be available if the Audio File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param urls The absolute or relative URL to load the audio files from. + * @param config An object containing an `instances` property for HTML5Audio. Defaults to 1. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + audio(key: string | Phaser.Loader.FileTypes.AudioFileConfig | Phaser.Loader.FileTypes.AudioFileConfig[], urls?: string | string[], config?: any, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.audioSprite('kyobi', 'kyobi.json', [ + * 'kyobi.ogg', + * 'kyobi.mp3', + * 'kyobi.m4a' + * ]); + * } + * ``` + * + * Audio Sprites are a combination of audio files and a JSON configuration. + * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite + * + * If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio + * files automatically based on its content. To do this exclude the audio URLs from the load: + * + * ```javascript + * function preload () + * { + * this.load.audioSprite('kyobi', 'kyobi.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring + * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. + * + * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Audio Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Audio Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.audioSprite({ + * key: 'kyobi', + * jsonURL: 'audio/Kyobi.json', + * audioURL: [ + * 'audio/Kyobi.ogg', + * 'audio/Kyobi.mp3', + * 'audio/Kyobi.m4a' + * ] + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.AudioSpriteFileConfig` for more details. + * + * Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead. + * + * Once the audio has finished loading you can use it create an Audio Sprite by referencing its key: + * + * ```javascript + * this.load.audioSprite('kyobi', 'kyobi.json'); + * // and later in your game ... + * var music = this.sound.addAudioSprite('kyobi'); + * music.play('title'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats. + * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on + * browser support. + * + * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded. + * + * Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or an array of objects. + * @param jsonURL The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead. + * @param audioURL The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file. + * @param audioConfig The audio configuration options. + * @param audioXhrSettings An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. + * @param jsonXhrSettings An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + */ + audioSprite(key: string | Phaser.Loader.FileTypes.AudioSpriteFileConfig | Phaser.Loader.FileTypes.AudioSpriteFileConfig[], jsonURL: string, audioURL?: string, audioConfig?: any, audioXhrSettings?: XHRSettingsObject, jsonXhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Binary file, or array of Binary files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.binary('doom', 'files/Doom.wad'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Binary Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Binary Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Binary Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.binary({ + * key: 'doom', + * url: 'files/Doom.wad', + * dataType: Uint8Array + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.BinaryFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.binary('doom', 'files/Doom.wad'); + * // and later in your game ... + * var data = this.cache.binary.get('doom'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Data` the final key will be `LEVEL1.Data` and + * this is what you would use to retrieve the text from the Binary Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "doom" + * and no URL is given then the Loader will set the URL to be "doom.bin". It will always add `.bin` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Binary File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin". + * @param dataType Optional type to cast the binary file to once loaded. For example, `Uint8Array`. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + binary(key: string | Phaser.Loader.FileTypes.BinaryFileConfig | Phaser.Loader.FileTypes.BinaryFileConfig[], url?: string, dataType?: any, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds an XML based Bitmap Font, or array of fonts, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * ```javascript + * function preload () + * { + * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring + * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. + * + * Phaser expects the font data to be provided in an XML file format. + * These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/), + * [Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner) + * + * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.bitmapFont({ + * key: 'goldenFont', + * textureURL: 'images/GoldFont.png', + * fontDataURL: 'images/GoldFont.xml' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.BitmapFontFileConfig` for more details. + * + * Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object: + * + * ```javascript + * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml'); + * // and later in your game ... + * this.add.bitmapText(x, y, 'goldenFont', 'Hello World'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use when creating a Bitmap Text object. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, + * then you can specify it by providing an array as the `url` where the second element is the normal map: + * + * ```javascript + * this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml'); + * ``` + * + * Or, if you are using a config object use the `normalMap` property: + * + * ```javascript + * this.load.bitmapFont({ + * key: 'goldenFont', + * textureURL: 'images/GoldFont.png', + * normalMap: 'images/GoldFont-n.png', + * fontDataURL: 'images/GoldFont.xml' + * }); + * ``` + * + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. + * + * Note: The ability to load this type of file will only be available if the Bitmap Font File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param textureURL The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param fontDataURL The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param textureXhrSettings An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. + * @param fontDataXhrSettings An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. + */ + bitmapFont(key: string | Phaser.Loader.FileTypes.BitmapFontFileConfig | Phaser.Loader.FileTypes.BitmapFontFileConfig[], textureURL?: string | string[], fontDataURL?: string, textureXhrSettings?: XHRSettingsObject, fontDataXhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a GLSL file, or array of GLSL files, to the current load queue. + * In Phaser 3 GLSL files are just plain Text files at the current moment in time. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.glsl('plasma', 'shaders/Plasma.glsl'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Shader Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Shader Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Shader Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.glsl({ + * key: 'plasma', + * url: 'shaders/Plasma.glsl' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.GLSLFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.glsl('plasma', 'shaders/Plasma.glsl'); + * // and later in your game ... + * var data = this.cache.shader.get('plasma'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `FX.` and the key was `Plasma` the final key will be `FX.Plasma` and + * this is what you would use to retrieve the text from the Shader Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "plasma" + * and no URL is given then the Loader will set the URL to be "plasma.glsl". It will always add `.glsl` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the GLSL File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.glsl`, i.e. if `key` was "alien" then the URL will be "alien.glsl". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + glsl(key: string | Phaser.Loader.FileTypes.GLSLFileConfig | Phaser.Loader.FileTypes.GLSLFileConfig[], url?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds an HTML File, or array of HTML Files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.html('instructions', 'content/intro.html', 256, 512); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.html({ + * key: 'instructions', + * url: 'content/intro.html', + * width: 256, + * height: 512 + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.HTMLFileConfig` for more details. + * + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: + * + * ```javascript + * this.load.html('instructions', 'content/intro.html', 256, 512); + * // and later in your game ... + * this.add.image(x, y, 'instructions'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * The width and height are the size of the texture to which the HTML will be rendered. It's not possible to determine these + * automatically, so you will need to provide them, either as arguments or in the file config object. + * When the HTML file has loaded a new SVG element is created with a size and viewbox set to the width and height given. + * The SVG file has a body tag added to it, with the HTML file contents included. It then calls `window.Blob` on the SVG, + * and if successful is added to the Texture Manager, otherwise it fails processing. The overall quality of the rendered + * HTML depends on your browser, and some of them may not even support the svg / blob process used. Be aware that there are + * limitations on what HTML can be inside an SVG. You can find out more details in this + * [Mozilla MDN entry](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas). + * + * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param width The width of the texture the HTML will be rendered to. Default 512. + * @param height The height of the texture the HTML will be rendered to. Default 512. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + html(key: string | Phaser.Loader.FileTypes.ImageFileConfig | Phaser.Loader.FileTypes.ImageFileConfig[], url?: string, width?: integer, height?: integer, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds an Image, or array of Images, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.image('logo', 'images/phaserLogo.png'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. + * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback + * of animated gifs to Canvas elements. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.image({ + * key: 'logo', + * url: 'images/AtariLogo.png' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.ImageFileConfig` for more details. + * + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: + * + * ```javascript + * this.load.image('logo', 'images/AtariLogo.png'); + * // and later in your game ... + * this.add.image(x, y, 'logo'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, + * then you can specify it by providing an array as the `url` where the second element is the normal map: + * + * ```javascript + * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); + * ``` + * + * Or, if you are using a config object use the `normalMap` property: + * + * ```javascript + * this.load.image({ + * key: 'logo', + * url: 'images/AtariLogo.png', + * normalMap: 'images/AtariLogo-n.png' + * }); + * ``` + * + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. + * + * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + image(key: string | Phaser.Loader.FileTypes.ImageFileConfig | Phaser.Loader.FileTypes.ImageFileConfig[], url?: string | string[], xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a JSON file, or array of JSON files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.json('wavedata', 'files/AlienWaveData.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the JSON Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.json({ + * key: 'wavedata', + * url: 'files/AlienWaveData.json' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.JSONFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.json('wavedata', 'files/AlienWaveData.json'); + * // and later in your game ... + * var data = this.cache.json.get('wavedata'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and + * this is what you would use to retrieve the text from the JSON Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" + * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, + * rather than the whole file. For example, if your JSON data had a structure like this: + * + * ```json + * { + * "level1": { + * "baddies": { + * "aliens": {}, + * "boss": {} + * } + * }, + * "level2": {}, + * "level3": {} + * } + * ``` + * + * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. + * + * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + json(key: string | Phaser.Loader.FileTypes.JSONFileConfig | Phaser.Loader.FileTypes.JSONFileConfig[], url?: string, dataKey?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.multiatlas('level1', 'images/Level1.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring + * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. + * + * Phaser expects the atlas data to be provided in a JSON file as exported from the application Texture Packer, + * version 4.6.3 or above, where you have made sure to use the Phaser 3 Export option. + * + * The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and + * extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps, + * Phaser will load those as well. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.multiatlas({ + * key: 'level1', + * atlasURL: 'images/Level1.json' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.MultiAtlasFileConfig` for more details. + * + * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead. + * + * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: + * + * ```javascript + * this.load.multiatlas('level1', 'images/Level1.json'); + * // and later in your game ... + * this.add.image(x, y, 'level1', 'background'); + * ``` + * + * To get a list of all available frames within an atlas please consult your Texture Atlas software. + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Multi Atlas File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param path Optional path to use when loading the textures defined in the atlas data. + * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. + */ + multiatlas(key: string | Phaser.Loader.FileTypes.MultiAtlasFileConfig | Phaser.Loader.FileTypes.MultiAtlasFileConfig[], atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a JSON File Pack, or array of packs, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.pack('level1', 'data/Level1Files.json'); + * } + * ``` + * + * A File Pack is a JSON file (or object) that contains details about other files that should be added into the Loader. + * Here is a small example: + * + * ```json + * { + * "test1": { + * "files": [ + * { + * "type": "image", + * "key": "taikodrummaster", + * "url": "assets/pics/taikodrummaster.jpg" + * }, + * { + * "type": "image", + * "key": "sukasuka-chtholly", + * "url": "assets/pics/sukasuka-chtholly.png" + * } + * ] + * }, + * "meta": { + * "generated": "1401380327373", + * "app": "Phaser 3 Asset Packer", + * "url": "https://phaser.io", + * "version": "1.0", + * "copyright": "Photon Storm Ltd. 2018" + * } + * } + * ``` + * + * The pack can be split into sections. In the example above you'll see a section called `test1. You can tell + * the `load.pack` method to parse only a particular section of a pack. The pack is stored in the JSON Cache, + * so you can pass it to the Loader to process additional sections as needed in your game, or you can just load + * them all at once without specifying anything. + * + * The pack file can contain an entry for any type of file that Phaser can load. The object structures exactly + * match that of the file type configs, and all properties available within the file type configs can be used + * in the pack file too. + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring + * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. + * + * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the JSON Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.pack({ + * key: 'level1', + * url: 'data/Level1Files.json' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.PackFileConfig` for more details. + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and + * this is what you would use to retrieve the text from the JSON Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" + * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, + * rather than the whole file. For example, if your JSON data had a structure like this: + * + * ```json + * { + * "level1": { + * "baddies": { + * "aliens": {}, + * "boss": {} + * } + * }, + * "level2": {}, + * "level3": {} + * } + * ``` + * + * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. + * + * Note: The ability to load this type of file will only be available if the Pack File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + pack(key: string | Phaser.Loader.FileTypes.PackFileConfig | Phaser.Loader.FileTypes.PackFileConfig[], url?: string, dataKey?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Plugin Script file, or array of plugin files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.plugin('modplayer', 'plugins/ModPlayer.js'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String and not already in-use by another file in the Loader. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.plugin({ + * key: 'modplayer', + * url: 'plugins/ModPlayer.js' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.PluginFileConfig` for more details. + * + * Once the file has finished loading it will automatically be converted into a script element + * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to + * false and then the resulting element will be appended to `document.head`. Any code then in the + * script will be executed. It will then be passed to the Phaser PluginCache.register method. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Plugin File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". Or, a plugin function. + * @param start The plugin mapping configuration object. + * @param mapping If this plugin is to be injected into the Scene, this is the property key used. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + plugin(key: string | Phaser.Loader.FileTypes.PluginFileConfig | Phaser.Loader.FileTypes.PluginFileConfig[], url?: string | Function, start?: boolean, mapping?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds an SVG File, or array of SVG Files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.svg('morty', 'images/Morty.svg'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.svg({ + * key: 'morty', + * url: 'images/Morty.svg' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.SVGFileConfig` for more details. + * + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: + * + * ```javascript + * this.load.svg('morty', 'images/Morty.svg'); + * // and later in your game ... + * this.add.image(x, y, 'morty'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + svg(key: string | Phaser.Loader.FileTypes.SVGFileConfig | Phaser.Loader.FileTypes.SVGFileConfig[], url?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Scene Plugin Script file, or array of plugin files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.scenePlugin('ModPlayer', 'plugins/ModPlayer.js', 'modPlayer', 'mods'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String and not already in-use by another file in the Loader. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.scenePlugin({ + * key: 'modplayer', + * url: 'plugins/ModPlayer.js' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.ScenePluginFileConfig` for more details. + * + * Once the file has finished loading it will automatically be converted into a script element + * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to + * false and then the resulting element will be appended to `document.head`. Any code then in the + * script will be executed. It will then be passed to the Phaser PluginCache.register method. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". Or, set to a plugin function. + * @param systemKey If this plugin is to be added to Scene.Systems, this is the property key for it. + * @param sceneKey If this plugin is to be added to the Scene, this is the property key for it. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + scenePlugin(key: string | Phaser.Loader.FileTypes.ScenePluginFileConfig | Phaser.Loader.FileTypes.ScenePluginFileConfig[], url?: string | Function, systemKey?: string, sceneKey?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Script file, or array of Script files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.script('aliens', 'lib/aliens.js'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String and not already in-use by another file in the Loader. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.script({ + * key: 'aliens', + * url: 'lib/aliens.js' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.ScriptFileConfig` for more details. + * + * Once the file has finished loading it will automatically be converted into a script element + * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to + * false and then the resulting element will be appended to `document.head`. Any code then in the + * script will be executed. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + script(key: string | Phaser.Loader.FileTypes.ScriptFileConfig | Phaser.Loader.FileTypes.ScriptFileConfig[], url?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Sprite Sheet Image, or array of Sprite Sheet Images, to the current load queue. + * + * The term 'Sprite Sheet' in Phaser means a fixed-size sheet. Where every frame in the sheet is the exact same size, + * and you reference those frames using numbers, not frame names. This is not the same thing as a Texture Atlas, where + * the frames are packed in a way where they take up the least amount of space, and are referenced by their names, + * not numbers. Some articles and software use the term 'Sprite Sheet' to mean Texture Atlas, so please be aware of + * what sort of file you're actually trying to load. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 }); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. + * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback + * of animated gifs to Canvas elements. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.spritesheet({ + * key: 'bot', + * url: 'images/robot.png', + * frameConfig: { + * frameWidth: 32, + * frameHeight: 38, + * startFrame: 0, + * endFrame: 8 + * } + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.SpriteSheetFileConfig` for more details. + * + * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: + * + * ```javascript + * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 }); + * // and later in your game ... + * this.add.image(x, y, 'bot', 0); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `PLAYER.` and the key was `Running` the final key will be `PLAYER.Running` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, + * then you can specify it by providing an array as the `url` where the second element is the normal map: + * + * ```javascript + * this.load.spritesheet('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ], { frameWidth: 256, frameHeight: 80 }); + * ``` + * + * Or, if you are using a config object use the `normalMap` property: + * + * ```javascript + * this.load.spritesheet({ + * key: 'logo', + * url: 'images/AtariLogo.png', + * normalMap: 'images/AtariLogo-n.png', + * frameConfig: { + * frameWidth: 256, + * frameHeight: 80 + * } + * }); + * ``` + * + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. + * + * Note: The ability to load this type of file will only be available if the Sprite Sheet File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param frameConfig The frame configuration object. At a minimum it should have a `frameWidth` property. + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + spritesheet(key: string | Phaser.Loader.FileTypes.SpriteSheetFileConfig | Phaser.Loader.FileTypes.SpriteSheetFileConfig[], url?: string, frameConfig?: Phaser.Loader.FileTypes.ImageFrameConfig, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Text file, or array of Text files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.text('story', files/IntroStory.txt'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Text Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Text Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.text({ + * key: 'story', + * url: 'files/IntroStory.txt' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.TextFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.image('story', 'files/IntroStory.txt'); + * // and later in your game ... + * var data = this.cache.text.get('story'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the text from the Text Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story" + * and no URL is given then the Loader will set the URL to be "story.txt". It will always add `.txt` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + text(key: string | Phaser.Loader.FileTypes.TextFileConfig | Phaser.Loader.FileTypes.TextFileConfig[], url?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a CSV Tilemap file, or array of CSV files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.tilemapCSV('level1', maps/Level1.csv'); + * } + * ``` + * + * Tilemap CSV data can be created in a text editor, or a 3rd party app that exports as CSV. + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Text Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.tilemapCSV({ + * key: 'level1', + * url: 'maps/Level1.csv' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.TilemapCSVFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.tilemapCSV('level1', 'maps/Level1.csv'); + * // and later in your game ... + * var map = this.make.tilemap({ key: 'level1' }); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the text from the Tilemap Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level" + * and no URL is given then the Loader will set the URL to be "level.csv". It will always add `.csv` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Tilemap CSV File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was "alien" then the URL will be "alien.csv". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + tilemapCSV(key: string | Phaser.Loader.FileTypes.TilemapCSVFileConfig | Phaser.Loader.FileTypes.TilemapCSVFileConfig[], url?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds an Impact.js Tilemap file, or array of map files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.tilemapImpact('level1', maps/Level1.json'); + * } + * ``` + * + * Impact Tilemap data is created the Impact.js Map Editor called Weltmeister. + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Text Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.tilemapImpact({ + * key: 'level1', + * url: 'maps/Level1.json' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.TilemapImpactFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.tilemapImpact('level1', 'maps/Level1.json'); + * // and later in your game ... + * var map = this.make.tilemap({ key: 'level1' }); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the text from the Tilemap Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level" + * and no URL is given then the Loader will set the URL to be "level.json". It will always add `.json` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Tilemap Impact File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + tilemapImpact(key: string | Phaser.Loader.FileTypes.TilemapImpactFileConfig | Phaser.Loader.FileTypes.TilemapImpactFileConfig[], url?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Tiled JSON Tilemap file, or array of map files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.tilemapTiledJSON('level1', maps/Level1.json'); + * } + * ``` + * + * The Tilemap data is created using the Tiled Map Editor and selecting JSON as the export format. + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Text Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.tilemapTiledJSON({ + * key: 'level1', + * url: 'maps/Level1.json' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.TilemapJSONFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.tilemapTiledJSON('level1', 'maps/Level1.json'); + * // and later in your game ... + * var map = this.make.tilemap({ key: 'level1' }); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the text from the Tilemap Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level" + * and no URL is given then the Loader will set the URL to be "level.json". It will always add `.json` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the Tilemap JSON File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + tilemapTiledJSON(key: string | Phaser.Loader.FileTypes.TilemapJSONFileConfig | Phaser.Loader.FileTypes.TilemapJSONFileConfig[], url?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.txt'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring + * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. + * + * Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity. + * + * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. + * + * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the Texture Manager. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the Texture Manager first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.unityAtlas({ + * key: 'mainmenu', + * textureURL: 'images/MainMenu.png', + * atlasURL: 'images/MainMenu.txt' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.UnityAtlasFileConfig` for more details. + * + * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: + * + * ```javascript + * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); + * // and later in your game ... + * this.add.image(x, y, 'mainmenu', 'background'); + * ``` + * + * To get a list of all available frames within an atlas please consult your Texture Atlas software. + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and + * this is what you would use to retrieve the image from the Texture Manager. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" + * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, + * then you can specify it by providing an array as the `url` where the second element is the normal map: + * + * ```javascript + * this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt'); + * ``` + * + * Or, if you are using a config object use the `normalMap` property: + * + * ```javascript + * this.load.unityAtlas({ + * key: 'mainmenu', + * textureURL: 'images/MainMenu.png', + * normalMap: 'images/MainMenu-n.png', + * atlasURL: 'images/MainMenu.txt' + * }); + * ``` + * + * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings. + * Normal maps are a WebGL only feature. + * + * Note: The ability to load this type of file will only be available if the Unity Atlas File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. + */ + unityAtlas(key: string | Phaser.Loader.FileTypes.UnityAtlasFileConfig | Phaser.Loader.FileTypes.UnityAtlasFileConfig[], textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: XHRSettingsObject, atlasXhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + /** + * Adds an XML file, or array of XML files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.xml('wavedata', 'files/AlienWaveData.xml'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global XML Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the XML Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the XML Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.xml({ + * key: 'wavedata', + * url: 'files/AlienWaveData.xml' + * }); + * ``` + * + * See the documentation for `Phaser.Loader.FileTypes.XMLFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.xml('wavedata', 'files/AlienWaveData.xml'); + * // and later in your game ... + * var data = this.cache.xml.get('wavedata'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and + * this is what you would use to retrieve the text from the XML Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" + * and no URL is given then the Loader will set the URL to be "data.xml". It will always add `.xml` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the XML File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * @param key The key to use for this file, or a file configuration object, or array of them. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + */ + xml(key: string | Phaser.Loader.FileTypes.XMLFileConfig | Phaser.Loader.FileTypes.XMLFileConfig[], url?: string, xhrSettings?: XHRSettingsObject): Phaser.Loader.LoaderPlugin; + + } + + /** + * Takes two XHRSettings Objects and creates a new XHRSettings object from them. + * + * The new object is seeded by the values given in the global settings, but any setting in + * the local object overrides the global ones. + * @param global The global XHRSettings object. + * @param local The local XHRSettings object. + */ + function MergeXHRSettings(global: XHRSettingsObject, local: XHRSettingsObject): XHRSettingsObject; + + /** + * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after + * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont. + * + * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods. + */ + class MultiFile { + /** + * + * @param loader The Loader that is going to load this File. + * @param type The file type string for sorting within the Loader. + * @param key The key of the file within the loader. + * @param files An array of Files that make-up this MultiFile. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, type: string, key: string, files: Phaser.Loader.File[]); + + /** + * A reference to the Loader that is going to load this file. + */ + loader: Phaser.Loader.LoaderPlugin; + + /** + * The file type string for sorting within the Loader. + */ + type: string; + + /** + * Unique cache key (unique within its file type) + */ + key: string; + + /** + * Array of files that make up this MultiFile. + */ + files: Phaser.Loader.File[]; + + /** + * The completion status of this MultiFile. + */ + complete: boolean; + + /** + * The number of files to load. + */ + pending: integer; + + /** + * The number of files that failed to load. + */ + failed: integer; + + /** + * A storage container for transient data that the loading files need. + */ + config: any; + + /** + * Checks if this MultiFile is ready to process its children or not. + */ + isReadyToProcess(): boolean; + + /** + * Adds another child to this MultiFile, increases the pending count and resets the completion status. + * @param files The File to add to this MultiFile. + */ + addToMultiFile(files: Phaser.Loader.File): Phaser.Loader.MultiFile; + + /** + * Called by each File when it finishes loading. + * @param file The File that has completed processing. + */ + onFileComplete(file: Phaser.Loader.File): void; + + /** + * Called by each File that fails to load. + * @param file The File that has failed to load. + */ + onFileFailed(file: Phaser.Loader.File): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + /** + * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings + * and starts the download of it. It uses the Files own XHRSettings and merges them + * with the global XHRSettings object to set the xhr values before download. + * @param file The File to download. + * @param globalXHRSettings The global XHRSettings object. + */ + function XHRLoader(file: Phaser.Loader.File, globalXHRSettings: XHRSettingsObject): XMLHttpRequest; + + /** + * Creates an XHRSettings Object with default values. + * @param responseType The responseType, such as 'text'. Default ''. + * @param async Should the XHR request use async or not? Default true. + * @param user Optional username for the XHR request. Default ''. + * @param password Optional password for the XHR request. Default ''. + * @param timeout Optional XHR timeout value. Default 0. + */ + function XHRSettings(responseType?: XMLHttpRequestResponseType, async?: boolean, user?: string, password?: string, timeout?: integer): XHRSettingsObject; + + /** + * The Loader is idle. + */ + var LOADER_IDLE: integer; + + /** + * The Loader is actively loading. + */ + var LOADER_LOADING: integer; + + /** + * The Loader is processing files is has loaded. + */ + var LOADER_PROCESSING: integer; + + /** + * The Loader has completed loading and processing. + */ + var LOADER_COMPLETE: integer; + + /** + * The Loader is shutting down. + */ + var LOADER_SHUTDOWN: integer; + + /** + * The Loader has been destroyed. + */ + var LOADER_DESTROYED: integer; + + /** + * File is in the load queue but not yet started + */ + var FILE_PENDING: integer; + + /** + * File has been started to load by the loader (onLoad called) + */ + var FILE_LOADING: integer; + + /** + * File has loaded successfully, awaiting processing + */ + var FILE_LOADED: integer; + + /** + * File failed to load + */ + var FILE_FAILED: integer; + + /** + * File is being processed (onProcess callback) + */ + var FILE_PROCESSING: integer; + + /** + * The File has errored somehow during processing. + */ + var FILE_ERRORED: integer; + + /** + * File has finished processing. + */ + var FILE_COMPLETE: integer; + + /** + * File has been destroyed + */ + var FILE_DESTROYED: integer; + + /** + * File was populated from local data and doesn't need an HTTP request + */ + var FILE_POPULATED: integer; + + namespace FileTypes { + /** + * A single Animation JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation. + */ + class AnimationJSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Called at the end of the load process, after the Loader has finished all files in its queue. + */ + onLoadComplete(): void; + + } + + type AtlasJSONFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the texture image file from. + */ + textureURL?: string; + /** + * The default file extension to use for the image texture if no url is provided. + */ + textureExtension?: string; + /** + * Extra XHR Settings specifically for the texture image file. + */ + textureXhrSettings?: XHRSettingsObject; + /** + * The filename of an associated normal map. It uses the same path and url to load as the texture image. + */ + normalMap?: string; + /** + * The absolute or relative URL to load the atlas json file from. Or a well formed JSON object to use instead. + */ + atlasURL?: string; + /** + * The default file extension to use for the atlas json if no url is provided. + */ + atlasExtension?: string; + /** + * Extra XHR Settings specifically for the atlas json file. + */ + atlasXhrSettings?: XHRSettingsObject; + }; + + /** + * A single JSON based Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas. + * + * https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm + */ + class AtlasJSONFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.AtlasJSONFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: XHRSettingsObject, atlasXhrSettings?: XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type AtlasXMLFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the texture image file from. + */ + textureURL?: string; + /** + * The default file extension to use for the image texture if no url is provided. + */ + textureExtension?: string; + /** + * Extra XHR Settings specifically for the texture image file. + */ + textureXhrSettings?: XHRSettingsObject; + /** + * The filename of an associated normal map. It uses the same path and url to load as the texture image. + */ + normalMap?: string; + /** + * The absolute or relative URL to load the atlas xml file from. + */ + atlasURL?: string; + /** + * The default file extension to use for the atlas xml if no url is provided. + */ + atlasExtension?: string; + /** + * Extra XHR Settings specifically for the atlas xml file. + */ + atlasXhrSettings?: XHRSettingsObject; + }; + + /** + * A single XML based Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML. + */ + class AtlasXMLFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.AtlasXMLFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: XHRSettingsObject, atlasXhrSettings?: XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type AudioFileConfig = { + /** + * The key of the file. Must be unique within the Loader and Audio Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + urlConfig?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + /** + * The AudioContext this file will use to process itself. + */ + audioContext?: AudioContext; + }; + + /** + * A single Audio File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. + */ + class AudioFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param urlConfig The absolute or relative URL to load this file from in a config object. + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param audioContext The AudioContext this file will use to process itself. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.AudioFileConfig, urlConfig?: any, xhrSettings?: XHRSettingsObject, audioContext?: AudioContext); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + type AudioSpriteFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Audio Cache. + */ + key: string; + /** + * The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead. + */ + jsonURL: string; + /** + * Extra XHR Settings specifically for the json file. + */ + jsonXhrSettings?: XHRSettingsObject; + /** + * The absolute or relative URL to load the audio file from. + */ + audioURL?: string; + /** + * The audio configuration options. + */ + audioConfig?: any; + /** + * Extra XHR Settings specifically for the audio file. + */ + audioXhrSettings?: XHRSettingsObject; + }; + + /** + * An Audio Sprite File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite. + */ + class AudioSpriteFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param jsonURL The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead. + * @param audioURL The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file. + * @param audioConfig The audio configuration options. + * @param audioXhrSettings An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. + * @param jsonXhrSettings An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.AudioSpriteFileConfig, jsonURL: string, audioURL?: string, audioConfig?: any, audioXhrSettings?: XHRSettingsObject, jsonXhrSettings?: XHRSettingsObject); + + } + + type BinaryFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Binary Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + /** + * Optional type to cast the binary file to once loaded. For example, `Uint8Array`. + */ + dataType?: any; + }; + + /** + * A single Binary File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary. + */ + class BinaryFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataType Optional type to cast the binary file to once loaded. For example, `Uint8Array`. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.BinaryFileConfig, url?: string, xhrSettings?: XHRSettingsObject, dataType?: any); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + type BitmapFontFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the texture image file from. + */ + textureURL?: string; + /** + * The default file extension to use for the image texture if no url is provided. + */ + textureExtension?: string; + /** + * Extra XHR Settings specifically for the texture image file. + */ + textureXhrSettings?: XHRSettingsObject; + /** + * The filename of an associated normal map. It uses the same path and url to load as the texture image. + */ + normalMap?: string; + /** + * The absolute or relative URL to load the font data xml file from. + */ + fontDataURL?: string; + /** + * The default file extension to use for the font data xml if no url is provided. + */ + fontDataExtension?: string; + /** + * Extra XHR Settings specifically for the font data xml file. + */ + fontDataXhrSettings?: XHRSettingsObject; + }; + + /** + * A single Bitmap Font based File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont. + */ + class BitmapFontFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param fontDataURL The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param textureXhrSettings An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. + * @param fontDataXhrSettings An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.BitmapFontFileConfig, textureURL?: string | string[], fontDataURL?: string, textureXhrSettings?: XHRSettingsObject, fontDataXhrSettings?: XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type GLSLFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Text Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single GLSL File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl. + */ + class GLSLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.TextFileConfig, url?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + /** + * A single Audio File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio. + */ + class HTML5AudioFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param urlConfig The absolute or relative URL to load this file from. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.AudioFileConfig, urlConfig?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called when the file finishes loading. + */ + onLoad(): void; + + /** + * Called if the file errors while loading. + */ + onError(): void; + + /** + * Called during the file load progress. Is sent a DOM ProgressEvent. + */ + onProgress(): void; + + /** + * Called by the Loader, starts the actual file downloading. + * During the load the methods onLoad, onError and onProgress are called, based on the XHR events. + * You shouldn't normally call this method directly, it's meant to be invoked by the Loader. + */ + load(): void; + + } + + type HTMLFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + /** + * The width of the texture the HTML will be rendered to. + */ + width?: integer; + /** + * The height of the texture the HTML will be rendered to. + */ + height?: integer; + }; + + /** + * A single HTML File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html. + */ + class HTMLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param width The width of the texture the HTML will be rendered to. + * @param height The height of the texture the HTML will be rendered to. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.HTMLFileConfig, url?: string, width?: integer, height?: integer, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type ImageFrameConfig = { + /** + * The width of the frame in pixels. + */ + frameWidth: integer; + /** + * The height of the frame in pixels. Uses the `frameWidth` value if not provided. + */ + frameHeight?: integer; + /** + * The first frame to start parsing from. + */ + startFrame?: integer; + /** + * The frame to stop parsing at. If not provided it will calculate the value based on the image and frame dimensions. + */ + endFrame?: integer; + /** + * The margin in the image. This is the space around the edge of the frames. + */ + margin?: integer; + /** + * The spacing between each frame in the image. + */ + spacing?: integer; + }; + + type ImageFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * The filename of an associated normal map. It uses the same path and url to load as the image. + */ + normalMap?: string; + /** + * The frame configuration object. Only provided for, and used by, Sprite Sheets. + */ + frameConfig?: Phaser.Loader.FileTypes.ImageFrameConfig; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Image File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. + */ + class ImageFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param frameConfig The frame configuration object. Only provided for, and used by, Sprite Sheets. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.ImageFileConfig, url?: string | string[], xhrSettings?: XHRSettingsObject, frameConfig?: Phaser.Loader.FileTypes.ImageFrameConfig); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type JSONFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the JSON Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache. + */ + url?: string | any; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. + */ + dataKey?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. + */ + class JSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + type MultiAtlasFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the multi atlas json file from. Or, a well formed JSON object. + */ + atlasURL?: string; + /** + * The default file extension to use for the atlas json if no url is provided. + */ + atlasExtension?: string; + /** + * Extra XHR Settings specifically for the atlas json file. + */ + atlasXhrSettings?: XHRSettingsObject; + /** + * Optional path to use when loading the textures defined in the atlas data. + */ + path?: string; + /** + * Optional Base URL to use when loading the textures defined in the atlas data. + */ + baseURL?: string; + /** + * Extra XHR Settings specifically for the texture files. + */ + textureXhrSettings?: XHRSettingsObject; + }; + + /** + * A single Multi Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas. + */ + class MultiAtlasFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. + * @param atlasURL The absolute or relative URL to load the multi atlas json file from. + * @param path Optional path to use when loading the textures defined in the atlas data. + * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data. + * @param atlasXhrSettings Extra XHR Settings specifically for the atlas json file. + * @param textureXhrSettings Extra XHR Settings specifically for the texture files. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: XHRSettingsObject, textureXhrSettings?: XHRSettingsObject); + + } + + type PackFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the JSON Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly processed. + */ + url?: string | any; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * If specified instead of the whole JSON file being parsed, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. + */ + dataKey?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single JSON Pack File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack. + */ + class PackFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + * @param dataKey When the JSON file loads only this property will be stored in the Cache. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: XHRSettingsObject, dataKey?: string); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + type PluginFileConfig = { + /** + * The key of the file. Must be unique within the Loader. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Automatically start the plugin after loading? + */ + start?: boolean; + /** + * If this plugin is to be injected into the Scene, this is the property key used. + */ + mapping?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Plugin Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin. + */ + class PluginFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param start Automatically start the plugin after loading? Default false. + * @param mapping If this plugin is to be injected into the Scene, this is the property key used. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.PluginFileConfig, url?: string, start?: boolean, mapping?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + type SVGFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single SVG File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg. + */ + class SVGFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.SVGFileConfig, url?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type ScenePluginFileConfig = { + /** + * The key of the file. Must be unique within the Loader. + */ + key: string; + /** + * The absolute or relative URL to load the file from. Or, a Scene Plugin. + */ + url?: string | Function; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * If this plugin is to be added to Scene.Systems, this is the property key for it. + */ + systemKey?: string; + /** + * If this plugin is to be added to the Scene, this is the property key for it. + */ + sceneKey?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Scene Plugin Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin. + */ + class ScenePluginFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param systemKey If this plugin is to be added to Scene.Systems, this is the property key for it. + * @param sceneKey If this plugin is to be added to the Scene, this is the property key for it. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.ScenePluginFileConfig, url?: string, systemKey?: string, sceneKey?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + type ScriptFileConfig = { + /** + * The key of the file. Must be unique within the Loader. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Script File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script. + */ + class ScriptFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was "alien" then the URL will be "alien.js". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.ScriptFileConfig, url?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + type SpriteSheetFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * The filename of an associated normal map. It uses the same path and url to load as the image. + */ + normalMap?: string; + /** + * The frame configuration object. + */ + frameConfig?: Phaser.Loader.FileTypes.ImageFrameConfig; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Sprite Sheet Image File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet. + */ + class SpriteSheetFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param frameConfig The frame configuration object. + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.SpriteSheetFileConfig, url?: string | string[], frameConfig?: Phaser.Loader.FileTypes.ImageFrameConfig, xhrSettings?: XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type TextFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Text Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Text File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text. + */ + class TextFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.TextFileConfig, url?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + type TilemapCSVFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Tilemap Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Tilemap CSV File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV. + */ + class TilemapCSVFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was "alien" then the URL will be "alien.csv". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.TilemapCSVFileConfig, url?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type TilemapImpactFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Tilemap Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Impact.js Tilemap JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact. + */ + class TilemapImpactFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.TilemapImpactFileConfig, url?: string, xhrSettings?: XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type TilemapJSONFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Tilemap Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single Tiled Tilemap JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON. + */ + class TilemapJSONFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.TilemapJSONFileConfig, url?: string, xhrSettings?: XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type UnityAtlasFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Texture Manager. + */ + key: string; + /** + * The absolute or relative URL to load the texture image file from. + */ + textureURL?: string; + /** + * The default file extension to use for the image texture if no url is provided. + */ + textureExtension?: string; + /** + * Extra XHR Settings specifically for the texture image file. + */ + textureXhrSettings?: XHRSettingsObject; + /** + * The filename of an associated normal map. It uses the same path and url to load as the texture image. + */ + normalMap?: string; + /** + * The absolute or relative URL to load the atlas data file from. + */ + atlasURL?: string; + /** + * The default file extension to use for the atlas data if no url is provided. + */ + atlasExtension?: string; + /** + * Extra XHR Settings specifically for the atlas data file. + */ + atlasXhrSettings?: XHRSettingsObject; + }; + + /** + * A single text file based Unity Texture Atlas File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas. + */ + class UnityAtlasFile extends Phaser.Loader.MultiFile { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". + * @param atlasURL The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. + * @param atlasXhrSettings An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.UnityAtlasFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: XHRSettingsObject, atlasXhrSettings?: XHRSettingsObject); + + /** + * Adds this file to its target cache upon successful loading and processing. + */ + addToCache(): void; + + } + + type XMLFileConfig = { + /** + * The key of the file. Must be unique within both the Loader and the Text Cache. + */ + key: string; + /** + * The absolute or relative URL to load the file from. + */ + url?: string; + /** + * The default file extension to use if no url is provided. + */ + extension?: string; + /** + * Extra XHR Settings specifically for this file. + */ + xhrSettings?: XHRSettingsObject; + }; + + /** + * A single XML File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml. + */ + class XMLFile extends Phaser.Loader.File { + /** + * + * @param loader A reference to the Loader that is responsible for this file. + * @param key The key to use for this file, or a file configuration object. + * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". + * @param xhrSettings Extra XHR Settings specifically for this file. + */ + constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Loader.FileTypes.XMLFileConfig, url?: string, xhrSettings?: XHRSettingsObject); + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + */ + onProcess(): void; + + } + + } + + } + + namespace Math { + /** + * Calculate the mean average of the given values. + * @param values The values to average. + */ + function Average(values: number[]): number; + + /** + * [description] + * @param n [description] + * @param i [description] + */ + function Bernstein(n: number, i: number): number; + + /** + * Compute a random integer between the `min` and `max` values, inclusive. + * @param min The minimum value. + * @param max The maximum value. + */ + function Between(min: integer, max: integer): integer; + + /** + * Calculates a Catmull-Rom value. + * @param t [description] + * @param p0 [description] + * @param p1 [description] + * @param p2 [description] + * @param p3 [description] + */ + function CatmullRom(t: number, p0: number, p1: number, p2: number, p3: number): number; + + /** + * Ceils to some place comparative to a `base`, default is 10 for decimal place. + * + * The `place` is represented by the power applied to `base` to get that place. + * @param value The value to round. + * @param place The place to round to. Default 0. + * @param base The base to round in. Default is 10 for decimal. Default 10. + */ + function CeilTo(value: number, place?: number, base?: integer): number; + + /** + * Force a value within the boundaries by clamping it to the range `min`, `max`. + * @param value The value to be clamped. + * @param min The minimum bounds. + * @param max The maximum bounds. + */ + function Clamp(value: number, min: number, max: number): number; + + /** + * Convert the given angle from degrees, to the equivalent angle in radians. + * @param degrees The angle (in degrees) to convert to radians. + */ + function DegToRad(degrees: integer): number; + + /** + * Calculates the positive difference of two given numbers. + * @param a The first number in the calculation. + * @param b The second number in the calculation. + */ + function Difference(a: number, b: number): number; + + /** + * Calculates the factorial of a given number for integer values greater than 0. + * @param value A positive integer to calculate the factorial of. + */ + function Factorial(value: number): number; + + /** + * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. + * @param min The lower bound for the float, inclusive. + * @param max The upper bound for the float exclusive. + */ + function FloatBetween(min: number, max: number): number; + + /** + * Floors to some place comparative to a `base`, default is 10 for decimal place. + * + * The `place` is represented by the power applied to `base` to get that place. + * @param value The value to round. + * @param place The place to round to. Default 0. + * @param base The base to round in. Default is 10 for decimal. Default 10. + */ + function FloorTo(value: number, place?: integer, base?: integer): number; + + /** + * Return a value based on the range between `min` and `max` and the percentage given. + * @param percent A value between 0 and 1 representing the percentage. + * @param min The minimum value. + * @param max The maximum value. + */ + function FromPercent(percent: number, min: number, max?: number): number; + + /** + * Calculate the speed required to cover a distance in the time given. + * @param distance The distance to travel in pixels. + * @param time The time, in ms, to cover the distance in. + */ + function GetSpeed(distance: number, time: integer): number; + + /** + * Check if a given value is an even number. + * @param value The number to perform the check with. + */ + function IsEven(value: number): boolean; + + /** + * Check if a given value is an even number using a strict type check. + * @param value The number to perform the check with. + */ + function IsEvenStrict(value: number): boolean; + + /** + * Calculates a linear (interpolation) value over t. + * @param p0 The first point. + * @param p1 The second point. + * @param t The percentage between p0 and p1 to return, represented as a number between 0 and 1. + */ + function Linear(p0: number, p1: number, t: number): number; + + /** + * A three-dimensional matrix. + * + * Defaults to the identity matrix when instantiated. + */ + class Matrix3 { + /** + * + * @param m Optional Matrix3 to copy values from. + */ + constructor(m?: Phaser.Math.Matrix3); + + /** + * The matrix values. + */ + val: Float32Array; + + /** + * Make a clone of this Matrix3. + */ + clone(): Phaser.Math.Matrix3; + + /** + * This method is an alias for `Matrix3.copy`. + * @param src The Matrix to set the values of this Matrix's from. + */ + set(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3; + + /** + * Copy the values of a given Matrix into this Matrix. + * @param src The Matrix to copy the values from. + */ + copy(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3; + + /** + * Copy the values of a given Matrix4 into this Matrix3. + * @param m The Matrix4 to copy the values from. + */ + fromMat4(m: Phaser.Math.Matrix4): Phaser.Math.Matrix3; + + /** + * Set the values of this Matrix from the given array. + * @param a The array to copy the values from. + */ + fromArray(a: any[]): Phaser.Math.Matrix3; + + /** + * Reset this Matrix to an identity (default) matrix. + */ + identity(): Phaser.Math.Matrix3; + + /** + * Transpose this Matrix. + */ + transpose(): Phaser.Math.Matrix3; + + /** + * Invert this Matrix. + */ + invert(): Phaser.Math.Matrix3; + + /** + * Calculate the adjoint, or adjugate, of this Matrix. + */ + adjoint(): Phaser.Math.Matrix3; + + /** + * Calculate the determinant of this Matrix. + */ + determinant(): number; + + /** + * Multiply this Matrix by the given Matrix. + * @param src The Matrix to multiply this Matrix by. + */ + multiply(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3; + + /** + * Translate this Matrix using the given Vector. + * @param v The Vector to translate this Matrix with. + */ + translate(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Matrix3; + + /** + * Apply a rotation transformation to this Matrix. + * @param rad The angle in radians to rotate by. + */ + rotate(rad: number): Phaser.Math.Matrix3; + + /** + * Apply a scale transformation to this Matrix. + * + * Uses the `x` and `y` components of the given Vector to scale the Matrix. + * @param v The Vector to scale this Matrix with. + */ + scale(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Matrix3; + + /** + * Set the values of this Matrix from the given Quaternion. + * @param q The Quaternion to set the values of this Matrix from. + */ + fromQuat(q: Phaser.Math.Quaternion): Phaser.Math.Matrix3; + + /** + * [description] + * @param m [description] + */ + normalFromMat4(m: Phaser.Math.Matrix4): Phaser.Math.Matrix3; + + } + + /** + * A four-dimensional matrix. + */ + class Matrix4 { + /** + * + * @param m Optional Matrix4 to copy values from. + */ + constructor(m?: Phaser.Math.Matrix4); + + /** + * The matrix values. + */ + val: Float32Array; + + /** + * Make a clone of this Matrix4. + */ + clone(): Phaser.Math.Matrix4; + + /** + * This method is an alias for `Matrix4.copy`. + * @param src The Matrix to set the values of this Matrix's from. + */ + set(src: Phaser.Math.Matrix4): Phaser.Math.Matrix4; + + /** + * Copy the values of a given Matrix into this Matrix. + * @param src The Matrix to copy the values from. + */ + copy(src: Phaser.Math.Matrix4): Phaser.Math.Matrix4; + + /** + * Set the values of this Matrix from the given array. + * @param a The array to copy the values from. + */ + fromArray(a: any[]): Phaser.Math.Matrix4; + + /** + * Reset this Matrix. + * + * Sets all values to `0`. + */ + zero(): Phaser.Math.Matrix4; + + /** + * Set the `x`, `y` and `z` values of this Matrix. + * @param x The x value. + * @param y The y value. + * @param z The z value. + */ + xyz(x: number, y: number, z: number): Phaser.Math.Matrix4; + + /** + * Set the scaling values of this Matrix. + * @param x The x scaling value. + * @param y The y scaling value. + * @param z The z scaling value. + */ + scaling(x: number, y: number, z: number): Phaser.Math.Matrix4; + + /** + * Reset this Matrix to an identity (default) matrix. + */ + identity(): Phaser.Math.Matrix4; + + /** + * Transpose this Matrix. + */ + transpose(): Phaser.Math.Matrix4; + + /** + * Invert this Matrix. + */ + invert(): Phaser.Math.Matrix4; + + /** + * Calculate the adjoint, or adjugate, of this Matrix. + */ + adjoint(): Phaser.Math.Matrix4; + + /** + * Calculate the determinant of this Matrix. + */ + determinant(): number; + + /** + * Multiply this Matrix by the given Matrix. + * @param src The Matrix to multiply this Matrix by. + */ + multiply(src: Phaser.Math.Matrix4): Phaser.Math.Matrix4; + + /** + * [description] + * @param src [description] + */ + multiplyLocal(src: Phaser.Math.Matrix4): Phaser.Math.Matrix4; + + /** + * Translate this Matrix using the given Vector. + * @param v The Vector to translate this Matrix with. + */ + translate(v: Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Matrix4; + + /** + * Apply a scale transformation to this Matrix. + * + * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix. + * @param v The Vector to scale this Matrix with. + */ + scale(v: Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Matrix4; + + /** + * Derive a rotation matrix around the given axis. + * @param axis The rotation axis. + * @param angle The rotation angle in radians. + */ + makeRotationAxis(axis: Phaser.Math.Vector3 | Phaser.Math.Vector4, angle: number): Phaser.Math.Matrix4; + + /** + * Apply a rotation transformation to this Matrix. + * @param rad The angle in radians to rotate by. + * @param axis The axis to rotate upon. + */ + rotate(rad: number, axis: Phaser.Math.Vector3): Phaser.Math.Matrix4; + + /** + * Rotate this matrix on its X axis. + * @param rad The angle in radians to rotate by. + */ + rotateX(rad: number): Phaser.Math.Matrix4; + + /** + * Rotate this matrix on its Y axis. + * @param rad The angle to rotate by, in radians. + */ + rotateY(rad: number): Phaser.Math.Matrix4; + + /** + * Rotate this matrix on its Z axis. + * @param rad The angle to rotate by, in radians. + */ + rotateZ(rad: number): Phaser.Math.Matrix4; + + /** + * Set the values of this Matrix from the given rotation Quaternion and translation Vector. + * @param q The Quaternion to set rotation from. + * @param v The Vector to set translation from. + */ + fromRotationTranslation(q: Phaser.Math.Quaternion, v: Phaser.Math.Vector3): Phaser.Math.Matrix4; + + /** + * Set the values of this Matrix from the given Quaternion. + * @param q The Quaternion to set the values of this Matrix from. + */ + fromQuat(q: Phaser.Math.Quaternion): Phaser.Math.Matrix4; + + /** + * Generate a frustum matrix with the given bounds. + * @param left The left bound of the frustum. + * @param right The right bound of the frustum. + * @param bottom The bottom bound of the frustum. + * @param top The top bound of the frustum. + * @param near The near bound of the frustum. + * @param far The far bound of the frustum. + */ + frustum(left: number, right: number, bottom: number, top: number, near: number, far: number): Phaser.Math.Matrix4; + + /** + * Generate a perspective projection matrix with the given bounds. + * @param fovy Vertical field of view in radians + * @param aspect Aspect ratio. Typically viewport width /height. + * @param near Near bound of the frustum. + * @param far Far bound of the frustum. + */ + perspective(fovy: number, aspect: number, near: number, far: number): Phaser.Math.Matrix4; + + /** + * Generate a perspective projection matrix with the given bounds. + * @param width The width of the frustum. + * @param height The height of the frustum. + * @param near Near bound of the frustum. + * @param far Far bound of the frustum. + */ + perspectiveLH(width: number, height: number, near: number, far: number): Phaser.Math.Matrix4; + + /** + * Generate an orthogonal projection matrix with the given bounds. + * @param left The left bound of the frustum. + * @param right The right bound of the frustum. + * @param bottom The bottom bound of the frustum. + * @param top The top bound of the frustum. + * @param near The near bound of the frustum. + * @param far The far bound of the frustum. + */ + ortho(left: number, right: number, bottom: number, top: number, near: number, far: number): Phaser.Math.Matrix4; + + /** + * Generate a look-at matrix with the given eye position, focal point, and up axis. + * @param eye Position of the viewer + * @param center Point the viewer is looking at + * @param up vec3 pointing up. + */ + lookAt(eye: Phaser.Math.Vector3, center: Phaser.Math.Vector3, up: Phaser.Math.Vector3): Phaser.Math.Matrix4; + + /** + * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values. + * @param yaw [description] + * @param pitch [description] + * @param roll [description] + */ + yawPitchRoll(yaw: number, pitch: number, roll: number): Phaser.Math.Matrix4; + + /** + * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix. + * @param rotation The rotation of the world matrix. + * @param position The position of the world matrix. + * @param scale The scale of the world matrix. + * @param viewMatrix The view matrix. + * @param projectionMatrix The projection matrix. + */ + setWorldMatrix(rotation: Phaser.Math.Vector3, position: Phaser.Math.Vector3, scale: Phaser.Math.Vector3, viewMatrix?: Phaser.Math.Matrix4, projectionMatrix?: Phaser.Math.Matrix4): Phaser.Math.Matrix4; + + } + + /** + * Add an `amount` to a `value`, limiting the maximum result to `max`. + * @param value The value to add to. + * @param amount The amount to add. + * @param max The maximum value to return. + */ + function MaxAdd(value: number, amount: number, max: number): number; + + /** + * Subtract an `amount` from `value`, limiting the minimum result to `min`. + * @param value The value to subtract from. + * @param amount The amount to subtract. + * @param min The minimum value to return. + */ + function MinSub(value: number, amount: number, min: number): number; + + /** + * Work out what percentage `value` is of the range between `min` and `max`. + * If `max` isn't given then it will return the percentage of `value` to `min`. + * + * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again. + * @param value The value to determine the percentage of. + * @param min The minimum value. + * @param max The maximum value. + * @param upperMax The mid-way point in the range that represents 100%. + */ + function Percent(value: number, min: number, max?: number, upperMax?: number): number; + + /** + * A quaternion. + */ + class Quaternion { + /** + * + * @param x The x component. + * @param y The y component. + * @param z The z component. + * @param w The w component. + */ + constructor(x?: number, y?: number, z?: number, w?: number); + + /** + * The x component of this Quaternion. + */ + x: number; + + /** + * The y component of this Quaternion. + */ + y: number; + + /** + * The z component of this Quaternion. + */ + z: number; + + /** + * The w component of this Quaternion. + */ + w: number; + + /** + * Copy the components of a given Quaternion or Vector into this Quaternion. + * @param src The Quaternion or Vector to copy the components from. + */ + copy(src: Phaser.Math.Quaternion | Phaser.Math.Vector4): Phaser.Math.Quaternion; + + /** + * Set the components of this Quaternion. + * @param x The x component, or an object containing x, y, z, and w components. Default 0. + * @param y The y component. Default 0. + * @param z The z component. Default 0. + * @param w The w component. Default 0. + */ + set(x?: number | object, y?: number, z?: number, w?: number): Phaser.Math.Quaternion; + + /** + * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise. + * @param v The Quaternion or Vector to add to this Quaternion. + */ + add(v: Phaser.Math.Quaternion | Phaser.Math.Vector4): Phaser.Math.Quaternion; + + /** + * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise. + * @param v The Quaternion or Vector to subtract from this Quaternion. + */ + subtract(v: Phaser.Math.Quaternion | Phaser.Math.Vector4): Phaser.Math.Quaternion; + + /** + * Scale this Quaternion by the given value. + * @param scale The value to scale this Quaternion by. + */ + scale(scale: number): Phaser.Math.Quaternion; + + /** + * Calculate the length of this Quaternion. + */ + length(): number; + + /** + * Calculate the length of this Quaternion squared. + */ + lengthSq(): number; + + /** + * Normalize this Quaternion. + */ + normalize(): Phaser.Math.Quaternion; + + /** + * Calculate the dot product of this Quaternion and the given Quaternion or Vector. + * @param v The Quaternion or Vector to dot product with this Quaternion. + */ + dot(v: Phaser.Math.Quaternion | Phaser.Math.Vector4): number; + + /** + * Linearly interpolate this Quaternion towards the given Quaternion or Vector. + * @param v The Quaternion or Vector to interpolate towards. + * @param t The percentage of interpolation. Default 0. + */ + lerp(v: Phaser.Math.Quaternion | Phaser.Math.Vector4, t?: number): Phaser.Math.Quaternion; + + /** + * [description] + * @param a [description] + * @param b [description] + */ + rotationTo(a: Phaser.Math.Vector3, b: Phaser.Math.Vector3): Phaser.Math.Quaternion; + + /** + * Set the axes of this Quaternion. + * @param view The view axis. + * @param right The right axis. + * @param up The upwards axis. + */ + setAxes(view: Phaser.Math.Vector3, right: Phaser.Math.Vector3, up: Phaser.Math.Vector3): Phaser.Math.Quaternion; + + /** + * Reset this Matrix to an identity (default) Quaternion. + */ + identity(): Phaser.Math.Quaternion; + + /** + * Set the axis angle of this Quaternion. + * @param axis The axis. + * @param rad The angle in radians. + */ + setAxisAngle(axis: Phaser.Math.Vector3, rad: number): Phaser.Math.Quaternion; + + /** + * Multiply this Quaternion by the given Quaternion or Vector. + * @param b The Quaternion or Vector to multiply this Quaternion by. + */ + multiply(b: Phaser.Math.Quaternion | Phaser.Math.Vector4): Phaser.Math.Quaternion; + + /** + * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector. + * @param b The Quaternion or Vector to interpolate towards. + * @param t The percentage of interpolation. + */ + slerp(b: Phaser.Math.Quaternion | Phaser.Math.Vector4, t: number): Phaser.Math.Quaternion; + + /** + * Invert this Quaternion. + */ + invert(): Phaser.Math.Quaternion; + + /** + * Convert this Quaternion into its conjugate. + * + * Sets the x, y and z components. + */ + conjugate(): Phaser.Math.Quaternion; + + /** + * Rotate this Quaternion on the X axis. + * @param rad The rotation angle in radians. + */ + rotateX(rad: number): Phaser.Math.Quaternion; + + /** + * Rotate this Quaternion on the Y axis. + * @param rad The rotation angle in radians. + */ + rotateY(rad: number): Phaser.Math.Quaternion; + + /** + * Rotate this Quaternion on the Z axis. + * @param rad The rotation angle in radians. + */ + rotateZ(rad: number): Phaser.Math.Quaternion; + + /** + * Create a unit (or rotation) Quaternion from its x, y, and z components. + * + * Sets the w component. + */ + calculateW(): Phaser.Math.Quaternion; + + /** + * Convert the given Matrix into this Quaternion. + * @param mat The Matrix to convert from. + */ + fromMat3(mat: Phaser.Math.Matrix3): Phaser.Math.Quaternion; + + } + + /** + * Convert the given angle in radians, to the equivalent angle in degrees. + * @param radians The angle in radians to convert ot degrees. + */ + function RadToDeg(radians: number): integer; + + /** + * Compute a random unit vector. + * + * Computes random values for the given vector between -1 and 1 that can be used to represent a direction. + * + * Optionally accepts a scale value to scale the resulting vector by. + * @param vector The Vector to compute random values for. + * @param scale The scale of the random values. Default 1. + */ + function RandomXY(vector: Phaser.Math.Vector2, scale?: number): Phaser.Math.Vector2; + + /** + * Compute a random position vector in a spherical area, optionally defined by the given radius. + * @param vec3 The Vector to compute random values for. + * @param radius The radius. Default 1. + */ + function RandomXYZ(vec3: Phaser.Math.Vector3, radius?: number): Phaser.Math.Vector3; + + /** + * Compute a random four-dimensional vector. + * @param vec4 The Vector to compute random values for. + * @param scale The scale of the random values. Default 1. + */ + function RandomXYZW(vec4: Phaser.Math.Vector4, scale?: number): Phaser.Math.Vector4; + + /** + * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction. + * @param point The point to be rotated. + * @param angle The angle to be rotated by in an anticlockwise direction. + */ + function Rotate(point: Phaser.Geom.Point | object, angle: number): Phaser.Geom.Point; + + /** + * Rotate a `point` around `x` and `y` by the given `angle`. + * @param point The point to be rotated. + * @param x The horizontal coordinate to rotate around. + * @param y The vertical coordinate to rotate around. + * @param angle The angle of rotation in radians. + */ + function RotateAround(point: Phaser.Geom.Point | object, x: number, y: number, angle: number): Phaser.Geom.Point; + + /** + * [description] + * @param point The point to be rotated. + * @param x The horizontal coordinate to rotate around. + * @param y The vertical coordinate to rotate around. + * @param angle The angle of rotation in radians. + * @param distance [description] + */ + function RotateAroundDistance(point: Phaser.Geom.Point | object, x: number, y: number, angle: number, distance: number): Phaser.Geom.Point; + + /** + * Rotates a vector in place by axis angle. + * + * This is the same as transforming a point by an + * axis-angle quaternion, but it has higher precision. + * @param vec The vector to be rotated. + * @param axis The axis to rotate around. + * @param radians The angle of rotation in radians. + */ + function RotateVec3(vec: Phaser.Math.Vector3, axis: Phaser.Math.Vector3, radians: number): Phaser.Math.Vector3; + + /** + * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down. + * @param value The number to round. + */ + function RoundAwayFromZero(value: number): number; + + /** + * Round a value to a given decimal place. + * @param value The value to round. + * @param place The place to round to. Default 0. + * @param base The base to round in. Default is 10 for decimal. Default 10. + */ + function RoundTo(value: number, place?: integer, base?: integer): number; + + /** + * Generate a series of sine and cosine values. + * @param length The number of values to generate. + * @param sinAmp The sine value amplitude. Default 1. + * @param cosAmp The cosine value amplitude. Default 1. + * @param frequency The frequency of the values. Default 1. + */ + function SinCosTableGenerator(length: number, sinAmp?: number, cosAmp?: number, frequency?: number): SinCosTable; + + /** + * Calculate a smooth interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * @param x The input value. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmoothStep(x: number, min: number, max: number): number; + + /** + * Calculate a smoother interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * + * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}. + * @param x The input value. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmootherStep(x: number, min: number, max: number): number; + + /** + * Takes the `x` and `y` coordinates and transforms them into the same space as + * defined by the position, rotation and scale values. + * @param x The x coordinate to be transformed. + * @param y The y coordinate to be transformed. + * @param positionX Horizontal position of the transform point. + * @param positionY Vertical position of the transform point. + * @param rotation Rotation of the transform point, in radians. + * @param scaleX Horizontal scale of the transform point. + * @param scaleY Vertical scale of the transform point. + * @param output The output vector, point or object for the translated coordinates. + */ + function TransformXY(x: number, y: number, positionX: number, positionY: number, rotation: number, scaleX: number, scaleY: number, output?: Phaser.Math.Vector2 | Phaser.Geom.Point | object): Phaser.Math.Vector2 | Phaser.Geom.Point | object; + + /** + * A representation of a vector in 2D space. + * + * A two-component vector. + */ + class Vector2 { + /** + * + * @param x The x component. + * @param y The y component. + */ + constructor(x?: number, y?: number); + + /** + * The x component of this Vector. + */ + x: number; + + /** + * The y component of this Vector. + */ + y: number; + + /** + * Make a clone of this Vector2. + */ + clone(): Phaser.Math.Vector2; + + /** + * Copy the components of a given Vector into this Vector. + * @param src The Vector to copy the components from. + */ + copy(src: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * Set the component values of this Vector from a given Vector2Like object. + * @param obj The object containing the component values to set for this Vector. + */ + setFromObject(obj: Vector2Like): Phaser.Math.Vector2; + + /** + * Set the `x` and `y` components of the this Vector to the given `x` and `y` values. + * @param x The x value to set for this Vector. + * @param y The y value to set for this Vector. Default x. + */ + set(x: number, y?: number): Phaser.Math.Vector2; + + /** + * This method is an alias for `Vector2.set`. + * @param x The x value to set for this Vector. + * @param y The y value to set for this Vector. Default x. + */ + setTo(x: number, y?: number): Phaser.Math.Vector2; + + /** + * Sets the `x` and `y` values of this object from a given polar coordinate. + * @param azimuth The angular coordinate, in radians. + * @param radius The radial coordinate (length). Default 1. + */ + setToPolar(azimuth: number, radius?: number): Phaser.Math.Vector2; + + /** + * Check whether this Vector is equal to a given Vector. + * + * Performs a strict equality check against each Vector's components. + * @param v The vector to compare with this Vector. + */ + equals(v: Phaser.Math.Vector2): boolean; + + /** + * Calculate the angle between this Vector and the positive x-axis, in radians. + */ + angle(): number; + + /** + * Add a given Vector to this Vector. Addition is component-wise. + * @param src The Vector to add to this Vector. + */ + add(src: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * Subtract the given Vector from this Vector. Subtraction is component-wise. + * @param src The Vector to subtract from this Vector. + */ + subtract(src: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * Perform a component-wise multiplication between this Vector and the given Vector. + * + * Multiplies this Vector by the given Vector. + * @param src The Vector to multiply this Vector by. + */ + multiply(src: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * Scale this Vector by the given value. + * @param value The value to scale this Vector by. + */ + scale(value: number): Phaser.Math.Vector2; + + /** + * Perform a component-wise division between this Vector and the given Vector. + * + * Divides this Vector by the given Vector. + * @param src The Vector to divide this Vector by. + */ + divide(src: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * Negate the `x` and `y` components of this Vector. + */ + negate(): Phaser.Math.Vector2; + + /** + * Calculate the distance between this Vector and the given Vector. + * @param src The Vector to calculate the distance to. + */ + distance(src: Phaser.Math.Vector2): number; + + /** + * Calculate the distance between this Vector and the given Vector, squared. + * @param src The Vector to calculate the distance to. + */ + distanceSq(src: Phaser.Math.Vector2): number; + + /** + * Calculate the length (or magnitude) of this Vector. + */ + length(): number; + + /** + * Calculate the length of this Vector squared. + */ + lengthSq(): number; + + /** + * Normalize this Vector. + * + * Makes the vector a unit length vector (magnitude of 1) in the same direction. + */ + normalize(): Phaser.Math.Vector2; + + /** + * Right-hand normalize (make unit length) this Vector. + */ + normalizeRightHand(): Phaser.Math.Vector2; + + /** + * Calculate the dot product of this Vector and the given Vector. + * @param src The Vector2 to dot product with this Vector2. + */ + dot(src: Phaser.Math.Vector2): number; + + /** + * [description] + * @param src [description] + */ + cross(src: Phaser.Math.Vector2): number; + + /** + * Linearly interpolate between this Vector and the given Vector. + * + * Interpolates this Vector towards the given Vector. + * @param src The Vector2 to interpolate towards. + * @param t The interpolation percentage, between 0 and 1. Default 0. + */ + lerp(src: Phaser.Math.Vector2, t?: number): Phaser.Math.Vector2; + + /** + * Transform this Vector with the given Matrix. + * @param mat The Matrix3 to transform this Vector2 with. + */ + transformMat3(mat: Phaser.Math.Matrix3): Phaser.Math.Vector2; + + /** + * Transform this Vector with the given Matrix. + * @param mat The Matrix4 to transform this Vector2 with. + */ + transformMat4(mat: Phaser.Math.Matrix4): Phaser.Math.Vector2; + + /** + * Make this Vector the zero vector (0, 0). + */ + reset(): Phaser.Math.Vector2; + + /** + * A static zero Vector2 for use by reference. + */ + static ZERO(): void; + + } + + /** + * A representation of a vector in 3D space. + * + * A three-component vector. + */ + class Vector3 { + /** + * + * @param x The x component. + * @param y The y component. + * @param z The z component. + */ + constructor(x?: number, y?: number, z?: number); + + /** + * The x component of this Vector. + */ + x: number; + + /** + * The y component of this Vector. + */ + y: number; + + /** + * The z component of this Vector. + */ + z: number; + + /** + * Set this Vector to point up. + * + * Sets the y component of the vector to 1, and the others to 0. + */ + up(): Phaser.Math.Vector3; + + /** + * Make a clone of this Vector3. + */ + clone(): Phaser.Math.Vector3; + + /** + * [description] + * @param a [description] + * @param b [description] + */ + crossVectors(a: Phaser.Math.Vector3, b: Phaser.Math.Vector3): Phaser.Math.Vector3; + + /** + * Check whether this Vector is equal to a given Vector. + * + * Performs a strict equality check against each Vector's components. + * @param v The Vector3 to compare against. + */ + equals(v: Phaser.Math.Vector3): boolean; + + /** + * Copy the components of a given Vector into this Vector. + * @param src The Vector to copy the components from. + */ + copy(src: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3; + + /** + * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values. + * @param x The x value to set for this Vector, or an object containing x, y and z components. + * @param y The y value to set for this Vector. + * @param z The z value to set for this Vector. + */ + set(x: number | object, y?: number, z?: number): Phaser.Math.Vector3; + + /** + * Add a given Vector to this Vector. Addition is component-wise. + * @param v The Vector to add to this Vector. + */ + add(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3; + + /** + * Subtract the given Vector from this Vector. Subtraction is component-wise. + * @param v The Vector to subtract from this Vector. + */ + subtract(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3; + + /** + * Perform a component-wise multiplication between this Vector and the given Vector. + * + * Multiplies this Vector by the given Vector. + * @param v The Vector to multiply this Vector by. + */ + multiply(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3; + + /** + * Scale this Vector by the given value. + * @param scale The value to scale this Vector by. + */ + scale(scale: number): Phaser.Math.Vector3; + + /** + * Perform a component-wise division between this Vector and the given Vector. + * + * Divides this Vector by the given Vector. + * @param v The Vector to divide this Vector by. + */ + divide(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3; + + /** + * Negate the `x`, `y` and `z` components of this Vector. + */ + negate(): Phaser.Math.Vector3; + + /** + * Calculate the distance between this Vector and the given Vector. + * @param v The Vector to calculate the distance to. + */ + distance(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): number; + + /** + * Calculate the distance between this Vector and the given Vector, squared. + * @param v The Vector to calculate the distance to. + */ + distanceSq(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): number; + + /** + * Calculate the length (or magnitude) of this Vector. + */ + length(): number; + + /** + * Calculate the length of this Vector squared. + */ + lengthSq(): number; + + /** + * Normalize this Vector. + * + * Makes the vector a unit length vector (magnitude of 1) in the same direction. + */ + normalize(): Phaser.Math.Vector3; + + /** + * Calculate the dot product of this Vector and the given Vector. + * @param v The Vector3 to dot product with this Vector3. + */ + dot(v: Phaser.Math.Vector3): number; + + /** + * [description] + * @param v [description] + */ + cross(v: Phaser.Math.Vector3): Phaser.Math.Vector3; + + /** + * Linearly interpolate between this Vector and the given Vector. + * + * Interpolates this Vector towards the given Vector. + * @param v The Vector3 to interpolate towards. + * @param t The interpolation percentage, between 0 and 1. Default 0. + */ + lerp(v: Phaser.Math.Vector3, t?: number): Phaser.Math.Vector3; + + /** + * Transform this Vector with the given Matrix. + * @param mat The Matrix3 to transform this Vector3 with. + */ + transformMat3(mat: Phaser.Math.Matrix3): Phaser.Math.Vector3; + + /** + * Transform this Vector with the given Matrix. + * @param mat The Matrix4 to transform this Vector3 with. + */ + transformMat4(mat: Phaser.Math.Matrix4): Phaser.Math.Vector3; + + /** + * [description] + * @param mat The Matrix4 to transform this Vector3 with. + */ + transformCoordinates(mat: Phaser.Math.Matrix4): Phaser.Math.Vector3; + + /** + * Transform this Vector with the given Quaternion. + * @param q The Quaternion to transform this Vector with. + */ + transformQuat(q: Phaser.Math.Quaternion): Phaser.Math.Vector3; + + /** + * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection, + * e.g. unprojecting a 2D point into 3D space. + * @param mat The Matrix4 to multiply this Vector3 with. + */ + project(mat: Phaser.Math.Matrix4): Phaser.Math.Vector3; + + /** + * Unproject this point from 2D space to 3D space. + * The point should have its x and y properties set to + * 2D screen space, and the z either at 0 (near plane) + * or 1 (far plane). The provided matrix is assumed to already + * be combined, i.e. projection * view * model. + * + * After this operation, this vector's (x, y, z) components will + * represent the unprojected 3D coordinate. + * @param viewport Screen x, y, width and height in pixels. + * @param invProjectionView Combined projection and view matrix. + */ + unproject(viewport: Phaser.Math.Vector4, invProjectionView: Phaser.Math.Matrix4): Phaser.Math.Vector3; + + /** + * Make this Vector the zero vector (0, 0, 0). + */ + reset(): Phaser.Math.Vector3; + + } + + /** + * A representation of a vector in 4D space. + * + * A four-component vector. + */ + class Vector4 { + /** + * + * @param x The x component. + * @param y The y component. + * @param z The z component. + * @param w The w component. + */ + constructor(x?: number, y?: number, z?: number, w?: number); + + /** + * The x component of this Vector. + */ + x: number; + + /** + * The y component of this Vector. + */ + y: number; + + /** + * The z component of this Vector. + */ + z: number; + + /** + * The w component of this Vector. + */ + w: number; + + /** + * Make a clone of this Vector4. + */ + clone(): Phaser.Math.Vector4; + + /** + * Copy the components of a given Vector into this Vector. + * @param src The Vector to copy the components from. + */ + copy(src: Phaser.Math.Vector4): Phaser.Math.Vector4; + + /** + * Check whether this Vector is equal to a given Vector. + * + * Performs a strict quality check against each Vector's components. + * @param v [description] + */ + equals(v: Phaser.Math.Vector4): boolean; + + /** + * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values. + * @param x The x value to set for this Vector, or an object containing x, y, z and w components. + * @param y The y value to set for this Vector. + * @param z The z value to set for this Vector. + * @param w The z value to set for this Vector. + */ + set(x: number | object, y: number, z: number, w: number): Phaser.Math.Vector4; + + /** + * Add a given Vector to this Vector. Addition is component-wise. + * @param v The Vector to add to this Vector. + */ + add(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Vector4; + + /** + * Subtract the given Vector from this Vector. Subtraction is component-wise. + * @param v The Vector to subtract from this Vector. + */ + subtract(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Vector4; + + /** + * Scale this Vector by the given value. + * @param scale The value to scale this Vector by. + */ + scale(scale: number): Phaser.Math.Vector4; + + /** + * Calculate the length (or magnitude) of this Vector. + */ + length(): number; + + /** + * Calculate the length of this Vector squared. + */ + lengthSq(): number; + + /** + * Normalize this Vector. + * + * Makes the vector a unit length vector (magnitude of 1) in the same direction. + */ + normalize(): Phaser.Math.Vector4; + + /** + * Calculate the dot product of this Vector and the given Vector. + * @param v The Vector4 to dot product with this Vector4. + */ + dot(v: Phaser.Math.Vector4): number; + + /** + * Linearly interpolate between this Vector and the given Vector. + * + * Interpolates this Vector towards the given Vector. + * @param v The Vector4 to interpolate towards. + * @param t The interpolation percentage, between 0 and 1. Default 0. + */ + lerp(v: Phaser.Math.Vector4, t?: number): Phaser.Math.Vector4; + + /** + * Perform a component-wise multiplication between this Vector and the given Vector. + * + * Multiplies this Vector by the given Vector. + * @param v The Vector to multiply this Vector by. + */ + multiply(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Vector4; + + /** + * Perform a component-wise division between this Vector and the given Vector. + * + * Divides this Vector by the given Vector. + * @param v The Vector to divide this Vector by. + */ + divide(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Vector4; + + /** + * Calculate the distance between this Vector and the given Vector. + * @param v [description] + */ + distance(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): number; + + /** + * Calculate the distance between this Vector and the given Vector, squared. + * @param v The Vector to calculate the distance to. + */ + distanceSq(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): number; + + /** + * Negate the `x`, `y`, `z` and `w` components of this Vector. + */ + negate(): Phaser.Math.Vector4; + + /** + * Transform this Vector with the given Matrix. + * @param mat The Matrix4 to transform this Vector4 with. + */ + transformMat4(mat: Phaser.Math.Matrix4): Phaser.Math.Vector4; + + /** + * Transform this Vector with the given Quaternion. + * @param q The Quaternion to transform this Vector with. + */ + transformQuat(q: Phaser.Math.Quaternion): Phaser.Math.Vector4; + + /** + * Make this Vector the zero vector (0, 0, 0, 0). + */ + reset(): Phaser.Math.Vector4; + + } + + /** + * Checks if the two values are within the given `tolerance` of each other. + * @param a The first value to use in the calculation. + * @param b The second value to use in the calculation. + * @param tolerance The tolerance. Anything equal to or less than this value is considered as being within range. + */ + function Within(a: number, b: number, tolerance: number): boolean; + + /** + * Wrap the given `value` between `min` and `max. + * @param value The value to wrap. + * @param min The minimum value. + * @param max The maximum value. + */ + function Wrap(value: number, min: number, max: number): number; + + namespace Angle { + /** + * Find the angle of a segment from (x1, y1) -> (x2, y2). + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Between(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * + * Calculates the angle of the vector from the first point to the second point. + * @param point1 The first point. + * @param point2 The second point. + */ + function BetweenPoints(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; + + /** + * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * + * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate + * travels down the screen. + * @param point1 The first point. + * @param point2 The second point. + */ + function BetweenPointsY(point1: Phaser.Geom.Point | object, point2: Phaser.Geom.Point | object): number; + + /** + * Find the angle of a segment from (x1, y1) -> (x2, y2). + * + * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate + * travels down the screen. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function BetweenY(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Normalize an angle to the [0, 2pi] range. + * @param angle The angle to normalize, in radians. + */ + function Normalize(angle: number): number; + + /** + * Reverse the given angle. + * @param angle The angle to reverse, in radians. + */ + function Reverse(angle: number): number; + + /** + * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. + * @param currentAngle The current angle, in radians. + * @param targetAngle The target angle to rotate to, in radians. + * @param lerp The lerp value to add to the current angle. Default 0.05. + */ + function RotateTo(currentAngle: number, targetAngle: number, lerp?: number): number; + + /** + * Gets the shortest angle between `angle1` and `angle2`. + * + * Both angles must be in the range -180 to 180, which is the same clamped + * range that `sprite.angle` uses, so you can pass in two sprite angles to + * this method and get the shortest angle back between the two of them. + * + * The angle returned will be in the same range. If the returned angle is + * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's + * a clockwise rotation. + * + * TODO: Wrap the angles in this function? + * @param angle1 The first angle in the range -180 to 180. + * @param angle2 The second angle in the range -180 to 180. + */ + function ShortestBetween(angle1: number, angle2: number): number; + + /** + * Wrap an angle. + * + * Wraps the angle to a value in the range of -PI to PI. + * @param angle The angle to wrap, in radians. + */ + function Wrap(angle: number): number; + + /** + * Wrap an angle in degrees. + * + * Wraps the angle to a value in the range of -180 to 180. + * @param angle The angle to wrap, in degrees. + */ + function WrapDegrees(angle: number): number; + + } + + /** + * The value of PI * 2. + */ + var PI2: number; + + /** + * The value of PI * 0.5. + */ + var TAU: number; + + /** + * An epsilon value (1.0e-6) + */ + var EPSILON: number; + + /** + * For converting degrees to radians (PI / 180) + */ + var DEG_TO_RAD: number; + + /** + * For converting radians to degrees (180 / PI) + */ + var RAD_TO_DEG: number; + + /** + * An instance of the Random Number Generator. + */ + var RND: Phaser.Math.RandomDataGenerator; + + namespace Distance { + /** + * Calculate the distance between two sets of coordinates (points). + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Between(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Calculate the distance between two sets of coordinates (points) to the power of `pow`. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + * @param pow The exponent. + */ + function Power(x1: number, y1: number, x2: number, y2: number, pow: number): number; + + /** + * Calculate the distance between two sets of coordinates (points), squared. + * @param x1 The x coordinate of the first point. + * @param y1 The y coordinate of the first point. + * @param x2 The x coordinate of the second point. + * @param y2 The y coordinate of the second point. + */ + function Squared(x1: number, y1: number, x2: number, y2: number): number; + + } + + namespace Easing { + namespace Back { + /** + * Back ease-in. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function In(v: number, overshoot?: number): number; + + /** + * Back ease-in/out. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function InOut(v: number, overshoot?: number): number; + + /** + * Back ease-out. + * @param v The value to be tweened. + * @param overshoot The overshoot amount. Default 1.70158. + */ + function Out(v: number, overshoot?: number): number; + + } + + namespace Bounce { + /** + * Bounce ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Bounce ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Bounce ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Circular { + /** + * Circular ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Circular ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Circular ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Cubic { + /** + * Cubic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Cubic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Cubic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Elastic { + /** + * Elastic ease-in. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period [description] Default 0.1. + */ + function In(v: number, amplitude?: number, period?: number): number; + + /** + * Elastic ease-in/out. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period [description] Default 0.1. + */ + function InOut(v: number, amplitude?: number, period?: number): number; + + /** + * Elastic ease-out. + * @param v The value to be tweened. + * @param amplitude The amplitude of the elastic ease. Default 0.1. + * @param period [description] Default 0.1. + */ + function Out(v: number, amplitude?: number, period?: number): number; + + } + + namespace Expo { + /** + * Exponential ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Exponential ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Exponential ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Linear { + /** + * Linear easing (no variation). + * @param v The value to be tweened. + */ + function Linear(v: number): number; + + } + + namespace Quadratic { + /** + * Quadratic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quadratic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quadratic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Quartic { + /** + * Quartic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quartic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quartic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Quintic { + /** + * Quintic ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Quintic ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Quintic ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Sine { + /** + * Sinusoidal ease-in. + * @param v The value to be tweened. + */ + function In(v: number): number; + + /** + * Sinusoidal ease-in/out. + * @param v The value to be tweened. + */ + function InOut(v: number): number; + + /** + * Sinusoidal ease-out. + * @param v The value to be tweened. + */ + function Out(v: number): number; + + } + + namespace Stepped { + /** + * Stepped easing. + * @param v The value to be tweened. + * @param steps The number of steps in the ease. Default 1. + */ + function Stepped(v: number, steps?: number): number; + + } + + } + + namespace Fuzzy { + /** + * Calculate the fuzzy ceiling of the given value. + * @param value The value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Ceil(value: number, epsilon?: number): number; + + /** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Equal(a: number, b: number, epsilon?: number): boolean; + + /** + * Calculate the fuzzy floor of the given value. + * @param value The value. + * @param epsilon The epsilon. Default 0.0001. + */ + function Floor(value: number, epsilon?: number): number; + + /** + * Check whether `a` is fuzzily greater than `b`. + * + * `a` is fuzzily greater than `b` if it is more than `b - epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function GreaterThan(a: number, b: number, epsilon?: number): boolean; + + /** + * Check whether `a` is fuzzily less than `b`. + * + * `a` is fuzzily less than `b` if it is less than `b + epsilon`. + * @param a The first value. + * @param b The second value. + * @param epsilon The epsilon. Default 0.0001. + */ + function LessThan(a: number, b: number, epsilon?: number): boolean; + + } + + namespace Interpolation { + /** + * A bezier interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function Bezier(v: number[], k: number): number; + + /** + * A Catmull-Rom interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function CatmullRom(v: number[], k: number): number; + + /** + * A cubic bezier interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param p0 The start point. + * @param p1 The first control point. + * @param p2 The second control point. + * @param p3 The end point. + */ + function CubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number; + + /** + * A linear interpolation method. + * @param v The input array of values to interpolate between. + * @param k The percentage of interpolation, between 0 and 1. + */ + function Linear(v: number[], k: number): number; + + /** + * A quadratic bezier interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param p0 The start point. + * @param p1 The control point. + * @param p2 The end point. + */ + function QuadraticBezier(t: number, p0: number, p1: number, p2: number): number; + + /** + * A Smooth Step interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmoothStep(t: number, min: number, max: number): number; + + /** + * A Smoother Step interpolation method. + * @param t The percentage of interpolation, between 0 and 1. + * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + */ + function SmootherStep(t: number, min: number, max: number): number; + + } + + namespace Pow2 { + /** + * Returns the nearest power of 2 to the given `value`. + * @param value The value. + */ + function GetPowerOfTwo(value: number): integer; + + /** + * Checks if the given `width` and `height` are a power of two. + * Useful for checking texture dimensions. + * @param width The width. + * @param height The height. + */ + function IsSizePowerOfTwo(width: number, height: number): boolean; + + /** + * Tests the value and returns `true` if it is a power of two. + * @param value The value to check if it's a power of two. + */ + function IsValuePowerOfTwo(value: number): boolean; + + } + + /** + * A seeded random data generator. + */ + class RandomDataGenerator { + /** + * + * @param seeds The seeds. + */ + constructor(seeds?: string[]); + + /** + * Signs to choose from. + */ + signs: number[]; + + /** + * Initialize the state of the random data generator. + * @param seeds The seeds to initialize the random data generator with. + */ + init(seeds: string | string[]): void; + + /** + * Reset the seed of the random data generator. + * + * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present. + * @param seeds The array of seeds: the `toString()` of each value is used. + */ + sow(seeds: string[]): void; + + /** + * Returns a random integer between 0 and 2^32. + */ + integer(): number; + + /** + * Returns a random real number between 0 and 1. + */ + frac(): number; + + /** + * Returns a random real number between 0 and 2^32. + */ + real(): number; + + /** + * Returns a random integer between and including min and max. + * @param min The minimum value in the range. + * @param max The maximum value in the range. + */ + integerInRange(min: number, max: number): number; + + /** + * Returns a random integer between and including min and max. + * This method is an alias for RandomDataGenerator.integerInRange. + * @param min The minimum value in the range. + * @param max The maximum value in the range. + */ + between(min: number, max: number): number; + + /** + * Returns a random real number between min and max. + * @param min The minimum value in the range. + * @param max The maximum value in the range. + */ + realInRange(min: number, max: number): number; + + /** + * Returns a random real number between -1 and 1. + */ + normal(): number; + + /** + * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368 + */ + uuid(): string; + + /** + * Returns a random element from within the given array. + * @param array The array to pick a random element from. + */ + pick(array: any[]): any; + + /** + * Returns a sign to be used with multiplication operator. + */ + sign(): number; + + /** + * Returns a random element from within the given array, favoring the earlier entries. + * @param array The array to pick a random element from. + */ + weightedPick(array: any[]): any; + + /** + * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified. + * @param min The minimum value in the range. + * @param max The maximum value in the range. + */ + timestamp(min: number, max: number): number; + + /** + * Returns a random angle between -180 and 180. + */ + angle(): number; + + /** + * Returns a random rotation in radians, between -3.141 and 3.141 + */ + rotation(): number; + + /** + * Gets or Sets the state of the generator. This allows you to retain the values + * that the generator is using between games, i.e. in a game save file. + * + * To seed this generator with a previously saved state you can pass it as the + * `seed` value in your game config, or call this method directly after Phaser has booted. + * + * Call this method with no parameters to return the current state. + * + * If providing a state it should match the same format that this method + * returns, which is a string with a header `!rnd` followed by the `c`, + * `s0`, `s1` and `s2` values respectively, each comma-delimited. + * @param state Generator state to be set. + */ + state(state?: string): string; + + /** + * Shuffles the given array, using the current seed. + * @param array The array to be shuffled. + */ + shuffle(array?: any[]): any[]; + + } + + namespace Snap { + /** + * Snap a value to nearest grid slice, using ceil. + * + * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`. + * As will `14` snap to `15`... but `16` will snap to `20`. + * @param value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + */ + function Ceil(value: number, gap: number, start?: number): number; + + /** + * Snap a value to nearest grid slice, using floor. + * + * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`. + * As will `14` snap to `10`... but `16` will snap to `15`. + * @param value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + */ + function Floor(value: number, gap: number, start?: number): number; + + /** + * Snap a value to nearest grid slice, using rounding. + * + * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`. + * @param value The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. Default 0. + */ + function To(value: number, gap: number, start?: number): number; + + } + + } + + namespace Physics { + namespace Arcade { + /** + * An Arcade Physics Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. + */ + class Image extends Phaser.GameObjects.Image implements Phaser.Physics.Arcade.Components.Acceleration, Phaser.Physics.Arcade.Components.Angular, Phaser.Physics.Arcade.Components.Bounce, Phaser.Physics.Arcade.Components.Debug, Phaser.Physics.Arcade.Components.Drag, Phaser.Physics.Arcade.Components.Enable, Phaser.Physics.Arcade.Components.Friction, Phaser.Physics.Arcade.Components.Gravity, Phaser.Physics.Arcade.Components.Immovable, Phaser.Physics.Arcade.Components.Mass, Phaser.Physics.Arcade.Components.Size, Phaser.Physics.Arcade.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, x: number, y: number, texture: string, frame?: string | integer); + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * [description] + * @param x The horizontal acceleration + * @param y The vertical acceleration Default x. + */ + setAcceleration(x: number, y?: number): this; + + /** + * [description] + * @param value The horizontal acceleration + */ + setAccelerationX(value: number): this; + + /** + * [description] + * @param value The vertical acceleration + */ + setAccelerationY(value: number): this; + + /** + * [description] + * @param value [description] + */ + setAngularVelocity(value: number): this; + + /** + * [description] + * @param value [description] + */ + setAngularAcceleration(value: number): this; + + /** + * [description] + * @param value [description] + */ + setAngularDrag(value: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setBounce(x: number, y?: number): this; + + /** + * [description] + * @param value [description] + */ + setBounceX(value: number): this; + + /** + * [description] + * @param value [description] + */ + setBounceY(value: number): this; + + /** + * [description] + * @param value [description] + */ + setCollideWorldBounds(value: boolean): this; + + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this; + + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): this; + + /** + * [description] + */ + debugShowBody: boolean; + + /** + * [description] + */ + debugShowVelocity: boolean; + + /** + * [description] + */ + debugBodyColor: number; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setDrag(x: number, y?: number): this; + + /** + * [description] + * @param value [description] + */ + setDragX(value: number): this; + + /** + * [description] + * @param value [description] + */ + setDragY(value: number): this; + + /** + * [description] + * @param value `true` to use damping for deceleration, or `false` to use linear deceleration. + */ + setDamping(value: boolean): this; + + /** + * [description] + * @param reset [description] + * @param x [description] + * @param y [description] + * @param enableGameObject [description] + * @param showGameObject [description] + */ + enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; + + /** + * [description] + * @param disableGameObject [description] Default false. + * @param hideGameObject [description] Default false. + */ + disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; + + /** + * Syncs the Bodies position and size with its parent Game Object. + * You don't need to call this for Dynamic Bodies, as it happens automatically. + * But for Static bodies it's a useful way of modifying the position of a Static Body + * in the Physics World, based on its Game Object. + */ + refreshBody(): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setFriction(x: number, y?: number): this; + + /** + * [description] + * @param x [description] + */ + setFrictionX(x: number): this; + + /** + * [description] + * @param y [description] + */ + setFrictionY(y: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setGravity(x: number, y?: number): this; + + /** + * [description] + * @param x [description] + */ + setGravityX(x: number): this; + + /** + * [description] + * @param y [description] + */ + setGravityY(y: number): this; + + /** + * [description] + * @param value [description] Default true. + */ + setImmovable(value?: boolean): this; + + /** + * [description] + * @param value [description] + */ + setMass(value: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setOffset(x: number, y?: number): this; + + /** + * [description] + * @param radius [description] + * @param offsetX [description] + * @param offsetY [description] + */ + setCircle(radius: number, offsetX?: number, offsetY?: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): this; + + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): this; + + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setMaxVelocity(x: number, y?: number): this; + + } + + /** + * [description] + */ + class ArcadePhysics { + /** + * + * @param scene [description] + */ + constructor(scene: Phaser.Scene); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + systems: Phaser.Scenes.Systems; + + /** + * [description] + */ + config: object; + + /** + * [description] + */ + world: Phaser.Physics.Arcade.World; + + /** + * [description] + */ + add: Phaser.Physics.Arcade.Factory; + + /** + * [description] + */ + getConfig(): object; + + /** + * Checks for overlaps between two Game Objects. The objects can be any Game Object that have an Arcade Physics Body. + * + * Unlike {@link #collide} the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. + * + * Both the first and second parameter can be arrays of objects, of differing types. + * If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. + * + * ##### Tilemaps + * + * Any overlapping tiles, including blank/null tiles, will give a positive result. Tiles marked via {@link Phaser.Tilemap#setCollision} (and similar methods) have no special status, and callbacks added via {@link Phaser.Tilemap#setTileIndexCallback} or {@link Phaser.Tilemap#setTileLocationCallback} are not invoked. So calling this method without any callbacks isn't very useful. + * + * If you're interested only in whether an object overlaps a certain tile or class of tiles, filter the tiles with `processCallback` and then use the result returned by this method. Blank/null tiles can be excluded by their {@link Phaser.Tile#index index} (-1). + * + * If you want to take action on certain overlaps, examine the tiles in `collideCallback` and then handle as you like. + * @param object1 The first object or array of objects to check. Can be any Game Object that has an Arcade Physics Body. + * @param object2 The second object or array of objects to check. Can be any Game Object that has an Arcade Physics Body. + * @param overlapCallback An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them, unless you are checking Group vs. Sprite, in which case Sprite will always be the first parameter. Default null. + * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`. Default null. + * @param callbackContext The context in which to run the callbacks. + */ + overlap(object1: Phaser.GameObjects.GameObject | any[], object2: Phaser.GameObjects.GameObject | any[], overlapCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): boolean; + + /** + * [description] + * @param object1 The first object or array of objects to check. Can be any Game Object that has an Arcade Physics Body. + * @param object2 The second object or array of objects to check. Can be any Game Object that has an Arcade Physics Body. + * @param collideCallback An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them, unless you are checking Group vs. Sprite, in which case Sprite will always be the first parameter. Default null. + * @param processCallback A callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`. Default null. + * @param callbackContext The context in which to run the callbacks. + */ + collide(object1: Phaser.GameObjects.GameObject | any[], object2: Phaser.GameObjects.GameObject | any[], collideCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): boolean; + + /** + * [description] + */ + pause(): Phaser.Physics.Arcade.World; + + /** + * [description] + */ + resume(): Phaser.Physics.Arcade.World; + + /** + * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared) + * + * You must give a maximum speed value, beyond which the game object won't go any faster. + * + * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course. + * Note: The game object doesn't stop moving once it reaches the destination coordinates. + * @param gameObject Any Game Object with an Arcade Physics body. + * @param x The x coordinate to accelerate towards. + * @param y The y coordinate to accelerate towards. + * @param speed The acceleration (change in speed) in pixels per second squared. Default 60. + * @param xSpeedMax The maximum x velocity the game object can reach. Default 500. + * @param ySpeedMax The maximum y velocity the game object can reach. Default 500. + */ + accelerateTo(gameObject: Phaser.GameObjects.GameObject, x: number, y: number, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number; + + /** + * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared) + * + * You must give a maximum speed value, beyond which the game object won't go any faster. + * + * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course. + * Note: The game object doesn't stop moving once it reaches the destination coordinates. + * @param gameObject Any Game Object with an Arcade Physics body. + * @param destination The Game Object to move towards. Can be any object but must have visible x/y properties. + * @param speed The acceleration (change in speed) in pixels per second squared. Default 60. + * @param xSpeedMax The maximum x velocity the game object can reach. Default 500. + * @param ySpeedMax The maximum y velocity the game object can reach. Default 500. + */ + accelerateToObject(gameObject: Phaser.GameObjects.GameObject, destination: Phaser.GameObjects.GameObject, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number; + + /** + * Finds the Body closest to a source point or object. + * @param source Any object with public `x` and `y` properties, such as a Game Object or Geometry object. + */ + closest(source: object): Phaser.Physics.Arcade.Body; + + /** + * Finds the Body farthest from a source point or object. + * @param source Any object with public `x` and `y` properties, such as a Game Object or Geometry object. + */ + furthest(source: object): Phaser.Physics.Arcade.Body; + + /** + * Move the given display object towards the x/y coordinates at a steady velocity. + * If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. + * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. + * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. + * Note: The display object doesn't stop moving once it reaches the destination coordinates. + * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all) + * @param gameObject Any Game Object with an Arcade Physics body. + * @param x The x coordinate to move towards. + * @param y The y coordinate to move towards. + * @param speed The speed it will move, in pixels per second (default is 60 pixels/sec) Default 60. + * @param maxTime Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. Default 0. + */ + moveTo(gameObject: Phaser.GameObjects.GameObject, x: number, y: number, speed?: number, maxTime?: number): number; + + /** + * Move the given display object towards the destination object at a steady velocity. + * If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds. + * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. + * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. + * Note: The display object doesn't stop moving once it reaches the destination coordinates. + * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all) + * @param gameObject Any Game Object with an Arcade Physics body. + * @param destination Any object with public `x` and `y` properties, such as a Game Object or Geometry object. + * @param speed The speed it will move, in pixels per second (default is 60 pixels/sec) Default 60. + * @param maxTime Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. Default 0. + */ + moveToObject(gameObject: Phaser.GameObjects.GameObject, destination: object, speed?: number, maxTime?: number): number; + + /** + * Given the angle (in degrees) and speed calculate the velocity and return it as a vector, or set it to the given vector object. + * One way to use this is: velocityFromAngle(angle, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object. + * @param angle The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative) + * @param speed The speed it will move, in pixels per second squared. Default 60. + * @param vec2 The Vector2 in which the x and y properties will be set to the calculated velocity. + */ + velocityFromAngle(angle: number, speed?: number, vec2?: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * Given the rotation (in radians) and speed calculate the velocity and return it as a vector, or set it to the given vector object. + * One way to use this is: velocityFromRotation(rotation, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object. + * @param rotation The angle in radians. + * @param speed The speed it will move, in pixels per second squared Default 60. + * @param vec2 The Vector2 in which the x and y properties will be set to the calculated velocity. + */ + velocityFromRotation(rotation: number, speed?: number, vec2?: Phaser.Math.Vector2): Phaser.Math.Vector2; + + /** + * The Scene that owns this plugin is shutting down. + * We need to kill and reset all internal properties as well as stop listening to Scene events. + */ + shutdown(): void; + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + */ + destroy(): void; + + } + + /** + * An Arcade Physics Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. + */ + class Sprite extends Phaser.GameObjects.Sprite implements Phaser.Physics.Arcade.Components.Acceleration, Phaser.Physics.Arcade.Components.Angular, Phaser.Physics.Arcade.Components.Bounce, Phaser.Physics.Arcade.Components.Debug, Phaser.Physics.Arcade.Components.Drag, Phaser.Physics.Arcade.Components.Enable, Phaser.Physics.Arcade.Components.Friction, Phaser.Physics.Arcade.Components.Gravity, Phaser.Physics.Arcade.Components.Immovable, Phaser.Physics.Arcade.Components.Mass, Phaser.Physics.Arcade.Components.Size, Phaser.Physics.Arcade.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(scene: Phaser.Scene, x: number, y: number, texture: string, frame?: string | integer); + + /** + * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + */ + body: Phaser.Physics.Arcade.Body; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * [description] + * @param x The horizontal acceleration + * @param y The vertical acceleration Default x. + */ + setAcceleration(x: number, y?: number): this; + + /** + * [description] + * @param value The horizontal acceleration + */ + setAccelerationX(value: number): this; + + /** + * [description] + * @param value The vertical acceleration + */ + setAccelerationY(value: number): this; + + /** + * [description] + * @param value [description] + */ + setAngularVelocity(value: number): this; + + /** + * [description] + * @param value [description] + */ + setAngularAcceleration(value: number): this; + + /** + * [description] + * @param value [description] + */ + setAngularDrag(value: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setBounce(x: number, y?: number): this; + + /** + * [description] + * @param value [description] + */ + setBounceX(value: number): this; + + /** + * [description] + * @param value [description] + */ + setBounceY(value: number): this; + + /** + * [description] + * @param value [description] + */ + setCollideWorldBounds(value: boolean): this; + + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this; + + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): this; + + /** + * [description] + */ + debugShowBody: boolean; + + /** + * [description] + */ + debugShowVelocity: boolean; + + /** + * [description] + */ + debugBodyColor: number; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setDrag(x: number, y?: number): this; + + /** + * [description] + * @param value [description] + */ + setDragX(value: number): this; + + /** + * [description] + * @param value [description] + */ + setDragY(value: number): this; + + /** + * [description] + * @param value `true` to use damping for deceleration, or `false` to use linear deceleration. + */ + setDamping(value: boolean): this; + + /** + * [description] + * @param reset [description] + * @param x [description] + * @param y [description] + * @param enableGameObject [description] + * @param showGameObject [description] + */ + enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; + + /** + * [description] + * @param disableGameObject [description] Default false. + * @param hideGameObject [description] Default false. + */ + disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; + + /** + * Syncs the Bodies position and size with its parent Game Object. + * You don't need to call this for Dynamic Bodies, as it happens automatically. + * But for Static bodies it's a useful way of modifying the position of a Static Body + * in the Physics World, based on its Game Object. + */ + refreshBody(): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setFriction(x: number, y?: number): this; + + /** + * [description] + * @param x [description] + */ + setFrictionX(x: number): this; + + /** + * [description] + * @param y [description] + */ + setFrictionY(y: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setGravity(x: number, y?: number): this; + + /** + * [description] + * @param x [description] + */ + setGravityX(x: number): this; + + /** + * [description] + * @param y [description] + */ + setGravityY(y: number): this; + + /** + * [description] + * @param value [description] Default true. + */ + setImmovable(value?: boolean): this; + + /** + * [description] + * @param value [description] + */ + setMass(value: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setOffset(x: number, y?: number): this; + + /** + * [description] + * @param radius [description] + * @param offsetX [description] + * @param offsetY [description] + */ + setCircle(radius: number, offsetX?: number, offsetY?: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): this; + + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): this; + + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): this; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setMaxVelocity(x: number, y?: number): this; + + } + + /** + * A Dynamic Arcade Body. + */ + class Body { + /** + * + * @param world The Arcade Physics simulation this Body belongs to. + * @param gameObject The Game Object this Body belongs to. + */ + constructor(world: Phaser.Physics.Arcade.World, gameObject: Phaser.GameObjects.GameObject); + + /** + * The Arcade Physics simulation this Body belongs to. + */ + world: Phaser.Physics.Arcade.World; + + /** + * The Game Object this Body belongs to. + */ + gameObject: Phaser.GameObjects.GameObject; + + /** + * Transformations applied to this Body. + */ + transform: object; + + /** + * Whether the Body's boundary is drawn to the debug display. + */ + debugShowBody: boolean; + + /** + * Whether the Body's velocity is drawn to the debug display. + */ + debugShowVelocity: boolean; + + /** + * The color of this Body on the debug display. + */ + debugBodyColor: integer; + + /** + * Whether this Body is updated by the physics simulation. + */ + enable: boolean; + + /** + * Whether this Body's boundary is circular (true) or rectangular (false). + */ + isCircle: boolean; + + /** + * The unscaled radius of this Body's boundary (if circular), as set by setCircle, in source pixels. + * The true radius (if circular) is equal to halfWidth. + */ + radius: number; + + /** + * The offset of this Body's position from its Game Object's position, in source pixels. + */ + offset: Phaser.Math.Vector2; + + /** + * The position of this Body within the simulation. + */ + position: Phaser.Math.Vector2; + + /** + * The position of this Body during the previous step. + */ + prev: Phaser.Math.Vector2; + + /** + * Whether this Body's rotation is affected by its angular acceleration and velocity. + */ + allowRotation: boolean; + + /** + * This body's rotation, in degrees, based on its angular acceleration and velocity. + * The Body's rotation controls the `angle` of its Game Object. + * It doesn't rotate the Body's boundary, which is always an axis-aligned rectangle or a circle. + */ + rotation: number; + + /** + * The Body's rotation, in degrees, during the previous step. + */ + preRotation: number; + + /** + * The width of the Body's boundary. If circular, this is also the Body's diameter. + */ + width: number; + + /** + * The height of the Body's boundary. If circular, this is also the Body's diameter. + */ + height: number; + + /** + * The unscaled width of the Body, in source pixels. The default is the width of the Body's Game Object's texture frame. + */ + sourceWidth: number; + + /** + * The unscaled height of the Body, in source pixels. The default is the height of the Body's Game Object's texture frame. + */ + sourceHeight: number; + + /** + * Half the Body's width. + */ + halfWidth: number; + + /** + * Half the Body's height. + */ + halfHeight: number; + + /** + * The center of the Body's boundary. The midpoint of its `position` (top-left corner) and its bottom-right corner. + */ + center: Phaser.Math.Vector2; + + /** + * The Body's change in position, in pixels per second. + */ + velocity: Phaser.Math.Vector2; + + /** + * The Body's calculated change in position, in pixels, at the last step. + */ + readonly newVelocity: Phaser.Math.Vector2; + + /** + * The Body's absolute maximum change in position, in pixels per step. + */ + deltaMax: Phaser.Math.Vector2; + + /** + * The Body's change in velocity, in pixels per second squared. + */ + acceleration: Phaser.Math.Vector2; + + /** + * Whether this Body's velocity is affected by its drag vector. + */ + allowDrag: boolean; + + /** + * Absolute loss of velocity due to movement, in pixels per second squared. + */ + drag: Phaser.Math.Vector2; + + /** + * Whether this Body's position is affected by its gravity vector. + */ + allowGravity: boolean; + + /** + * Acceleration due to gravity (specific to this Body), in pixels per second squared. + * Total gravity is the sum of this vector and the simulation's `gravity`. + */ + gravity: Phaser.Math.Vector2; + + /** + * Rebound following a collision, relative to 1. + */ + bounce: Phaser.Math.Vector2; + + /** + * Rebound following a collision with the world boundary, relative to 1. + * If empty, `bounce` is used instead. + */ + worldBounce: Phaser.Math.Vector2; + + /** + * Whether the simulation emits a `worldbounds` event when this Body collides with the world boundary (and `collideWorldBounds` is also true). + */ + onWorldBounds: boolean; + + /** + * Whether the simulation emits a `collide` event when this Body collides with another. + */ + onCollide: boolean; + + /** + * Whether the simulation emits an `overlap` event when this Body overlaps with another. + */ + onOverlap: boolean; + + /** + * The Body's absolute maximum velocity. + * + * This limits the Body's rate of movement but not its `velocity` values (which can still exceed `maxVelocity`). + */ + maxVelocity: Phaser.Math.Vector2; + + /** + * If this Body is `immovable` and in motion, this the proportion of this Body's movement received by the riding body on each axis, relative to 1. + * The default value (1, 0) moves the riding body horizontally in equal proportion and vertically not at all. + */ + friction: Phaser.Math.Vector2; + + /** + * If this Body is using `drag` for deceleration this property controls how the drag is applied. + * If set to `true` drag will use a damping effect rather than a linear approach. If you are + * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in + * the game Asteroids) then you will get a far smoother and more visually correct deceleration + * by using damping, avoiding the axis-drift that is prone with linear deceleration. + * + * If you enable this property then you should use far smaller `drag` values than with linear, as + * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow + * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately. + */ + useDamping: boolean; + + /** + * The rate of change of this Body's rotation, in degrees per second. + */ + angularVelocity: number; + + /** + * The rate of change of this Body's angular velocity, in degrees per second squared. + */ + angularAcceleration: number; + + /** + * Loss of angular velocity due to angular movement, in degrees per second. + */ + angularDrag: number; + + /** + * The Body's maximum angular velocity, in degrees per second. + */ + maxAngular: number; + + /** + * The Body's inertia, relative to a default unit (1). + * With `bounce`, this affects the exchange of momentum (velocities) during collisions. + */ + mass: number; + + /** + * The angle of this Body's velocity vector, in degrees. + */ + angle: number; + + /** + * The magnitude of the Body's velocity, as calculated during the last update. + */ + speed: number; + + /** + * The calculated direction of the Body's velocity. + */ + facing: integer; + + /** + * Whether this object can be moved by collisions with another body. + */ + immovable: boolean; + + /** + * Whether the Body's position and rotation are affected by its velocity, acceleration, drag, and gravity. + */ + moves: boolean; + + /** + * A flag disabling the default horizontal separation of colliding bodies. Pass your own `processHandler` to the collider. + */ + customSeparateX: boolean; + + /** + * A flag disabling the default vertical separation of colliding bodies. Pass your own `processHandler` to the collider. + */ + customSeparateY: boolean; + + /** + * The amount of horizontal overlap (before separation), if this Body is colliding with another. + */ + overlapX: number; + + /** + * The amount of vertical overlap (before separation), if this Body is colliding with another. + */ + overlapY: number; + + /** + * The amount of overlap (before separation), if this Body is circular and colliding with another circular body. + */ + overlapR: number; + + /** + * Whether this Body is overlapped with another and both have zero velocity. + */ + embedded: boolean; + + /** + * Whether this Body interacts with the world boundary. + */ + collideWorldBounds: boolean; + + /** + * Whether this Body is checked for collisions and for which directions. + * You can set `checkCollision.none = false` to disable collision checks. + */ + checkCollision: ArcadeBodyCollision; + + /** + * Whether this Body is colliding with another and in which direction. + */ + touching: ArcadeBodyCollision; + + /** + * Whether this Body was colliding with another during the last step, and in which direction. + */ + wasTouching: ArcadeBodyCollision; + + /** + * Whether this Body is colliding with a tile or the world boundary. + */ + blocked: ArcadeBodyCollision; + + /** + * Whether to automatically synchronize this Body's dimensions to the dimensions of its Game Object's visual bounds. + */ + syncBounds: boolean; + + /** + * Whether this Body is being moved by the `moveTo` or `moveFrom` methods. + */ + isMoving: boolean; + + /** + * Whether this Body's movement by `moveTo` or `moveFrom` will be stopped by collisions with other bodies. + */ + stopVelocityOnCollide: boolean; + + /** + * The Body's physics type (dynamic or static). + */ + readonly physicsType: integer; + + /** + * Updates this Body's transform, dimensions, and position from its Game Object. + */ + updateBounds(): void; + + /** + * Updates the Body's `center` from its `position` and dimensions. + */ + updateCenter(): void; + + /** + * Updates the Body. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + update(delta: number): void; + + /** + * Feeds the Body results back into the parent Game Object. + * @param resetDelta Reset the delta properties? + */ + postUpdate(resetDelta: boolean): void; + + /** + * Checks for collisions between this Body and the world boundary and separates them. + */ + checkWorldBounds(): boolean; + + /** + * Sets the offset of the Body's position from its Game Object's position. + * @param x The horizontal offset, in source pixels. + * @param y The vertical offset, in source pixels. Default x. + */ + setOffset(x: number, y?: number): Phaser.Physics.Arcade.Body; + + /** + * Sizes and positions this Body's boundary, as a rectangle. + * Modifies the Body's `offset` if `center` is true (the default). + * @param width The width of the Body, in source pixels. + * @param height The height of the Body, in source pixels. + * @param center Modify the Body's `offset`, placing the Body's center on its Game Object's center. Default true. + */ + setSize(width: number, height: number, center?: boolean): Phaser.Physics.Arcade.Body; + + /** + * Sizes and positions this Body's boundary, as a circle. + * @param radius The radius of the Body, in source pixels. + * @param offsetX The horizontal offset of the Body from its Game Object, in source pixels. + * @param offsetY The vertical offset of the Body from its Game Object, in source pixels. + */ + setCircle(radius: number, offsetX?: number, offsetY?: number): Phaser.Physics.Arcade.Body; + + /** + * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates. + * If the Body had any velocity or acceleration it is lost as a result of calling this. + * @param x The horizontal position to place the Game Object and Body. + * @param y The vertical position to place the Game Object and Body. + */ + reset(x: number, y: number): void; + + /** + * Sets acceleration, velocity, and speed to zero. + */ + stop(): Phaser.Physics.Arcade.Body; + + /** + * Copies the coordinates of this Body's edges into an object. + * @param obj An object to copy the values into. + */ + getBounds(obj: ArcadeBodyBounds): ArcadeBodyBounds; + + /** + * Tests if the coordinates are within this Body's boundary. + * @param x The horizontal coordinate. + * @param y The vertical coordinate. + */ + hitTest(x: number, y: number): boolean; + + /** + * Whether this Body is touching a tile or the world boundary while moving down. + */ + onFloor(): boolean; + + /** + * Whether this Body is touching a tile or the world boundary while moving up. + */ + onCeiling(): boolean; + + /** + * Whether this Body is touching a tile or the world boundary while moving left or right. + */ + onWall(): boolean; + + /** + * The absolute (non-negative) change in this Body's horizontal position from the previous step. + */ + deltaAbsX(): number; + + /** + * The absolute (non-negative) change in this Body's vertical position from the previous step. + */ + deltaAbsY(): number; + + /** + * The change in this Body's horizontal position from the previous step. + * This value is set during the Body's update phase. + */ + deltaX(): number; + + /** + * The change in this Body's vertical position from the previous step. + * This value is set during the Body's update phase. + */ + deltaY(): number; + + /** + * The change in this Body's rotation from the previous step, in degrees. + */ + deltaZ(): number; + + /** + * Disables this Body and marks it for deletion by the simulation. + */ + destroy(): void; + + /** + * Draws this Body's boundary and velocity, if enabled. + * @param graphic The Graphics object to draw on. + */ + drawDebug(graphic: Phaser.GameObjects.Graphics): void; + + /** + * Whether this Body will be drawn to the debug display. + */ + willDrawDebug(): boolean; + + /** + * Sets whether this Body collides with the world boundary. + * @param value True (collisions) or false (no collisions). Default true. + */ + setCollideWorldBounds(value?: boolean): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's velocity. + * @param x The horizontal velocity, in pixels per second. + * @param y The vertical velocity, in pixels per second. Default x. + */ + setVelocity(x: number, y?: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's horizontal velocity. + * @param value The velocity, in pixels per second. + */ + setVelocityX(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's vertical velocity. + * @param value The velocity, in pixels per second. + */ + setVelocityY(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's maximum velocity. + * @param x The horizontal velocity, in pixels per second. + * @param y The vertical velocity, in pixels per second. Default x. + */ + setMaxVelocity(x: number, y?: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's bounce. + * @param x The horizontal bounce, relative to 1. + * @param y The vertical bounce, relative to 1. + */ + setBounce(x: number, y: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's horizontal bounce. + * @param value The bounce, relative to 1. + */ + setBounceX(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's vertical bounce. + * @param value The bounce, relative to 1. + */ + setBounceY(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's acceleration. + * @param x The horizontal component, in pixels per second squared. + * @param y The vertical component, in pixels per second squared. + */ + setAcceleration(x: number, y: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's horizontal acceleration. + * @param value The acceleration, in pixels per second squared. + */ + setAccelerationX(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's vertical acceleration. + * @param value The acceleration, in pixels per second squared. + */ + setAccelerationY(value: number): Phaser.Physics.Arcade.Body; + + /** + * Enables or disables drag. + * @param value `true` to allow drag on this body, or `false` to disable it. Default true. + */ + setAllowDrag(value?: boolean): Phaser.Physics.Arcade.Body; + + /** + * Enables or disables gravity's effect on this Body. + * @param value `true` to allow gravity on this body, or `false` to disable it. Default true. + */ + setAllowGravity(value?: boolean): Phaser.Physics.Arcade.Body; + + /** + * Enables or disables rotation. + * @param value `true` to allow rotation on this body, or `false` to disable it. Default true. + */ + setAllowRotation(value?: boolean): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's drag. + * @param x The horizontal component, in pixels per second squared. + * @param y The vertical component, in pixels per second squared. + */ + setDrag(x: number, y: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's horizontal drag. + * @param value The drag, in pixels per second squared. + */ + setDragX(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's vertical drag. + * @param value The drag, in pixels per second squared. + */ + setDragY(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's gravity. + * @param x The horizontal component, in pixels per second squared. + * @param y The vertical component, in pixels per second squared. + */ + setGravity(x: number, y: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's horizontal gravity. + * @param value The gravity, in pixels per second squared. + */ + setGravityX(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's vertical gravity. + * @param value The gravity, in pixels per second squared. + */ + setGravityY(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's friction. + * @param x The horizontal component, relative to 1. + * @param y The vertical component, relative to 1. + */ + setFriction(x: number, y: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's horizontal friction. + * @param value The friction value, relative to 1. + */ + setFrictionX(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's vertical friction. + * @param value The friction value, relative to 1. + */ + setFrictionY(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's angular velocity. + * @param value The velocity, in degrees per second. + */ + setAngularVelocity(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's angular acceleration. + * @param value The acceleration, in degrees per second squared. + */ + setAngularAcceleration(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's angular drag. + * @param value The drag, in degrees per second squared. + */ + setAngularDrag(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's mass. + * @param value The mass value, relative to 1. + */ + setMass(value: number): Phaser.Physics.Arcade.Body; + + /** + * Sets the Body's `immovable` property. + * @param value The value to assign to `immovable`. Default true. + */ + setImmovable(value?: boolean): Phaser.Physics.Arcade.Body; + + /** + * The Body's horizontal position (left edge). + */ + x: number; + + /** + * The Body's vertical position (top edge). + */ + y: number; + + /** + * The left edge of the Body's boundary. Identical to x. + */ + readonly left: number; + + /** + * The right edge of the Body's boundary. + */ + readonly right: number; + + /** + * The top edge of the Body's boundary. Identical to y. + */ + readonly top: number; + + /** + * The bottom edge of this Body's boundary. + */ + readonly bottom: number; + + } + + /** + * [description] + */ + class Collider { + /** + * + * @param world [description] + * @param overlapOnly [description] + * @param object1 The first object to check for collision. + * @param object2 The second object to check for collision. + * @param collideCallback The callback to invoke when the two objects collide. + * @param processCallback The callback to invoke when the two objects collide. Must return a boolean. + * @param callbackContext The scope in which to call the callbacks. + */ + constructor(world: Phaser.Physics.Arcade.World, overlapOnly: boolean, object1: ArcadeColliderType, object2: ArcadeColliderType, collideCallback: ArcadePhysicsCallback, processCallback: ArcadePhysicsCallback, callbackContext: any); + + /** + * [description] + */ + world: Phaser.Physics.Arcade.World; + + /** + * [description] + */ + name: string; + + /** + * [description] + */ + active: boolean; + + /** + * [description] + */ + overlapOnly: boolean; + + /** + * [description] + */ + object1: ArcadeColliderType; + + /** + * [description] + */ + object2: ArcadeColliderType; + + /** + * [description] + */ + collideCallback: ArcadePhysicsCallback; + + /** + * [description] + */ + processCallback: ArcadePhysicsCallback; + + /** + * [description] + */ + callbackContext: object; + + /** + * [description] + * @param name [description] + */ + setName(name: string): Phaser.Physics.Arcade.Collider; + + /** + * [description] + */ + update(): void; + + /** + * [description] + */ + destroy(): void; + + } + + /** + * The Arcade Physics Factory allows you to easily create Arcade Physics enabled Game Objects. + * Objects that are created by this Factory are automatically added to the physics world. + */ + class Factory { + /** + * + * @param world The Arcade Physics World instance. + */ + constructor(world: Phaser.Physics.Arcade.World); + + /** + * A reference to the Arcade Physics World. + */ + world: Phaser.Physics.Arcade.World; + + /** + * A reference to the Scene this Arcade Physics instance belongs to. + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems this Arcade Physics instance belongs to. + */ + sys: Phaser.Scenes.Systems; + + /** + * Create a new Arcade Physics Collider object. + * @param object1 The first object to check for collision. + * @param object2 The second object to check for collision. + * @param collideCallback The callback to invoke when the two objects collide. + * @param processCallback The callback to invoke when the two objects collide. Must return a boolean. + * @param callbackContext The scope in which to call the callbacks. + */ + collider(object1: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group | Phaser.GameObjects.Group[], object2: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group | Phaser.GameObjects.Group[], collideCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): Phaser.Physics.Arcade.Collider; + + /** + * Create a new Arcade Physics Collider Overlap object. + * @param object1 The first object to check for overlap. + * @param object2 The second object to check for overlap. + * @param collideCallback The callback to invoke when the two objects collide. + * @param processCallback The callback to invoke when the two objects collide. Must return a boolean. + * @param callbackContext The scope in which to call the callbacks. + */ + overlap(object1: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group | Phaser.GameObjects.Group[], object2: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group | Phaser.GameObjects.Group[], collideCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): Phaser.Physics.Arcade.Collider; + + /** + * Adds an Arcade Physics Body to the given Game Object. + * @param gameObject [description] + * @param isStatic Set to true to create a Static body, otherwise it will create a Dynamic body. Default false. + */ + existing(gameObject: Phaser.GameObjects.GameObject, isStatic?: boolean): Phaser.GameObjects.GameObject; + + /** + * Creates a new Arcade Image object with a Static body. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + staticImage(x: number, y: number, texture: string, frame?: string | integer): Phaser.Physics.Arcade.Image; + + /** + * Creates a new Arcade Image object with a Dynamic body. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + image(x: number, y: number, texture: string, frame?: string | integer): Phaser.Physics.Arcade.Image; + + /** + * Creates a new Arcade Sprite object with a Static body. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + staticSprite(x: number, y: number, texture: string, frame?: string | integer): Phaser.Physics.Arcade.Sprite; + + /** + * Creates a new Arcade Sprite object with a Dynamic body. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + sprite(x: number, y: number, key: string, frame?: string | integer): Phaser.Physics.Arcade.Sprite; + + /** + * Creates a Static Physics Group object. + * All Game Objects created by this Group will automatically be static Arcade Physics objects. + * @param children [description] + * @param config [description] + */ + staticGroup(children?: object | object[], config?: GroupConfig): Phaser.Physics.Arcade.StaticGroup; + + /** + * Creates a Physics Group object. + * All Game Objects created by this Group will automatically be dynamic Arcade Physics objects. + * @param children [description] + * @param config [description] + */ + group(children?: object | object[], config?: PhysicsGroupConfig): Phaser.Physics.Arcade.Group; + + /** + * Destroys this Factory. + */ + destroy(): void; + + } + + /** + * [description] + * @param body1 [description] + * @param body2 [description] + * @param overlapOnly [description] + * @param bias [description] + */ + function GetOverlapX(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number): number; + + /** + * [description] + * @param body1 [description] + * @param body2 [description] + * @param overlapOnly [description] + * @param bias [description] + */ + function GetOverlapY(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number): number; + + /** + * An Arcade Physics Group object. + * + * All Game Objects created by this Group will automatically be dynamic Arcade Physics objects. + */ + class Group extends Phaser.GameObjects.Group { + /** + * + * @param world [description] + * @param scene [description] + * @param children [description] + * @param config [description] + */ + constructor(world: Phaser.Physics.Arcade.World, scene: Phaser.Scene, children: any[], config?: PhysicsGroupConfig); + + /** + * [description] + */ + world: Phaser.Physics.Arcade.World; + + /** + * The class to create new group members from. + */ + classType: Phaser.Physics.Arcade.Sprite; + + /** + * [description] + */ + physicsType: integer; + + /** + * [description] + */ + defaults: PhysicsGroupDefaults; + + /** + * [description] + * @param child [description] + */ + createCallbackHandler(child: Phaser.GameObjects.GameObject): void; + + /** + * [description] + * @param child [description] + */ + removeCallbackHandler(child: Phaser.GameObjects.GameObject): void; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param step [description] + */ + setVelocity(x: number, y: number, step: number): Phaser.Physics.Arcade.Group; + + /** + * [description] + * @param value [description] + * @param step [description] + */ + setVelocityX(value: number, step: number): Phaser.Physics.Arcade.Group; + + /** + * [description] + * @param value [description] + * @param step [description] + */ + setVelocityY(value: number, step: number): Phaser.Physics.Arcade.Group; + + } + + /** + * [description] + * @param body1 [description] + * @param body2 [description] + * @param overlapOnly [description] + * @param bias [description] + */ + function SeparateX(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number): boolean; + + /** + * [description] + * @param body1 [description] + * @param body2 [description] + * @param overlapOnly [description] + * @param bias [description] + */ + function SeparateY(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number): boolean; + + /** + * [description] + */ + class StaticBody { + /** + * + * @param world [description] + * @param gameObject [description] + */ + constructor(world: Phaser.Physics.Arcade.World, gameObject: Phaser.GameObjects.GameObject); + + /** + * [description] + */ + world: Phaser.Physics.Arcade.World; + + /** + * [description] + */ + gameObject: Phaser.GameObjects.GameObject; + + /** + * [description] + */ + debugShowBody: boolean; + + /** + * [description] + */ + debugBodyColor: integer; + + /** + * [description] + */ + enable: boolean; + + /** + * [description] + */ + isCircle: boolean; + + /** + * [description] + */ + radius: number; + + /** + * [description] + */ + offset: Phaser.Math.Vector2; + + /** + * [description] + */ + position: Phaser.Math.Vector2; + + /** + * [description] + */ + width: number; + + /** + * [description] + */ + height: number; + + /** + * [description] + */ + halfWidth: number; + + /** + * [description] + */ + halfHeight: number; + + /** + * [description] + */ + center: Phaser.Math.Vector2; + + /** + * [description] + */ + velocity: Phaser.Math.Vector2; + + /** + * [description] + */ + allowGravity: boolean; + + /** + * [description] + */ + gravity: Phaser.Math.Vector2; + + /** + * [description] + */ + bounce: Phaser.Math.Vector2; + + /** + * [description] + */ + onWorldBounds: boolean; + + /** + * [description] + */ + onCollide: boolean; + + /** + * [description] + */ + onOverlap: boolean; + + /** + * [description] + */ + mass: number; + + /** + * [description] + */ + immovable: boolean; + + /** + * [description] + */ + customSeparateX: boolean; + + /** + * [description] + */ + customSeparateY: boolean; + + /** + * [description] + */ + overlapX: number; + + /** + * [description] + */ + overlapY: number; + + /** + * [description] + */ + overlapR: number; + + /** + * [description] + */ + embedded: boolean; + + /** + * [description] + */ + collideWorldBounds: boolean; + + /** + * [description] + */ + checkCollision: ArcadeBodyCollision; + + /** + * [description] + */ + touching: ArcadeBodyCollision; + + /** + * [description] + */ + wasTouching: ArcadeBodyCollision; + + /** + * [description] + */ + blocked: ArcadeBodyCollision; + + /** + * [description] + */ + physicsType: integer; + + /** + * Changes the Game Object this Body is bound to. + * First it removes its reference from the old Game Object, then sets the new one. + * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object. + * @param gameObject The new Game Object that will own this Body. + * @param update Reposition and resize this Body to match the new Game Object? Default true. + */ + setGameObject(gameObject: Phaser.GameObjects.GameObject, update?: boolean): Phaser.Physics.Arcade.StaticBody; + + /** + * Updates this Static Body so that its position and dimensions are updated + * based on the current Game Object it is bound to. + */ + updateFromGameObject(): Phaser.Physics.Arcade.StaticBody; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + setOffset(x: number, y: number): Phaser.Physics.Arcade.StaticBody; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param offsetX [description] + * @param offsetY [description] + */ + setSize(width: number, height: number, offsetX?: number, offsetY?: number): Phaser.Physics.Arcade.StaticBody; + + /** + * [description] + * @param radius [description] + * @param offsetX [description] + * @param offsetY [description] + */ + setCircle(radius: number, offsetX?: number, offsetY?: number): Phaser.Physics.Arcade.StaticBody; + + /** + * [description] + */ + updateCenter(): void; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + reset(x: number, y: number): void; + + /** + * [description] + */ + stop(): Phaser.Physics.Arcade.StaticBody; + + /** + * [description] + * @param obj [description] + */ + getBounds(obj: ArcadeBodyBounds): ArcadeBodyBounds; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + hitTest(x: number, y: number): boolean; + + /** + * [description] + */ + deltaAbsX(): number; + + /** + * [description] + */ + deltaAbsY(): number; + + /** + * [description] + */ + deltaX(): number; + + /** + * [description] + */ + deltaY(): number; + + /** + * [description] + */ + deltaZ(): number; + + /** + * [description] + */ + destroy(): void; + + /** + * [description] + * @param graphic [description] + */ + drawDebug(graphic: Phaser.GameObjects.Graphics): void; + + /** + * [description] + */ + willDrawDebug(): boolean; + + /** + * [description] + * @param value [description] + */ + setMass(value: number): Phaser.Physics.Arcade.StaticBody; + + /** + * [description] + */ + x: number; + + /** + * [description] + */ + y: number; + + /** + * [description] + */ + readonly left: number; + + /** + * [description] + */ + readonly right: number; + + /** + * [description] + */ + readonly top: number; + + /** + * [description] + */ + readonly bottom: number; + + } + + /** + * [description] + */ + class StaticGroup extends Phaser.GameObjects.Group { + /** + * + * @param world [description] + * @param scene [description] + * @param children [description] + * @param config [description] + */ + constructor(world: Phaser.Physics.Arcade.World, scene: Phaser.Scene, children: any[], config: GroupConfig); + + /** + * [description] + */ + world: Phaser.Physics.Arcade.World; + + /** + * [description] + */ + physicsType: integer; + + /** + * [description] + * @param child [description] + */ + createCallbackHandler(child: Phaser.GameObjects.GameObject): void; + + /** + * [description] + * @param child [description] + */ + removeCallbackHandler(child: Phaser.GameObjects.GameObject): void; + + /** + * [description] + * @param entries [description] + */ + createMultipleCallbackHandler(entries: object): void; + + /** + * [description] + */ + refresh(): Phaser.Physics.Arcade.StaticGroup; + + } + + /** + * The Arcade Physics World. + * + * The World is responsible for creating, managing, colliding and updating all of the bodies within it. + * + * An instance of the World belongs to a Phaser.Scene and is accessed via the property `physics.world`. + */ + class World extends Phaser.Events.EventEmitter { + /** + * + * @param scene The Scene to which this World instance belongs. + * @param config An Arcade Physics Configuration object. + */ + constructor(scene: Phaser.Scene, config: ArcadeWorldConfig); + + /** + * The Scene this simulation belongs to. + */ + scene: Phaser.Scene; + + /** + * Dynamic Bodies in this simulation. + */ + bodies: Phaser.Structs.Set; + + /** + * Static Bodies in this simulation. + */ + staticBodies: Phaser.Structs.Set; + + /** + * Static Bodies marked for deletion. + */ + pendingDestroy: Phaser.Structs.Set<(Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody)>; + + /** + * This simulation's collision processors. + */ + colliders: Phaser.Structs.ProcessQueue; + + /** + * Acceleration of Bodies due to gravity, in pixels per second. + */ + gravity: Phaser.Math.Vector2; + + /** + * A boundary constraining Bodies. + */ + bounds: Phaser.Geom.Rectangle; + + /** + * The boundary edges that Bodies can collide with. + */ + checkCollision: CheckCollisionObject; + + /** + * The number of physics steps to be taken per second. + * + * This property is read-only. Use the `setFPS` method to modify it at run-time. + */ + readonly fps: number; + + /** + * The number of steps that took place in the last frame. + */ + readonly stepsLastFrame: number; + + /** + * Scaling factor applied to the frame rate. + * + * - 1.0 = normal speed + * - 2.0 = half speed + * - 0.5 = double speed + */ + timeScale: any; + + /** + * The maximum absolute difference of a Body's per-step velocity and its overlap with another Body that will result in separation on *each axis*. + * Larger values favor separation. + * Smaller values favor no separation. + */ + OVERLAP_BIAS: number; + + /** + * The maximum absolute value of a Body's overlap with a tile that will result in separation on *each axis*. + * Larger values favor separation. + * Smaller values favor no separation. + * The optimum value may be similar to the tile size. + */ + TILE_BIAS: number; + + /** + * Always separate overlapping Bodies horizontally before vertically. + * False (the default) means Bodies are first separated on the axis of greater gravity, or the vertical axis if neither is greater. + */ + forceX: boolean; + + /** + * Whether the simulation advances with the game loop. + */ + isPaused: boolean; + + /** + * Enables the debug display. + */ + drawDebug: boolean; + + /** + * The graphics object drawing the debug display. + */ + debugGraphic: Phaser.GameObjects.Graphics; + + /** + * Default debug display settings for new Bodies. + */ + defaults: ArcadeWorldDefaults; + + /** + * The maximum number of items per node on the RTree. + * + * This is ignored if `useTree` is `false`. If you have a large number of bodies in + * your world then you may find search performance improves by increasing this value, + * to allow more items per node and less node division. + */ + maxEntries: integer; + + /** + * Should this Arcade Physics World use an RTree for Dynamic Physics bodies or not? + * + * An RTree is a fast way of spatially sorting of all the moving bodies in the world. + * However, at certain limits, the cost of clearing and inserting the bodies into the + * tree every frame becomes more expensive than the search speed gains it provides. + * + * If you have a large number of dynamic bodies in your world then it may be best to + * disable the use of the RTree by setting this property to `true`. + * The number it can cope with depends on browser and device, but a conservative estimate + * of around 5,000 bodies should be considered the max before disabling it. + * + * Note this only applies to dynamic bodies. Static bodies are always kept in an RTree, + * because they don't have to be cleared every frame, so you benefit from the + * massive search speeds all the time. + */ + useTree: boolean; + + /** + * The spatial index of Dynamic Bodies. + */ + tree: Phaser.Structs.RTree; + + /** + * The spatial index of Static Bodies. + */ + staticTree: Phaser.Structs.RTree; + + /** + * Recycled input for tree searches. + */ + treeMinMax: ArcadeWorldTreeMinMax; + + /** + * Adds an Arcade Physics Body to a Game Object, an array of Game Objects, or the children of a Group. + * + * The difference between this and the `enableBody` method is that you can pass arrays or Groups + * to this method. + * + * You can specify if the bodies are to be Dynamic or Static. A dynamic body can move via velocity and + * acceleration. A static body remains fixed in place and as such is able to use an optimized search + * tree, making it ideal for static elements such as level objects. You can still collide and overlap + * with static bodies. + * + * Normally, rather than calling this method directly, you'd use the helper methods available in the + * Arcade Physics Factory, such as: + * + * ```javascript + * this.physics.add.image(x, y, textureKey); + * this.physics.add.sprite(x, y, textureKey); + * ``` + * + * Calling factory methods encapsulates the creation of a Game Object and the creation of its + * body at the same time. If you are creating custom classes then you can pass them to this + * method to have their bodies created. + * @param object The object, or objects, on which to create the bodies. + * @param bodyType The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`. + */ + enable(object: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group | Phaser.GameObjects.Group[], bodyType?: integer): void; + + /** + * Creates an Arcade Physics Body on a single Game Object. + * + * If the Game Object already has a body, this method will simply add it back into the simulation. + * + * You can specify if the body is Dynamic or Static. A dynamic body can move via velocity and + * acceleration. A static body remains fixed in place and as such is able to use an optimized search + * tree, making it ideal for static elements such as level objects. You can still collide and overlap + * with static bodies. + * + * Normally, rather than calling this method directly, you'd use the helper methods available in the + * Arcade Physics Factory, such as: + * + * ```javascript + * this.physics.add.image(x, y, textureKey); + * this.physics.add.sprite(x, y, textureKey); + * ``` + * + * Calling factory methods encapsulates the creation of a Game Object and the creation of its + * body at the same time. If you are creating custom classes then you can pass them to this + * method to have their bodies created. + * @param object The Game Object on which to create the body. + * @param bodyType The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`. + */ + enableBody(object: Phaser.GameObjects.GameObject, bodyType?: integer): Phaser.GameObjects.GameObject; + + /** + * Adds an existing Arcade Physics Body or StaticBody to the simulation. + * + * The body is enabled and added to the local search trees. + * @param body The Body to be added to the simulation. + */ + add(body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody): Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody; + + /** + * Disables the Arcade Physics Body of a Game Object, an array of Game Objects, or the children of a Group. + * + * The difference between this and the `disableBody` method is that you can pass arrays or Groups + * to this method. + * + * The body itself is not deleted, it just has its `enable` property set to false, which + * means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`. + * @param object The object, or objects, on which to disable the bodies. + */ + disable(object: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group | Phaser.GameObjects.Group[]): void; + + /** + * Disables an existing Arcade Physics Body or StaticBody and removes it from the simulation. + * + * The body is disabled and removed from the local search trees. + * + * The body itself is not deleted, it just has its `enable` property set to false, which + * means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`. + * @param body The Body to be disabled. + */ + disableBody(body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody): void; + + /** + * Removes an existing Arcade Physics Body or StaticBody from the simulation. + * + * The body is disabled and removed from the local search trees. + * + * The body itself is not deleted, it just has its `enabled` property set to false, which + * means you can re-enable it again at any point by passing it to enable `enable` or `add`. + * @param body The body to be removed from the simulation. + */ + remove(body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody): void; + + /** + * Creates a Graphics Game Object that the world will use to render the debug display to. + * + * This is called automatically when the World is instantiated if the `debug` config property + * was set to `true`. However, you can call it at any point should you need to display the + * debug Graphic from a fixed point. + * + * You can control which objects are drawn to the Graphics object, and the colors they use, + * by setting the debug properties in the physics config. + * + * You should not typically use this in a production game. Use it to aid during debugging. + */ + createDebugGraphic(): Phaser.GameObjects.Graphics; + + /** + * Sets the position, size and properties of the World boundary. + * + * The World boundary is an invisible rectangle that defines the edges of the World. + * If a Body is set to collide with the world bounds then it will automatically stop + * when it reaches any of the edges. You can optionally set which edges of the boundary + * should be checked against. + * @param x The top-left x coordinate of the boundary. + * @param y The top-left y coordinate of the boundary. + * @param width The width of the boundary. + * @param height The height of the boundary. + * @param checkLeft Should bodies check against the left edge of the boundary? + * @param checkRight Should bodies check against the right edge of the boundary? + * @param checkUp Should bodies check against the top edge of the boundary? + * @param checkDown Should bodies check against the bottom edge of the boundary? + */ + setBounds(x: number, y: number, width: number, height: number, checkLeft?: boolean, checkRight?: boolean, checkUp?: boolean, checkDown?: boolean): Phaser.Physics.Arcade.World; + + /** + * Enables or disables collisions on each edge of the World boundary. + * @param left Should bodies check against the left edge of the boundary? Default true. + * @param right Should bodies check against the right edge of the boundary? Default true. + * @param up Should bodies check against the top edge of the boundary? Default true. + * @param down Should bodies check against the bottom edge of the boundary? Default true. + */ + setBoundsCollision(left?: boolean, right?: boolean, up?: boolean, down?: boolean): Phaser.Physics.Arcade.World; + + /** + * Pauses the simulation. + * + * A paused simulation does not update any existing bodies, or run any Colliders. + * + * However, you can still enable and disable bodies within it, or manually run collide or overlap + * checks. + */ + pause(): Phaser.Physics.Arcade.World; + + /** + * Resumes the simulation, if paused. + */ + resume(): Phaser.Physics.Arcade.World; + + /** + * Creates a new Collider object and adds it to the simulation. + * + * A Collider is a way to automatically perform collision checks between two objects, + * calling the collide and process callbacks if they occur. + * + * Colliders are run as part of the World update, after all of the Bodies have updated. + * + * By creating a Collider you don't need then call `World.collide` in your `update` loop, + * as it will be handled for you automatically. + * @param object1 The first object to check for collision. + * @param object2 The second object to check for collision. + * @param collideCallback The callback to invoke when the two objects collide. + * @param processCallback The callback to invoke when the two objects collide. Must return a boolean. + * @param callbackContext The scope in which to call the callbacks. + */ + addCollider(object1: ArcadeColliderType, object2: ArcadeColliderType, collideCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): Phaser.Physics.Arcade.Collider; + + /** + * Creates a new Overlap Collider object and adds it to the simulation. + * + * A Collider is a way to automatically perform overlap checks between two objects, + * calling the collide and process callbacks if they occur. + * + * Colliders are run as part of the World update, after all of the Bodies have updated. + * + * By creating a Collider you don't need then call `World.overlap` in your `update` loop, + * as it will be handled for you automatically. + * @param object1 The first object to check for overlap. + * @param object2 The second object to check for overlap. + * @param collideCallback The callback to invoke when the two objects overlap. + * @param processCallback The callback to invoke when the two objects overlap. Must return a boolean. + * @param callbackContext The scope in which to call the callbacks. + */ + addOverlap(object1: ArcadeColliderType, object2: ArcadeColliderType, collideCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): Phaser.Physics.Arcade.Collider; + + /** + * Removes a Collider from the simulation so it is no longer processed. + * + * This method does not destroy the Collider. If you wish to add it back at a later stage you can call + * `World.colliders.add(Collider)`. + * + * If you no longer need the Collider you can call the `Collider.destroy` method instead, which will + * automatically clear all of its references and then remove it from the World. If you call destroy on + * a Collider you _don't_ need to pass it to this method too. + * @param collider The Collider to remove from the simulation. + */ + removeCollider(collider: Phaser.Physics.Arcade.Collider): Phaser.Physics.Arcade.World; + + /** + * Sets the frame rate to run the simulation at. + * + * The frame rate value is used to simulate a fixed update time step. This fixed + * time step allows for a straightforward implementation of a deterministic game state. + * + * This frame rate is independent of the frequency at which the game is rendering. The + * higher you set the fps, the more physics simulation steps will occur per game step. + * Conversely, the lower you set it, the less will take place. + * + * You can optionally advance the simulation directly yourself by calling the `step` method. + * @param framerate The frame rate to advance the simulation at. + */ + setFPS(framerate: integer): this; + + /** + * Advances the simulation based on the elapsed time and fps rate. + * + * This is called automatically by your Scene and does not need to be invoked directly. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time, in ms, elapsed since the last frame. + */ + protected update(time: number, delta: number): void; + + /** + * Advances the simulation by one step. + * @param delta The delta time amount, in ms, by which to advance the simulation. + */ + step(delta: number): void; + + /** + * Updates bodies, draws the debug display, and handles pending queue operations. + */ + postUpdate(): void; + + /** + * Calculates a Body's velocity and updates its position. + * @param body The Body to be updated. + * @param delta The delta value to be used in the motion calculations. + */ + updateMotion(body: Phaser.Physics.Arcade.Body, delta: number): void; + + /** + * Calculates a Body's angular velocity. + * @param body The Body to compute the velocity for. + * @param delta The delta value to be used in the calculation. + */ + computeAngularVelocity(body: Phaser.Physics.Arcade.Body, delta: number): void; + + /** + * Calculates a Body's per-axis velocity. + * @param body The Body to compute the velocity for. + * @param delta The delta value to be used in the calculation. + */ + computeVelocity(body: Phaser.Physics.Arcade.Body, delta: number): void; + + /** + * Separates two Bodies. + * @param body1 The first Body to be separated. + * @param body2 The second Body to be separated. + * @param processCallback The process callback. + * @param callbackContext The context in which to invoke the callback. + * @param overlapOnly If this a collide or overlap check? + */ + separate(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, processCallback?: ArcadePhysicsCallback, callbackContext?: any, overlapOnly?: boolean): boolean; + + /** + * Separates two Bodies, when both are circular. + * @param body1 The first Body to be separated. + * @param body2 The second Body to be separated. + * @param overlapOnly If this a collide or overlap check? + * @param bias A small value added to the calculations. + */ + separateCircle(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly?: boolean, bias?: number): boolean; + + /** + * Checks to see if two Bodies intersect at all. + * @param body1 The first body to check. + * @param body2 The second body to check. + */ + intersects(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body): boolean; + + /** + * Tests if a circular Body intersects with another Body. + * @param circle The circular body to test. + * @param body The rectangular body to test. + */ + circleBodyIntersects(circle: Phaser.Physics.Arcade.Body, body: Phaser.Physics.Arcade.Body): boolean; + + /** + * Tests if Game Objects overlap. + * @param object1 [description] + * @param object2 [description] + * @param overlapCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + */ + overlap(object1: ArcadeColliderType, object2?: ArcadeColliderType, overlapCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): boolean; + + /** + * Performs a collision check and separation between the two physics enabled objects given, which can be single + * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups. + * + * If you don't require separation then use {@link #overlap} instead. + * + * If two Groups or arrays are passed, each member of one will be tested against each member of the other. + * + * If one Group **only** is passed (as `object1`), each member of the Group will be collided against the other members. + * + * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding + * objects are passed to it. + * + * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable + * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other. + * The separation that stops two objects penetrating may create a new penetration against a different object. If you + * require a high level of stability please consider using an alternative physics system, such as Matter.js. + * @param object1 [description] + * @param object2 [description] + * @param collideCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + */ + collide(object1: ArcadeColliderType, object2?: ArcadeColliderType, collideCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any): boolean; + + /** + * Helper for Phaser.Physics.Arcade.World#collide. + * @param object1 [description] + * @param object2 [description] + * @param collideCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + * @param overlapOnly [description] + */ + collideObjects(object1: ArcadeColliderType, object2?: ArcadeColliderType, collideCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any, overlapOnly?: boolean): boolean; + + /** + * Helper for Phaser.Physics.Arcade.World#collide and Phaser.Physics.Arcade.World#overlap. + * @param object1 [description] + * @param object2 [description] + * @param collideCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + * @param overlapOnly [description] + */ + collideHandler(object1: ArcadeColliderType, object2?: ArcadeColliderType, collideCallback?: ArcadePhysicsCallback, processCallback?: ArcadePhysicsCallback, callbackContext?: any, overlapOnly?: boolean): boolean; + + /** + * Handler for Sprite vs. Sprite collisions. + * @param sprite1 [description] + * @param sprite2 [description] + * @param collideCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + * @param overlapOnly [description] + */ + collideSpriteVsSprite(sprite1: Phaser.GameObjects.GameObject, sprite2: Phaser.GameObjects.GameObject, collideCallback: ArcadePhysicsCallback, processCallback: ArcadePhysicsCallback, callbackContext: any, overlapOnly: boolean): boolean; + + /** + * Handler for Sprite vs. Group collisions. + * @param sprite [description] + * @param group [description] + * @param collideCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + * @param overlapOnly [description] + */ + collideSpriteVsGroup(sprite: Phaser.GameObjects.GameObject, group: Phaser.GameObjects.Group, collideCallback: ArcadePhysicsCallback, processCallback: ArcadePhysicsCallback, callbackContext: any, overlapOnly: boolean): boolean; + + /** + * Helper for Group vs. Tilemap collisions. + * @param group [description] + * @param tilemapLayer [description] + * @param collideCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + * @param overlapOnly [description] + */ + collideGroupVsTilemapLayer(group: Phaser.GameObjects.Group, tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, collideCallback: ArcadePhysicsCallback, processCallback: ArcadePhysicsCallback, callbackContext: any, overlapOnly: boolean): boolean; + + /** + * Helper for Sprite vs. Tilemap collisions. + * @param sprite [description] + * @param tilemapLayer [description] + * @param collideCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + * @param overlapOnly [description] + */ + collideSpriteVsTilemapLayer(sprite: Phaser.GameObjects.GameObject, tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, collideCallback: ArcadePhysicsCallback, processCallback: ArcadePhysicsCallback, callbackContext: any, overlapOnly: boolean): boolean; + + /** + * Helper for Group vs. Group collisions. + * @param group1 [description] + * @param group2 [description] + * @param collideCallback [description] + * @param processCallback [description] + * @param callbackContext [description] + * @param overlapOnly [description] + */ + collideGroupVsGroup(group1: Phaser.GameObjects.Group, group2: Phaser.GameObjects.Group, collideCallback: ArcadePhysicsCallback, processCallback: ArcadePhysicsCallback, callbackContext: any, overlapOnly: boolean): boolean; + + /** + * Wrap an object's coordinates (or several objects' coordinates) within {@link Phaser.Physics.Arcade.World#bounds}. + * + * If the object is outside any boundary edge (left, top, right, bottom), it will be moved to the same offset from the opposite edge (the interior). + * @param object A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects. + * @param padding An amount added to each boundary edge during the operation. Default 0. + */ + wrap(object: any, padding?: number): void; + + /** + * Wrap each object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}. + * @param objects An array of objects to be wrapped. + * @param padding An amount added to the boundary. Default 0. + */ + wrapArray(objects: any[], padding?: number): void; + + /** + * Wrap an object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}. + * @param object A Game Object, a Physics Body, or any object with `x` and `y` coordinates + * @param padding An amount added to the boundary. Default 0. + */ + wrapObject(object: any, padding?: number): void; + + /** + * Shuts down the simulation, clearing physics data and removing listeners. + */ + shutdown(): void; + + /** + * Shuts down the simulation and disconnects it from the current scene. + */ + destroy(): void; + + } + + namespace Components { + /** + * [description] + */ + interface Acceleration { + /** + * [description] + * @param x The horizontal acceleration + * @param y The vertical acceleration Default x. + */ + setAcceleration(x: number, y?: number): this; + /** + * [description] + * @param value The horizontal acceleration + */ + setAccelerationX(value: number): this; + /** + * [description] + * @param value The vertical acceleration + */ + setAccelerationY(value: number): this; + } + + /** + * [description] + */ + interface Angular { + /** + * [description] + * @param value [description] + */ + setAngularVelocity(value: number): this; + /** + * [description] + * @param value [description] + */ + setAngularAcceleration(value: number): this; + /** + * [description] + * @param value [description] + */ + setAngularDrag(value: number): this; + } + + /** + * [description] + */ + interface Bounce { + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setBounce(x: number, y?: number): this; + /** + * [description] + * @param value [description] + */ + setBounceX(value: number): this; + /** + * [description] + * @param value [description] + */ + setBounceY(value: number): this; + /** + * [description] + * @param value [description] + */ + setCollideWorldBounds(value: boolean): this; + } + + /** + * [description] + */ + interface Debug { + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this; + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): this; + /** + * [description] + */ + debugShowBody: boolean; + /** + * [description] + */ + debugShowVelocity: boolean; + /** + * [description] + */ + debugBodyColor: number; + } + + /** + * [description] + */ + interface Drag { + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setDrag(x: number, y?: number): this; + /** + * [description] + * @param value [description] + */ + setDragX(value: number): this; + /** + * [description] + * @param value [description] + */ + setDragY(value: number): this; + /** + * [description] + * @param value `true` to use damping for deceleration, or `false` to use linear deceleration. + */ + setDamping(value: boolean): this; + } + + /** + * [description] + */ + interface Enable { + /** + * [description] + * @param reset [description] + * @param x [description] + * @param y [description] + * @param enableGameObject [description] + * @param showGameObject [description] + */ + enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; + /** + * [description] + * @param disableGameObject [description] Default false. + * @param hideGameObject [description] Default false. + */ + disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; + /** + * Syncs the Bodies position and size with its parent Game Object. + * You don't need to call this for Dynamic Bodies, as it happens automatically. + * But for Static bodies it's a useful way of modifying the position of a Static Body + * in the Physics World, based on its Game Object. + */ + refreshBody(): this; + } + + /** + * [description] + */ + interface Friction { + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setFriction(x: number, y?: number): this; + /** + * [description] + * @param x [description] + */ + setFrictionX(x: number): this; + /** + * [description] + * @param y [description] + */ + setFrictionY(y: number): this; + } + + /** + * [description] + */ + interface Gravity { + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setGravity(x: number, y?: number): this; + /** + * [description] + * @param x [description] + */ + setGravityX(x: number): this; + /** + * [description] + * @param y [description] + */ + setGravityY(y: number): this; + } + + /** + * [description] + */ + interface Immovable { + /** + * [description] + * @param value [description] Default true. + */ + setImmovable(value?: boolean): this; + } + + /** + * [description] + */ + interface Mass { + /** + * [description] + * @param value [description] + */ + setMass(value: number): this; + } + + /** + * [description] + */ + interface Size { + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setOffset(x: number, y?: number): this; + /** + * [description] + * @param width [description] + * @param height [description] + * @param center [description] Default true. + */ + setSize(width: number, height: number, center?: boolean): this; + /** + * [description] + * @param radius [description] + * @param offsetX [description] + * @param offsetY [description] + */ + setCircle(radius: number, offsetX?: number, offsetY?: number): this; + } + + /** + * [description] + */ + interface Velocity { + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): this; + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): this; + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): this; + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setMaxVelocity(x: number, y?: number): this; + } + + } + + /** + * [description] + */ + var DYNAMIC_BODY: number; + + /** + * [description] + */ + var STATIC_BODY: number; + + /** + * [description] + */ + var GROUP: number; + + /** + * [description] + */ + var TILEMAPLAYER: number; + + /** + * [description] + */ + var FACING_NONE: number; + + /** + * [description] + */ + var FACING_UP: number; + + /** + * [description] + */ + var FACING_DOWN: number; + + /** + * [description] + */ + var FACING_LEFT: number; + + /** + * [description] + */ + var FACING_RIGHT: number; + + namespace Tilemap { + /** + * [description] + * @param tile [description] + * @param sprite [description] + */ + function ProcessTileCallbacks(tile: Phaser.Tilemaps.Tilemap, sprite: Phaser.GameObjects.Sprite): boolean; + + /** + * Internal function to process the separation of a physics body from a tile. + * @param body The Body object to separate. + * @param x The x separation amount. + */ + function ProcessTileSeparationX(body: Phaser.Physics.Arcade.Body, x: number): void; + + /** + * Internal function to process the separation of a physics body from a tile. + * @param body The Body object to separate. + * @param y The y separation amount. + */ + function ProcessTileSeparationY(body: Phaser.Physics.Arcade.Body, y: number): void; + + /** + * The core separation function to separate a physics body and a tile. + * @param i [description] + * @param body The Body object to separate. + * @param tile The tile to collide against. + * @param tileWorldRect [description] + * @param tilemapLayer The tilemapLayer to collide against. + * @param tileBias [description] + */ + function SeparateTile(i: number, body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileWorldRect: Phaser.Geom.Rectangle, tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, tileBias: number): boolean; + + /** + * Check the body against the given tile on the X axis. + * @param body The Body object to separate. + * @param tile The tile to check. + * @param tileLeft [description] + * @param tileRight [description] + * @param tileBias [description] + */ + function TileCheckX(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileLeft: number, tileRight: number, tileBias: number): number; + + /** + * Check the body against the given tile on the Y axis. + * @param body The Body object to separate. + * @param tile The tile to check. + * @param tileTop [description] + * @param tileBottom [description] + * @param tileBias [description] + */ + function TileCheckY(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileTop: number, tileBottom: number, tileBias: number): number; + + /** + * [description] + * @param tileWorldRect [description] + * @param body [description] + */ + function TileIntersectsBody(tileWorldRect: Object, body: Phaser.Physics.Arcade.Body): boolean; + + } + + } + + /** + * An Impact.js compatible physics world, body and solver, for those who are used + * to the Impact way of defining and controlling physics bodies. Also works with + * the new Loader support for Weltmeister map data. + * + * World updated to run off the Phaser main loop. + * Body extended to support additional setter functions. + * + * To create the map data you'll need Weltmeister, which comes with Impact + * and can be purchased from http://impactjs.com + * + * My thanks to Dominic Szablewski for his permission to support Impact in Phaser. + */ + namespace Impact { + /** + * An Impact.js compatible physics body. + * This re-creates the properties you'd get on an Entity and the math needed to update them. + */ + class Body { + /** + * + * @param world [description] + * @param x [description] + * @param y [description] + * @param sx [description] Default 16. + * @param sy [description] Default 16. + */ + constructor(world: Phaser.Physics.Impact.World, x: number, y: number, sx?: number, sy?: number); + + /** + * [description] + */ + world: Phaser.Physics.Impact.World; + + /** + * [description] + */ + gameObject: Phaser.GameObjects.GameObject; + + /** + * [description] + */ + enabled: boolean; + + /** + * The ImpactBody, ImpactSprite or ImpactImage object that owns this Body, if any. + */ + parent: Phaser.Physics.Impact.ImpactBody | Phaser.Physics.Impact.ImpactImage | Phaser.Physics.Impact.ImpactSprite; + + /** + * [description] + */ + id: integer; + + /** + * [description] + */ + name: string; + + /** + * [description] + */ + size: Object; + + /** + * [description] + */ + offset: Object; + + /** + * [description] + */ + pos: Object; + + /** + * [description] + */ + last: Object; + + /** + * [description] + */ + vel: Object; + + /** + * [description] + */ + accel: Object; + + /** + * [description] + */ + friction: Object; + + /** + * [description] + */ + maxVel: Object; + + /** + * [description] + */ + standing: boolean; + + /** + * [description] + */ + gravityFactor: number; + + /** + * [description] + */ + bounciness: number; + + /** + * [description] + */ + minBounceVelocity: number; + + /** + * [description] + */ + accelGround: number; + + /** + * [description] + */ + accelAir: number; + + /** + * [description] + */ + jumpSpeed: number; + + /** + * [description] + */ + type: Phaser.Physics.Impact.TYPE; + + /** + * [description] + */ + checkAgainst: Phaser.Physics.Impact.TYPE; + + /** + * [description] + */ + collides: Phaser.Physics.Impact.COLLIDES; + + /** + * [description] + */ + debugShowBody: boolean; + + /** + * [description] + */ + debugShowVelocity: boolean; + + /** + * [description] + */ + debugBodyColor: integer; + + /** + * [description] + */ + updateCallback: BodyUpdateCallback; + + /** + * min 44 deg, max 136 deg + */ + slopeStanding: Object; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + reset(x: number, y: number): void; + + /** + * [description] + * @param delta [description] + */ + update(delta: number): void; + + /** + * [description] + * @param graphic [description] + */ + drawDebug(graphic: Phaser.GameObjects.Graphics): void; + + /** + * [description] + */ + willDrawDebug(): boolean; + + /** + * [description] + */ + skipHash(): boolean; + + /** + * [description] + * @param other [description] + */ + touches(other: Phaser.Physics.Impact.Body): boolean; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + resetSize(x: number, y: number, width: number, height: number): Phaser.Physics.Impact.Body; + + /** + * [description] + */ + toJSON(): JSONImpactBody; + + /** + * [description] + * @param config [description] + */ + fromJSON(config: object): void; + + /** + * Can be overridden by user code + * @param other [description] + */ + check(other: Phaser.Physics.Impact.Body): void; + + /** + * Can be overridden by user code + * @param other [description] + * @param axis [description] + */ + collideWith(other: Phaser.Physics.Impact.Body, axis: string): void; + + /** + * Can be overridden by user code but must return a boolean. + * @param res [description] + */ + handleMovementTrace(res: number): boolean; + + /** + * [description] + */ + destroy(): void; + + } + + /** + * Collision Types - Determine if and how entities collide with each other. + * + * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves, + * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE + * collisions, both entities are moved. LITE or PASSIVE entities don't collide + * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. + * FIXED collisions is undefined. + */ + enum COLLIDES { + /** + * Never collides. + */ + NEVER, + /** + * Lite collision. + */ + LITE, + /** + * Passive collision. + */ + PASSIVE, + /** + * Active collision. + */ + ACTIVE, + /** + * Fixed collision. + */ + FIXED, + } + + /** + * [description] + */ + class CollisionMap { + /** + * + * @param tilesize [description] Default 32. + * @param data [description] + */ + constructor(tilesize?: integer, data?: any[]); + + /** + * [description] + */ + tilesize: integer; + + /** + * [description] + */ + data: any[]; + + /** + * [description] + */ + width: number; + + /** + * [description] + */ + height: number; + + /** + * [description] + */ + lastSlope: integer; + + /** + * [description] + */ + tiledef: object; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param vx [description] + * @param vy [description] + * @param objectWidth [description] + * @param objectHeight [description] + */ + trace(x: number, y: number, vx: number, vy: number, objectWidth: number, objectHeight: number): boolean; + + /** + * [description] + * @param res [description] + * @param x [description] + * @param y [description] + * @param vx [description] + * @param vy [description] + * @param width [description] + * @param height [description] + * @param rvx [description] + * @param rvy [description] + * @param step [description] + */ + step(res: object, x: number, y: number, vx: number, vy: number, width: number, height: number, rvx: number, rvy: number, step: number): void; + + /** + * [description] + * @param res [description] + * @param t [description] + * @param x [description] + * @param y [description] + * @param vx [description] + * @param vy [description] + * @param width [description] + * @param height [description] + * @param tileX [description] + * @param tileY [description] + */ + checkDef(res: object, t: number, x: number, y: number, vx: number, vy: number, width: number, height: number, tileX: number, tileY: number): boolean; + + } + + /** + * The Impact Physics Factory allows you to easily create Impact Physics enabled Game Objects. + * Objects that are created by this Factory are automatically added to the physics world. + */ + class Factory { + /** + * + * @param world [description] + */ + constructor(world: Phaser.Physics.Impact.World); + + /** + * [description] + */ + world: Phaser.Physics.Impact.World; + + /** + * A reference to the Scene.Systems this Impact Physics instance belongs to. + */ + sys: Phaser.Scenes.Systems; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + body(x: number, y: number, width: number, height: number): Phaser.Physics.Impact.ImpactBody; + + /** + * Adds an Impact Physics Body to the given Game Object. + * @param gameObject [description] + */ + existing(gameObject: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + image(x: number, y: number, key: string, frame?: string | integer): Phaser.Physics.Impact.ImpactImage; + + /** + * [description] + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + sprite(x: number, y: number, key: string, frame?: string | integer): Phaser.Physics.Impact.ImpactSprite; + + /** + * Destroys this Factory. + */ + destroy(): void; + + } + + /** + * [description] + * @param delta [description] + * @param vel [description] + * @param accel [description] + * @param friction [description] + * @param max [description] + */ + function GetVelocity(delta: number, vel: number, accel: number, friction: number, max: number): number; + + /** + * [description] + */ + class ImpactBody implements Phaser.Physics.Impact.Components.Acceleration, Phaser.Physics.Impact.Components.BodyScale, Phaser.Physics.Impact.Components.BodyType, Phaser.Physics.Impact.Components.Bounce, Phaser.Physics.Impact.Components.CheckAgainst, Phaser.Physics.Impact.Components.Collides, Phaser.Physics.Impact.Components.Debug, Phaser.Physics.Impact.Components.Friction, Phaser.Physics.Impact.Components.Gravity, Phaser.Physics.Impact.Components.Offset, Phaser.Physics.Impact.Components.SetGameObject, Phaser.Physics.Impact.Components.Velocity { + /** + * + * @param world [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + constructor(world: Phaser.Physics.Impact.World, x: number, y: number, width: number, height: number); + + /** + * [description] + */ + body: Phaser.Physics.Impact.Body; + + /** + * [description] + */ + size: Object; + + /** + * [description] + */ + offset: Object; + + /** + * [description] + */ + vel: Object; + + /** + * [description] + */ + accel: Object; + + /** + * [description] + */ + friction: Object; + + /** + * [description] + */ + maxVel: Object; + + /** + * [description] + * @param x [description] + */ + setAccelerationX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setAccelerationY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + setAcceleration(x: number, y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param width [description] + * @param height [description] Default width. + */ + setBodySize(width: number, height?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param scaleX [description] + * @param scaleY [description] + */ + setBodyScale(scaleX: number, scaleY?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + getBodyType(): number; + + /** + * [description] + */ + setTypeNone(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setTypeA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setTypeB(): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setMinBounceVelocity(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + bounce: number; + + /** + * [description] + */ + setAvsB(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setBvsA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstNone(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstB(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + checkAgainst: number; + + /** + * [description] + * @param callback [description] + * @param scope [description] + */ + setCollideCallback(callback: CollideCallback, scope: any): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCollidesNever(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setLiteCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setPassiveCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setActiveCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setFixedCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + collides: number; + + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + debugShowBody: boolean; + + /** + * [description] + */ + debugShowVelocity: boolean; + + /** + * [description] + */ + debugBodyColor: number; + + /** + * [description] + * @param x [description] + */ + setFrictionX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setFrictionY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + setFriction(x: number, y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setGravity(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + gravity: number; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + setOffset(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param gameObject [description] + * @param sync [description] Default true. + */ + setGameObject(gameObject: Phaser.GameObjects.GameObject, sync?: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + syncGameObject(): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setMaxVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + + } + + /** + * An Impact Physics Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. + */ + class ImpactImage extends Phaser.GameObjects.Image implements Phaser.Physics.Impact.Components.Acceleration, Phaser.Physics.Impact.Components.BodyScale, Phaser.Physics.Impact.Components.BodyType, Phaser.Physics.Impact.Components.Bounce, Phaser.Physics.Impact.Components.CheckAgainst, Phaser.Physics.Impact.Components.Collides, Phaser.Physics.Impact.Components.Debug, Phaser.Physics.Impact.Components.Friction, Phaser.Physics.Impact.Components.Gravity, Phaser.Physics.Impact.Components.Offset, Phaser.Physics.Impact.Components.SetGameObject, Phaser.Physics.Impact.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param world [description] + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(world: Phaser.Physics.Impact.World, x: number, y: number, texture: string, frame?: string | integer); + + /** + * [description] + */ + body: Phaser.Physics.Impact.Body; + + /** + * [description] + */ + size: Object; + + /** + * [description] + */ + offset: Object; + + /** + * [description] + */ + vel: Object; + + /** + * [description] + */ + accel: Object; + + /** + * [description] + */ + friction: Object; + + /** + * [description] + */ + maxVel: Object; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * [description] + * @param x [description] + */ + setAccelerationX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setAccelerationY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + setAcceleration(x: number, y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param width [description] + * @param height [description] Default width. + */ + setBodySize(width: number, height?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param scaleX [description] + * @param scaleY [description] + */ + setBodyScale(scaleX: number, scaleY?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + getBodyType(): number; + + /** + * [description] + */ + setTypeNone(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setTypeA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setTypeB(): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setMinBounceVelocity(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + bounce: number; + + /** + * [description] + */ + setAvsB(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setBvsA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstNone(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstB(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + checkAgainst: number; + + /** + * [description] + * @param callback [description] + * @param scope [description] + */ + setCollideCallback(callback: CollideCallback, scope: any): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCollidesNever(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setLiteCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setPassiveCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setActiveCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setFixedCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + collides: number; + + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + debugShowBody: boolean; + + /** + * [description] + */ + debugShowVelocity: boolean; + + /** + * [description] + */ + debugBodyColor: number; + + /** + * [description] + * @param x [description] + */ + setFrictionX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setFrictionY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + setFriction(x: number, y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setGravity(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + gravity: number; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + setOffset(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param gameObject [description] + * @param sync [description] Default true. + */ + setGameObject(gameObject: Phaser.GameObjects.GameObject, sync?: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + syncGameObject(): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setMaxVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + + } + + /** + * [description] + */ + class ImpactPhysics { + /** + * + * @param scene [description] + */ + constructor(scene: Phaser.Scene); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + systems: Phaser.Scenes.Systems; + + /** + * [description] + */ + config: object; + + /** + * [description] + */ + world: Phaser.Physics.Impact.World; + + /** + * [description] + */ + add: Phaser.Physics.Impact.Factory; + + /** + * [description] + */ + getConfig(): object; + + /** + * [description] + */ + pause(): Phaser.Physics.Impact.World; + + /** + * [description] + */ + resume(): Phaser.Physics.Impact.World; + + } + + /** + * An Impact Physics Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. + */ + class ImpactSprite extends Phaser.GameObjects.Sprite implements Phaser.Physics.Impact.Components.Acceleration, Phaser.Physics.Impact.Components.BodyScale, Phaser.Physics.Impact.Components.BodyType, Phaser.Physics.Impact.Components.Bounce, Phaser.Physics.Impact.Components.CheckAgainst, Phaser.Physics.Impact.Components.Collides, Phaser.Physics.Impact.Components.Debug, Phaser.Physics.Impact.Components.Friction, Phaser.Physics.Impact.Components.Gravity, Phaser.Physics.Impact.Components.Offset, Phaser.Physics.Impact.Components.SetGameObject, Phaser.Physics.Impact.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param world [description] + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + */ + constructor(world: Phaser.Physics.Impact.World, x: number, y: number, texture: string, frame?: string | integer); + + /** + * [description] + */ + body: Phaser.Physics.Impact.Body; + + /** + * [description] + */ + size: Object; + + /** + * [description] + */ + offset: Object; + + /** + * [description] + */ + vel: Object; + + /** + * [description] + */ + accel: Object; + + /** + * [description] + */ + friction: Object; + + /** + * [description] + */ + maxVel: Object; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * [description] + * @param x [description] + */ + setAccelerationX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setAccelerationY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + setAcceleration(x: number, y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param width [description] + * @param height [description] Default width. + */ + setBodySize(width: number, height?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param scaleX [description] + * @param scaleY [description] + */ + setBodyScale(scaleX: number, scaleY?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + getBodyType(): number; + + /** + * [description] + */ + setTypeNone(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setTypeA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setTypeB(): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setMinBounceVelocity(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + bounce: number; + + /** + * [description] + */ + setAvsB(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setBvsA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstNone(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstA(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCheckAgainstB(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + checkAgainst: number; + + /** + * [description] + * @param callback [description] + * @param scope [description] + */ + setCollideCallback(callback: CollideCallback, scope: any): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setCollidesNever(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setLiteCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setPassiveCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setActiveCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + setFixedCollision(): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + collides: number; + + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + debugShowBody: boolean; + + /** + * [description] + */ + debugShowVelocity: boolean; + + /** + * [description] + */ + debugBodyColor: number; + + /** + * [description] + * @param x [description] + */ + setFrictionX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setFrictionY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] + */ + setFriction(x: number, y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setGravity(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + gravity: number; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + setOffset(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param gameObject [description] + * @param sync [description] Default true. + */ + setGameObject(gameObject: Phaser.GameObjects.GameObject, sync?: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + syncGameObject(): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setMaxVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + + } + + /** + * [description] + * @param world [description] + * @param left [description] + * @param right [description] + * @param weak [description] + */ + function SeperateX(world: Phaser.Physics.Impact.World, left: Phaser.Physics.Impact.Body, right: Phaser.Physics.Impact.Body, weak?: Phaser.Physics.Impact.Body): void; + + /** + * [description] + * @param world [description] + * @param top [description] + * @param bottom [description] + * @param weak [description] + */ + function SeperateY(world: Phaser.Physics.Impact.World, top: Phaser.Physics.Impact.Body, bottom: Phaser.Physics.Impact.Body, weak?: Phaser.Physics.Impact.Body): void; + + /** + * Impact Physics Solver + * @param world [description] + * @param bodyA [description] + * @param bodyB [description] + */ + function Solver(world: Phaser.Physics.Impact.World, bodyA: Phaser.Physics.Impact.Body, bodyB: Phaser.Physics.Impact.Body): void; + + /** + * Collision Types - Determine if and how entities collide with each other. + * + * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves, + * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE + * collisions, both entities are moved. LITE or PASSIVE entities don't collide + * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. + * FIXED collisions is undefined. + */ + enum TYPE { + /** + * Collides with nothing. + */ + NONE, + /** + * Type A. Collides with Type B. + */ + A, + /** + * Type B. Collides with Type A. + */ + B, + /** + * Collides with both types A and B. + */ + BOTH, + } + + /** + * Set up the trace-result + * var res = { + * collision: {x: false, y: false, slope: false}, + * pos: {x: x, y: y}, + * tile: {x: 0, y: 0} + * }; + * @param body [description] + * @param res [description] + */ + function UpdateMotion(body: Phaser.Physics.Impact.Body, res: object): void; + + type WorldConfig = { + /** + * [description] + */ + gravity?: number; + /** + * [description] + */ + cellSize?: number; + /** + * [description] + */ + timeScale?: number; + /** + * [description] + */ + maxStep?: number; + /** + * [description] + */ + debug?: boolean; + /** + * [description] + */ + maxVelocity?: number; + /** + * [description] + */ + debugShowBody?: boolean; + /** + * [description] + */ + debugShowVelocity?: boolean; + /** + * [description] + */ + debugBodyColor?: number; + /** + * [description] + */ + debugVelocityColor?: number; + /** + * [description] + */ + maxVelocityX?: number; + /** + * [description] + */ + maxVelocityY?: number; + /** + * [description] + */ + minBounceVelocity?: number; + /** + * [description] + */ + gravityFactor?: number; + /** + * [description] + */ + bounciness?: number; + /** + * [description] + */ + setBounds?: object | boolean; + /** + * [description] + */ + "setBounds.x"?: number; + /** + * [description] + */ + "setBounds.y"?: number; + /** + * [description] + */ + "setBounds.width"?: number; + /** + * [description] + */ + "setBounds.height"?: number; + /** + * [description] + */ + "setBounds.thickness"?: number; + /** + * [description] + */ + "setBounds.left"?: boolean; + /** + * [description] + */ + "setBounds.right"?: boolean; + /** + * [description] + */ + "setBounds.top"?: boolean; + /** + * [description] + */ + "setBounds.bottom"?: boolean; + }; + + /** + * An object containing the 4 wall bodies that bound the physics world. + */ + type WorldDefaults = { + /** + * [description] + */ + debugShowBody: boolean; + /** + * [description] + */ + debugShowVelocity: boolean; + /** + * [description] + */ + bodyDebugColor: number; + /** + * [description] + */ + velocityDebugColor: number; + /** + * [description] + */ + maxVelocityX: number; + /** + * [description] + */ + maxVelocityY: number; + /** + * [description] + */ + minBounceVelocity: number; + /** + * [description] + */ + gravityFactor: number; + /** + * [description] + */ + bounciness: number; + }; + + type WorldWalls = { + /** + * [description] + */ + left: Phaser.Physics.Impact.Body; + /** + * [description] + */ + right: Phaser.Physics.Impact.Body; + /** + * [description] + */ + top: Phaser.Physics.Impact.Body; + /** + * [description] + */ + bottom: Phaser.Physics.Impact.Body; + }; + + /** + * [description] + */ + class World extends Phaser.Events.EventEmitter { + /** + * + * @param scene [description] + * @param config [description] + */ + constructor(scene: Phaser.Scene, config: Phaser.Physics.Impact.WorldConfig); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + bodies: Phaser.Structs.Set; + + /** + * [description] + */ + gravity: number; + + /** + * Spatial hash cell dimensions + */ + cellSize: integer; + + /** + * [description] + */ + collisionMap: Phaser.Physics.Impact.CollisionMap; + + /** + * [description] + */ + timeScale: number; + + /** + * Impacts maximum time step is 20 fps. + */ + maxStep: number; + + /** + * [description] + */ + enabled: boolean; + + /** + * [description] + */ + drawDebug: boolean; + + /** + * [description] + */ + debugGraphic: Phaser.GameObjects.Graphics; + + /** + * [description] + */ + defaults: Phaser.Physics.Impact.WorldDefaults; + + /** + * An object containing the 4 wall bodies that bound the physics world. + */ + walls: Phaser.Physics.Impact.WorldWalls; + + /** + * [description] + */ + delta: number; + + /** + * Sets the collision map for the world either from a Weltmeister JSON level in the cache or from + * a 2D array. If loading from a Weltmeister level, the map must have a layer called "collision". + * @param key Either a string key that corresponds to a Weltmeister level + * in the cache, or a 2D array of collision IDs. + * @param tileSize The size of a tile. This is optional if loading from a Weltmeister + * level in the cache. + */ + setCollisionMap(key: string | integer[][], tileSize: integer): Phaser.Physics.Impact.CollisionMap; + + /** + * Sets the collision map for the world from a tilemap layer. Only tiles that are marked as + * colliding will be used. You can specify the mapping from tiles to slope IDs in a couple of + * ways. The easiest is to use Tiled and the slopeTileProperty option. Alternatively, you can + * manually create a slopeMap that stores the mapping between tile indices and slope IDs. + * @param tilemapLayer The tilemap layer to use. + * @param options Options for controlling the mapping from tiles to slope IDs. + * @param options.slopeTileProperty Slope IDs can be stored on tiles directly + * using Tiled's tileset editor. If a tile has a property with the given slopeTileProperty string + * name, the value of that property for the tile will be used for its slope mapping. E.g. a 45 + * degree slope upward could be given a "slope" property with a value of 2. Default null. + * @param options.slopeMap A tile index to slope definition map. Default null. + * @param options.defaultCollidingSlope If specified, the default slope ID to + * assign to a colliding tile. If not specified, the tile's index is used. Default null. + * @param options.defaultNonCollidingSlope The default slope ID to assign to a + * non-colliding tile. Default 0. + */ + setCollisionMapFromTilemapLayer(tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, options?: object): Phaser.Physics.Impact.CollisionMap; + + /** + * Sets the bounds of the Physics world to match the given world pixel dimensions. + * You can optionally set which 'walls' to create: left, right, top or bottom. + * If none of the walls are given it will default to use the walls settings it had previously. + * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size + * the newly created bounds will also not have the left and right walls. + * Explicitly state them in the parameters to override this. + * @param x The x coordinate of the top-left corner of the bounds. + * @param y The y coordinate of the top-left corner of the bounds. + * @param width The width of the bounds. + * @param height The height of the bounds. + * @param thickness [description] Default 64. + * @param left If true will create the left bounds wall. Default true. + * @param right If true will create the right bounds wall. Default true. + * @param top If true will create the top bounds wall. Default true. + * @param bottom If true will create the bottom bounds wall. Default true. + */ + setBounds(x?: number, y?: number, width?: number, height?: number, thickness?: number, left?: boolean, right?: boolean, top?: boolean, bottom?: boolean): Phaser.Physics.Impact.World; + + /** + * position = 'left', 'right', 'top' or 'bottom' + * @param add [description] + * @param position [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + updateWall(add: boolean, position: string, x: number, y: number, width: number, height: number): void; + + /** + * [description] + */ + createDebugGraphic(): Phaser.GameObjects.Graphics; + + /** + * [description] + */ + getNextID(): integer; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param sizeX [description] + * @param sizeY [description] + */ + create(x: number, y: number, sizeX: number, sizeY: number): Phaser.Physics.Impact.Body; + + /** + * [description] + * @param object The Body to remove from this World. + */ + remove(object: Phaser.Physics.Impact.Body): void; + + /** + * [description] + */ + pause(): Phaser.Physics.Impact.World; + + /** + * [description] + */ + resume(): Phaser.Physics.Impact.World; + + /** + * [description] + * @param time [description] + * @param delta [description] + */ + update(time: number, delta: number): void; + + /** + * Check the body against the spatial hash. + * @param body [description] + * @param hash [description] + * @param size [description] + */ + checkHash(body: Phaser.Physics.Impact.Body, hash: object, size: number): void; + + /** + * [description] + * @param bodyA [description] + * @param bodyB [description] + */ + checkBodies(bodyA: Phaser.Physics.Impact.Body, bodyB: Phaser.Physics.Impact.Body): void; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the collides value on. + */ + setCollidesNever(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the collides value on. + */ + setLite(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the collides value on. + */ + setPassive(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the collides value on. + */ + setActive(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the collides value on. + */ + setFixed(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the type value on. + */ + setTypeNone(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the type value on. + */ + setTypeA(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the type value on. + */ + setTypeB(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the type value on. + */ + setAvsB(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the type value on. + */ + setBvsA(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the type value on. + */ + setCheckAgainstNone(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the type value on. + */ + setCheckAgainstA(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + * @param bodies An Array of Impact Bodies to set the type value on. + */ + setCheckAgainstB(bodies: Phaser.Physics.Impact.Body[]): Phaser.Physics.Impact.World; + + /** + * [description] + */ + shutdown(): void; + + /** + * [description] + */ + destroy(): void; + + } + + namespace Components { + /** + * [description] + */ + interface Acceleration { + /** + * [description] + * @param x [description] + */ + setAccelerationX(x: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param y [description] + */ + setAccelerationY(y: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param x [description] + * @param y [description] + */ + setAcceleration(x: number, y: number): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface BodyScale { + /** + * [description] + * @param width [description] + * @param height [description] Default width. + */ + setBodySize(width: number, height?: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param scaleX [description] + * @param scaleY [description] + */ + setBodyScale(scaleX: number, scaleY?: number): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface BodyType { + /** + * [description] + */ + getBodyType(): number; + /** + * [description] + */ + setTypeNone(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setTypeA(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setTypeB(): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Bounce { + /** + * [description] + * @param value [description] + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setMinBounceVelocity(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + */ + bounce: number; + } + + /** + * [description] + */ + interface CheckAgainst { + /** + * [description] + */ + setAvsB(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setBvsA(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCheckAgainstNone(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCheckAgainstA(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCheckAgainstB(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + checkAgainst: number; + } + + /** + * [description] + */ + interface Collides { + /** + * [description] + * @param callback [description] + * @param scope [description] + */ + setCollideCallback(callback: CollideCallback, scope: any): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setCollidesNever(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setLiteCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setPassiveCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setActiveCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setFixedCollision(): Phaser.GameObjects.GameObject; + /** + * [description] + */ + collides: number; + } + + /** + * [description] + */ + interface Debug { + /** + * [description] + * @param showBody [description] + * @param showVelocity [description] + * @param bodyColor [description] + */ + setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setDebugBodyColor(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + */ + debugShowBody: boolean; + /** + * [description] + */ + debugShowVelocity: boolean; + /** + * [description] + */ + debugBodyColor: number; + } + + /** + * [description] + */ + interface Friction { + /** + * [description] + * @param x [description] + */ + setFrictionX(x: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param y [description] + */ + setFrictionY(y: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param x [description] + * @param y [description] + */ + setFriction(x: number, y: number): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Gravity { + /** + * [description] + * @param value [description] + */ + setGravity(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + */ + gravity: number; + } + + /** + * [description] + */ + interface Offset { + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + setOffset(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface SetGameObject { + /** + * [description] + * @param gameObject [description] + * @param sync [description] Default true. + */ + setGameObject(gameObject: Phaser.GameObjects.GameObject, sync?: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + */ + syncGameObject(): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Velocity { + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setMaxVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + } + + } + + } + + namespace Matter { + /** + * [description] + */ + class Factory { + /** + * + * @param world [description] + */ + constructor(world: Phaser.Physics.Matter.World); + + /** + * [description] + */ + world: Phaser.Physics.Matter.World; + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * A reference to the Scene.Systems this Matter Physics instance belongs to. + */ + sys: Phaser.Scenes.Systems; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + * @param options [description] + */ + rectangle(x: number, y: number, width: number, height: number, options: object): MatterJS.Body; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + * @param slope [description] + * @param options [description] + */ + trapezoid(x: number, y: number, width: number, height: number, slope: number, options: object): MatterJS.Body; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param radius [description] + * @param options [description] + * @param maxSides [description] + */ + circle(x: number, y: number, radius: number, options: object, maxSides: number): MatterJS.Body; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param sides [description] + * @param radius [description] + * @param options [description] + */ + polygon(x: number, y: number, sides: number, radius: number, options: object): MatterJS.Body; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param vertexSets [description] + * @param options [description] + * @param flagInternal [description] + * @param removeCollinear [description] + * @param minimumArea [description] + */ + fromVertices(x: number, y: number, vertexSets: any[], options: object, flagInternal: boolean, removeCollinear: boolean, minimumArea: number): MatterJS.Body; + + /** + * Create a new composite containing Matter Image objects created in a grid arrangement. + * This function uses the body bounds to prevent overlaps. + * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. + * @param x The horizontal position of this composite in the world. + * @param y The vertical position of this composite in the world. + * @param columns The number of columns in the grid. + * @param rows The number of rows in the grid. + * @param columnGap The distance between each column. Default 0. + * @param rowGap The distance between each row. Default 0. + * @param options [description] + */ + imageStack(key: string, frame: string | integer, x: number, y: number, columns: number, rows: number, columnGap?: number, rowGap?: number, options?: object): MatterJS.Composite; + + /** + * Create a new composite containing bodies created in the callback in a grid arrangement. + * This function uses the body bounds to prevent overlaps. + * @param x The horizontal position of this composite in the world. + * @param y The vertical position of this composite in the world. + * @param columns The number of columns in the grid. + * @param rows The number of rows in the grid. + * @param columnGap The distance between each column. + * @param rowGap The distance between each row. + * @param callback The callback that creates the stack. + */ + stack(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): MatterJS.Composite; + + /** + * Create a new composite containing bodies created in the callback in a pyramid arrangement. + * This function uses the body bounds to prevent overlaps. + * @param x The horizontal position of this composite in the world. + * @param y The vertical position of this composite in the world. + * @param columns The number of columns in the pyramid. + * @param rows The number of rows in the pyramid. + * @param columnGap The distance between each column. + * @param rowGap The distance between each row. + * @param callback [description] + */ + pyramid(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): MatterJS.Composite; + + /** + * Chains all bodies in the given composite together using constraints. + * @param composite [description] + * @param xOffsetA [description] + * @param yOffsetA [description] + * @param xOffsetB [description] + * @param yOffsetB [description] + * @param options [description] + */ + chain(composite: MatterJS.Composite, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options: object): MatterJS.Composite; + + /** + * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. + * @param composite [description] + * @param columns [description] + * @param rows [description] + * @param crossBrace [description] + * @param options [description] + */ + mesh(composite: MatterJS.Composite, columns: number, rows: number, crossBrace: boolean, options: object): MatterJS.Composite; + + /** + * Creates a composite with a Newton's Cradle setup of bodies and constraints. + * @param x [description] + * @param y [description] + * @param number [description] + * @param size [description] + * @param length [description] + */ + newtonsCradle(x: number, y: number, number: number, size: number, length: number): MatterJS.Composite; + + /** + * Creates a composite with simple car setup of bodies and constraints. + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + * @param wheelSize [description] + */ + car(x: number, y: number, width: number, height: number, wheelSize: number): MatterJS.Composite; + + /** + * Creates a simple soft body like object. + * @param x The horizontal position of this composite in the world. + * @param y The vertical position of this composite in the world. + * @param columns The number of columns in the Composite. + * @param rows The number of rows in the Composite. + * @param columnGap The distance between each column. + * @param rowGap The distance between each row. + * @param crossBrace [description] + * @param particleRadius [description] + * @param particleOptions [description] + * @param constraintOptions [description] + */ + softBody(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions: object, constraintOptions: object): MatterJS.Composite; + + /** + * [description] + * @param bodyA [description] + * @param bodyB [description] + * @param length [description] + * @param stiffness [description] Default 1. + * @param options [description] Default {}. + */ + joint(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length: number, stiffness?: number, options?: object): MatterJS.Constraint; + + /** + * [description] + * @param bodyA [description] + * @param bodyB [description] + * @param length [description] + * @param stiffness [description] Default 1. + * @param options [description] Default {}. + */ + spring(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length: number, stiffness?: number, options?: object): MatterJS.Constraint; + + /** + * [description] + * @param bodyA [description] + * @param bodyB [description] + * @param length [description] + * @param stiffness [description] Default 1. + * @param options [description] Default {}. + */ + constraint(bodyA: MatterJS.Body, bodyB: MatterJS.Body, length: number, stiffness?: number, options?: object): MatterJS.Constraint; + + /** + * [description] + * @param bodyB [description] + * @param length [description] + * @param stiffness [description] Default 1. + * @param options [description] Default {}. + */ + worldConstraint(bodyB: MatterJS.Body, length: number, stiffness?: number, options?: object): MatterJS.Constraint; + + /** + * [description] + * @param options [description] + */ + mouseSpring(options: object): MatterJS.Constraint; + + /** + * [description] + * @param options [description] + */ + pointerConstraint(options: object): MatterJS.Constraint; + + /** + * [description] + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. + * @param options [description] Default {}. + */ + image(x: number, y: number, key: string, frame?: string | integer, options?: object): Phaser.Physics.Matter.Image; + + /** + * [description] + * @param tile [description] + * @param options [description] + */ + tileBody(tile: Phaser.Tilemaps.Tile, options: object): Phaser.Physics.Matter.TileBody; + + /** + * [description] + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. + * @param options [description] Default {}. + */ + sprite(x: number, y: number, key: string, frame?: string | integer, options?: object): Phaser.Physics.Matter.Sprite; + + /** + * [description] + * @param gameObject The Game Object to inject the Matter Body in to. + * @param options [description] + */ + gameObject(gameObject: Phaser.GameObjects.GameObject, options: object): Phaser.GameObjects.GameObject; + + /** + * Destroys this Factory. + */ + destroy(): void; + + } + + /** + * [description] + * @param world [description] + * @param gameObject [description] + * @param options [description] + */ + function MatterGameObject(world: Phaser.Physics.Matter.World, gameObject: Phaser.GameObjects.GameObject, options: object): Phaser.GameObjects.GameObject; + + /** + * A Matter Physics Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. + */ + class Image extends Phaser.GameObjects.Image implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Force, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.SetBody, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static, Phaser.Physics.Matter.Components.Transform, Phaser.Physics.Matter.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param world [description] + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + * @param options Matter.js configuration object. Default {}. + */ + constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string, frame?: string | integer, options?: object); + + /** + * [description] + */ + world: Phaser.Physics.Matter.World; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * [description] + * @param value [description] + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value Unique category bitfield. + */ + setCollisionCategory(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value Unique group index. + */ + setCollisionGroup(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param categories A unique category bitfield, or an array of them. + */ + setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param force [description] + */ + applyForce(force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param position [description] + * @param force [description] + */ + applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param speed [description] + */ + thrust(speed: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param speed [description] + */ + thrustLeft(speed: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param speed [description] + */ + thrustRight(speed: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param speed [description] + */ + thrustBack(speed: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + * @param air [description] + * @param fstatic [description] + */ + setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setFrictionAir(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setFrictionStatic(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setIgnoreGravity(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setMass(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setDensity(value: number): Phaser.GameObjects.GameObject; + + /** + * The body's center of mass. + */ + readonly centerOfMass: any; + + /** + * [description] + * @param value [description] + */ + setSensor(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + isSensor(): boolean; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param options [description] + */ + setRectangle(width: number, height: number, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param radius [description] + * @param options [description] + */ + setCircle(radius: number, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param radius [description] + * @param sides [description] + * @param options [description] + */ + setPolygon(radius: number, sides: number, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param slope [description] + * @param options [description] + */ + setTrapezoid(width: number, height: number, slope: number, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param body [description] + * @param addToWorld [description] Default true. + */ + setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param config [description] + * @param options [description] + */ + setBody(config: object, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] Default 60. + */ + setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param start [description] + * @param end [description] + */ + setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setStatic(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + isStatic(): boolean; + + /** + * [description] + */ + setFixedRotation(): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setAngularVelocity(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + + } + + /** + * [description] + */ + class MatterPhysics { + /** + * + * @param scene [description] + */ + constructor(scene: Phaser.Scene); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + systems: Phaser.Scenes.Systems; + + /** + * [description] + */ + config: object; + + /** + * [description] + */ + world: Phaser.Physics.Matter.World; + + /** + * [description] + */ + add: Phaser.Physics.Matter.Factory; + + /** + * [description] + */ + getConfig(): object; + + /** + * [description] + */ + enableAttractorPlugin(): Phaser.Physics.Matter.MatterPhysics; + + /** + * [description] + */ + enableWrapPlugin(): Phaser.Physics.Matter.MatterPhysics; + + /** + * [description] + */ + pause(): Phaser.Physics.Matter.World; + + /** + * [description] + */ + resume(): Phaser.Physics.Matter.World; + + /** + * Sets the Matter Engine to run at fixed timestep of 60Hz and enables `autoUpdate`. + * If you have set a custom `getDelta` function then this will override it. + */ + set60Hz(): Phaser.Physics.Matter.MatterPhysics; + + /** + * Sets the Matter Engine to run at fixed timestep of 30Hz and enables `autoUpdate`. + * If you have set a custom `getDelta` function then this will override it. + */ + set30Hz(): Phaser.Physics.Matter.MatterPhysics; + + /** + * Manually advances the physics simulation by one iteration. + * + * You can optionally pass in the `delta` and `correction` values to be used by Engine.update. + * If undefined they use the Matter defaults of 60Hz and no correction. + * + * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`. + * + * It also ignores any custom `getDelta` functions, as you should be passing the delta + * value in to this call. + * + * You can adjust the number of iterations that Engine.update performs internally. + * Use the Scene Matter Physics config object to set the following properties: + * + * positionIterations (defaults to 6) + * velocityIterations (defaults to 4) + * constraintIterations (defaults to 2) + * + * Adjusting these values can help performance in certain situations, depending on the physics requirements + * of your game. + * @param delta [description] Default 16.666. + * @param correction [description] Default 1. + */ + step(delta?: number, correction?: number): void; + + } + + /** + * A Matter Physics Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. + */ + class Sprite extends Phaser.GameObjects.Sprite implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Force, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.SetBody, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static, Phaser.Physics.Matter.Components.Transform, Phaser.Physics.Matter.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param world [description] + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. + * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param frame An optional frame from the Texture this Game Object is rendering with. + * @param options Matter.js configuration object. Default {}. + */ + constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string, frame?: string | integer, options?: object); + + /** + * [description] + */ + world: Phaser.Physics.Matter.World; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The Mask this Game Object is using during render. + */ + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + /** + * Sets the mask that this Game Object will use to render with. + * + * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. + * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * + * If a mask is already set on this Game Object it will be immediately replaced. + * + * Masks are positioned in global space and are not relative to the Game Object to which they + * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * + * Masks have no impact on physics or input detection. They are purely a rendering component + * that allows you to limit what is visible during the render pass. + * @param mask The mask this Game Object will use when rendering. + */ + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + + /** + * Clears the mask that this Game Object was using. + * @param destroyMask Destroy the mask before clearing it? Default false. + */ + clearMask(destroyMask?: boolean): this; + + /** + * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a renderable Game Object. + * A renderable Game Object is one that uses a texture to render with, such as an + * Image, Sprite, Render Texture or BitmapText. + * + * If you do not provide a renderable object, and this Game Object has a texture, + * it will use itself as the object. This means you can call this method to create + * a Bitmap Mask from any renderable Game Object. + * @param renderable A renderable Game Object that uses a texture, such as a Sprite. + */ + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + + /** + * Creates and returns a Geometry Mask. This mask can be used by any Game Object, + * including this one. + * + * To create the mask you need to pass in a reference to a Graphics Game Object. + * + * If you do not provide a graphics object, and this Game Object is an instance + * of a Graphics object, then it will use itself to create the mask. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * @param graphics A Graphics Game Object. The geometry within it will be used as the mask. + */ + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object to be that of the given Frame. + * @param frame The frame to base the size of this Game Object on. + */ + setSizeToFrame(frame: Phaser.Textures.Frame): this; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + */ + isCropped: boolean; + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * @param x The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param y The y coordinate to start the crop from. + * @param width The width of the crop rectangle in pixels. + * @param height The height of the crop rectangle in pixels. + */ + setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string, frame?: string | integer): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | integer, updateSize?: boolean, updateOrigin?: boolean): this; + + /** + * Fill or additive? + */ + tintFill: boolean; + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + */ + clearTint(): this; + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTint(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * @param topLeft The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff. + * @param topRight The tint being applied to the top-right of the Game Object. + * @param bottomLeft The tint being applied to the bottom-left of the Game Object. + * @param bottomRight The tint being applied to the bottom-right of the Game Object. + */ + setTintFill(topLeft?: integer, topRight?: integer, bottomLeft?: integer, bottomRight?: integer): this; + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopLeft: integer; + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintTopRight: integer; + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomLeft: integer; + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + tintBottomRight: integer; + + /** + * The tint value being applied to the whole of the Game Object. + */ + tint: integer; + + /** + * Does this Game Object have a tint applied to it or not? + */ + readonly isTinted: boolean; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * [description] + * @param value [description] + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value Unique category bitfield. + */ + setCollisionCategory(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value Unique group index. + */ + setCollisionGroup(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param categories A unique category bitfield, or an array of them. + */ + setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param force [description] + */ + applyForce(force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param position [description] + * @param force [description] + */ + applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param speed [description] + */ + thrust(speed: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param speed [description] + */ + thrustLeft(speed: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param speed [description] + */ + thrustRight(speed: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param speed [description] + */ + thrustBack(speed: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + * @param air [description] + * @param fstatic [description] + */ + setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setFrictionAir(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setFrictionStatic(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setIgnoreGravity(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setMass(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setDensity(value: number): Phaser.GameObjects.GameObject; + + /** + * The body's center of mass. + */ + readonly centerOfMass: any; + + /** + * [description] + * @param value [description] + */ + setSensor(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + isSensor(): boolean; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param options [description] + */ + setRectangle(width: number, height: number, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param radius [description] + * @param options [description] + */ + setCircle(radius: number, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param radius [description] + * @param sides [description] + * @param options [description] + */ + setPolygon(radius: number, sides: number, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param slope [description] + * @param options [description] + */ + setTrapezoid(width: number, height: number, slope: number, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param body [description] + * @param addToWorld [description] Default true. + */ + setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param config [description] + * @param options [description] + */ + setBody(config: object, options: object): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] Default 60. + */ + setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param start [description] + * @param end [description] + */ + setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setStatic(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + isStatic(): boolean; + + /** + * [description] + */ + setFixedRotation(): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setAngularVelocity(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + + } + + /** + * A wrapper around a Tile that provides access to a corresponding Matter body. A tile can only + * have one Matter body associated with it. You can either pass in an existing Matter body for + * the tile or allow the constructor to create the corresponding body for you. If the Tile has a + * collision group (defined in Tiled), those shapes will be used to create the body. If not, the + * tile's rectangle bounding box will be used. + * + * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody. + * + * Note: not all Tiled collision shapes are supported. See + * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information. + */ + class TileBody implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static { + /** + * + * @param world [description] + * @param tile The target tile that should have a Matter body. + * @param options Options to be used when creating the Matter body. See + * Phaser.Physics.Matter.Matter.Body for a list of what Matter accepts. + * @param options.body An existing Matter body to + * be used instead of creating a new one. Default null. + * @param options.isStatic Whether or not the newly created body should be + * made static. This defaults to true since typically tiles should not be moved. Default true. + * @param options.addToWorld Whether or not to add the newly created body (or + * existing body if options.body is used) to the Matter world. Default true. + */ + constructor(world: Phaser.Physics.Matter.World, tile: Phaser.Tilemaps.Tile, options?: object); + + /** + * The tile object the body is associated with. + */ + tile: Phaser.Tilemaps.Tile; + + /** + * The Matter world the body exists within. + */ + world: Phaser.Physics.Matter.World; + + /** + * Sets the current body to a rectangle that matches the bounds of the tile. + * @param options Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts. + * @param options.isStatic Whether or not the newly created body should be + * made static. This defaults to true since typically tiles should not be moved. Default true. + * @param options.addToWorld Whether or not to add the newly created body (or + * existing body if options.body is used) to the Matter world. Default true. + */ + setFromTileRectangle(options?: object): Phaser.Physics.Matter.TileBody; + + /** + * Sets the current body from the collision group associated with the Tile. This is typically + * set up in Tiled's collision editor. + * + * Note: Matter doesn't support all shapes from Tiled. Rectangles and polygons are directly + * supported. Ellipses are converted into circle bodies. Polylines are treated as if they are + * closed polygons. If a tile has multiple shapes, a multi-part body will be created. Concave + * shapes are supported if poly-decomp library is included. Decomposition is not guaranteed to + * work for complex shapes (e.g. holes), so it's often best to manually decompose a concave + * polygon into multiple convex polygons yourself. + * @param options Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts. + * @param options.isStatic Whether or not the newly created body should be + * made static. This defaults to true since typically tiles should not be moved. Default true. + * @param options.addToWorld Whether or not to add the newly created body (or + * existing body if options.body is used) to the Matter world. Default true. + */ + setFromTileCollision(options?: object): Phaser.Physics.Matter.TileBody; + + /** + * Sets the current body to the given body. This will remove the previous body, if one already + * exists. + * @param body The new Matter body to use. + * @param addToWorld Whether or not to add the body to the Matter world. Default true. + */ + setBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.Physics.Matter.TileBody; + + /** + * Removes the current body from the TileBody and from the Matter world + */ + removeBody(): Phaser.Physics.Matter.TileBody; + + /** + * Removes the current body from the tile and the world. + */ + destroy(): Phaser.Physics.Matter.TileBody; + + /** + * [description] + * @param value [description] + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value Unique category bitfield. + */ + setCollisionCategory(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value Unique group index. + */ + setCollisionGroup(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param categories A unique category bitfield, or an array of them. + */ + setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + * @param air [description] + * @param fstatic [description] + */ + setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setFrictionAir(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setFrictionStatic(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setIgnoreGravity(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setMass(value: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setDensity(value: number): Phaser.GameObjects.GameObject; + + /** + * The body's center of mass. + */ + readonly centerOfMass: any; + + /** + * [description] + * @param value [description] + */ + setSensor(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + isSensor(): boolean; + + /** + * [description] + * @param value [description] Default 60. + */ + setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param start [description] + * @param end [description] + */ + setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + * @param value [description] + */ + setStatic(value: boolean): Phaser.GameObjects.GameObject; + + /** + * [description] + */ + isStatic(): boolean; + + } + + /** + * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file + * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor). + */ + namespace PhysicsEditorParser { + /** + * Parses a body element exported by PhysicsEditor. + * @param x x position. + * @param y y position. + * @param w width. + * @param h height. + * @param config body configuration and fixture (child body) definitions. + */ + function parseBody(x: number, y: number, w: number, h: number, config: object): object; + + /** + * Parses an element of the "fixtures" list exported by PhysicsEditor + * @param fixtureConfig the fixture object to parse + */ + function parseFixture(fixtureConfig: object): object[]; + + /** + * Parses the "vertices" lists exported by PhysicsEditor. + * @param vertexSets The vertex lists to parse. + * @param options Matter body options. + */ + function parseVertices(vertexSets: object, options: object): object[]; + + } + + /** + * [description] + */ + class PointerConstraint { + /** + * + * @param scene [description] + * @param world [description] + * @param options [description] + */ + constructor(scene: Phaser.Scene, world: Phaser.Physics.Matter.World, options: object); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + world: Phaser.Physics.Matter.World; + + /** + * [description] + */ + camera: Phaser.Cameras.Scene2D.Camera; + + /** + * [description] + */ + pointer: Phaser.Input.Pointer; + + /** + * [description] + */ + active: boolean; + + /** + * The transformed position. + */ + position: Phaser.Math.Vector2; + + /** + * [description] + */ + constraint: object; + + /** + * [description] + * @param pointer [description] + */ + onDown(pointer: Phaser.Input.Pointer): void; + + /** + * [description] + */ + onUp(): void; + + /** + * [description] + * @param body [description] + * @param position [description] + */ + getBodyPart(body: MatterJS.Body, position: Phaser.Math.Vector2): boolean; + + /** + * [description] + */ + update(): void; + + /** + * [description] + */ + destroy(): void; + + } + + /** + * [description] + */ + class World extends Phaser.Events.EventEmitter { + /** + * + * @param scene [description] + * @param config [description] + */ + constructor(scene: Phaser.Scene, config: object); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + engine: MatterJS.Engine; + + /** + * A `World` composite object that will contain all simulated bodies and constraints. + */ + localWorld: MatterJS.World; + + /** + * An object containing the 4 wall bodies that bound the physics world. + */ + walls: object; + + /** + * [description] + */ + enabled: boolean; + + /** + * The correction argument is an optional Number that specifies the time correction factor to apply to the update. + * This can help improve the accuracy of the simulation in cases where delta is changing between updates. + * The value of correction is defined as delta / lastDelta, i.e. the percentage change of delta over the last step. + * Therefore the value is always 1 (no correction) when delta constant (or when no correction is desired, which is the default). + * See the paper on Time Corrected Verlet for more information. + */ + correction: number; + + /** + * This function is called every time the core game loop steps, which is bound to the + * Request Animation Frame frequency unless otherwise modified. + * + * The function is passed two values: `time` and `delta`, both of which come from the game step values. + * + * It must return a number. This number is used as the delta value passed to Matter.Engine.update. + * + * You can override this function with your own to define your own timestep. + * + * If you need to update the Engine multiple times in a single game step then call + * `World.update` as many times as required. Each call will trigger the `getDelta` function. + * If you wish to have full control over when the Engine updates then see the property `autoUpdate`. + * + * You can also adjust the number of iterations that Engine.update performs. + * Use the Scene Matter Physics config object to set the following properties: + * + * positionIterations (defaults to 6) + * velocityIterations (defaults to 4) + * constraintIterations (defaults to 2) + * + * Adjusting these values can help performance in certain situations, depending on the physics requirements + * of your game. + */ + getDelta: Function; + + /** + * Automatically call Engine.update every time the game steps. + * If you disable this then you are responsible for calling `World.step` directly from your game. + * If you call `set60Hz` or `set30Hz` then `autoUpdate` is reset to `true`. + */ + autoUpdate: boolean; + + /** + * [description] + */ + drawDebug: boolean; + + /** + * [description] + */ + debugGraphic: Phaser.GameObjects.Graphics; + + /** + * [description] + */ + defaults: object; + + /** + * [description] + */ + setEventsProxy(): void; + + /** + * Sets the bounds of the Physics world to match the given world pixel dimensions. + * You can optionally set which 'walls' to create: left, right, top or bottom. + * If none of the walls are given it will default to use the walls settings it had previously. + * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size + * the newly created bounds will also not have the left and right walls. + * Explicitly state them in the parameters to override this. + * @param x The x coordinate of the top-left corner of the bounds. Default 0. + * @param y The y coordinate of the top-left corner of the bounds. Default 0. + * @param width The width of the bounds. + * @param height The height of the bounds. + * @param thickness The thickness of each wall, in pixels. Default 128. + * @param left If true will create the left bounds wall. Default true. + * @param right If true will create the right bounds wall. Default true. + * @param top If true will create the top bounds wall. Default true. + * @param bottom If true will create the bottom bounds wall. Default true. + */ + setBounds(x?: number, y?: number, width?: number, height?: number, thickness?: number, left?: boolean, right?: boolean, top?: boolean, bottom?: boolean): Phaser.Physics.Matter.World; + + /** + * [description] + * @param add [description] + * @param position [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + */ + updateWall(add: boolean, position: string, x: number, y: number, width: number, height: number): void; + + /** + * [description] + */ + createDebugGraphic(): Phaser.GameObjects.Graphics; + + /** + * [description] + */ + disableGravity(): Phaser.Physics.Matter.World; + + /** + * [description] + * @param x [description] Default 0. + * @param y [description] Default 1. + * @param scale [description] + */ + setGravity(x?: number, y?: number, scale?: number): Phaser.Physics.Matter.World; + + /** + * [description] + * @param x [description] + * @param y [description] + * @param width [description] + * @param height [description] + * @param options [description] + */ + create(x: number, y: number, width: number, height: number, options: object): MatterJS.Body; + + /** + * [description] + * @param object Can be single or an array, and can be a body, composite or constraint + */ + add(object: object | object[]): Phaser.Physics.Matter.World; + + /** + * [description] + * @param object The object to be removed from the world. + * @param deep [description] + */ + remove(object: object, deep: boolean): Phaser.Physics.Matter.World; + + /** + * [description] + * @param constraint [description] + * @param deep [description] + */ + removeConstraint(constraint: MatterJS.Constraint, deep: boolean): Phaser.Physics.Matter.World; + + /** + * Adds MatterTileBody instances for all the colliding tiles within the given tilemap layer. Set + * the appropriate tiles in your layer to collide before calling this method! + * @param tilemapLayer An array of tiles. + * @param options Options to be passed to the MatterTileBody constructor. {@ee Phaser.Physics.Matter.TileBody} + */ + convertTilemapLayer(tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer, options?: object): Phaser.Physics.Matter.World; + + /** + * Adds MatterTileBody instances for the given tiles. This adds bodies regardless of whether the + * tiles are set to collide or not. + * @param tiles An array of tiles. + * @param options Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody} + */ + convertTiles(tiles: Phaser.Tilemaps.Tile[], options?: object): Phaser.Physics.Matter.World; + + /** + * [description] + * @param isNonColliding [description] + */ + nextGroup(isNonColliding: boolean): number; + + /** + * [description] + */ + nextCategory(): number; + + /** + * [description] + */ + pause(): Phaser.Physics.Matter.World; + + /** + * [description] + */ + resume(): Phaser.Physics.Matter.World; + + /** + * [description] + * @param time [description] + * @param delta [description] + */ + update(time: number, delta: number): void; + + /** + * Manually advances the physics simulation by one iteration. + * + * You can optionally pass in the `delta` and `correction` values to be used by Engine.update. + * If undefined they use the Matter defaults of 60Hz and no correction. + * + * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`. + * + * It also ignores any custom `getDelta` functions, as you should be passing the delta + * value in to this call. + * + * You can adjust the number of iterations that Engine.update performs internally. + * Use the Scene Matter Physics config object to set the following properties: + * + * positionIterations (defaults to 6) + * velocityIterations (defaults to 4) + * constraintIterations (defaults to 2) + * + * Adjusting these values can help performance in certain situations, depending on the physics requirements + * of your game. + * @param delta [description] Default 16.666. + * @param correction [description] Default 1. + */ + step(delta?: number, correction?: number): void; + + /** + * Runs the Matter Engine.update at a fixed timestep of 60Hz. + */ + update60Hz(): number; + + /** + * Runs the Matter Engine.update at a fixed timestep of 30Hz. + */ + update30Hz(): number; + + /** + * [description] + */ + postUpdate(): void; + + /** + * [description] + * @param path [description] + * @param points [description] + */ + fromPath(path: string, points: any[]): any[]; + + /** + * [description] + */ + shutdown(): void; + + /** + * [description] + */ + destroy(): void; + + } + + namespace Components { + /** + * [description] + */ + interface Bounce { + /** + * [description] + * @param value [description] + */ + setBounce(value: number): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Collision { + /** + * [description] + * @param value Unique category bitfield. + */ + setCollisionCategory(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value Unique group index. + */ + setCollisionGroup(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param categories A unique category bitfield, or an array of them. + */ + setCollidesWith(categories: number | number[]): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Force { + /** + * [description] + * @param force [description] + */ + applyForce(force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + /** + * [description] + * @param position [description] + * @param force [description] + */ + applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + /** + * [description] + * @param speed [description] + */ + thrust(speed: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param speed [description] + */ + thrustLeft(speed: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param speed [description] + */ + thrustRight(speed: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param speed [description] + */ + thrustBack(speed: number): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Friction { + /** + * [description] + * @param value [description] + * @param air [description] + * @param fstatic [description] + */ + setFriction(value: number, air?: number, fstatic?: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setFrictionAir(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setFrictionStatic(value: number): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Gravity { + /** + * [description] + * @param value [description] + */ + setIgnoreGravity(value: boolean): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Mass { + /** + * [description] + * @param value [description] + */ + setMass(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setDensity(value: number): Phaser.GameObjects.GameObject; + /** + * The body's center of mass. + */ + readonly centerOfMass: any; + } + + /** + * [description] + */ + interface Sensor { + /** + * [description] + * @param value [description] + */ + setSensor(value: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + */ + isSensor(): boolean; + } + + /** + * [description] + */ + interface SetBody { + /** + * [description] + * @param width [description] + * @param height [description] + * @param options [description] + */ + setRectangle(width: number, height: number, options: object): Phaser.GameObjects.GameObject; + /** + * [description] + * @param radius [description] + * @param options [description] + */ + setCircle(radius: number, options: object): Phaser.GameObjects.GameObject; + /** + * [description] + * @param radius [description] + * @param sides [description] + * @param options [description] + */ + setPolygon(radius: number, sides: number, options: object): Phaser.GameObjects.GameObject; + /** + * [description] + * @param width [description] + * @param height [description] + * @param slope [description] + * @param options [description] + */ + setTrapezoid(width: number, height: number, slope: number, options: object): Phaser.GameObjects.GameObject; + /** + * [description] + * @param body [description] + * @param addToWorld [description] Default true. + */ + setExistingBody(body: MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + * @param config [description] + * @param options [description] + */ + setBody(config: object, options: object): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Sleep { + /** + * [description] + * @param value [description] Default 60. + */ + setSleepThreshold(value?: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param start [description] + * @param end [description] + */ + setSleepEvents(start: boolean, end: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setSleepStartEvent(value: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + * @param value [description] + */ + setSleepEndEvent(value: boolean): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Static { + /** + * [description] + * @param value [description] + */ + setStatic(value: boolean): Phaser.GameObjects.GameObject; + /** + * [description] + */ + isStatic(): boolean; + } + + /** + * [description] + */ + interface Transform { + /** + * [description] + */ + x: number; + /** + * [description] + */ + y: number; + /** + * [description] + */ + scaleX: number; + /** + * [description] + */ + scaleY: number; + /** + * [description] + */ + angle: number; + /** + * [description] + */ + rotation: number; + /** + * [description] + * @param x [description] Default 0. + * @param y [description] Default x. + */ + setPosition(x?: number, y?: number): void; + /** + * [description] + * @param radians [description] Default 0. + */ + setRotation(radians?: number): Phaser.GameObjects.GameObject; + /** + * [description] + */ + setFixedRotation(): Phaser.GameObjects.GameObject; + /** + * [description] + * @param degrees [description] Default 0. + */ + setAngle(degrees?: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param x [description] Default 1. + * @param y [description] Default x. + * @param point [description] + */ + setScale(x?: number, y?: number, point?: Phaser.Math.Vector2): Phaser.GameObjects.GameObject; + } + + /** + * [description] + */ + interface Velocity { + /** + * [description] + * @param value [description] + */ + setAngularVelocity(value: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param x [description] + */ + setVelocityX(x: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param y [description] + */ + setVelocityY(y: number): Phaser.GameObjects.GameObject; + /** + * [description] + * @param x [description] + * @param y [description] Default x. + */ + setVelocity(x: number, y?: number): Phaser.GameObjects.GameObject; + } + + } + + } + + } + + namespace Plugins { + /** + * A Global Plugin is installed just once into the Game owned Plugin Manager. + * It can listen for Game events and respond to them. + */ + class BasePlugin { + /** + * + * @param pluginManager A reference to the Plugin Manager. + */ + constructor(pluginManager: Phaser.Plugins.PluginManager); + + /** + * A handy reference to the Plugin Manager that is responsible for this plugin. + * Can be used as a route to gain access to game systems and events. + */ + protected pluginManager: Phaser.Plugins.PluginManager; + + /** + * A reference to the Game instance this plugin is running under. + */ + protected game: Phaser.Game; + + /** + * A reference to the Scene that has installed this plugin. + * Only set if it's a Scene Plugin, otherwise `null`. + * This property is only set when the plugin is instantiated and added to the Scene, not before. + * You cannot use it during the `init` method, but you can during the `boot` method. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene Systems of the Scene that has installed this plugin. + * Only set if it's a Scene Plugin, otherwise `null`. + * This property is only set when the plugin is instantiated and added to the Scene, not before. + * You cannot use it during the `init` method, but you can during the `boot` method. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * Called by the PluginManager when this plugin is first instantiated. + * It will never be called again on this instance. + * In here you can set-up whatever you need for this plugin to run. + * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this. + */ + init(): void; + + /** + * Called by the PluginManager when this plugin is started. + * If a plugin is stopped, and then started again, this will get called again. + * Typically called immediately after `BasePlugin.init`. + */ + start(): void; + + /** + * Called by the PluginManager when this plugin is stopped. + * The game code has requested that your plugin stop doing whatever it does. + * It is now considered as 'inactive' by the PluginManager. + * Handle that process here (i.e. stop listening for events, etc) + * If the plugin is started again then `BasePlugin.start` will be called again. + */ + stop(): void; + + /** + * If this is a Scene Plugin (i.e. installed into a Scene) then this method is called when the Scene boots. + * By this point the plugin properties `scene` and `systems` will have already been set. + * In here you can listen for Scene events and set-up whatever you need for this plugin to run. + */ + boot(): void; + + /** + * Game instance has been destroyed. + * You must release everything in here, all references, all objects, free it all up. + */ + destroy(): void; + + } + + type DefaultPlugins = { + /** + * These are the Global Managers that are created by the Phaser.Game instance. + */ + Global: any[]; + /** + * These are the core plugins that are installed into every Scene.Systems instance, no matter what. + */ + CoreScene: any[]; + /** + * These plugins are created in Scene.Systems in addition to the CoreScenePlugins. + */ + DefaultScene: any[]; + }; + + /** + * These are the Global Managers that are created by the Phaser.Game instance. + * They are referenced from Scene.Systems so that plugins can use them. + */ + var Global: any[]; + + /** + * These are the core plugins that are installed into every Scene.Systems instance, no matter what. + * They are optionally exposed in the Scene as well (see the InjectionMap for details) + * + * They are created in the order in which they appear in this array and EventEmitter is always first. + */ + var CoreScene: any[]; + + /** + * These plugins are created in Scene.Systems in addition to the CoreScenePlugins. + * + * You can elect not to have these plugins by either creating a DefaultPlugins object as part + * of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array + * and building your own bundle. + * + * They are optionally exposed in the Scene as well (see the InjectionMap for details) + * + * They are always created in the order in which they appear in the array. + */ + var DefaultScene: any[]; + + /** + * The PluginManager is responsible for installing and adding plugins to Phaser. + * + * It is a global system and therefore belongs to the Game instance, not a specific Scene. + * + * It works in conjunction with the PluginCache. Core internal plugins automatically register themselves + * with the Cache, but it's the Plugin Manager that is responsible for injecting them into the Scenes. + * + * There are two types of plugin: + * + * 1) A Global Plugin + * 2) A Scene Plugin + * + * A Global Plugin is a plugin that lives within the Plugin Manager rather than a Scene. You can get + * access to it by calling `PluginManager.get` and providing a key. Any Scene that requests a plugin in + * this way will all get access to the same plugin instance, allowing you to use a single plugin across + * multiple Scenes. + * + * A Scene Plugin is a plugin dedicated to running within a Scene. These are different to Global Plugins + * in that their instances do not live within the Plugin Manager, but within the Scene Systems class instead. + * And that every Scene created is given its own unique instance of a Scene Plugin. Examples of core Scene + * Plugins include the Input Plugin, the Tween Plugin and the physics Plugins. + * + * You can add a plugin to Phaser in three different ways: + * + * 1) Preload it + * 2) Include it in your source code and install it via the Game Config + * 3) Include it in your source code and install it within a Scene + * + * For examples of all of these approaches please see the Phaser 3 Examples Repo `plugins` folder. + * + * For information on creating your own plugin please see the Phaser 3 Plugin Template. + */ + class PluginManager { + /** + * + * @param game The game instance that owns this Plugin Manager. + */ + constructor(game: Phaser.Game); + + /** + * The game instance that owns this Plugin Manager. + */ + game: Phaser.Game; + + /** + * The global plugins currently running and managed by this Plugin Manager. + * A plugin must have been started at least once in order to appear in this list. + */ + plugins: GlobalPlugin[]; + + /** + * A list of plugin keys that should be installed into Scenes as well as the Core Plugins. + */ + scenePlugins: string[]; + + /** + * Run once the game has booted and installs all of the plugins configured in the Game Config. + */ + protected boot(): void; + + /** + * Called by the Scene Systems class. Tells the plugin manager to install all Scene plugins into it. + * + * First it will install global references, i.e. references from the Game systems into the Scene Systems (and Scene if mapped.) + * Then it will install Core Scene Plugins followed by Scene Plugins registered with the PluginManager. + * Finally it will install any references to Global Plugins that have a Scene mapping property into the Scene itself. + * @param sys The Scene Systems class to install all the plugins in to. + * @param globalPlugins An array of global plugins to install. + * @param scenePlugins An array of scene plugins to install. + */ + protected addToScene(sys: Phaser.Scenes.Systems, globalPlugins: any[], scenePlugins: any[]): void; + + /** + * Called by the Scene Systems class. Returns a list of plugins to be installed. + */ + protected getDefaultScenePlugins(): string[]; + + /** + * Installs a new Scene Plugin into the Plugin Manager and optionally adds it + * to the given Scene as well. A Scene Plugin added to the manager in this way + * will be automatically installed into all new Scenes using the key and mapping given. + * + * The `key` property is what the plugin is injected into Scene.Systems as. + * The `mapping` property is optional, and if specified is what the plugin is installed into + * the Scene as. For example: + * + * ```javascript + * this.plugins.installScenePlugin('powerupsPlugin', pluginCode, 'powerups'); + * + * // and from within the scene: + * this.sys.powerupsPlugin; // key value + * this.powerups; // mapping value + * ``` + * + * This method is called automatically by Phaser if you install your plugins using either the + * Game Configuration object, or by preloading them via the Loader. + * @param key The property key that will be used to add this plugin to Scene.Systems. + * @param plugin The plugin code. This should be the non-instantiated version. + * @param mapping If this plugin is injected into the Phaser.Scene class, this is the property key to use. + * @param addToScene Optionally automatically add this plugin to the given Scene. + */ + installScenePlugin(key: string, plugin: Function, mapping?: string, addToScene?: Phaser.Scene): void; + + /** + * Installs a new Global Plugin into the Plugin Manager and optionally starts it running. + * A global plugin belongs to the Plugin Manager, rather than a specific Scene, and can be accessed + * and used by all Scenes in your game. + * + * The `key` property is what you use to access this plugin from the Plugin Manager. + * + * ```javascript + * this.plugins.install('powerupsPlugin', pluginCode); + * + * // and from within the scene: + * this.plugins.get('powerupsPlugin'); + * ``` + * + * This method is called automatically by Phaser if you install your plugins using either the + * Game Configuration object, or by preloading them via the Loader. + * + * The same plugin can be installed multiple times into the Plugin Manager by simply giving each + * instance its own unique key. + * @param key The unique handle given to this plugin within the Plugin Manager. + * @param plugin The plugin code. This should be the non-instantiated version. + * @param start Automatically start the plugin running? This is always `true` if you provide a mapping value. Default false. + * @param mapping If this plugin is injected into the Phaser.Scene class, this is the property key to use. + */ + install(key: string, plugin: Function, start?: boolean, mapping?: string): void; + + /** + * Gets an index of a global plugin based on the given key. + * @param key The unique plugin key. + */ + protected getIndex(key: string): integer; + + /** + * Gets a global plugin based on the given key. + * @param key The unique plugin key. + */ + protected getEntry(key: string): GlobalPlugin; + + /** + * Checks if the given global plugin, based on its key, is active or not. + * @param key The unique plugin key. + */ + isActive(key: string): boolean; + + /** + * Starts a global plugin running. + * + * If the plugin was previously active then calling `start` will reset it to an active state and then + * call its `start` method. + * + * If the plugin has never been run before a new instance of it will be created within the Plugin Manager, + * its active state set and then both of its `init` and `start` methods called, in that order. + * + * If the plugin is already running under the given key then nothing happens. + * @param key The key of the plugin to start. + * @param runAs Run the plugin under a new key. This allows you to run one plugin multiple times. + */ + start(key: string, runAs?: string): Phaser.Plugins.BasePlugin; + + /** + * Stops a global plugin from running. + * + * If the plugin is active then its active state will be set to false and the plugins `stop` method + * will be called. + * + * If the plugin is not already running, nothing will happen. + * @param key The key of the plugin to stop. + */ + stop(key: string): Phaser.Plugins.PluginManager; + + /** + * Gets a global plugin from the Plugin Manager based on the given key and returns it. + * + * If it cannot find an active plugin based on the key, but there is one in the Plugin Cache with the same key, + * then it will create a new instance of the cached plugin and return that. + * @param key The key of the plugin to get. + * @param autoStart Automatically start a new instance of the plugin if found in the cache, but not actively running. Default true. + */ + get(key: string, autoStart?: boolean): Phaser.Plugins.BasePlugin | Function; + + /** + * Returns the plugin class from the cache. + * Used internally by the Plugin Manager. + * @param key The key of the plugin to get. + */ + getClass(key: string): Phaser.Plugins.BasePlugin; + + /** + * Removes a global plugin from the Plugin Manager and Plugin Cache. + * + * It is up to you to remove all references to this plugin that you may hold within your game code. + * @param key The key of the plugin to remove. + */ + removeGlobalPlugin(key: string): void; + + /** + * Removes a scene plugin from the Plugin Manager and Plugin Cache. + * + * This will not remove the plugin from any active Scenes that are already using it. + * + * It is up to you to remove all references to this plugin that you may hold within your game code. + * @param key The key of the plugin to remove. + */ + removeScenePlugin(key: string): void; + + /** + * Registers a new type of Game Object with the global Game Object Factory and / or Creator. + * This is usually called from within your Plugin code and is a helpful short-cut for creating + * new Game Objects. + * + * The key is the property that will be injected into the factories and used to create the + * Game Object. For example: + * + * ```javascript + * this.plugins.registerGameObject('clown', clownFactoryCallback, clownCreatorCallback); + * // later in your game code: + * this.add.clown(); + * this.make.clown(); + * ``` + * + * The callbacks are what are called when the factories try to create a Game Object + * matching the given key. It's important to understand that the callbacks are invoked within + * the context of the GameObjectFactory. In this context there are several properties available + * to use: + * + * this.scene - A reference to the Scene that owns the GameObjectFactory. + * this.displayList - A reference to the Display List the Scene owns. + * this.updateList - A reference to the Update List the Scene owns. + * + * See the GameObjectFactory and GameObjectCreator classes for more details. + * Any public property or method listed is available from your callbacks under `this`. + * @param key The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`. + * @param factoryCallback The callback to invoke when the Game Object Factory is called. + * @param creatorCallback The callback to invoke when the Game Object Creator is called. + */ + registerGameObject(key: string, factoryCallback?: Function, creatorCallback?: Function): void; + + /** + * Registers a new file type with the global File Types Manager, making it available to all Loader + * Plugins created after this. + * + * This is usually called from within your Plugin code and is a helpful short-cut for creating + * new loader file types. + * + * The key is the property that will be injected into the Loader Plugin and used to load the + * files. For example: + * + * ```javascript + * this.plugins.registerFileType('wad', doomWadLoaderCallback); + * // later in your preload code: + * this.load.wad(); + * ``` + * + * The callback is what is called when the loader tries to load a file matching the given key. + * It's important to understand that the callback is invoked within + * the context of the LoaderPlugin. In this context there are several properties / methods available + * to use: + * + * this.addFile - A method to add the new file to the load queue. + * this.scene - The Scene that owns the Loader Plugin instance. + * + * See the LoaderPlugin class for more details. Any public property or method listed is available from + * your callback under `this`. + * @param key The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`. + * @param callback The callback to invoke when the Game Object Factory is called. + * @param addToScene Optionally add this file type into the Loader Plugin owned by the given Scene. + */ + registerFileType(key: string, callback: Function, addToScene?: Phaser.Scene): void; + + /** + * Destroys this Plugin Manager and all associated plugins. + * It will iterate all plugins found and call their `destroy` methods. + * Note that the PluginCache is NOT cleared by this as it doesn't hold any plugin instances. + */ + destroy(): void; + + } + + /** + * A Scene Level Plugin is installed into every Scene and belongs to that Scene. + * It can listen for Scene events and respond to them. + * It can map itself to a Scene property, or into the Scene Systems, or both. + */ + class ScenePlugin extends Phaser.Plugins.BasePlugin { + /** + * + * @param scene A reference to the Scene that has installed this plugin. + * @param pluginManager A reference to the Plugin Manager. + */ + constructor(scene: Phaser.Scene, pluginManager: Phaser.Plugins.PluginManager); + + /** + * A reference to the Scene that has installed this plugin. + * This property is only set when the plugin is instantiated and added to the Scene, not before. + */ + protected scene: Phaser.Scene; + + /** + * A reference to the Scene Systems of the Scene that has installed this plugin. + * This property is only set when the plugin is instantiated and added to the Scene, not before. + */ + protected systems: Phaser.Scenes.Systems; + + /** + * This method is called when the Scene boots. It is only ever called once. + * + * By this point the plugin properties `scene` and `systems` will have already been set. + * + * In here you can listen for Scene events and set-up whatever you need for this plugin to run. + * Here are the Scene events you can listen to: + * + * start + * ready + * preupdate + * update + * postupdate + * resize + * pause + * resume + * sleep + * wake + * transitioninit + * transitionstart + * transitioncomplete + * transitionout + * shutdown + * destroy + * + * At the very least you should offer a destroy handler for when the Scene closes down, i.e: + * + * ```javascript + * var eventEmitter = this.systems.events; + * eventEmitter.once('destroy', this.sceneDestroy, this); + * ``` + */ + boot(): void; + + } + + } + + /** + * Phaser Blend Modes. + */ + enum BlendModes { + /** + * Skips the Blend Mode check in the renderer. + */ + SKIP_CHECK, + /** + * Normal blend mode. + */ + NORMAL, + /** + * Add blend mode. + */ + ADD, + /** + * Multiply blend mode. + */ + MULTIPLY, + /** + * Screen blend mode. + */ + SCREEN, + /** + * Overlay blend mode. + */ + OVERLAY, + /** + * Darken blend mode. + */ + DARKEN, + /** + * Lighten blend mode. + */ + LIGHTEN, + /** + * Color Dodge blend mode. + */ + COLOR_DODGE, + /** + * Color Burn blend mode. + */ + COLOR_BURN, + /** + * Hard Light blend mode. + */ + HARD_LIGHT, + /** + * Soft Light blend mode. + */ + SOFT_LIGHT, + /** + * Difference blend mode. + */ + DIFFERENCE, + /** + * Exclusion blend mode. + */ + EXCLUSION, + /** + * Hue blend mode. + */ + HUE, + /** + * Saturation blend mode. + */ + SATURATION, + /** + * Color blend mode. + */ + COLOR, + /** + * Luminosity blend mode. + */ + LUMINOSITY, + } + + /** + * Phaser Scale Modes. + */ + enum ScaleModes { + /** + * Default Scale Mode (Linear). + */ + DEFAULT, + /** + * Linear Scale Mode. + */ + LINEAR, + /** + * Nearest Scale Mode. + */ + NEAREST, + } + + namespace Renderer { + namespace Canvas { + /** + * [description] + */ + class CanvasRenderer { + /** + * + * @param game The Phaser Game instance that owns this renderer. + */ + constructor(game: Phaser.Game); + + /** + * The Phaser Game instance that owns this renderer. + */ + game: Phaser.Game; + + /** + * [description] + */ + type: integer; + + /** + * [description] + */ + drawCount: number; + + /** + * [description] + */ + width: number; + + /** + * [description] + */ + height: number; + + /** + * [description] + */ + config: RendererConfig; + + /** + * [description] + */ + scaleMode: integer; + + /** + * [description] + */ + gameCanvas: HTMLCanvasElement; + + /** + * [description] + */ + gameContext: CanvasRenderingContext2D; + + /** + * [description] + */ + currentContext: CanvasRenderingContext2D; + + /** + * Map to the required function. + */ + drawImage: Function; + + /** + * [description] + */ + blitImage: Function; + + /** + * [description] + */ + blendModes: any[]; + + /** + * [description] + */ + currentAlpha: number; + + /** + * [description] + */ + currentBlendMode: number; + + /** + * [description] + */ + currentScaleMode: number; + + /** + * [description] + */ + snapshotCallback: SnapshotCallback; + + /** + * [description] + */ + snapshotType: string; + + /** + * [description] + */ + snapshotEncoder: number; + + /** + * [description] + */ + init(): void; + + /** + * Resize the main game canvas. + * @param width [description] + * @param height [description] + */ + resize(width: integer, height: integer): void; + + /** + * [description] + * @param callback [description] + */ + onContextLost(callback: Function): void; + + /** + * [description] + * @param callback [description] + */ + onContextRestored(callback: Function): void; + + /** + * [description] + */ + resetTransform(): void; + + /** + * [description] + * @param blendMode [description] + */ + setBlendMode(blendMode: number): number; + + /** + * [description] + * @param alpha [description] + */ + setAlpha(alpha: number): number; + + /** + * Called at the start of the render loop. + */ + preRender(): void; + + /** + * Renders the Scene to the given Camera. + * @param scene [description] + * @param children [description] + * @param interpolationPercentage [description] + * @param camera [description] + */ + render(scene: Phaser.Scene, children: Phaser.GameObjects.DisplayList, interpolationPercentage: number, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * [description] + */ + postRender(): void; + + /** + * [description] + * @param callback [description] + * @param type [description] + * @param encoderOptions [description] + */ + snapshot(callback: SnapshotCallback, type: string, encoderOptions: number): void; + + /** + * [description] + */ + destroy(): void; + + } + + /** + * No scaling, anchor, rotation or effects, literally draws the frame directly to the canvas. + * @param dx The x coordinate to render the Frame to. + * @param dy The y coordinate to render the Frame to. + * @param frame The Frame to render. + */ + function BlitImage(dx: number, dy: number, frame: Phaser.Textures.Frame): void; + + /** + * [description] + * @param src [description] + * @param camera [description] + * @param parentTransformMatrix [description] + */ + function DrawImage(src: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * [description] + */ + function GetBlendModes(): any[]; + + } + + namespace Snapshot { + /** + * [description] + * @param canvas [description] + * @param type [description] Default 'image/png'. + * @param encoderOptions [description] Default 0.92. + */ + function Canvas(canvas: HTMLCanvasElement, type?: string, encoderOptions?: number): HTMLImageElement; + + /** + * [description] + * @param sourceCanvas [description] + * @param type [description] Default 'image/png'. + * @param encoderOptions [description] Default 0.92. + */ + function WebGL(sourceCanvas: HTMLCanvasElement, type?: string, encoderOptions?: number): HTMLImageElement; + + } + + namespace WebGL { + namespace Utils { + /** + * Packs four floats on a range from 0.0 to 1.0 into a single Uint32 + * @param r Red component in a range from 0.0 to 1.0 + * @param g [description] + * @param b [description] + * @param a Alpha component in a range from 0.0 to 1.0 + */ + function getTintFromFloats(r: number, g: number, b: number, a: number): number; + + /** + * Packs a Uint24, representing RGB components, with a Float32, representing + * the alpha component, with a range between 0.0 and 1.0 and return a Uint32 + * @param rgb Uint24 representing RGB components + * @param a Float32 representing Alpha component + */ + function getTintAppendFloatAlpha(rgb: number, a: number): number; + + /** + * Packs a Uint24, representing RGB components, with a Float32, representing + * the alpha component, with a range between 0.0 and 1.0 and return a + * swizzled Uint32 + * @param rgb Uint24 representing RGB components + * @param a Float32 representing Alpha component + */ + function getTintAppendFloatAlphaAndSwap(rgb: number, a: number): number; + + /** + * Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0 + * @param rgb RGB packed as a Uint24 + */ + function getFloatsFromUintRGB(rgb: number): any[]; + + /** + * Counts how many attributes of 32 bits a vertex has + * @param attributes Array of attributes + * @param glContext WebGLContext used for check types + */ + function getComponentCount(attributes: any[], glContext: WebGLRenderingContext): number; + + } + + /** + * WebGLPipeline is a class that describes the way elements will be rendererd + * in WebGL, specially focused on batching vertices (batching is not provided). + * Pipelines are mostly used for describing 2D rendering passes but it's + * flexible enough to be used for any type of rendering including 3D. + * Internally WebGLPipeline will handle things like compiling shaders, + * creating vertex buffers, assigning primitive topology and binding + * vertex attributes. + * + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - gl: Current WebGL context. + * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. + * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + * - vertices: An optional buffer of vertices + * - attributes: An array describing the vertex attributes + * + * The vertex attributes properties are: + * - name : String - Name of the attribute in the vertex shader + * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 + * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) + * - normalized : boolean - Is the attribute normalized + * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C + * Here you can find more information of how to describe an attribute: + * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer + */ + class WebGLPipeline { + /** + * + * @param config [description] + */ + constructor(config: object); + + /** + * Name of the Pipeline. Used for identifying + */ + name: string; + + /** + * [description] + */ + game: Phaser.Game; + + /** + * [description] + */ + view: HTMLCanvasElement; + + /** + * Used to store the current game resolution + */ + resolution: number; + + /** + * Width of the current viewport + */ + width: number; + + /** + * Height of the current viewport + */ + height: number; + + /** + * [description] + */ + gl: WebGLRenderingContext; + + /** + * How many vertices have been fed to the current pipeline. + */ + vertexCount: number; + + /** + * The limit of vertices that the pipeline can hold + */ + vertexCapacity: integer; + + /** + * [description] + */ + renderer: Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Raw byte buffer of vertices. + */ + vertexData: ArrayBuffer; + + /** + * The handle to a WebGL vertex buffer object. + */ + vertexBuffer: WebGLBuffer; + + /** + * The handle to a WebGL program + */ + program: WebGLProgram; + + /** + * Array of objects that describe the vertex attributes + */ + attributes: object; + + /** + * The size in bytes of the vertex + */ + vertexSize: integer; + + /** + * The primitive topology which the pipeline will use to submit draw calls + */ + topology: integer; + + /** + * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources + * to the GPU. + */ + bytes: Uint8Array; + + /** + * This will store the amount of components of 32 bit length + */ + vertexComponentCount: integer; + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + */ + flushLocked: boolean; + + /** + * Indicates if the current pipeline is active or not for this frame only. + * Reset in the onRender method. + */ + active: boolean; + + /** + * Called when the Game has fully booted and the Renderer has finished setting up. + * + * By this stage all Game level systems are now in place and you can perform any final + * tasks that the pipeline may need that relied on game systems such as the Texture Manager. + */ + boot(): void; + + /** + * Adds a description of vertex attribute to the pipeline + * @param name Name of the vertex attribute + * @param size Vertex component size + * @param type Type of the attribute + * @param normalized Is the value normalized to a range + * @param offset Byte offset to the beginning of the first element in the vertex + */ + addAttribute(name: string, size: integer, type: integer, normalized: boolean, offset: integer): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Check if the current batch of vertices is full. + */ + shouldFlush(): boolean; + + /** + * Resizes the properties used to describe the viewport + * @param width [description] + * @param height [description] + * @param resolution [description] + */ + resize(width: number, height: number, resolution: number): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Binds the pipeline resources, including programs, vertex buffers and binds attributes + */ + bind(): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * [description] + */ + onBind(): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * [description] + */ + onPreRender(): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * [description] + * @param scene [description] + * @param camera [description] + */ + onRender(scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * [description] + */ + onPostRender(): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Uploads the vertex data and emits a draw call + * for the current batch of vertices. + */ + flush(): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * [description] + */ + destroy(): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name [description] + * @param x [description] + */ + setFloat1(name: string, x: number): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name [description] + * @param x [description] + * @param y [description] + */ + setFloat2(name: string, x: number, y: number): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name [description] + * @param x [description] + * @param y [description] + * @param z [description] + */ + setFloat3(name: string, x: number, y: number, z: number): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name Name of the uniform + * @param x X component of the uniform + * @param y Y component of the uniform + * @param z Z component of the uniform + * @param w W component of the uniform + */ + setFloat4(name: string, x: number, y: number, z: number, w: number): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name [description] + * @param x [description] + */ + setInt1(name: string, x: integer): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name [description] + * @param x [description] + * @param y [description] + */ + setInt2(name: string, x: integer, y: integer): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name [description] + * @param x [description] + * @param y [description] + * @param z [description] + */ + setInt3(name: string, x: integer, y: integer, z: integer): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name Name of the uniform + * @param x X component of the uniform + * @param y Y component of the uniform + * @param z Z component of the uniform + * @param w W component of the uniform + */ + setInt4(name: string, x: integer, y: integer, z: integer, w: integer): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * [description] + * @param name [description] + * @param transpose [description] + * @param matrix [description] + */ + setMatrix2(name: string, transpose: boolean, matrix: Float32Array): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * [description] + * [description] + * @param name [description] + * @param transpose [description] + * @param matrix [description] + */ + setMatrix3(name: string, transpose: boolean, matrix: Float32Array): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Set a uniform value of the current pipeline program. + * @param name Name of the uniform + * @param transpose Should the matrix be transpose + * @param matrix Matrix data + */ + setMatrix4(name: string, transpose: boolean, matrix: Float32Array): Phaser.Renderer.WebGL.WebGLPipeline; + + } + + /** + * WebGLRenderer is a class that contains the needed functionality to keep the + * WebGLRenderingContext state clean. The main idea of the WebGLRenderer is to keep track of + * any context change that happens for WebGL rendering inside of Phaser. This means + * if raw webgl functions are called outside the WebGLRenderer of the Phaser WebGL + * rendering ecosystem they might pollute the current WebGLRenderingContext state producing + * unexpected behavior. It's recommended that WebGL interaction is done through + * WebGLRenderer and/or WebGLPipeline. + */ + class WebGLRenderer { + /** + * + * @param game [description] + */ + constructor(game: Phaser.Game); + + /** + * [description] + */ + config: RendererConfig; + + /** + * [description] + */ + game: Phaser.Game; + + /** + * [description] + */ + type: integer; + + /** + * [description] + */ + width: number; + + /** + * [description] + */ + height: number; + + /** + * [description] + */ + canvas: HTMLCanvasElement; + + /** + * [description] + */ + lostContextCallbacks: WebGLContextCallback[]; + + /** + * [description] + */ + restoredContextCallbacks: WebGLContextCallback[]; + + /** + * [description] + */ + blendModes: any[]; + + /** + * Keeps track of any WebGLTexture created with the current WebGLRenderingContext + */ + nativeTextures: any[]; + + /** + * [description] + */ + contextLost: boolean; + + /** + * This object will store all pipelines created through addPipeline + */ + pipelines: object; + + /** + * [description] + */ + snapshotState: SnapshotState; + + /** + * Cached value for the last texture unit that was used + */ + currentActiveTextureUnit: integer; + + /** + * An array of the last texture handles that were bound to the WebGLRenderingContext + */ + currentTextures: any[]; + + /** + * Current framebuffer in use + */ + currentFramebuffer: WebGLFramebuffer; + + /** + * Current WebGLPipeline in use + */ + currentPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Current WebGLProgram in use + */ + currentProgram: WebGLProgram; + + /** + * Current WebGLBuffer (Vertex buffer) in use + */ + currentVertexBuffer: WebGLBuffer; + + /** + * Current WebGLBuffer (Index buffer) in use + */ + currentIndexBuffer: WebGLBuffer; + + /** + * Current blend mode in use + */ + currentBlendMode: integer; + + /** + * Indicates if the the scissor state is enabled in WebGLRenderingContext + */ + currentScissorEnabled: boolean; + + /** + * Stores the current scissor data + */ + currentScissor: Uint32Array; + + /** + * Index to the scissor stack top + */ + currentScissorIdx: number; + + /** + * Stack of scissor data + */ + scissorStack: Uint32Array; + + /** + * [description] + */ + gl: WebGLRenderingContext; + + /** + * Array of strings that indicate which WebGL extensions are supported by the browser + */ + supportedExtensions: object; + + /** + * Extensions loaded into the current context + */ + extensions: object; + + /** + * Stores the current WebGL component formats for further use + */ + glFormats: any[]; + + /** + * Stores the supported WebGL texture compression formats. + */ + compression: any[]; + + /** + * Cached drawing buffer height to reduce gl calls. + */ + readonly drawingBufferHeight: number; + + /** + * Creates a new WebGLRenderingContext and initializes all internal + * state. + * @param config [description] + */ + init(config: object): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param width [description] + * @param height [description] + */ + resize(width: number, height: number): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param callback [description] + * @param target [description] + */ + onContextRestored(callback: WebGLContextCallback, target: object): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param callback [description] + * @param target [description] + */ + onContextLost(callback: WebGLContextCallback, target: object): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Checks if a WebGL extension is supported + * @param extensionName Name of the WebGL extension + */ + hasExtension(extensionName: string): boolean; + + /** + * Loads a WebGL extension + * @param extensionName [description] + */ + getExtension(extensionName: string): object; + + /** + * Flushes the current pipeline if the pipeline is bound + */ + flush(): void; + + /** + * Checks if a pipeline is present in the current WebGLRenderer + * @param pipelineName Name of the pipeline + */ + hasPipeline(pipelineName: string): boolean; + + /** + * Returns the pipeline by name if the pipeline exists + * @param pipelineName [description] + */ + getPipeline(pipelineName: string): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Removes a pipeline by name + * @param pipelineName [description] + */ + removePipeline(pipelineName: string): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Adds a pipeline instance into the collection of pipelines + * @param pipelineName [description] + * @param pipelineInstance Pipeline instance must extend WebGLPipeline + */ + addPipeline(pipelineName: string, pipelineInstance: Phaser.Renderer.WebGL.WebGLPipeline): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the current scissor state + * @param x [description] + * @param y [description] + * @param w [description] + * @param h [description] + */ + setScissor(x: integer, y: integer, w: integer, h: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Pushes a new scissor state. This is used to set nested scissor states. + * @param x [description] + * @param y [description] + * @param w [description] + * @param h [description] + */ + pushScissor(x: integer, y: integer, w: integer, h: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Pops the last scissor state and sets it. + */ + popScissor(): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Binds a WebGLPipeline and sets it as the current pipeline to be used. + * @param pipelineInstance The pipeline instance to be activated. + * @param gameObject The Game Object that invoked this pipeline, if any. + */ + setPipeline(pipelineInstance: Phaser.Renderer.WebGL.WebGLPipeline, gameObject?: Phaser.GameObjects.GameObject): Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * [description] + * @param blendModeId [description] + */ + setBlendMode(blendModeId: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param func [description] + * @param equation [description] + */ + addBlendMode(func: Function, equation: Function): integer; + + /** + * [description] + * @param index [description] + * @param func [description] + * @param equation [description] + */ + updateBlendMode(index: integer, func: Function, equation: Function): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param index [description] + */ + removeBlendMode(index: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Binds a texture at a texture unit. If a texture is already + * bound to that unit it will force a flush on the current pipeline. + * @param texture The WebGL texture that needs to be bound + * @param textureUnit The texture unit to which the texture will be bound + */ + setTexture2D(texture: WebGLTexture, textureUnit: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Binds a framebuffer. If there was another framebuffer already bound + * it will force a pipeline flush. + * @param framebuffer The framebuffer that needs to be bound + */ + setFramebuffer(framebuffer: WebGLFramebuffer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Binds a program. If there was another program already bound + * it will force a pipeline flush + * @param program The program that needs to be bound + */ + setProgram(program: WebGLProgram): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Bounds a vertex buffer. If there is a vertex buffer already bound + * it'll force a pipeline flush. + * @param vertexBuffer The buffer that needs to be bound + */ + setVertexBuffer(vertexBuffer: WebGLBuffer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Bounds a index buffer. If there is a index buffer already bound + * it'll force a pipeline flush. + * @param indexBuffer The buffer the needs to be bound + */ + setIndexBuffer(indexBuffer: WebGLBuffer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Creates a texture from an image source. If the source is not valid + * it creates an empty texture + * @param source [description] + * @param width [description] + * @param height [description] + * @param scaleMode [description] + */ + createTextureFromSource(source: object, width: integer, height: integer, scaleMode: integer): WebGLTexture; + + /** + * A wrapper for creating a WebGLTexture. If not pixel data is passed + * it will create an empty texture. + * @param mipLevel Mip level of the texture + * @param minFilter Filtering of the texture + * @param magFilter Filtering of the texture + * @param wrapT Wrapping mode of the texture + * @param wrapS Wrapping mode of the texture + * @param format Which format does the texture use + * @param pixels pixel data + * @param width Width of the texture in pixels + * @param height Height of the texture in pixels + * @param pma Does the texture have premultiplied alpha? + */ + createTexture2D(mipLevel: integer, minFilter: integer, magFilter: integer, wrapT: integer, wrapS: integer, format: integer, pixels: object, width: integer, height: integer, pma: boolean): WebGLTexture; + + /** + * Wrapper for creating WebGLFramebuffer. + * @param width Width in pixels of the framebuffer + * @param height Height in pixels of the framebuffer + * @param renderTexture The color texture to where the color pixels are written + * @param addDepthStencilBuffer Indicates if the current framebuffer support depth and stencil buffers + */ + createFramebuffer(width: integer, height: integer, renderTexture: WebGLTexture, addDepthStencilBuffer: boolean): WebGLFramebuffer; + + /** + * Wrapper for creating a WebGLProgram + * @param vertexShader Source to the vertex shader + * @param fragmentShader Source to the fragment shader + */ + createProgram(vertexShader: string, fragmentShader: string): WebGLProgram; + + /** + * Wrapper for creating a vertex buffer. + * @param initialDataOrSize It's either ArrayBuffer or an integer indicating the size of the vbo + * @param bufferUsage How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW + */ + createVertexBuffer(initialDataOrSize: ArrayBuffer, bufferUsage: integer): WebGLBuffer; + + /** + * Wrapper for creating a vertex buffer. + * @param initialDataOrSize It's either ArrayBuffer or an integer indicating the size of the vbo + * @param bufferUsage How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW + */ + createIndexBuffer(initialDataOrSize: ArrayBuffer, bufferUsage: integer): WebGLBuffer; + + /** + * [description] + * @param texture [description] + */ + deleteTexture(texture: WebGLTexture): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Wrapper for deleting a raw WebGLFramebuffer + * @param framebuffer [description] + */ + deleteFramebuffer(framebuffer: WebGLFramebuffer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + */ + deleteProgram(program: WebGLProgram): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Wrapper for deleting a vertex or index buffer + * @param vertexBuffer [description] + */ + deleteBuffer(vertexBuffer: WebGLBuffer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Handles any clipping needed by the camera and renders the background + * color if a color is visible. + * @param camera [description] + */ + preRenderCamera(camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * Renders the foreground camera effects like flash and fading. + * It resets the current scissor state. + * @param camera [description] + */ + postRenderCamera(camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * Clears the current vertex buffer and updates pipelines. + */ + preRender(): void; + + /** + * [description] + * @param scene [description] + * @param children [description] + * @param interpolationPercentage [description] + * @param camera [description] + */ + render(scene: Phaser.Scene, children: Phaser.GameObjects.GameObject, interpolationPercentage: number, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * [description] + */ + postRender(): void; + + /** + * [description] + * @param callback [description] + * @param type [description] + * @param encoderOptions [description] + */ + snapshot(callback: SnapshotCallback, type: string, encoderOptions: number): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param srcCanvas [description] + * @param dstTexture [description] + */ + canvasToTexture(srcCanvas: HTMLCanvasElement, dstTexture?: WebGLTexture): WebGLTexture; + + /** + * [description] + * @param texture [description] + * @param filter [description] + */ + setTextureFilter(texture: integer, filter: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + * @param name [description] + * @param x [description] + */ + setFloat1(program: WebGLProgram, name: string, x: number): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + * @param name [description] + * @param x [description] + * @param y [description] + */ + setFloat2(program: WebGLProgram, name: string, x: number, y: number): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + * @param name [description] + * @param x [description] + * @param y [description] + * @param z [description] + */ + setFloat3(program: WebGLProgram, name: string, x: number, y: number, z: number): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Sets uniform of a WebGLProgram + * @param program Target program + * @param name Name of the uniform + * @param x X component + * @param y Y component + * @param z Z component + * @param w W component + */ + setFloat4(program: WebGLProgram, name: string, x: number, y: number, z: number, w: number): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + * @param name [description] + * @param x [description] + */ + setInt1(program: WebGLProgram, name: string, x: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + * @param name [description] + * @param x [description] + * @param y [description] + */ + setInt2(program: WebGLProgram, name: string, x: integer, y: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + * @param name [description] + * @param x [description] + * @param y [description] + * @param z [description] + */ + setInt3(program: WebGLProgram, name: string, x: integer, y: integer, z: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Sets uniform of a WebGLProgram + * @param program Target Program + * @param name Name of the uniform + * @param x X component + * @param y Y component + * @param z Z component + * @param w W component + */ + setInt4(program: WebGLProgram, name: string, x: integer, y: integer, z: integer, w: integer): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + * @param name [description] + * @param transpose [description] + * @param matrix [description] + */ + setMatrix2(program: WebGLProgram, name: string, transpose: boolean, matrix: Float32Array): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * [description] + * @param program [description] + * @param name [description] + * @param transpose [description] + * @param matrix [description] + */ + setMatrix3(program: WebGLProgram, name: string, transpose: boolean, matrix: Float32Array): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Sets uniform of a WebGLProgram + * @param program Target program + * @param name Name of the uniform + * @param transpose Is the matrix transposed + * @param matrix Matrix data + */ + setMatrix4(program: WebGLProgram, name: string, transpose: boolean, matrix: Float32Array): Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * Returns the maximum number of texture units that can be used in a fragment shader. + */ + getMaxTextures(): integer; + + /** + * Returns the largest texture size (either width or height) that can be created. + * Note that VRAM may not allow a texture of any given size, it just expresses + * hardware / driver support for a given size. + */ + getMaxTextureSize(): integer; + + /** + * [description] + */ + destroy(): void; + + } + + namespace Pipelines { + /** + * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using + * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. + * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + */ + class BitmapMaskPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { + /** + * + * @param config Used for overriding shader an pipeline properties if extending this pipeline. + */ + constructor(config: object); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewF32: Float32Array; + + /** + * Size of the batch. + */ + maxQuads: number; + + /** + * Dirty flag to check if resolution properties need to be updated on the + * masking shader. + */ + resolutionDirty: boolean; + + /** + * Called every time the pipeline needs to be used. + * It binds all necessary resources. + */ + onBind(): Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param resolution [description] + */ + resize(width: number, height: number, resolution: number): Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline; + + /** + * Binds necessary resources and renders the mask to a separated framebuffer. + * The framebuffer for the masked object is also bound for further use. + * @param mask GameObject used as mask. + * @param maskedObject GameObject masked by the mask GameObject. + * @param camera [description] + */ + beginMask(mask: Phaser.GameObjects.GameObject, maskedObject: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void; + + /** + * The masked game object's framebuffer is unbound and it's texture + * is bound together with the mask texture and the mask shader and + * a draw call with a single quad is processed. Here is where the + * masking effect is applied. + * @param mask GameObject used as a mask. + */ + endMask(mask: Phaser.GameObjects.GameObject): void; + + } + + /** + * The FlatTintPipeline is used for rendering flat colored shapes. + * Mostly used by the Graphics game object. + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. + * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + */ + class FlatTintPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { + /** + * + * @param config Used for overriding shader an pipeline properties if extending this pipeline. + */ + constructor(config: object); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewF32: Float32Array; + + /** + * Uint32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewU32: Uint32Array; + + /** + * Used internally to draw triangles + */ + tempTriangle: any[]; + + /** + * Used internally for triangulating a polygon + */ + polygonCache: any[]; + + /** + * [description] + */ + onBind(): Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline; + + /** + * [description] + * @param width [description] + * @param height [description] + * @param resolution [description] + */ + resize(width: number, height: number, resolution: number): Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline; + + /** + * Pushes a rectangle into the vertex batch + * @param srcX Graphics horizontal component for translation + * @param srcY Graphics vertical component for translation + * @param srcScaleX Graphics horizontal component for scale + * @param srcScaleY Graphics vertical component for scale + * @param srcRotation Graphics rotation + * @param x Horizontal top left coordinate of the rectangle + * @param y Vertical top left coordinate of the rectangle + * @param width Width of the rectangle + * @param height Height of the rectangle + * @param fillColor RGB color packed as a uint + * @param fillAlpha Alpha represented as float + * @param a1 Matrix stack top a component + * @param b1 Matrix stack top b component + * @param c1 Matrix stack top c component + * @param d1 Matrix stack top d component + * @param e1 Matrix stack top e component + * @param f1 Matrix stack top f component + * @param currentMatrix Parent matrix, generally used by containers + */ + batchFillRect(srcX: number, srcY: number, srcScaleX: number, srcScaleY: number, srcRotation: number, x: number, y: number, width: number, height: number, fillColor: integer, fillAlpha: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, currentMatrix: Float32Array): void; + + /** + * [description] + * @param srcX Graphics horizontal component for translation + * @param srcY Graphics vertical component for translation + * @param srcScaleX Graphics horizontal component for scale + * @param srcScaleY Graphics vertical component for scale + * @param srcRotation Graphics rotation + * @param x0 Point 0 x coordinate + * @param y0 Point 0 y coordinate + * @param x1 Point 1 x coordinate + * @param y1 Point 1 y coordinate + * @param x2 Point 2 x coordinate + * @param y2 Point 2 y coordinate + * @param fillColor RGB color packed as a uint + * @param fillAlpha Alpha represented as float + * @param a1 Matrix stack top a component + * @param b1 Matrix stack top b component + * @param c1 Matrix stack top c component + * @param d1 Matrix stack top d component + * @param e1 Matrix stack top e component + * @param f1 Matrix stack top f component + * @param currentMatrix Parent matrix, generally used by containers + */ + batchFillTriangle(srcX: number, srcY: number, srcScaleX: number, srcScaleY: number, srcRotation: number, x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, fillColor: integer, fillAlpha: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, currentMatrix: Float32Array): void; + + /** + * [description] + * @param srcX Graphics horizontal component for translation + * @param srcY Graphics vertical component for translation + * @param srcScaleX Graphics horizontal component for scale + * @param srcScaleY Graphics vertical component for scale + * @param srcRotation Graphics rotation + * @param x0 [description] + * @param y0 [description] + * @param x1 [description] + * @param y1 [description] + * @param x2 [description] + * @param y2 [description] + * @param lineWidth Size of the line as a float value + * @param lineColor RGB color packed as a uint + * @param lineAlpha Alpha represented as float + * @param a Matrix stack top a component + * @param b Matrix stack top b component + * @param c Matrix stack top c component + * @param d Matrix stack top d component + * @param e Matrix stack top e component + * @param f Matrix stack top f component + * @param currentMatrix Parent matrix, generally used by containers + */ + batchStrokeTriangle(srcX: number, srcY: number, srcScaleX: number, srcScaleY: number, srcRotation: number, x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, lineWidth: number, lineColor: integer, lineAlpha: number, a: number, b: number, c: number, d: number, e: number, f: number, currentMatrix: Float32Array): void; + + /** + * [description] + * @param srcX Graphics horizontal component for translation + * @param srcY Graphics vertical component for translation + * @param srcScaleX Graphics horizontal component for scale + * @param srcScaleY Graphics vertical component for scale + * @param srcRotation Graphics rotation + * @param path Collection of points that represent the path + * @param fillColor RGB color packed as a uint + * @param fillAlpha Alpha represented as float + * @param a1 Matrix stack top a component + * @param b1 Matrix stack top b component + * @param c1 Matrix stack top c component + * @param d1 Matrix stack top d component + * @param e1 Matrix stack top e component + * @param f1 Matrix stack top f component + * @param currentMatrix Parent matrix, generally used by containers + */ + batchFillPath(srcX: number, srcY: number, srcScaleX: number, srcScaleY: number, srcRotation: number, path: number, fillColor: integer, fillAlpha: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, currentMatrix: Float32Array): void; + + /** + * [description] + * @param srcX Graphics horizontal component for translation + * @param srcY Graphics vertical component for translation + * @param srcScaleX Graphics horizontal component for scale + * @param srcScaleY Graphics vertical component for scale + * @param srcRotation Graphics rotation + * @param path [description] + * @param lineWidth [description] + * @param lineColor RGB color packed as a uint + * @param lineAlpha Alpha represented as float + * @param a Matrix stack top a component + * @param b Matrix stack top b component + * @param c Matrix stack top c component + * @param d Matrix stack top d component + * @param e Matrix stack top e component + * @param f Matrix stack top f component + * @param isLastPath Indicates if the path should be closed + * @param currentMatrix Parent matrix, generally used by containers + */ + batchStrokePath(srcX: number, srcY: number, srcScaleX: number, srcScaleY: number, srcRotation: number, path: any[], lineWidth: number, lineColor: integer, lineAlpha: number, a: number, b: number, c: number, d: number, e: number, f: number, isLastPath: boolean, currentMatrix: Float32Array): void; + + /** + * [description] + * @param srcX Graphics horizontal component for translation + * @param srcY Graphics vertical component for translation + * @param srcScaleX Graphics horizontal component for scale + * @param srcScaleY Graphics vertical component for scale + * @param srcRotation Graphics rotation + * @param ax X coordinate to the start of the line + * @param ay Y coordinate to the start of the line + * @param bx X coordinate to the end of the line + * @param by Y coordinate to the end of the line + * @param aLineWidth Width of the start of the line + * @param bLineWidth Width of the end of the line + * @param aLineColor RGB color packed as a uint + * @param bLineColor RGB color packed as a uint + * @param lineAlpha Alpha represented as float + * @param a1 Matrix stack top a component + * @param b1 Matrix stack top b component + * @param c1 Matrix stack top c component + * @param d1 Matrix stack top d component + * @param e1 Matrix stack top e component + * @param f1 Matrix stack top f component + * @param currentMatrix Parent matrix, generally used by containers + */ + batchLine(srcX: number, srcY: number, srcScaleX: number, srcScaleY: number, srcRotation: number, ax: number, ay: number, bx: number, by: number, aLineWidth: number, bLineWidth: number, aLineColor: integer, bLineColor: integer, lineAlpha: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, currentMatrix: Float32Array): void; + + /** + * [description] + * @param graphics [description] + * @param camera [description] + * @param parentTransformMatrix [description] + */ + batchGraphics(graphics: Phaser.GameObjects.Graphics, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + } + + /** + * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights. + * This pipeline extends TextureTintPipeline so it implements all it's rendering functions + * and batching system. + */ + class ForwardDiffuseLightPipeline extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline { + /** + * + * @param config [description] + */ + constructor(config: object); + + /** + * This function sets all the needed resources for each camera pass. + * @param scene [description] + * @param camera [description] + */ + onRender(scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera): Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline; + + /** + * Sets the Game Objects normal map as the active texture. + * @param gameObject [description] + */ + setNormalMap(gameObject: Phaser.GameObjects.GameObject): void; + + /** + * [description] + * @param sprite [description] + * @param camera [description] + * @param parentTransformMatrix [description] + */ + batchSprite(sprite: Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + } + + /** + * TextureTintPipeline implements the rendering infrastructure + * for displaying textured objects + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. + * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * - vertShader: Source for vertex shader as a string. + * - fragShader: Source for fragment shader as a string. + * - vertexCapacity: The amount of vertices that shall be allocated + * - vertexSize: The size of a single vertex in bytes. + */ + class TextureTintPipeline extends Phaser.Renderer.WebGL.WebGLPipeline { + /** + * + * @param config [description] + */ + constructor(config: object); + + /** + * Generic function for batching a textured quad + * @param gameObject Source GameObject + * @param texture Raw WebGLTexture associated with the quad + * @param textureWidth Real texture width + * @param textureHeight Real texture height + * @param srcX X coordinate of the quad + * @param srcY Y coordinate of the quad + * @param srcWidth Width of the quad + * @param srcHeight Height of the quad + * @param scaleX X component of scale + * @param scaleY Y component of scale + * @param rotation Rotation of the quad + * @param flipX Indicates if the quad is horizontally flipped + * @param flipY Indicates if the quad is vertically flipped + * @param scrollFactorX By which factor is the quad affected by the camera horizontal scroll + * @param scrollFactorY By which factor is the quad effected by the camera vertical scroll + * @param displayOriginX Horizontal origin in pixels + * @param displayOriginY Vertical origin in pixels + * @param frameX X coordinate of the texture frame + * @param frameY Y coordinate of the texture frame + * @param frameWidth Width of the texture frame + * @param frameHeight Height of the texture frame + * @param tintTL Tint for top left + * @param tintTR Tint for top right + * @param tintBL Tint for bottom left + * @param tintBR Tint for bottom right + * @param tintEffect The tint effect (0 for additive, 1 for replacement) + * @param uOffset Horizontal offset on texture coordinate + * @param vOffset Vertical offset on texture coordinate + * @param camera Current used camera + * @param parentTransformMatrix Parent container + */ + batchTexture(gameObject: Phaser.GameObjects.GameObject, texture: WebGLTexture, textureWidth: integer, textureHeight: integer, srcX: number, srcY: number, srcWidth: number, srcHeight: number, scaleX: number, scaleY: number, rotation: number, flipX: boolean, flipY: boolean, scrollFactorX: number, scrollFactorY: number, displayOriginX: number, displayOriginY: number, frameX: number, frameY: number, frameWidth: number, frameHeight: number, tintTL: integer, tintTR: integer, tintBL: integer, tintBR: integer, tintEffect: number, uOffset: number, vOffset: number, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewF32: Float32Array; + + /** + * Uint32 view of the array buffer containing the pipeline's vertices. + */ + vertexViewU32: Uint32Array; + + /** + * Size of the batch. + */ + maxQuads: integer; + + /** + * Collection of batch information + */ + batches: any[]; + + /** + * Assigns a texture to the current batch. If a texture is already set it creates + * a new batch object. + * @param texture WebGLTexture that will be assigned to the current batch. + * @param textureUnit Texture unit to which the texture needs to be bound. + */ + setTexture2D(texture: WebGLTexture, textureUnit: integer): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; + + /** + * Creates a new batch object and pushes it to a batch array. + * The batch object contains information relevant to the current + * vertex batch like the offset in the vertex buffer, vertex count and + * the textures used by that batch. + */ + pushBatch(): void; + + /** + * Binds, uploads resources and processes all batches generating draw calls. + */ + flush(): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; + + /** + * Called every time the pipeline needs to be used. + * It binds all necessary resources. + */ + onBind(): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; + + /** + * Resizes this pipeline and updates the projection. + * @param width The new width. + * @param height The new height. + * @param resolution The resolution. + */ + resize(width: number, height: number, resolution: number): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; + + /** + * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. + * @param sprite The texture based Game Object to add to the batch. + * @param camera The Camera to use for the rendering transform. + * @param parentTransformMatrix The transform matrix of the parent container, if set. + */ + batchSprite(sprite: Phaser.GameObjects.Image | Phaser.GameObjects.Sprite, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void; + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 6 vertices in the following arrangement: + * + * ``` + * 0----3 + * |\ B| + * | \ | + * | \ | + * | A \| + * | \ + * 1----2 + * ``` + * + * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 + * @param tx0 The top-left x position. + * @param ty0 The top-left y position. + * @param tx1 The bottom-left x position. + * @param ty1 The bottom-left y position. + * @param tx2 The bottom-right x position. + * @param ty2 The bottom-right y position. + * @param tx3 The top-right x position. + * @param ty3 The top-right y position. + * @param u0 UV u0 value. + * @param v0 UV v0 value. + * @param u1 UV u1 value. + * @param v1 UV v1 value. + * @param tintTL The top-left tint color value. + * @param tintTR The top-right tint color value. + * @param tintBL The bottom-left tint color value. + * @param tintBR The bottom-right tint color value. + * @param tintEffect The tint effect for the shader to use. + */ + batchVertices(tx0: number, ty0: number, tx1: number, ty1: number, tx2: number, ty2: number, tx3: number, ty3: number, u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintBR: number, tintEffect: number | boolean): boolean; + + /** + * Immediately draws a Texture Frame with no batching. + * @param texture The WebGL Texture to be rendered. + * @param x The horizontal position to render the texture at. + * @param y The vertical position to render the texture at. + * @param tint The tint color. + * @param alpha The alpha value. + * @param transformMatrix An array of matrix values. + * @param parentTransformMatrix A parent Transform Matrix. + */ + drawTexture(texture: WebGLTexture, x: number, y: number, tint: number, alpha: number, transformMatrix: any[], parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline; + + } + + } + + } + + } + + /** + * [description] + */ + class Scene { + /** + * + * @param config Scene specific configuration settings. + */ + constructor(config: string | Phaser.Scenes.Settings.Config); + + /** + * The Scene Systems. You must never overwrite this property, or all hell will break lose. + */ + sys: Phaser.Scenes.Systems; + + /** + * A reference to the Phaser.Game instance. + * This property will only be available if defined in the Scene Injection Map. + */ + game: Phaser.Game; + + /** + * A reference to the global Animation Manager. + * This property will only be available if defined in the Scene Injection Map. + */ + anims: Phaser.Animations.AnimationManager; + + /** + * A reference to the global Cache. + * This property will only be available if defined in the Scene Injection Map. + */ + cache: Phaser.Cache.CacheManager; + + /** + * A reference to the game level Data Manager. + * This property will only be available if defined in the Scene Injection Map. + */ + registry: Phaser.Data.DataManager; + + /** + * A reference to the Sound Manager. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + sound: Phaser.Sound.BaseSoundManager; + + /** + * A reference to the Texture Manager. + * This property will only be available if defined in the Scene Injection Map. + */ + textures: Phaser.Textures.TextureManager; + + /** + * A scene level Event Emitter. + * This property will only be available if defined in the Scene Injection Map. + */ + events: Phaser.Events.EventEmitter; + + /** + * A scene level Camera System. + * This property will only be available if defined in the Scene Injection Map. + */ + cameras: Phaser.Cameras.Scene2D.CameraManager; + + /** + * A scene level 3D Camera System. + * This property will only be available if defined in the Scene Injection Map. + */ + cameras3d: Phaser.Cameras.Sprite3D.CameraManager; + + /** + * A scene level Game Object Factory. + * This property will only be available if defined in the Scene Injection Map. + */ + add: Phaser.GameObjects.GameObjectFactory; + + /** + * A scene level Game Object Creator. + * This property will only be available if defined in the Scene Injection Map. + */ + make: Phaser.GameObjects.GameObjectCreator; + + /** + * A reference to the Scene Manager Plugin. + * This property will only be available if defined in the Scene Injection Map. + */ + scene: Phaser.Scenes.ScenePlugin; + + /** + * A scene level Game Object Display List. + * This property will only be available if defined in the Scene Injection Map. + */ + children: Phaser.GameObjects.DisplayList; + + /** + * A scene level Lights Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + lights: Phaser.GameObjects.LightsManager; + + /** + * A scene level Data Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + data: Phaser.Data.DataManager; + + /** + * A scene level Input Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + input: Phaser.Input.InputPlugin; + + /** + * A scene level Loader Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + load: Phaser.Loader.LoaderPlugin; + + /** + * A scene level Time and Clock Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + time: Phaser.Time.Clock; + + /** + * A scene level Tween Manager Plugin. + * This property will only be available if defined in the Scene Injection Map and the plugin is installed. + */ + tweens: Phaser.Tweens.TweenManager; + + /** + * A scene level Arcade Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + physics: Phaser.Physics.Arcade.ArcadePhysics; + + /** + * A scene level Impact Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + impact: Phaser.Physics.Impact.ImpactPhysics; + + /** + * A scene level Matter Physics Plugin. + * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured. + */ + matter: Phaser.Physics.Matter.MatterPhysics; + + /** + * Should be overridden by your own Scenes. + * @param time [description] + * @param delta [description] + */ + update(time: number, delta: number): void; + + } + + namespace Scenes { + /** + * Builds an array of which physics plugins should be activated for the given Scene. + * @param sys The scene system to get the physics systems of. + */ + function GetPhysicsPlugins(sys: Phaser.Scenes.Systems): any[]; + + /** + * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene. + * @param sys [description] + */ + function GetScenePlugins(sys: Phaser.Scenes.Systems): any[]; + + /** + * The Scene Manager. + * + * The Scene Manager is a Game level system, responsible for creating, processing and updating all of the + * Scenes in a Game instance. + */ + class SceneManager { + /** + * + * @param game The Phaser.Game instance this Scene Manager belongs to. + * @param sceneConfig Scene specific configuration settings. + */ + constructor(game: Phaser.Game, sceneConfig: object); + + /** + * The Game that this SceneManager belongs to. + */ + game: Phaser.Game; + + /** + * An object that maps the keys to the scene so we can quickly get a scene from a key without iteration. + */ + keys: object; + + /** + * The array in which all of the scenes are kept. + */ + scenes: any[]; + + /** + * Is the Scene Manager actively processing the Scenes list? + */ + readonly isProcessing: boolean; + + /** + * Has the Scene Manager properly started? + */ + readonly isBooted: boolean; + + /** + * Process the Scene operations queue. + */ + processQueue(): void; + + /** + * Adds a new Scene into the SceneManager. + * You must give each Scene a unique key by which you'll identify it. + * + * The `sceneConfig` can be: + * + * * A `Phaser.Scene` object, or an object that extends it. + * * A plain JavaScript object + * * A JavaScript ES6 Class that extends `Phaser.Scene` + * * A JavaScript ES5 prototype based Class + * * A JavaScript function + * + * If a function is given then a new Scene will be created by calling it. + * @param key A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`. + * @param sceneConfig The config for the Scene + * @param autoStart If `true` the Scene will be started immediately after being added. Default false. + * @param data Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`. + */ + add(key: string, sceneConfig: Phaser.Scene | Phaser.Scenes.Settings.Config | Function, autoStart?: boolean, data?: object): Phaser.Scene; + + /** + * Removes a Scene from the SceneManager. + * + * The Scene is removed from the local scenes array, it's key is cleared from the keys + * cache and Scene.Systems.destroy is then called on it. + * + * If the SceneManager is processing the Scenes when this method is called it wil + * queue the operation for the next update sequence. + * @param scene The Scene to be removed. + */ + remove(scene: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Updates the Scenes. + * @param time Time elapsed. + * @param delta Delta time from the last update. + */ + update(time: number, delta: number): void; + + /** + * Informs the Scenes of the Game being resized. + * @param width The new width of the game. + * @param height The new height of the game. + */ + resize(width: number, height: number): void; + + /** + * Renders the Scenes. + * @param renderer The renderer to use. + */ + render(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer): void; + + /** + * Retrieves a Scene. + * @param key The Scene to retrieve. + */ + getScene(key: string | Phaser.Scene): Phaser.Scene; + + /** + * Determines whether a Scene is active. + * @param key The Scene to check. + */ + isActive(key: string): boolean; + + /** + * Determines whether a Scene is visible. + * @param key The Scene to check. + */ + isVisible(key: string): boolean; + + /** + * Determines whether a Scene is sleeping. + * @param key The Scene to check. + */ + isSleeping(key: string): boolean; + + /** + * Pauses the given Scene. + * @param key The Scene to pause. + * @param data An optional data object that will be passed to the Scene and emitted by its pause event. + */ + pause(key: string, data?: object): Phaser.Scenes.SceneManager; + + /** + * Resumes the given Scene. + * @param key The Scene to resume. + * @param data An optional data object that will be passed to the Scene and emitted by its resume event. + */ + resume(key: string, data?: object): Phaser.Scenes.SceneManager; + + /** + * Puts the given Scene to sleep. + * @param key The Scene to put to sleep. + * @param data An optional data object that will be passed to the Scene and emitted by its sleep event. + */ + sleep(key: string, data?: object): Phaser.Scenes.SceneManager; + + /** + * Awakens the given Scene. + * @param key The Scene to wake up. + * @param data An optional data object that will be passed to the Scene and emitted by its wake event. + */ + wake(key: string, data?: object): Phaser.Scenes.SceneManager; + + /** + * Runs the given Scene, but does not change the state of this Scene. + * + * If the given Scene is paused, it will resume it. If sleeping, it will wake it. + * If not running at all, it will be started. + * + * Use this if you wish to open a modal Scene by calling `pause` on the current + * Scene, then `run` on the modal Scene. + * @param key The Scene to run. + * @param data A data object that will be passed to the Scene on start, wake, or resume. + */ + run(key: string, data?: object): Phaser.Scenes.SceneManager; + + /** + * Starts the given Scene. + * @param key The Scene to start. + * @param data Optional data object to pass to Scene.Settings and Scene.init. + */ + start(key: string, data?: object): Phaser.Scenes.SceneManager; + + /** + * Stops the given Scene. + * @param key The Scene to stop. + */ + stop(key: string): Phaser.Scenes.SceneManager; + + /** + * Sleeps one one Scene and starts the other. + * @param from The Scene to sleep. + * @param to The Scene to start. + */ + switch(from: string, to: string): Phaser.Scenes.SceneManager; + + /** + * Retrieves a Scene by numeric index. + * @param index The index of the Scene to retrieve. + */ + getAt(index: integer): Phaser.Scene | undefined; + + /** + * Retrieves the numeric index of a Scene. + * @param key The key of the Scene. + */ + getIndex(key: string | Phaser.Scene): integer; + + /** + * Brings a Scene to the top of the Scenes list. + * + * This means it will render above all other Scenes. + * @param key The Scene to move. + */ + bringToTop(key: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Sends a Scene to the back of the Scenes list. + * + * This means it will render below all other Scenes. + * @param key The Scene to move. + */ + sendToBack(key: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Moves a Scene down one position in the Scenes list. + * @param key The Scene to move. + */ + moveDown(key: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Moves a Scene up one position in the Scenes list. + * @param key The Scene to move. + */ + moveUp(key: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Moves a Scene so it is immediately above another Scene in the Scenes list. + * + * This means it will render over the top of the other Scene. + * @param keyA The Scene that Scene B will be moved above. + * @param keyB The Scene to be moved. + */ + moveAbove(keyA: string | Phaser.Scene, keyB: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Moves a Scene so it is immediately below another Scene in the Scenes list. + * + * This means it will render behind the other Scene. + * @param keyA The Scene that Scene B will be moved above. + * @param keyB The Scene to be moved. + */ + moveBelow(keyA: string | Phaser.Scene, keyB: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Swaps the positions of two Scenes in the Scenes list. + * @param keyA The first Scene to swap. + * @param keyB The second Scene to swap. + */ + swapPosition(keyA: string | Phaser.Scene, keyB: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Dumps debug information about each Scene to the developer console. + */ + dump(): void; + + /** + * Destroy the SceneManager and all of its Scene's systems. + */ + destroy(): void; + + } + + /** + * A proxy class to the Global Scene Manager. + */ + class ScenePlugin { + /** + * + * @param scene The Scene that this ScenePlugin belongs to. + */ + constructor(scene: Phaser.Scene); + + /** + * The Scene that this ScenePlugin belongs to. + */ + scene: Phaser.Scene; + + /** + * The Scene Systems instance of the Scene that this ScenePlugin belongs to. + */ + systems: Phaser.Scenes.Systems; + + /** + * The settings of the Scene this ScenePlugin belongs to. + */ + settings: Phaser.Scenes.Settings.Object; + + /** + * The key of the Scene this ScenePlugin belongs to. + */ + key: string; + + /** + * The Game's SceneManager. + */ + manager: Phaser.Scenes.SceneManager; + + /** + * If this Scene is currently transitioning to another, this holds + * the current percentage of the transition progress, between 0 and 1. + */ + transitionProgress: number; + + /** + * Shutdown this Scene and run the given one. + * @param key The Scene to start. + * @param data The Scene data. + */ + start(key?: string, data?: object): Phaser.Scenes.ScenePlugin; + + /** + * Restarts this Scene. + * @param data The Scene data. + */ + restart(data?: object): Phaser.Scenes.ScenePlugin; + + /** + * This will start a transition from the current Scene to the target Scene given. + * + * The transition will last for the duration specified in milliseconds. + * + * You can have the target Scene moved above or below this one in the display list. + * + * You can specify an update callback. This callback will be invoked _every frame_ for the duration + * of the transition. + * + * This Scene can either be sent to sleep at the end of the transition, or stopped. The default is to stop. + * + * There are also 5 transition related events: This scene will emit the event `transitionto` when + * the transition begins, which is typically the frame after calling this method. + * + * The target Scene will emit the event `transitioninit` when that Scene's `init` method is called. + * It will then emit the event `transitionstart` when its `create` method is called. + * If the Scene was sleeping and has been woken up, it will emit the event `transitionwake` instead of these two, + * as the Scenes `init` and `create` methods are not invoked when a sleep wakes up. + * + * When the duration of the transition has elapsed it will emit the event `transitioncomplete`. + * These events are all cleared of listeners when the Scene shuts down, but not if it is sent to sleep. + * + * It's important to understand that the duration of the transition begins the moment you call this method. + * If the Scene you are transitioning to includes delayed processes, such as waiting for files to load, the + * time still counts down even while that is happening. If the game itself pauses, or something else causes + * this Scenes update loop to stop, then the transition will also pause for that duration. There are + * checks in place to prevent you accidentally stopping a transitioning Scene but if you've got code to + * override this understand that until the target Scene completes it might never be unlocked for input events. + * @param config The transition configuration object. + */ + transition(config: Phaser.Scenes.ScenePlugin.SceneTransitionConfig): boolean; + + /** + * Add the Scene into the Scene Manager and start it if 'autoStart' is true or the Scene config 'active' property is set. + * @param key The Scene key. + * @param sceneConfig The config for the Scene. + * @param autoStart Whether to start the Scene after it's added. + */ + add(key: string, sceneConfig: Phaser.Scene | Phaser.Scenes.Settings.Config | Function, autoStart: boolean): Phaser.Scenes.ScenePlugin; + + /** + * Launch the given Scene and run it in parallel with this one. + * @param key The Scene to launch. + * @param data The Scene data. + */ + launch(key: string, data?: object): Phaser.Scenes.ScenePlugin; + + /** + * Runs the given Scene, but does not change the state of this Scene. + * + * If the given Scene is paused, it will resume it. If sleeping, it will wake it. + * If not running at all, it will be started. + * + * Use this if you wish to open a modal Scene by calling `pause` on the current + * Scene, then `run` on the modal Scene. + * @param key The Scene to run. + * @param data A data object that will be passed to the Scene and emitted in its ready, wake, or resume events. + */ + run(key: string, data?: object): Phaser.Scenes.ScenePlugin; + + /** + * Pause the Scene - this stops the update step from happening but it still renders. + * @param key The Scene to pause. + * @param data An optional data object that will be passed to the Scene and emitted in its pause event. + */ + pause(key?: string, data?: object): Phaser.Scenes.ScenePlugin; + + /** + * Resume the Scene - starts the update loop again. + * @param key The Scene to resume. + * @param data An optional data object that will be passed to the Scene and emitted in its resume event. + */ + resume(key?: string, data?: object): Phaser.Scenes.ScenePlugin; + + /** + * Makes the Scene sleep (no update, no render) but doesn't shutdown. + * @param key The Scene to put to sleep. + * @param data An optional data object that will be passed to the Scene and emitted in its sleep event. + */ + sleep(key?: string, data?: object): Phaser.Scenes.ScenePlugin; + + /** + * Makes the Scene wake-up (starts update and render) + * @param key The Scene to wake up. + * @param data An optional data object that will be passed to the Scene and emitted in its wake event. + */ + wake(key?: string, data?: object): Phaser.Scenes.ScenePlugin; + + /** + * Makes this Scene sleep then starts the Scene given. + * @param key The Scene to start. + */ + switch(key: string): Phaser.Scenes.ScenePlugin; + + /** + * Shutdown the Scene, clearing display list, timers, etc. + * @param key The Scene to stop. + */ + stop(key: string): Phaser.Scenes.ScenePlugin; + + /** + * Sets the active state of the given Scene. + * @param value If `true` the Scene will be resumed. If `false` it will be paused. + * @param key The Scene to set the active state of. + * @param data An optional data object that will be passed to the Scene and emitted with its events. + */ + setActive(value: boolean, key?: string, data?: object): Phaser.Scenes.ScenePlugin; + + /** + * Sets the visible state of the given Scene. + * @param value The visible value. + * @param key The Scene to set the visible state for. + */ + setVisible(value: boolean, key?: string): Phaser.Scenes.ScenePlugin; + + /** + * Checks if the given Scene is sleeping or not? + * @param key The Scene to check. + */ + isSleeping(key: string): boolean; + + /** + * Checks if the given Scene is active or not? + * @param key The Scene to check. + */ + isActive(key: string): boolean; + + /** + * Checks if the given Scene is visible or not? + * @param key The Scene to check. + */ + isVisible(key: string): boolean; + + /** + * Swaps the position of two scenes in the Scenes list. + * + * This controls the order in which they are rendered and updated. + * @param keyA The first Scene to swap. + * @param keyB The second Scene to swap. If none is given it defaults to this Scene. + */ + swapPosition(keyA: string, keyB?: string): Phaser.Scenes.ScenePlugin; + + /** + * Swaps the position of two scenes in the Scenes list, so that Scene B is directly above Scene A. + * + * This controls the order in which they are rendered and updated. + * @param keyA The Scene that Scene B will be moved to be above. + * @param keyB The Scene to be moved. If none is given it defaults to this Scene. + */ + moveAbove(keyA: string, keyB?: string): Phaser.Scenes.ScenePlugin; + + /** + * Swaps the position of two scenes in the Scenes list, so that Scene B is directly below Scene A. + * + * This controls the order in which they are rendered and updated. + * @param keyA The Scene that Scene B will be moved to be below. + * @param keyB The Scene to be moved. If none is given it defaults to this Scene. + */ + moveBelow(keyA: string, keyB?: string): Phaser.Scenes.ScenePlugin; + + /** + * Removes a Scene from the SceneManager. + * + * The Scene is removed from the local scenes array, it's key is cleared from the keys + * cache and Scene.Systems.destroy is then called on it. + * + * If the SceneManager is processing the Scenes when this method is called it wil + * queue the operation for the next update sequence. + * @param key The Scene to be removed. + */ + remove(key: string | Phaser.Scene): Phaser.Scenes.SceneManager; + + /** + * Moves a Scene up one position in the Scenes list. + * @param key The Scene to move. + */ + moveUp(key: string): Phaser.Scenes.ScenePlugin; + + /** + * Moves a Scene down one position in the Scenes list. + * @param key The Scene to move. + */ + moveDown(key: string): Phaser.Scenes.ScenePlugin; + + /** + * Brings a Scene to the top of the Scenes list. + * + * This means it will render above all other Scenes. + * @param key The Scene to move. + */ + bringToTop(key: string): Phaser.Scenes.ScenePlugin; + + /** + * Sends a Scene to the back of the Scenes list. + * + * This means it will render below all other Scenes. + * @param key The Scene to move. + */ + sendToBack(key: string): Phaser.Scenes.ScenePlugin; + + /** + * Retrieve a Scene. + * @param key The Scene to retrieve. + */ + get(key: string): Phaser.Scene; + + /** + * Retrieves the numeric index of a Scene in the Scenes list. + * @param key The Scene to get the index of. + */ + getIndex(key?: string | Phaser.Scene): integer; + + } + + namespace Settings { + type Config = { + /** + * [description] + */ + key?: string; + /** + * [description] + */ + active?: boolean; + /** + * [description] + */ + visible?: boolean; + /** + * [description] + */ + pack?: false | Phaser.Loader.FileTypes.PackFileConfig; + /** + * [description] + */ + cameras?: InputJSONCameraObject | InputJSONCameraObject[]; + /** + * Overwrites the default injection map for a scene. + */ + map?: { [key: string]: string }; + /** + * Extends the injection map for a scene. + */ + mapAdd?: { [key: string]: string }; + /** + * [description] + */ + physics?: object; + /** + * [description] + */ + loader?: object; + /** + * [description] + */ + plugins?: false | any; + }; + + type Object = { + /** + * [description] + */ + status: number; + /** + * [description] + */ + key: string; + /** + * [description] + */ + active: boolean; + /** + * [description] + */ + visible: boolean; + /** + * [description] + */ + isBooted: boolean; + /** + * [description] + */ + isTransition: boolean; + /** + * [description] + */ + transitionFrom: Phaser.Scene; + /** + * [description] + */ + transitionDuration: integer; + /** + * [description] + */ + transitionAllowInput: boolean; + /** + * [description] + */ + data: object; + /** + * [description] + */ + pack: false | Phaser.Loader.FileTypes.PackFileConfig; + /** + * [description] + */ + cameras: InputJSONCameraObject | InputJSONCameraObject[]; + /** + * [description] + */ + map: { [key: string]: string }; + /** + * [description] + */ + physics: object; + /** + * [description] + */ + loader: object; + /** + * [description] + */ + plugins: false | any; + }; + + /** + * Takes a Scene configuration object and returns a fully formed Systems object. + * @param config [description] + */ + function create(config: string | Phaser.Scenes.Settings.Config): Phaser.Scenes.Settings.Object; + + } + + /** + * The Scene Systems class. + * + * This class is available from within a Scene under the property `sys`. + * It is responsible for managing all of the plugins a Scene has running, including the display list, and + * handling the update step and renderer. It also contains references to global systems belonging to Game. + */ + class Systems { + /** + * + * @param scene The Scene that owns this Systems instance. + * @param config Scene specific configuration settings. + */ + constructor(scene: Phaser.Scene, config: string | Phaser.Scenes.Settings.Config); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + game: Phaser.Game; + + /** + * [description] + */ + config: string | Phaser.Scenes.Settings.Config; + + /** + * [description] + */ + settings: Phaser.Scenes.Settings.Object; + + /** + * A handy reference to the Scene canvas / context. + */ + canvas: HTMLCanvasElement; + + /** + * [description] + */ + context: CanvasRenderingContext2D; + + /** + * [description] + */ + anims: Phaser.Animations.AnimationManager; + + /** + * [description] + */ + cache: Phaser.Cache.CacheManager; + + /** + * [description] + */ + plugins: Phaser.Plugins.PluginManager; + + /** + * [description] + */ + registry: Phaser.Data.DataManager; + + /** + * [description] + */ + sound: Phaser.Sound.BaseSoundManager; + + /** + * [description] + */ + textures: Phaser.Textures.TextureManager; + + /** + * [description] + */ + add: Phaser.GameObjects.GameObjectFactory; + + /** + * [description] + */ + cameras: Phaser.Cameras.Scene2D.CameraManager; + + /** + * [description] + */ + displayList: Phaser.GameObjects.DisplayList; + + /** + * [description] + */ + events: Phaser.Events.EventEmitter; + + /** + * [description] + */ + make: Phaser.GameObjects.GameObjectCreator; + + /** + * [description] + */ + scenePlugin: Phaser.Scenes.ScenePlugin; + + /** + * [description] + */ + updateList: Phaser.GameObjects.UpdateList; + + /** + * This method is called only once by the Scene Manager when the Scene is instantiated. + * It is responsible for setting up all of the Scene plugins and references. + * It should never be called directly. + * @param game A reference to the Phaser Game instance. + */ + protected init(game: Phaser.Game): void; + + /** + * A single game step. Called automatically by the Scene Manager as a result of a Request Animation + * Frame or Set Timeout call to the main Game instance. + * @param time The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now(). + * @param delta The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class. + */ + step(time: number, delta: number): void; + + /** + * Called automatically by the Scene Manager. Instructs the Scene to render itself via + * its Camera Manager to the renderer given. + * @param renderer [description] + */ + render(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer): void; + + /** + * Force a sort of the display list on the next render. + */ + queueDepthSort(): void; + + /** + * Immediately sorts the display list if the flag is set. + */ + depthSort(): void; + + /** + * Pause this Scene. + * A paused Scene still renders, it just doesn't run ANY of its update handlers or systems. + * @param data A data object that will be passed in the 'pause' event. + */ + pause(data?: object): Phaser.Scenes.Systems; + + /** + * Resume this Scene from a paused state. + * @param data A data object that will be passed in the 'resume' event. + */ + resume(data?: object): Phaser.Scenes.Systems; + + /** + * Send this Scene to sleep. + * + * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down + * or have any of its systems or children removed, meaning it can be re-activated at any point and + * will carry on from where it left off. It also keeps everything in memory and events and callbacks + * from other Scenes may still invoke changes within it, so be careful what is left active. + * @param data A data object that will be passed in the 'sleep' event. + */ + sleep(data?: object): Phaser.Scenes.Systems; + + /** + * Wake-up this Scene if it was previously asleep. + * @param data A data object that will be passed in the 'wake' event. + */ + wake(data?: object): Phaser.Scenes.Systems; + + /** + * Is this Scene sleeping? + */ + isSleeping(): boolean; + + /** + * Is this Scene active? + */ + isActive(): boolean; + + /** + * Is this Scene currently transitioning out to, or in from another Scene? + */ + isTransitioning(): boolean; + + /** + * Is this Scene currently transitioning out from itself to another Scene? + */ + isTransitionOut(): boolean; + + /** + * Is this Scene currently transitioning in from another Scene? + */ + isTransitionIn(): boolean; + + /** + * Is this Scene visible and rendering? + */ + isVisible(): boolean; + + /** + * Sets the visible state of this Scene. + * An invisible Scene will not render, but will still process updates. + * @param value [description] + */ + setVisible(value: boolean): Phaser.Scenes.Systems; + + /** + * Set the active state of this Scene. + * + * An active Scene will run its core update loop. + * @param value If `true` the Scene will be resumed, if previously paused. If `false` it will be paused. + * @param data A data object that will be passed in the 'resume' or 'pause' events. + */ + setActive(value: boolean, data?: object): Phaser.Scenes.Systems; + + /** + * Start this Scene running and rendering. + * Called automatically by the SceneManager. + * @param data Optional data object that may have been passed to this Scene from another. + */ + start(data: object): void; + + /** + * Called automatically by the SceneManager if the Game resizes. + * Dispatches an event you can respond to in your game code. + * @param width The new width of the game. + * @param height The new height of the game. + */ + resize(width: number, height: number): void; + + /** + * Shutdown this Scene and send a shutdown event to all of its systems. + * A Scene that has been shutdown will not run its update loop or render, but it does + * not destroy any of its plugins or references. It is put into hibernation for later use. + * If you don't ever plan to use this Scene again, then it should be destroyed instead + * to free-up resources. + * @param data A data object that will be passed in the 'shutdown' event. + */ + shutdown(data?: object): void; + + } + + /** + * Scene state. + */ + var PENDING: integer; + + /** + * Scene state. + */ + var INIT: integer; + + /** + * Scene state. + */ + var START: integer; + + /** + * Scene state. + */ + var LOADING: integer; + + /** + * Scene state. + */ + var CREATING: integer; + + /** + * Scene state. + */ + var RUNNING: integer; + + /** + * Scene state. + */ + var PAUSED: integer; + + /** + * Scene state. + */ + var SLEEPING: integer; + + /** + * Scene state. + */ + var SHUTDOWN: integer; + + /** + * Scene state. + */ + var DESTROYED: integer; + + } + + namespace Sound { + /** + * Class containing all the shared state and behavior of a sound object, independent of the implementation. + */ + class BaseSound extends Phaser.Events.EventEmitter { + /** + * + * @param manager Reference to the current sound manager instance. + * @param key Asset key for the sound. + * @param config An optional config object containing default sound settings. + */ + constructor(manager: Phaser.Sound.BaseSoundManager, key: string, config?: SoundConfig); + + /** + * Asset key for the sound. + */ + readonly key: string; + + /** + * Flag indicating if sound is currently playing. + */ + readonly isPlaying: boolean; + + /** + * Flag indicating if sound is currently paused. + */ + readonly isPaused: boolean; + + /** + * A property that holds the value of sound's actual playback rate, + * after its rate and detune values has been combined with global + * rate and detune values. + */ + readonly totalRate: number; + + /** + * A value representing the duration, in seconds. + * It could be total sound duration or a marker duration. + */ + readonly duration: number; + + /** + * The total duration of the sound in seconds. + */ + readonly totalDuration: number; + + /** + * Object containing markers definitions. + */ + readonly markers: { [key: string]: SoundMarker }; + + /** + * Currently playing marker. + * 'null' if whole sound is playing. + */ + readonly currentMarker: SoundMarker; + + /** + * Adds a marker into the current sound. A marker is represented by name, start time, duration, and optionally config object. + * This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback. + * @param marker Marker object. + */ + addMarker(marker: SoundMarker): boolean; + + /** + * Updates previously added marker. + * @param marker Marker object with updated values. + */ + updateMarker(marker: SoundMarker): boolean; + + /** + * Removes a marker from the sound. + * @param markerName The name of the marker to remove. + */ + removeMarker(markerName: string): SoundMarker; + + /** + * Play this sound, or a marked section of it. + * It always plays the sound from the start. If you want to start playback from a specific time + * you can set 'seek' setting of the config object, provided to this call, to that value. + * @param markerName If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. Default ''. + * @param config Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + */ + play(markerName?: string, config?: SoundConfig): boolean; + + /** + * Pauses the sound. + */ + pause(): boolean; + + /** + * Resumes the sound. + */ + resume(): boolean; + + /** + * Stop playing this sound. + */ + stop(): boolean; + + /** + * Method used internally for applying config values to some of the sound properties. + */ + protected applyConfig(): void; + + /** + * Method used internally for resetting values of some of the config properties. + */ + protected resetConfig(): void; + + /** + * Update method called automatically by sound manager on every game step. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time elapsed since the last frame. + */ + protected update(time: number, delta: number): void; + + /** + * Method used internally to calculate total playback rate of the sound. + */ + protected calculateRate(): void; + + /** + * Destroys this sound and all associated events and marks it for removal from the sound manager. + */ + destroy(): void; + + } + + /** + * The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback. + * The audio file type and the encoding of those files are extremely important. + * + * Not all browsers can play all audio formats. + * + * There is a good guide to what's supported [here](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). + */ + class BaseSoundManager extends Phaser.Events.EventEmitter { + /** + * + * @param game Reference to the current game instance. + */ + constructor(game: Phaser.Game); + + /** + * Local reference to game. + */ + readonly game: Phaser.Game; + + /** + * Local reference to the JSON Cache, as used by Audio Sprites. + */ + readonly jsonCache: Phaser.Cache.BaseCache; + + /** + * Global mute setting. + */ + mute: boolean; + + /** + * Global volume setting. + */ + volume: number; + + /** + * Flag indicating if sounds should be paused when game looses focus, + * for instance when user switches to another tab/program/app. + */ + pauseOnBlur: boolean; + + /** + * Mobile devices require sounds to be triggered from an explicit user action, + * such as a tap, before any sound can be loaded/played on a web page. + * Set to true if the audio system is currently locked awaiting user interaction. + */ + readonly locked: boolean; + + /** + * Adds a new sound into the sound manager. + * @param key Asset key for the sound. + * @param config An optional config object containing default sound settings. + */ + add(key: string, config?: SoundConfig): Phaser.Sound.BaseSound; + + /** + * Adds a new audio sprite sound into the sound manager. + * Audio Sprites are a combination of audio files and a JSON configuration. + * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite + * @param key Asset key for the sound. + * @param config An optional config object containing default sound settings. + */ + addAudioSprite(key: string, config?: SoundConfig): Phaser.Sound.BaseSound.AudioSpriteSound; + + /** + * Enables playing sound on the fly without the need to keep a reference to it. + * Sound will auto destroy once its playback ends. + * @param key Asset key for the sound. + * @param extra An optional additional object containing settings to be applied to the sound. It could be either config or marker object. + */ + play(key: string, extra?: SoundConfig | SoundMarker): boolean; + + /** + * Enables playing audio sprite sound on the fly without the need to keep a reference to it. + * Sound will auto destroy once its playback ends. + * @param key Asset key for the sound. + * @param spriteName The name of the sound sprite to play. + * @param config An optional config object containing default sound settings. + */ + playAudioSprite(key: string, spriteName: string, config?: SoundConfig): boolean; + + /** + * Removes a sound from the sound manager. + * The removed sound is destroyed before removal. + * @param sound The sound object to remove. + */ + remove(sound: Phaser.Sound.BaseSound): boolean; + + /** + * Removes all sounds from the sound manager that have an asset key matching the given value. + * The removed sounds are destroyed before removal. + * @param key The key to match when removing sound objects. + */ + removeByKey(key: string): number; + + /** + * Pauses all the sounds in the game. + */ + pauseAll(): void; + + /** + * Resumes all the sounds in the game. + */ + resumeAll(): void; + + /** + * Stops all the sounds in the game. + */ + stopAll(): void; + + /** + * Method used internally for unlocking audio playback on devices that + * require user interaction before any sound can be played on a web page. + * + * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09). + */ + protected unlock(): void; + + /** + * Method used internally for pausing sound manager if + * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true. + */ + protected onBlur(): void; + + /** + * Method used internally for resuming sound manager if + * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true. + */ + protected onFocus(): void; + + /** + * Update method called on every game step. + * Removes destroyed sounds and updates every active sound in the game. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time elapsed since the last frame. + */ + protected update(time: number, delta: number): void; + + /** + * Destroys all the sounds in the game and all associated events. + */ + destroy(): void; + + /** + * Sets the global playback rate at which all the sounds will be played. + * + * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audios playback speed. + * @param value Global playback rate at which all the sounds will be played. + */ + setRate(value: number): Phaser.Sound.BaseSoundManager; + + /** + * Global playback rate at which all the sounds will be played. + * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audio's playback speed. + */ + rate: number; + + /** + * Sets the global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + * @param value The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + */ + setDetune(value: number): Phaser.Sound.BaseSoundManager; + + /** + * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + */ + detune: number; + + } + + /** + * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. + * + * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes + * @param game Reference to the current game instance. + */ + function SoundManagerCreator(game: Phaser.Game): void; + + /** + * HTML5 Audio implementation of the sound. + */ + class HTML5AudioSound extends Phaser.Sound.BaseSound { + /** + * + * @param manager Reference to the current sound manager instance. + * @param key Asset key for the sound. + * @param config An optional config object containing default sound settings. Default {}. + */ + constructor(manager: Phaser.Sound.HTML5AudioSoundManager, key: string, config?: SoundConfig); + + /** + * Play this sound, or a marked section of it. + * It always plays the sound from the start. If you want to start playback from a specific time + * you can set 'seek' setting of the config object, provided to this call, to that value. + * @param markerName If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. Default ''. + * @param config Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + */ + play(markerName?: string, config?: SoundConfig): boolean; + + /** + * Pauses the sound. + */ + pause(): boolean; + + /** + * Resumes the sound. + */ + resume(): boolean; + + /** + * Stop playing this sound. + */ + stop(): boolean; + + /** + * Update method called automatically by sound manager on every game step. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time elapsed since the last frame. + */ + protected update(time: number, delta: number): void; + + /** + * Calls Phaser.Sound.BaseSound#destroy method + * and cleans up all HTML5 Audio related stuff. + */ + destroy(): void; + + /** + * Method used internally to calculate total playback rate of the sound. + */ + protected calculateRate(): void; + + /** + * Boolean indicating whether the sound is muted or not. + * Gets or sets the muted state of this sound. + */ + mute: boolean; + + /** + * Sets the muted state of this Sound. + * @param value `true` to mute this sound, `false` to unmute it. + */ + setMute(value: boolean): Phaser.Sound.HTML5AudioSound; + + /** + * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume). + */ + volume: number; + + /** + * Sets the volume of this Sound. + * @param value The volume of the sound. + */ + setVolume(value: number): Phaser.Sound.HTML5AudioSound; + + /** + * Rate at which this Sound will be played. + * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audios playback speed. + */ + rate: number; + + /** + * Sets the playback rate of this Sound. + * + * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audios playback speed. + * @param value The playback rate at of this Sound. + */ + setRate(value: number): Phaser.Sound.HTML5AudioSound; + + /** + * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + */ + detune: number; + + /** + * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + * @param value The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + */ + setDetune(value: number): Phaser.Sound.HTML5AudioSound; + + /** + * Property representing the position of playback for this sound, in seconds. + * Setting it to a specific value moves current playback to that position. + * The value given is clamped to the range 0 to current marker duration. + * Setting seek of a stopped sound has no effect. + */ + seek: number; + + /** + * Seeks to a specific point in this sound. + * @param value The point in the sound to seek to. + */ + setSeek(value: number): Phaser.Sound.HTML5AudioSound; + + /** + * Flag indicating whether or not the sound or current sound marker will loop. + */ + loop: boolean; + + /** + * Sets the loop state of this Sound. + * @param value `true` to loop this sound, `false` to not loop it. + */ + setLoop(value: boolean): Phaser.Sound.HTML5AudioSound; + + } + + /** + * HTML5AudioSoundManager + */ + class HTML5AudioSoundManager extends Phaser.Sound.BaseSoundManager { + /** + * + * @param game Reference to the current game instance. + */ + constructor(game: Phaser.Game); + + /** + * Flag indicating whether if there are no idle instances of HTML5 Audio tag, + * for any particular sound, if one of the used tags should be hijacked and used + * for succeeding playback or if succeeding Phaser.Sound.HTML5AudioSound#play + * call should be ignored. + */ + override: boolean; + + /** + * Value representing time difference, in seconds, between calling + * play method on an audio tag and when it actually starts playing. + * It is used to achieve more accurate delayed sound playback. + * + * You might need to tweak this value to get the desired results + * since audio play delay varies depending on the browser/platform. + */ + audioPlayDelay: number; + + /** + * A value by which we should offset the loop end marker of the + * looping sound to compensate for lag, caused by changing audio + * tag playback position, in order to achieve gapless looping. + * + * You might need to tweak this value to get the desired results + * since loop lag varies depending on the browser/platform. + */ + loopEndOffset: number; + + /** + * Adds a new sound into the sound manager. + * @param key Asset key for the sound. + * @param config An optional config object containing default sound settings. + */ + add(key: string, config?: SoundConfig): Phaser.Sound.HTML5AudioSound; + + /** + * Unlocks HTML5 Audio loading and playback on mobile + * devices on the initial explicit user interaction. + */ + unlock(): void; + + /** + * Method used internally for pausing sound manager if + * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true. + */ + protected onBlur(): void; + + /** + * Method used internally for resuming sound manager if + * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true. + */ + protected onFocus(): void; + + /** + * Calls Phaser.Sound.BaseSoundManager#destroy method + * and cleans up all HTML5 Audio related stuff. + */ + destroy(): void; + + /** + * Method used internally by Phaser.Sound.HTML5AudioSound class methods and property setters + * to check if sound manager is locked and then either perform action immediately or queue it + * to be performed once the sound manager gets unlocked. + * @param sound Sound object on which to perform queued action. + * @param prop Name of the method to be called or property to be assigned a value to. + * @param value An optional parameter that either holds an array of arguments to be passed to the method call or value to be set to the property. + */ + protected isLocked(sound: Phaser.Sound.HTML5AudioSound, prop: string, value?: any): boolean; + + /** + * Sets the muted state of all this Sound Manager. + * @param value `true` to mute all sounds, `false` to unmute them. + */ + setMute(value: boolean): Phaser.Sound.HTML5AudioSoundManager; + + mute: boolean; + + /** + * Sets the volume of this Sound Manager. + * @param value The global volume of this Sound Manager. + */ + setVolume(value: number): Phaser.Sound.HTML5AudioSoundManager; + + volume: number; + + } + + /** + * No audio implementation of the sound. It is used if audio has been + * disabled in the game config or the device doesn't support any audio. + * + * It represents a graceful degradation of sound logic that provides + * minimal functionality and prevents Phaser projects that use audio from + * breaking on devices that don't support any audio playback technologies. + */ + class NoAudioSound extends Phaser.Sound.BaseSound { + /** + * + * @param manager Reference to the current sound manager instance. + * @param key Asset key for the sound. + * @param config An optional config object containing default sound settings. Default {}. + */ + constructor(manager: Phaser.Sound.NoAudioSoundManager, key: string, config?: SoundConfig); + + } + + /** + * No audio implementation of the sound manager. It is used if audio has been + * disabled in the game config or the device doesn't support any audio. + * + * It represents a graceful degradation of sound manager logic that provides + * minimal functionality and prevents Phaser projects that use audio from + * breaking on devices that don't support any audio playback technologies. + */ + class NoAudioSoundManager extends Phaser.Sound.BaseSoundManager { + /** + * + * @param game Reference to the current game instance. + */ + constructor(game: Phaser.Game); + + } + + /** + * Web Audio API implementation of the sound. + */ + class WebAudioSound extends Phaser.Sound.BaseSound { + /** + * + * @param manager Reference to the current sound manager instance. + * @param key Asset key for the sound. + * @param config An optional config object containing default sound settings. Default {}. + */ + constructor(manager: Phaser.Sound.WebAudioSoundManager, key: string, config?: SoundConfig); + + /** + * Play this sound, or a marked section of it. + * + * It always plays the sound from the start. If you want to start playback from a specific time + * you can set 'seek' setting of the config object, provided to this call, to that value. + * @param markerName If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. Default ''. + * @param config Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + */ + play(markerName?: string, config?: SoundConfig): boolean; + + /** + * Pauses the sound. + */ + pause(): boolean; + + /** + * Resumes the sound. + */ + resume(): boolean; + + /** + * Stop playing this sound. + */ + stop(): boolean; + + /** + * Method used internally for applying config values to some of the sound properties. + */ + protected applyConfig(): void; + + /** + * Update method called automatically by sound manager on every game step. + * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param delta The delta time elapsed since the last frame. + */ + protected update(time: number, delta: number): void; + + /** + * Calls Phaser.Sound.BaseSound#destroy method + * and cleans up all Web Audio API related stuff. + */ + destroy(): void; + + /** + * Method used internally to calculate total playback rate of the sound. + */ + protected calculateRate(): void; + + /** + * Rate at which this Sound will be played. + * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audios playback speed. + */ + rate: number; + + /** + * Sets the playback rate of this Sound. + * + * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audios playback speed. + * @param value The playback rate at of this Sound. + */ + setRate(value: number): Phaser.Sound.WebAudioSound; + + /** + * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + */ + detune: number; + + /** + * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + * @param value The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + */ + setDetune(value: number): Phaser.Sound.WebAudioSound; + + /** + * Boolean indicating whether the sound is muted or not. + * Gets or sets the muted state of this sound. + */ + mute: boolean; + + /** + * Sets the muted state of this Sound. + * @param value `true` to mute this sound, `false` to unmute it. + */ + setMute(value: boolean): Phaser.Sound.WebAudioSound; + + /** + * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume). + */ + volume: number; + + /** + * Sets the volume of this Sound. + * @param value The volume of the sound. + */ + setVolume(value: number): Phaser.Sound.WebAudioSound; + + /** + * Property representing the position of playback for this sound, in seconds. + * Setting it to a specific value moves current playback to that position. + * The value given is clamped to the range 0 to current marker duration. + * Setting seek of a stopped sound has no effect. + */ + seek: number; + + /** + * Seeks to a specific point in this sound. + * @param value The point in the sound to seek to. + */ + setSeek(value: number): Phaser.Sound.WebAudioSound; + + /** + * Flag indicating whether or not the sound or current sound marker will loop. + */ + loop: boolean; + + /** + * Sets the loop state of this Sound. + * @param value `true` to loop this sound, `false` to not loop it. + */ + setLoop(value: boolean): Phaser.Sound.WebAudioSound; + + } + + /** + * Web Audio API implementation of the sound manager. + */ + class WebAudioSoundManager extends Phaser.Sound.BaseSoundManager { + /** + * + * @param game Reference to the current game instance. + */ + constructor(game: Phaser.Game); + + /** + * Adds a new sound into the sound manager. + * @param key Asset key for the sound. + * @param config An optional config object containing default sound settings. + */ + add(key: string, config?: SoundConfig): Phaser.Sound.WebAudioSound; + + /** + * Unlocks Web Audio API on the initial input event. + * + * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09). + */ + unlock(): void; + + /** + * Method used internally for pausing sound manager if + * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true. + */ + protected onBlur(): void; + + /** + * Method used internally for resuming sound manager if + * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true. + */ + protected onFocus(): void; + + /** + * Calls Phaser.Sound.BaseSoundManager#destroy method + * and cleans up all Web Audio API related stuff. + */ + destroy(): void; + + /** + * Sets the muted state of all this Sound Manager. + * @param value `true` to mute all sounds, `false` to unmute them. + */ + setMute(value: boolean): Phaser.Sound.WebAudioSoundManager; + + mute: boolean; + + /** + * Sets the volume of this Sound Manager. + * @param value The global volume of this Sound Manager. + */ + setVolume(value: number): Phaser.Sound.WebAudioSoundManager; + + volume: number; + + } + + } + + namespace Structs { + /** + * [description] + */ + class List { + /** + * + * @param parent [description] + */ + constructor(parent: any); + + /** + * The parent of this list. + */ + parent: any; + + /** + * The objects that belong to this collection. + */ + list: T[]; + + /** + * [description] + */ + position: integer; + + /** + * A callback that is invoked every time a child is added to this list. + */ + addCallback: Function; + + /** + * A callback that is invoked every time a child is removed from this list. + */ + removeCallback: Function; + + /** + * The property key to sort by. + */ + _sortKey: string; + + /** + * [description] + * @param child [description] + * @param skipCallback Skip calling the List.addCallback if this child is added successfully. Default false. + */ + add(child: T, skipCallback?: boolean): T; + + /** + * [description] + * @param child [description] + * @param index [description] Default 0. + * @param skipCallback Skip calling the List.addCallback if this child is added successfully. Default false. + */ + addAt(child: T, index?: integer, skipCallback?: boolean): T; + + /** + * [description] + * @param index [description] + */ + getAt(index: integer): T; + + /** + * [description] + * @param child [description] + */ + getIndex(child: T): integer; + + /** + * Sort the contents of this List so the items are in order based + * on the given property. For example, `sort('alpha')` would sort the List + * contents based on the value of their `alpha` property. + * @param property The property to lexically sort by. + */ + sort(property: string): T[]; + + /** + * Searches for the first instance of a child with its `name` + * property matching the given argument. Should more than one child have + * the same name only the first is returned. + * @param name The name to search for. + */ + getByName(name: string): T | null; + + /** + * Returns a random child from the group. + * @param startIndex Offset from the front of the group (lowest child). Default 0. + * @param length Restriction on the number of values you want to randomly select from. Default (to top). + */ + getRandom(startIndex?: integer, length?: integer): T | null; + + /** + * [description] + * @param property [description] + * @param value [description] + * @param startIndex [description] Default 0. + * @param endIndex [description] + */ + getFirst(property: string, value: T, startIndex?: number, endIndex?: number): T | null; + + /** + * Returns all children in this List. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('parent')` would return only children that have a property called `parent`. + * + * You can also specify a value to compare the property to: + * + * `getAll('visible', true)` would return only children that have their visible property set to `true`. + * + * Optionally you can specify a start and end index. For example if this List had 100 children, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 children in the List. + * @param property An optional property to test against the value argument. + * @param value If property is set then Child.property must strictly equal this value to be included in the results. + * @param startIndex The first child index to start the search from. + * @param endIndex The last child index to search up until. + */ + getAll(property?: string, value?: T, startIndex?: integer, endIndex?: integer): T[]; + + /** + * [description] + * @param property [description] + * @param value [description] + */ + count(property: string, value: T): integer; + + /** + * [description] + * @param child1 [description] + * @param child2 [description] + */ + swap(child1: T, child2: T): void; + + /** + * [description] + * @param child [description] + * @param index [description] + */ + moveTo(child: T, index: integer): T; + + /** + * [description] + * @param child [description] + * @param skipCallback Skip calling the List.removeCallback. Default false. + */ + remove(child: T, skipCallback?: boolean): T; + + /** + * [description] + * @param index [description] + * @param skipCallback Skip calling the List.removeCallback. Default false. + */ + removeAt(index: integer, skipCallback?: boolean): T; + + /** + * [description] + * @param startIndex [description] Default 0. + * @param endIndex [description] + * @param skipCallback Skip calling the List.removeCallback. Default false. + */ + removeBetween(startIndex?: integer, endIndex?: integer, skipCallback?: boolean): T[]; + + /** + * Removes all the items. + * @param skipCallback Skip calling the List.removeCallback. Default false. + */ + removeAll(skipCallback?: boolean): Phaser.Structs.List; + + /** + * Brings the given child to the top of this List. + * @param child [description] + */ + bringToTop(child: T): T; + + /** + * Sends the given child to the bottom of this List. + * @param child [description] + */ + sendToBack(child: T): T; + + /** + * Moves the given child up one place in this group unless it's already at the top. + * @param child [description] + */ + moveUp(child: T): T; + + /** + * Moves the given child down one place in this group unless it's already at the bottom. + * @param child [description] + */ + moveDown(child: T): T; + + /** + * Reverses the order of all children in this List. + */ + reverse(): Phaser.Structs.List; + + /** + * [description] + */ + shuffle(): Phaser.Structs.List; + + /** + * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List. + * @param oldChild The child in this List that will be replaced. + * @param newChild The child to be inserted into this List. + */ + replace(oldChild: T, newChild: T): T; + + /** + * [description] + * @param child [description] + */ + exists(child: T): boolean; + + /** + * Sets the property `key` to the given value on all members of this List. + * @param property [description] + * @param value [description] + * @param startIndex The first child index to start the search from. + * @param endIndex The last child index to search up until. + */ + setAll(property: string, value: T, startIndex?: integer, endIndex?: integer): void; + + /** + * Passes all children to the given callback. + * @param callback The function to call. + * @param context Value to use as `this` when executing callback. + * @param args Additional arguments that will be passed to the callback, after the child. + */ + each(callback: EachListCallback, context?: any, ...args: any[]): void; + + /** + * [description] + */ + shutdown(): void; + + /** + * [description] + */ + destroy(): void; + + /** + * [description] + */ + readonly length: integer; + + /** + * [description] + */ + readonly first: integer; + + /** + * [description] + */ + readonly last: integer; + + /** + * [description] + */ + readonly next: integer; + + /** + * [description] + */ + readonly previous: integer; + + } + + /** + * The keys of a Map can be arbitrary values. + * var map = new Map([ + * [ 1, 'one' ], + * [ 2, 'two' ], + * [ 3, 'three' ] + * ]); + */ + class Map { + /** + * + * @param elements [description] + */ + constructor(elements: V[]); + + /** + * [description] + */ + entries: { [key: string]: V }; + + /** + * [description] + */ + size: number; + + /** + * [description] + * @param key [description] + * @param value [description] + */ + set(key: K, value: V): Phaser.Structs.Map; + + /** + * [description] + * @param key [description] + */ + get(key: K): V; + + /** + * [description] + */ + getArray(): V[]; + + /** + * [description] + * @param key [description] + */ + has(key: K): boolean; + + /** + * [description] + * @param key [description] + */ + delete(key: K): Phaser.Structs.Map; + + /** + * [description] + */ + clear(): Phaser.Structs.Map; + + /** + * [description] + */ + keys(): K[]; + + /** + * [description] + */ + values(): V[]; + + /** + * [description] + */ + dump(): void; + + /** + * [description] + * @param callback [description] + */ + each(callback: EachMapCallback): Phaser.Structs.Map; + + /** + * [description] + * @param value [description] + */ + contains(value: V): boolean; + + /** + * Merges all new keys from the given Map into this one + * If it encounters a key that already exists it will be skipped + * unless override = true. + * @param map [description] + * @param override [description] Default false. + */ + merge(map: Phaser.Structs.Map, override?: boolean): Phaser.Structs.Map; + + } + + /** + * [description] + */ + class ProcessQueue { + /** + * [description] + * @param item [description] + */ + add(item: T): Phaser.Structs.ProcessQueue; + + /** + * [description] + * @param item [description] + */ + remove(item: T): Phaser.Structs.ProcessQueue; + + /** + * [description] + */ + update(): T[]; + + /** + * [description] + */ + getActive(): T[]; + + /** + * [description] + */ + destroy(): void; + + } + + /** + * RBush is a high-performance JavaScript library for 2D spatial indexing of points and rectangles. + * It's based on an optimized R-tree data structure with bulk insertion support. + * + * Spatial index is a special data structure for points and rectangles that allows you to perform queries like + * "all items within this bounding box" very efficiently (e.g. hundreds of times faster than looping over all items). + * + * This version of RBush uses a fixed min/max accessor structure of `[ '.left', '.top', '.right', '.bottom' ]`. + * This is to avoid the eval like function creation that the original library used, which caused CSP policy violations. + */ + class RTree { + } + + /** + * A Set is a collection of unique elements. + */ + class Set { + /** + * + * @param elements [description] + */ + constructor(elements?: T[]); + + /** + * [description] + */ + entries: T[]; + + /** + * [description] + * @param value [description] + */ + set(value: T): Phaser.Structs.Set; + + /** + * [description] + * @param property [description] + * @param value [description] + */ + get(property: string, value: T): T; + + /** + * [description] + */ + getArray(): T[]; + + /** + * [description] + * @param value [description] + */ + delete(value: T): Phaser.Structs.Set; + + /** + * [description] + */ + dump(): void; + + /** + * For when you know this Set will be modified during the iteration. + * @param callback [description] + * @param callbackScope [description] + */ + each(callback: EachSetCallback, callbackScope: any): Phaser.Structs.Set; + + /** + * For when you absolutely know this Set won't be modified during the iteration. + * @param callback [description] + * @param callbackScope [description] + */ + iterate(callback: EachSetCallback, callbackScope: any): Phaser.Structs.Set; + + /** + * [description] + * @param callbackKey [description] + * @param args Additional arguments that will be passed to the callback, after the child. + */ + iterateLocal(callbackKey: string, ...args: any[]): Phaser.Structs.Set; + + /** + * [description] + */ + clear(): Phaser.Structs.Set; + + /** + * [description] + * @param value [description] + */ + contains(value: T): boolean; + + /** + * [description] + * @param set [description] + */ + union(set: Phaser.Structs.Set): Phaser.Structs.Set; + + /** + * [description] + * @param set [description] + */ + intersect(set: Phaser.Structs.Set): Phaser.Structs.Set; + + /** + * [description] + * @param set [description] + */ + difference(set: Phaser.Structs.Set): Phaser.Structs.Set; + + /** + * [description] + */ + size: integer; + + } + + } + + namespace Textures { + /** + * A Canvas Texture is a special kind of Texture that is backed by an HTML Canvas Element as its source. + * + * You can use the properties of this texture to draw to the canvas element directly, using all of the standard + * canvas operations available in the browser. Any Game Object can be given this texture and will render with it. + * + * Note: When running under WebGL the Canvas Texture needs to re-generate its base WebGLTexture and reupload it to + * the GPU every time you modify it, otherwise the changes you make to this texture will not be visible. To do this + * you should call `CanvasTexture.refresh()` once you are finished with your changes to the canvas. Try and keep + * this to a minimum, especially on large canvas sizes, or you may inadvertently thrash the GPU by constantly uploading + * texture data to it. This restriction does not apply if using the Canvas Renderer. + * + * It starts with only one frame that covers the whole of the canvas. You can add further frames, that specify + * sections of the canvas using the `add` method. + * + * Should you need to resize the canvas use the `setSize` method so that it accurately updates all of the underlying + * texture data as well. Forgetting to do this (i.e. by changing the canvas size directly from your code) could cause + * graphical errors. + */ + class CanvasTexture extends Phaser.Textures.Texture { + /** + * + * @param manager A reference to the Texture Manager this Texture belongs to. + * @param key The unique string-based key of this Texture. + * @param source The canvas element that is used as the base of this texture. + * @param width The width of the canvas. + * @param height The height of the canvas. + */ + constructor(manager: Phaser.Textures.TextureManager, key: string, source: HTMLCanvasElement, width: integer, height: integer); + + /** + * This should be called manually if you are running under WebGL. + * It will refresh the WebGLTexture from the Canvas source. Only call this if you know that the + * canvas has changed, as there is a significant GPU texture allocation cost involved in doing so. + */ + refresh(): Phaser.Textures.CanvasTexture; + + /** + * Gets the Canvas Element. + */ + getCanvas(): HTMLCanvasElement; + + /** + * Gets the 2D Canvas Rendering Context. + */ + getContext(): CanvasRenderingContext2D; + + /** + * Clears this Canvas Texture, resetting it back to transparent. + */ + clear(): Phaser.Textures.CanvasTexture; + + /** + * Changes the size of this Canvas Texture. + * @param width The new width of the Canvas. + * @param height The new height of the Canvas. If not given it will use the width as the height. + */ + setSize(width: integer, height?: integer): Phaser.Textures.CanvasTexture; + + } + + /** + * A Frame is a section of a Texture. + */ + class Frame { + /** + * + * @param texture The Texture this Frame is a part of. + * @param name The name of this Frame. The name is unique within the Texture. + * @param sourceIndex The index of the TextureSource that this Frame is a part of. + * @param x The x coordinate of the top-left of this Frame. + * @param y The y coordinate of the top-left of this Frame. + * @param width The width of this Frame. + * @param height The height of this Frame. + */ + constructor(texture: Phaser.Textures.Texture, name: integer | string, sourceIndex: integer, x: number, y: number, width: number, height: number); + + /** + * The Texture this Frame is a part of. + */ + texture: Phaser.Textures.Texture; + + /** + * The name of this Frame. + * The name is unique within the Texture. + */ + name: string; + + /** + * The TextureSource this Frame is part of. + */ + source: Phaser.Textures.TextureSource; + + /** + * The index of the TextureSource in the Texture sources array. + */ + sourceIndex: integer; + + /** + * A reference to the Texture Source WebGL Texture that this Frame is using. + */ + glTexture: WebGLTexture; + + /** + * X position within the source image to cut from. + */ + cutX: integer; + + /** + * Y position within the source image to cut from. + */ + cutY: integer; + + /** + * The width of the area in the source image to cut. + */ + cutWidth: integer; + + /** + * The height of the area in the source image to cut. + */ + cutHeight: integer; + + /** + * The X rendering offset of this Frame, taking trim into account. + */ + x: integer; + + /** + * The Y rendering offset of this Frame, taking trim into account. + */ + y: integer; + + /** + * The rendering width of this Frame, taking trim into account. + */ + width: integer; + + /** + * The rendering height of this Frame, taking trim into account. + */ + height: integer; + + /** + * Half the width, floored. + * Precalculated for the renderer. + */ + halfWidth: integer; + + /** + * Half the height, floored. + * Precalculated for the renderer. + */ + halfHeight: integer; + + /** + * The x center of this frame, floored. + */ + centerX: integer; + + /** + * The y center of this frame, floored. + */ + centerY: integer; + + /** + * The horizontal pivot point of this Frame. + */ + pivotX: number; + + /** + * The vertical pivot point of this Frame. + */ + pivotY: number; + + /** + * Does this Frame have a custom pivot point? + */ + customPivot: boolean; + + /** + * **CURRENTLY UNSUPPORTED** + * + * Is this frame is rotated or not in the Texture? + * Rotation allows you to use rotated frames in texture atlas packing. + * It has nothing to do with Sprite rotation. + */ + rotated: boolean; + + /** + * Over-rides the Renderer setting. + * -1 = use Renderer Setting + * 0 = No rounding + * 1 = Round + */ + autoRound: integer; + + /** + * Any Frame specific custom data can be stored here. + */ + customData: object; + + /** + * WebGL UV u0 value. + */ + u0: number; + + /** + * WebGL UV v0 value. + */ + v0: number; + + /** + * WebGL UV u1 value. + */ + u1: number; + + /** + * WebGL UV v1 value. + */ + v1: number; + + /** + * Sets the width, height, x and y of this Frame. + * + * This is called automatically by the constructor + * and should rarely be changed on-the-fly. + * @param width The width of the frame before being trimmed. + * @param height The height of the frame before being trimmed. + * @param x The x coordinate of the top-left of this Frame. Default 0. + * @param y The y coordinate of the top-left of this Frame. Default 0. + */ + setSize(width: integer, height: integer, x?: integer, y?: integer): Phaser.Textures.Frame; + + /** + * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data. + * @param actualWidth The width of the frame before being trimmed. + * @param actualHeight The height of the frame before being trimmed. + * @param destX The destination X position of the trimmed frame for display. + * @param destY The destination Y position of the trimmed frame for display. + * @param destWidth The destination width of the trimmed frame for display. + * @param destHeight The destination height of the trimmed frame for display. + */ + setTrim(actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): Phaser.Textures.Frame; + + /** + * Takes a crop data object and, based on the rectangular region given, calculates the + * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. + * + * This is called directly by the Game Object Texture Components `setCrop` method. + * Please use that method to crop a Game Object. + * @param crop The crop data object. This is the `GameObject._crop` property. + * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. + * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height. + * @param width The width of the crop rectangle. Cannot exceed the Frame width. + * @param height The height of the crop rectangle. Cannot exceed the Frame height. + * @param flipX Does the parent Game Object have flipX set? + * @param flipY Does the parent Game Object have flipY set? + */ + setCropUVs(crop: object, x: number, y: number, width: number, height: number, flipX: boolean, flipY: boolean): object; + + /** + * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object. + * Called automatically by `setFrame`. + * @param crop The crop data object. This is the `GameObject._crop` property. + * @param flipX Does the parent Game Object have flipX set? + * @param flipY Does the parent Game Object have flipY set? + */ + updateCropUVs(crop: object, flipX: boolean, flipY: boolean): object; + + /** + * Updates the internal WebGL UV cache and the drawImage cache. + */ + updateUVs(): Phaser.Textures.Frame; + + /** + * Updates the internal WebGL UV cache. + */ + updateUVsInverted(): Phaser.Textures.Frame; + + /** + * Clones this Frame into a new Frame object. + */ + clone(): Phaser.Textures.Frame; + + /** + * Destroys this Frames references. + */ + destroy(): void; + + /** + * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + */ + readonly realWidth: number; + + /** + * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package, + * before being packed. + */ + readonly realHeight: number; + + /** + * The radius of the Frame (derived from sqrt(w * w + h * h) / 2) + */ + readonly radius: number; + + /** + * Is the Frame trimmed or not? + */ + readonly trimmed: boolean; + + /** + * The Canvas drawImage data object. + */ + readonly canvasData: object; + + } + + /** + * A Texture consists of a source, usually an Image from the Cache, and a collection of Frames. + * The Frames represent the different areas of the Texture. For example a texture atlas + * may have many Frames, one for each element within the atlas. Where-as a single image would have + * just one frame, that encompasses the whole image. + * + * Textures are managed by the global TextureManager. This is a singleton class that is + * responsible for creating and delivering Textures and their corresponding Frames to Game Objects. + * + * Sprites and other Game Objects get the texture data they need from the TextureManager. + */ + class Texture { + /** + * + * @param manager A reference to the Texture Manager this Texture belongs to. + * @param key The unique string-based key of this Texture. + * @param source An array of sources that are used to create the texture. Usually Images, but can also be a Canvas. + * @param width The width of the Texture. This is optional and automatically derived from the source images. + * @param height The height of the Texture. This is optional and automatically derived from the source images. + */ + constructor(manager: Phaser.Textures.TextureManager, key: string, source: HTMLImageElement[] | HTMLCanvasElement[], width?: number, height?: number); + + /** + * A reference to the Texture Manager this Texture belongs to. + */ + manager: Phaser.Textures.TextureManager; + + /** + * The unique string-based key of this Texture. + */ + key: string; + + /** + * An array of TextureSource instances. + * These are unique to this Texture and contain the actual Image (or Canvas) data. + */ + source: Phaser.Textures.TextureSource[]; + + /** + * An array of TextureSource data instances. + * Used to store additional data images, such as normal maps or specular maps. + */ + dataSource: any[]; + + /** + * A key-value object pair associating the unique Frame keys with the Frames objects. + */ + frames: object; + + /** + * Any additional data that was set in the source JSON (if any), + * or any extra data you'd like to store relating to this texture + */ + customData: object; + + /** + * The name of the first frame of the Texture. + */ + firstFrame: string; + + /** + * The total number of Frames in this Texture. + */ + frameTotal: integer; + + /** + * Adds a new Frame to this Texture. + * + * A Frame is a rectangular region of a TextureSource with a unique index or string-based key. + * @param name The name of this Frame. The name is unique within the Texture. + * @param sourceIndex The index of the TextureSource that this Frame is a part of. + * @param x The x coordinate of the top-left of this Frame. + * @param y The y coordinate of the top-left of this Frame. + * @param width The width of this Frame. + * @param height The height of this Frame. + */ + add(name: integer | string, sourceIndex: integer, x: number, y: number, width: number, height: number): Phaser.Textures.Frame; + + /** + * Checks to see if a Frame matching the given key exists within this Texture. + * @param name The key of the Frame to check for. + */ + has(name: string): boolean; + + /** + * Gets a Frame from this Texture based on either the key or the index of the Frame. + * + * In a Texture Atlas Frames are typically referenced by a key. + * In a Sprite Sheet Frames are referenced by an index. + * Passing no value for the name returns the base texture. + * @param name The string-based name, or integer based index, of the Frame to get from this Texture. + */ + get(name?: string | integer): Phaser.Textures.Frame; + + /** + * Takes the given TextureSource and returns the index of it within this Texture. + * If it's not in this Texture, it returns -1. + * Unless this Texture has multiple TextureSources, such as with a multi-atlas, this + * method will always return zero or -1. + * @param source The TextureSource to check. + */ + getTextureSourceIndex(source: Phaser.Textures.TextureSource): integer; + + /** + * Returns an array of all the Frames in the given TextureSource. + * @param sourceIndex The index of the TextureSource to get the Frames from. + */ + getFramesFromTextureSource(sourceIndex: integer): Phaser.Textures.Frame[]; + + /** + * Returns an array with all of the names of the Frames in this Texture. + * + * Useful if you want to randomly assign a Frame to a Game Object, as you can + * pick a random element from the returned array. + * @param includeBase Include the `__BASE` Frame in the output array? Default false. + */ + getFrameNames(includeBase?: boolean): string[]; + + /** + * Given a Frame name, return the source image it uses to render with. + * + * This will return the actual DOM Image or Canvas element. + * @param name The string-based name, or integer based index, of the Frame to get from this Texture. + */ + getSourceImage(name?: string | integer): HTMLImageElement | HTMLCanvasElement; + + /** + * Given a Frame name, return the data source image it uses to render with. + * You can use this to get the normal map for an image for example. + * + * This will return the actual DOM Image. + * @param name The string-based name, or integer based index, of the Frame to get from this Texture. + */ + getDataSourceImage(name?: string | integer): HTMLImageElement | HTMLCanvasElement; + + /** + * Adds a data source image to this Texture. + * + * An example of a data source image would be a normal map, where all of the Frames for this Texture + * equally apply to the normal map. + * @param data The source image. + */ + setDataSource(data: HTMLImageElement | HTMLCanvasElement): void; + + /** + * Sets the Filter Mode for this Texture. + * + * The mode can be either Linear, the default, or Nearest. + * + * For pixel-art you should use Nearest. + * + * The mode applies to the entire Texture, not just a specific Frame of it. + * @param filterMode The Filter Mode. + */ + setFilter(filterMode: Phaser.Textures.FilterMode): void; + + /** + * Destroys this Texture and releases references to its sources and frames. + */ + destroy(): void; + + } + + /** + * Textures are managed by the global TextureManager. This is a singleton class that is + * responsible for creating and delivering Textures and their corresponding Frames to Game Objects. + * + * Sprites and other Game Objects get the texture data they need from the TextureManager. + * + * Access it via `scene.textures`. + */ + class TextureManager extends Phaser.Events.EventEmitter { + /** + * + * @param game [description] + */ + constructor(game: Phaser.Game); + + /** + * The source Canvas Element. + */ + readonly canvas: HTMLCanvasElement; + + /** + * The width of the Canvas. + * This property is read-only, if you wish to change use `setSize`. + */ + readonly width: integer; + + /** + * The height of the Canvas. + * This property is read-only, if you wish to change use `setSize`. + */ + readonly height: integer; + + /** + * [description] + */ + game: Phaser.Game; + + /** + * [description] + */ + name: string; + + /** + * [description] + */ + list: object; + + /** + * [description] + */ + boot(): void; + + /** + * [description] + */ + updatePending(): void; + + /** + * Checks the given texture key and throws a console.warn if the key is already in use, then returns false. + * If you wish to avoid the console.warn then use `TextureManager.exists` instead. + * @param key The texture key to check. + */ + checkKey(key: string): boolean; + + /** + * Removes a Texture from the Texture Manager and destroys it. This will immediately + * clear all references to it from the Texture Manager, and if it has one, destroy its + * WebGLTexture. This will emit a `removetexture` event. + * + * Note: If you have any Game Objects still using this texture they will start throwing + * errors the next time they try to render. Make sure that removing the texture is the final + * step when clearing down to avoid this. + * @param key The key of the Texture to remove, or a reference to it. + */ + remove(key: string | Phaser.Textures.Texture): Phaser.Textures.TextureManager; + + /** + * Adds a new Texture to the Texture Manager created from the given Base64 encoded data. + * @param key The unique string-based key of the Texture. + * @param data The Base64 encoded data. + */ + addBase64(key: string, data: any): void; + + /** + * Adds a new Texture to the Texture Manager created from the given Image element. + * @param key The unique string-based key of the Texture. + * @param source The source Image element. + * @param dataSource An optional data Image element. + */ + addImage(key: string, source: HTMLImageElement, dataSource?: HTMLImageElement): Phaser.Textures.Texture; + + /** + * Creates a new Texture using the given config values. + * Generated textures consist of a Canvas element to which the texture data is drawn. + * See the Phaser.Create function for the more direct way to create textures. + * @param key The unique string-based key of the Texture. + * @param config [description] + */ + generate(key: string, config: object): Phaser.Textures.Texture; + + /** + * Creates a new Texture using a blank Canvas element of the size given. + * + * Canvas elements are automatically pooled and calling this method will + * extract a free canvas from the CanvasPool, or create one if none are available. + * @param key The unique string-based key of the Texture. + * @param width The width of the Canvas element. Default 256. + * @param height The height of the Canvas element. Default 256. + */ + createCanvas(key: string, width?: integer, height?: integer): Phaser.Textures.CanvasTexture; + + /** + * Creates a new Canvas Texture object from an existing Canvas element and adds + * it to this Texture Manager. + * @param key The unique string-based key of the Texture. + * @param source The Canvas element to form the base of the new Texture. + */ + addCanvas(key: string, source: HTMLCanvasElement): Phaser.Textures.CanvasTexture; + + /** + * Adds a new Texture Atlas to this Texture Manager. + * It can accept either JSON Array or JSON Hash formats, as exported by Texture Packer and similar software. + * @param key The unique string-based key of the Texture. + * @param source The source Image element. + * @param data The Texture Atlas data. + * @param dataSource An optional data Image element. + */ + addAtlas(key: string, source: HTMLImageElement, data: object, dataSource?: HTMLImageElement): Phaser.Textures.Texture; + + /** + * Adds a Texture Atlas to this Texture Manager. + * The frame data of the atlas must be stored in an Array within the JSON. + * This is known as a JSON Array in software such as Texture Packer. + * @param key The unique string-based key of the Texture. + * @param source The source Image element/s. + * @param data The Texture Atlas data/s. + * @param dataSource An optional data Image element. + */ + addAtlasJSONArray(key: string, source: HTMLImageElement | HTMLImageElement[], data: object | object[], dataSource?: HTMLImageElement): Phaser.Textures.Texture; + + /** + * Adds a Texture Atlas to this Texture Manager. + * The frame data of the atlas must be stored in an Object within the JSON. + * This is known as a JSON Hash in software such as Texture Packer. + * @param key The unique string-based key of the Texture. + * @param source The source Image element. + * @param data The Texture Atlas data. + * @param dataSource An optional data Image element. + */ + addAtlasJSONHash(key: string, source: HTMLImageElement, data: object, dataSource?: HTMLImageElement): Phaser.Textures.Texture; + + /** + * Adds a Texture Atlas to this Texture Manager, where the atlas data is given + * in the XML format. + * @param key The unique string-based key of the Texture. + * @param source The source Image element. + * @param data The Texture Atlas XML data. + * @param dataSource An optional data Image element. + */ + addAtlasXML(key: string, source: HTMLImageElement, data: object, dataSource?: HTMLImageElement): Phaser.Textures.Texture; + + /** + * Adds a Unity Texture Atlas to this Texture Manager. + * The data must be in the form of a Unity YAML file. + * @param key The unique string-based key of the Texture. + * @param source The source Image element. + * @param data The Texture Atlas data. + * @param dataSource An optional data Image element. + */ + addUnityAtlas(key: string, source: HTMLImageElement, data: object, dataSource?: HTMLImageElement): Phaser.Textures.Texture; + + /** + * Adds a Sprite Sheet to this Texture Manager. + * + * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact + * same size and cannot be trimmed or rotated. + * @param key The unique string-based key of the Texture. + * @param source The source Image element. + * @param config The configuration object for this Sprite Sheet. + */ + addSpriteSheet(key: string, source: HTMLImageElement, config: SpriteSheetConfig): Phaser.Textures.Texture; + + /** + * Adds a Sprite Sheet to this Texture Manager, where the Sprite Sheet exists as a Frame within a Texture Atlas. + * + * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact + * same size and cannot be trimmed or rotated. + * @param key The unique string-based key of the Texture. + * @param config The configuration object for this Sprite Sheet. + */ + addSpriteSheetFromAtlas(key: string, config: SpriteSheetFromAtlasConfig): Phaser.Textures.Texture; + + /** + * Creates a new Texture using the given source and dimensions. + * @param key The unique string-based key of the Texture. + * @param source The source Image element. + * @param width The width of the Texture. + * @param height The height of the Texture. + */ + create(key: string, source: HTMLImageElement, width: integer, height: integer): Phaser.Textures.Texture; + + /** + * Checks the given key to see if a Texture using it exists within this Texture Manager. + * @param key The unique string-based key of the Texture. + */ + exists(key: string): boolean; + + /** + * Returns a Texture from the Texture Manager that matches the given key. + * If the key is undefined it will return the `__DEFAULT` Texture. + * If the key is given, but not found, it will return the `__MISSING` Texture. + * @param key The unique string-based key of the Texture. + */ + get(key: string): Phaser.Textures.Texture; + + /** + * Takes a Texture key and Frame name and returns a clone of that Frame if found. + * @param key The unique string-based key of the Texture. + * @param frame The string or index of the Frame to be cloned. + */ + cloneFrame(key: string, frame: string | integer): Phaser.Textures.Frame; + + /** + * Takes a Texture key and Frame name and returns a reference to that Frame, if found. + * @param key The unique string-based key of the Texture. + * @param frame The string-based name, or integer based index, of the Frame to get from the Texture. + */ + getFrame(key: string, frame?: string | integer): Phaser.Textures.Frame; + + /** + * Returns an array with all of the keys of all Textures in this Texture Manager. + * The output array will exclude the `__DEFAULT` and `__MISSING` keys. + */ + getTextureKeys(): string[]; + + /** + * Given a Texture and an `x` and `y` coordinate this method will return a new + * Color object that has been populated with the color and alpha values of the pixel + * at that location in the Texture. + * @param x The x coordinate of the pixel within the Texture. + * @param y The y coordinate of the pixel within the Texture. + * @param key The unique string-based key of the Texture. + * @param frame The string or index of the Frame. + */ + getPixel(x: integer, y: integer, key: string, frame: string | integer): Phaser.Display.Color; + + /** + * Given a Texture and an `x` and `y` coordinate this method will return a value between 0 and 255 + * corresponding to the alpha value of the pixel at that location in the Texture. If the coordinate + * is out of bounds it will return null. + * @param x The x coordinate of the pixel within the Texture. + * @param y The y coordinate of the pixel within the Texture. + * @param key The unique string-based key of the Texture. + * @param frame The string or index of the Frame. + */ + getPixelAlpha(x: integer, y: integer, key: string, frame: string | integer): integer; + + /** + * Sets the given Game Objects `texture` and `frame` properties so that it uses + * the Texture and Frame specified in the `key` and `frame` arguments to this method. + * @param gameObject [description] + * @param key The unique string-based key of the Texture. + * @param frame The string or index of the Frame. + */ + setTexture(gameObject: Phaser.GameObjects.GameObject, key: string, frame: string | integer): Phaser.GameObjects.GameObject; + + /** + * Passes all Textures to the given callback. + * @param callback The callback function to be sent the Textures. + * @param scope The value to use as `this` when executing the callback. + * @param args Additional arguments that will be passed to the callback, after the child. + */ + each(callback: EachTextureCallback, scope: object, ...args: any[]): void; + + /** + * Destroys the Texture Manager and all Textures stored within it. + */ + destroy(): void; + + } + + /** + * A Texture Source is the encapsulation of the actual source data for a Texture. + * This is typically an Image Element, loaded from the file system or network, or a Canvas Element. + * + * A Texture can contain multiple Texture Sources, which only happens when a multi-atlas is loaded. + */ + class TextureSource { + /** + * + * @param texture The Texture this TextureSource belongs to. + * @param source The source image data. + * @param width Optional width of the source image. If not given it's derived from the source itself. + * @param height Optional height of the source image. If not given it's derived from the source itself. + */ + constructor(texture: Phaser.Textures.Texture, source: HTMLImageElement | HTMLCanvasElement, width?: integer, height?: integer); + + /** + * The Texture this TextureSource belongs to. + */ + renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer; + + /** + * The Texture this TextureSource belongs to. + */ + texture: string; + + /** + * The source image data. This is either an Image Element, or a Canvas Element. + */ + image: HTMLImageElement | HTMLCanvasElement; + + /** + * Currently un-used. + */ + compressionAlgorithm: integer; + + /** + * The resolution of the source image. + */ + resolution: number; + + /** + * The width of the source image. If not specified in the constructor it will check + * the `naturalWidth` and then `width` properties of the source image. + */ + width: integer; + + /** + * The height of the source image. If not specified in the constructor it will check + * the `naturalHeight` and then `height` properties of the source image. + */ + height: integer; + + /** + * The Scale Mode the image will use when rendering. + * Either Linear or Nearest. + */ + scaleMode: number; + + /** + * Is the source image a Canvas Element? + */ + isCanvas: boolean; + + /** + * Are the source image dimensions a power of two? + */ + isPowerOf2: boolean; + + /** + * The WebGL Texture of the source image. + */ + glTexture: WebGLTexture; + + /** + * Creates a WebGL Texture, if required, and sets the Texture filter mode. + * @param game A reference to the Phaser Game instance. + */ + init(game: Phaser.Game): void; + + /** + * Sets the Filter Mode for this Texture. + * + * The mode can be either Linear, the default, or Nearest. + * + * For pixel-art you should use Nearest. + * @param filterMode The Filter Mode. + */ + setFilter(filterMode: Phaser.Textures.FilterMode): void; + + /** + * If this TextureSource is backed by a Canvas and is running under WebGL, + * it updates the WebGLTexture using the canvas data. + */ + update(): void; + + /** + * Destroys this Texture Source and nulls the references. + */ + destroy(): void; + + } + + /** + * Filter Types. + */ + enum FilterMode { + /** + * Linear filter type. + */ + LINEAR, + /** + * Nearest neighbor filter type. + */ + NEAREST, + } + + /** + * Linear filter type. + */ + const LINEAR: any; + + /** + * Nearest Neighbor filter type. + */ + const NEAREST: any; + + namespace Parsers { + } + + } + + namespace Tilemaps { + namespace Formats { + /** + * CSV Map Type + */ + var CSV: number; + + /** + * Tiled JSON Map Type + */ + var TILED_JSON: number; + + /** + * 2D Array Map Type + */ + var ARRAY_2D: number; + + /** + * Weltmeister (Impact.js) Map Type + */ + var WELTMEISTER: number; + + } + + /** + * An Image Collection is a special Tile Set containing multiple images, with no slicing into each image. + * + * Image Collections are normally created automatically when Tiled data is loaded. + */ + class ImageCollection { + /** + * + * @param name The name of the image collection in the map data. + * @param firstgid The first image index this image collection contains. + * @param width Width of widest image (in pixels). Default 32. + * @param height Height of tallest image (in pixels). Default 32. + * @param margin The margin around all images in the collection (in pixels). Default 0. + * @param spacing The spacing between each image in the collection (in pixels). Default 0. + * @param properties Custom Image Collection properties. Default {}. + */ + constructor(name: string, firstgid: integer, width?: integer, height?: integer, margin?: integer, spacing?: integer, properties?: object); + + /** + * The name of the Image Collection. + */ + name: string; + + /** + * The Tiled firstgid value. + * This is the starting index of the first image index this Image Collection contains. + */ + firstgid: integer; + + /** + * The width of the widest image (in pixels). + */ + readonly imageWidth: integer; + + /** + * The height of the tallest image (in pixels). + */ + readonly imageHeight: integer; + + /** + * The margin around the images in the collection (in pixels). + * Use `setSpacing` to change. + */ + readonly imageMarge: integer; + + /** + * The spacing between each image in the collection (in pixels). + * Use `setSpacing` to change. + */ + readonly imageSpacing: integer; + + /** + * Image Collection-specific properties that are typically defined in the Tiled editor. + */ + properties: object; + + /** + * The cached images that are a part of this collection. + */ + readonly images: any[]; + + /** + * The total number of images in the image collection. + */ + readonly total: integer; + + /** + * Returns true if and only if this image collection contains the given image index. + * @param imageIndex The image index to search for. + */ + containsImageIndex(imageIndex: integer): boolean; + + /** + * Add an image to this Image Collection. + * @param gid The gid of the image in the Image Collection. + * @param image The the key of the image in the Image Collection and in the cache. + */ + addImage(gid: integer, image: string): Phaser.Tilemaps.ImageCollection; + + } + + /** + * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When + * loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from + * a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For + * an empty map, you should specify tileWidth, tileHeight, width & height. + * @param scene The Scene to which this Tilemap belongs. + * @param key The key in the Phaser cache that corresponds to the loaded tilemap data. + * @param tileWidth The width of a tile in pixels. Default 32. + * @param tileHeight The height of a tile in pixels. Default 32. + * @param width The width of the map in tiles. Default 10. + * @param height The height of the map in tiles. Default 10. + * @param data Instead of loading from the cache, you can also load directly from + * a 2D array of tile indexes. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the + * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. Default false. + */ + function ParseToTilemap(scene: Phaser.Scene, key?: string, tileWidth?: integer, tileHeight?: integer, width?: integer, height?: integer, data?: integer[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap; + + /** + * A Tile is a representation of a single tile within the Tilemap. This is a lightweight data + * representation, so its position information is stored without factoring in scroll, layer + * scale or layer position. + */ + class Tile implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.Visible { + /** + * + * @param layer The LayerData object in the Tilemap that this tile belongs to. + * @param index The unique index of this tile within the map. + * @param x The x coordinate of this tile in tile coordinates. + * @param y The y coordinate of this tile in tile coordinates. + * @param width Width of the tile in pixels. + * @param height Height of the tile in pixels. + * @param baseWidth The base width a tile in the map (in pixels). Tiled maps support + * multiple tileset sizes within one map, but they are still placed at intervals of the base + * tile width. + * @param baseHeight The base height of the tile in pixels (in pixels). Tiled maps + * support multiple tileset sizes within one map, but they are still placed at intervals of the + * base tile height. + */ + constructor(layer: Phaser.Tilemaps.LayerData, index: integer, x: integer, y: integer, width: integer, height: integer, baseWidth: integer, baseHeight: integer); + + /** + * The LayerData in the Tilemap data that this tile belongs to. + */ + layer: Phaser.Tilemaps.LayerData; + + /** + * The index of this tile within the map data corresponding to the tileset, or -1 if this + * represents a blank tile. + */ + index: integer; + + /** + * The x map coordinate of this tile in tile units. + */ + x: integer; + + /** + * The y map coordinate of this tile in tile units. + */ + y: integer; + + /** + * The width of the tile in pixels. + */ + width: integer; + + /** + * The height of the tile in pixels. + */ + height: integer; + + /** + * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes + * within one map, but they are still placed at intervals of the base tile size. + */ + baseWidth: integer; + + /** + * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes + * within one map, but they are still placed at intervals of the base tile size. + */ + baseHeight: integer; + + /** + * The x coordinate of the top left of this tile in pixels. This is relative to the top left + * of the layer this tile is being rendered within. This property does NOT factor in camera + * scroll, layer scale or layer position. + */ + pixelX: number; + + /** + * The y coordinate of the top left of this tile in pixels. This is relative to the top left + * of the layer this tile is being rendered within. This property does NOT factor in camera + * scroll, layer scale or layer position. + */ + pixelY: number; + + /** + * Tile specific properties. These usually come from Tiled. + */ + properties: object; + + /** + * The rotation angle of this tile. + */ + rotation: number; + + /** + * Whether the tile should collide with any object on the left side. + */ + collideLeft: boolean; + + /** + * Whether the tile should collide with any object on the right side. + */ + collideRight: boolean; + + /** + * Whether the tile should collide with any object on the top side. + */ + collideUp: boolean; + + /** + * Whether the tile should collide with any object on the bottom side. + */ + collideDown: boolean; + + /** + * Whether the tile's left edge is interesting for collisions. + */ + faceLeft: boolean; + + /** + * Whether the tile's right edge is interesting for collisions. + */ + faceRight: boolean; + + /** + * Whether the tile's top edge is interesting for collisions. + */ + faceTop: boolean; + + /** + * Whether the tile's bottom edge is interesting for collisions. + */ + faceBottom: boolean; + + /** + * Tile collision callback. + */ + collisionCallback: Function; + + /** + * The context in which the collision callback will be called. + */ + collisionCallbackContext: object; + + /** + * The tint to apply to this tile. Note: tint is currently a single color value instead of + * the 4 corner tint component on other GameObjects. + */ + tint: number; + + /** + * An empty object where physics-engine specific information (e.g. bodies) may be stored. + */ + physics: object; + + /** + * Check if the given x and y world coordinates are within this Tile. This does not factor in + * camera scroll, layer scale or layer position. + * @param x The x coordinate to test. + * @param y The y coordinate to test. + */ + containsPoint(x: number, y: number): boolean; + + /** + * Copies the tile data & properties from the given tile to this tile. This copies everything + * except for position and interesting faces. + * @param tile The tile to copy from. + */ + copy(tile: Phaser.Tilemaps.Tile): Phaser.Tilemaps.Tile; + + /** + * The collision group for this Tile, defined within the Tileset. This returns a reference to + * the collision group stored within the Tileset, so any modification of the returned object + * will impact all tiles that have the same index as this tile. + */ + getCollisionGroup(): object; + + /** + * The tile data for this Tile, defined within the Tileset. This typically contains Tiled + * collision data, tile animations and terrain information. This returns a reference to the tile + * data stored within the Tileset, so any modification of the returned object will impact all + * tiles that have the same index as this tile. + */ + getTileData(): object; + + /** + * Gets the world X position of the left side of the tile, factoring in the layers position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getLeft(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world X position of the right side of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getRight(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world Y position of the top side of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getTop(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world Y position of the bottom side of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getBottom(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world rectangle bounding box for the tile, factoring in the layers position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + * @param output [description] + */ + getBounds(camera?: Phaser.Cameras.Scene2D.Camera, output?: object): Phaser.Geom.Rectangle | object; + + /** + * Gets the world X position of the center of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getCenterX(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Gets the world Y position of the center of the tile, factoring in the layer's position, + * scale and scroll. + * @param camera The Camera to use to perform the check. + */ + getCenterY(camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Clean up memory. + */ + destroy(): void; + + /** + * Check for intersection with this tile. This does not factor in camera scroll, layer scale or + * layer position. + * @param x The x axis in pixels. + * @param y The y axis in pixels. + * @param right The right point. + * @param bottom The bottom point. + */ + intersects(x: number, y: number, right: number, bottom: number): boolean; + + /** + * Checks if the tile is interesting. + * @param collides If true, will consider the tile interesting if it collides on any side. + * @param faces If true, will consider the tile interesting if it has an interesting face. + */ + isInteresting(collides: boolean, faces: boolean): boolean; + + /** + * Reset collision status flags. + * @param recalculateFaces Whether or not to recalculate interesting faces for this tile and its neighbors. Default true. + */ + resetCollision(recalculateFaces?: boolean): Phaser.Tilemaps.Tile; + + /** + * Reset faces. + */ + resetFaces(): Phaser.Tilemaps.Tile; + + /** + * Sets the collision flags for each side of this tile and updates the interesting faces list. + * @param left Indicating collide with any object on the left. + * @param right Indicating collide with any object on the right. + * @param up Indicating collide with any object on the top. + * @param down Indicating collide with any object on the bottom. + * @param recalculateFaces Whether or not to recalculate interesting faces + * for this tile and its neighbors. Default true. + */ + setCollision(left: boolean, right?: boolean, up?: boolean, down?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; + + /** + * Set a callback to be called when this tile is hit by an object. The callback must true for + * collision processing to take place. + * @param callback Callback function. + * @param context Callback will be called within this context. + */ + setCollisionCallback(callback: Function, context: object): Phaser.Tilemaps.Tile; + + /** + * Sets the size of the tile and updates its pixelX and pixelY. + * @param tileWidth The width of the tile in pixels. + * @param tileHeight The height of the tile in pixels. + * @param baseWidth The base width a tile in the map (in pixels). + * @param baseHeight The base height of the tile in pixels (in pixels). + */ + setSize(tileWidth: integer, tileHeight: integer, baseWidth: integer, baseHeight: integer): Phaser.Tilemaps.Tile; + + /** + * Used internally. Updates the tile's world XY position based on the current tile size. + */ + updatePixelXY(): Phaser.Tilemaps.Tile; + + /** + * True if this tile can collide on any of its faces or has a collision callback set. + */ + readonly canCollide: boolean; + + /** + * True if this tile can collide on any of its faces. + */ + readonly collides: boolean; + + /** + * True if this tile has any interesting faces. + */ + readonly hasInterestingFace: boolean; + + /** + * The tileset that contains this Tile. This will only return null if accessed from a LayerData + * instance before the tile is placed within a StaticTilemapLayer or DynamicTilemapLayer. + */ + readonly tileset: Phaser.Tilemaps.Tileset; + + /** + * The tilemap layer that contains this Tile. This will only return null if accessed from a + * LayerData instance before the tile is placed within a StaticTilemapLayer or + * DynamicTilemapLayer. + */ + readonly tilemapLayer: Phaser.Tilemaps.StaticTilemapLayer | Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * The tilemap that contains this Tile. This will only return null if accessed from a LayerData + * instance before the tile is placed within a StaticTilemapLayer or DynamicTilemapLayer. + */ + readonly tilemap: Phaser.Tilemaps.Tilemap; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A Tilemap is a container for Tilemap data. This isn't a display object, rather, it holds data + * about the map and allows you to add tilesets and tilemap layers to it. A map can have one or + * more tilemap layers (StaticTilemapLayer or DynamicTilemapLayer), which are the display + * objects that actually render tiles. + * + * The Tilemap data be parsed from a Tiled JSON file, a CSV file or a 2D array. Tiled is a free + * software package specifically for creating tile maps, and is available from: + * http://www.mapeditor.org + * + * A Tilemap has handy methods for getting & manipulating the tiles within a layer. You can only + * use the methods that change tiles (e.g. removeTileAt) on a DynamicTilemapLayer. + * + * Note that all Tilemaps use a base tile size to calculate dimensions from, but that a + * StaticTilemapLayer or DynamicTilemapLayer may have its own unique tile size that overrides + * it. + */ + class Tilemap { + /** + * + * @param scene The Scene to which this Tilemap belongs. + * @param mapData A MapData instance containing Tilemap data. + */ + constructor(scene: Phaser.Scene, mapData: Phaser.Tilemaps.MapData); + + scene: Phaser.Scene; + + /** + * The base width of a tile in pixels. Note that individual layers may have a different tile + * width. + */ + tileWidth: integer; + + /** + * The base height of a tile in pixels. Note that individual layers may have a different + * tile height. + */ + tileHeight: integer; + + /** + * The width of the map (in tiles). + */ + width: number; + + /** + * The height of the map (in tiles). + */ + height: number; + + /** + * The orientation of the map data (as specified in Tiled), usually 'orthogonal'. + */ + orientation: string; + + /** + * The format of the map data. + */ + format: number; + + /** + * The version of the map data (as specified in Tiled, usually 1). + */ + version: number; + + /** + * Map specific properties as specified in Tiled. + */ + properties: object; + + /** + * The width of the map in pixels based on width * tileWidth. + */ + widthInPixels: number; + + /** + * The height of the map in pixels based on height * tileHeight. + */ + heightInPixels: number; + + imageCollections: Phaser.Tilemaps.ImageCollection[]; + + /** + * An array of Tiled Image Layers. + */ + images: any[]; + + /** + * An array of Tilemap layer data. + */ + layers: Phaser.Tilemaps.LayerData[]; + + /** + * An array of Tilesets used in the map. + */ + tilesets: Phaser.Tilemaps.Tileset[]; + + /** + * An array of ObjectLayer instances parsed from Tiled object layers. + */ + objects: Phaser.Tilemaps.ObjectLayer[]; + + /** + * The index of the currently selected LayerData object. + */ + currentLayerIndex: integer; + + /** + * Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. + * Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled + * editor. + * @param tilesetName The name of the tileset as specified in the map data. + * @param key The key of the Phaser.Cache image used for this tileset. If + * `undefined` or `null` it will look for an image with a key matching the tilesetName parameter. + * @param tileWidth The width of the tile (in pixels) in the Tileset Image. If not + * given it will default to the map's tileWidth value, or the tileWidth specified in the Tiled + * JSON file. + * @param tileHeight The height of the tiles (in pixels) in the Tileset Image. If + * not given it will default to the map's tileHeight value, or the tileHeight specified in the + * Tiled JSON file. + * @param tileMargin The margin around the tiles in the sheet (in pixels). If not + * specified, it will default to 0 or the value specified in the Tiled JSON file. + * @param tileSpacing The spacing between each the tile in the sheet (in pixels). + * If not specified, it will default to 0 or the value specified in the Tiled JSON file. + * @param gid If adding multiple tilesets to a blank map, specify the starting + * GID this set will use here. Default 0. + */ + addTilesetImage(tilesetName: string, key?: string, tileWidth?: integer, tileHeight?: integer, tileMargin?: integer, tileSpacing?: integer, gid?: integer): Phaser.Tilemaps.Tileset; + + /** + * Turns the StaticTilemapLayer associated with the given layer into a DynamicTilemapLayer. If + * no layer specified, the map's current layer is used. This is useful if you want to manipulate + * a map at the start of a scene, but then make it non-manipulable and optimize it for speed. + * Note: the DynamicTilemapLayer passed in is destroyed, so make sure to store the value + * returned from this method if you want to manipulate the new StaticTilemapLayer. + * @param layer The name of the layer from Tiled, the + * index of the layer in the map, or a DynamicTilemapLayer. + */ + convertLayerToStatic(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * See component documentation. If no layer specified, the map's current layer is used. This + * cannot be applied to StaticTilemapLayers. + */ + copy(): Phaser.Tilemaps.Tilemap; + + /** + * Creates a new and empty DynamicTilemapLayer. The currently selected layer in the map is set + * to this new layer. + * @param name The name of this layer. Must be unique within the map. + * @param tileset The tileset the new layer will use. + * @param x The world x position where the top left of this layer will be placed. Default 0. + * @param y The world y position where the top left of this layer will be placed. Default 0. + * @param width The width of the layer in tiles. If not specified, it will default + * to the map's width. + * @param height The height of the layer in tiles. If not specified, it will default + * to the map's height. + * @param tileWidth The width of the tiles the layer uses for calculations. If not + * specified, it will default to the map's tileWidth. + * @param tileHeight The height of the tiles the layer uses for calculations. If not + * specified, it will default to the map's tileHeight. + */ + createBlankDynamicLayer(name: string, tileset: Phaser.Tilemaps.Tileset, x?: number, y?: number, width?: integer, height?: integer, tileWidth?: integer, tileHeight?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Creates a new DynamicTilemapLayer that renders the LayerData associated with the given + * `layerID`. The currently selected layer in the map is set to this new layer. + * + * The `layerID` is important. If you've created your map in Tiled then you can get this by + * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and + * look at the layers[].name value. Either way it must match. + * + * Unlike a static layer, a dynamic layer can be modified. See DynamicTilemapLayer for more + * information. + * @param layerID The layer array index value, or if a string is given, the + * layer name from Tiled. + * @param tileset The tileset the new layer will use. + * @param x The x position to place the layer in the world. If not specified, it will + * default to the layer offset from Tiled or 0. + * @param y The y position to place the layer in the world. If not specified, it will + * default to the layer offset from Tiled or 0. + */ + createDynamicLayer(layerID: integer | string, tileset: Phaser.Tilemaps.Tileset, x: number, y: number): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Creates a Sprite for every object matching the given gid in the map data. All properties from + * the map data objectgroup are copied into the `spriteConfig`, so you can use this as an easy + * way to configure Sprite properties from within the map editor. For example giving an object a + * property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. + * @param name The name of the object layer (from Tiled) to create Sprites from. + * @param id Either the id (object), gid (tile object) or name (object or + * tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects + * with the same graphic. The same name can be used on multiple objects. + * @param spriteConfig The config object to pass into the Sprite creator (i.e. + * scene.make.sprite). + * @param scene The Scene to create the Sprites within. Default the scene the map is within. + */ + createFromObjects(name: string, id: integer | string, spriteConfig: object, scene?: Phaser.Scene): Phaser.GameObjects.Sprite[]; + + /** + * Creates a Sprite for every object matching the given tile indexes in the layer. You can + * optionally specify if each tile will be replaced with a new tile after the Sprite has been + * created. This is useful if you want to lay down special tiles in a level that are converted to + * Sprites, but want to replace the tile itself with a floor tile or similar once converted. + * @param indexes The tile index, or array of indexes, to create Sprites from. + * @param replacements The tile index, or array of indexes, to change a converted + * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a + * one-to-one mapping with the indexes array. + * @param spriteConfig The config object to pass into the Sprite creator (i.e. + * scene.make.sprite). + * @param scene The Scene to create the Sprites within. Default scene the map is within. + * @param camera The Camera to use when determining the world XY Default main camera. + * @param layer [description] + */ + createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: object, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): Phaser.GameObjects.Sprite[]; + + /** + * Creates a new StaticTilemapLayer that renders the LayerData associated with the given + * `layerID`. The currently selected layer in the map is set to this new layer. + * + * The `layerID` is important. If you've created your map in Tiled then you can get this by + * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and + * look at the layers[].name value. Either way it must match. + * + * It's important to remember that a static layer cannot be modified. See StaticTilemapLayer for + * more information. + * @param layerID The layer array index value, or if a string is given, the + * layer name from Tiled. + * @param tileset The tileset the new layer will use. + * @param x The x position to place the layer in the world. If not specified, it will + * default to the layer offset from Tiled or 0. + * @param y The y position to place the layer in the world. If not specified, it will + * default to the layer offset from Tiled or 0. + */ + createStaticLayer(layerID: integer | string, tileset: Phaser.Tilemaps.Tileset, x: number, y: number): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Removes all layer data from this Tilemap and nulls the scene reference. This will destroy any + * StaticTilemapLayers or DynamicTilemapLayers that have been linked to LayerData. + */ + destroy(): void; + + /** + * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the + * specified index. Tiles will be set to collide if the given index is a colliding index. + * Collision information in the region will be recalculated. + * + * If no layer specified, the map's current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param index [description] + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param recalculateFaces [description] Default true. + * @param layer [description] + */ + fill(index: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * For each object in the given object layer, run the given filter callback function. Any + * objects that pass the filter test (i.e. where the callback returns true) will returned as a + * new array. Similar to Array.prototype.Filter in vanilla JS. + * @param objectLayer The name of an object layer (from Tiled) or an ObjectLayer instance. + * @param callback The callback. Each object in the given area will be passed to this callback as the first and only parameter. + * @param context The context under which the callback should be run. + */ + filterObjects(objectLayer: Phaser.Tilemaps.ObjectLayer | string, callback: TilemapFilterCallback, context?: object): Phaser.GameObjects.GameObject[]; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns + * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. + * If no layer specified, the map's current layer is used. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. The callback should return true for tiles that pass the + * filter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param layer [description] + */ + filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile[]; + + /** + * Searches the entire map layer for the first tile matching the given index, then returns that Tile + * object. If no match is found, it returns null. The search starts from the top-left tile and + * continues horizontally until it hits the end of the row, then it drops down to the next column. + * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to + * the top-left. + * If no layer specified, the map's current layer is used. + * @param index The tile index value to search for. + * @param skip The number of times to skip a matching tile before returning. Default 0. + * @param reverse If true it will scan the layer in reverse, starting at the + * bottom-right. Otherwise it scans from the top-left. Default false. + * @param layer [description] + */ + findByIndex(index: integer, skip?: integer, reverse?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile; + + /** + * Find the first object in the given object layer that satisfies the provided testing function. + * I.e. finds the first object for which `callback` returns true. Similar to + * Array.prototype.find in vanilla JS. + * @param objectLayer The name of an object layer (from Tiled) or an ObjectLayer instance. + * @param callback The callback. Each object in the given area will be passed to this callback as the first and only parameter. + * @param context The context under which the callback should be run. + */ + findObject(objectLayer: Phaser.Tilemaps.ObjectLayer | string, callback: TilemapFindCallback, context?: object): Phaser.GameObjects.GameObject; + + /** + * Find the first tile in the given rectangular area (in tile coordinates) of the layer that + * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns + * true. Similar to Array.prototype.find in vanilla JS. + * If no layer specified, the maps current layer is used. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param layer [description] + */ + findTile(callback: FindTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * callback. Similar to Array.prototype.forEach in vanilla JS. + * + * If no layer specified, the map's current layer is used. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param layer [description] + */ + forEachTile(callback: EachTileCallback, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object, layer?: LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Gets the image layer index based on its name. + * @param name The name of the image to get. + */ + getImageIndex(name: string): integer; + + /** + * Internally used. Returns the index of the object in one of the Tilemaps arrays whose name + * property matches the given `name`. + * @param location The Tilemap array to search. + * @param name The name of the array element to get. + */ + getIndex(location: any[], name: string): number; + + /** + * Gets the LayerData from this.layers that is associated with `layer`, or null if an invalid + * `layer` is given. + * @param layer The name of the + * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a + * StaticTilemapLayer. If not given will default to the maps current layer index. + */ + getLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.LayerData; + + /** + * Gets the ObjectLayer from this.objects that has the given `name`, or null if no ObjectLayer + * is found with that name. + * @param name The name of the object layer from Tiled. + */ + getObjectLayer(name?: string): Phaser.Tilemaps.ObjectLayer; + + /** + * Gets the LayerData index of the given `layer` within this.layers, or null if an invalid + * `layer` is given. + * @param layer The name of the + * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a + * StaticTilemapLayer. If not given will default to the map's current layer index. + */ + getLayerIndex(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): integer; + + /** + * Gets the index of the LayerData within this.layers that has the given `name`, or null if an + * invalid `name` is given. + * @param name The name of the layer to get. + */ + getLayerIndexByName(name: string): integer; + + /** + * Gets a tile at the given tile coordinates from the given layer. + * If no layer specified, the map's current layer is used. + * @param tileX X position to get the tile from (given in tile units, not pixels). + * @param tileY Y position to get the tile from (given in tile units, not pixels). + * @param nonNull If true getTile won't return null for empty tiles, but a Tile + * object with an index of -1. Default false. + * @param layer [description] + */ + getTileAt(tileX: integer, tileY: integer, nonNull?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile; + + /** + * Gets a tile at the given world coordinates from the given layer. + * If no layer specified, the map's current layer is used. + * @param worldX X position to get the tile from (given in pixels) + * @param worldY Y position to get the tile from (given in pixels) + * @param nonNull If true, function won't return null for empty tiles, but a Tile + * object with an index of -1. Default false. + * @param camera [description] Default main camera. + * @param layer [description] + */ + getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile; + + /** + * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. + * If no layer specified, the maps current layer is used. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param layer [description] + */ + getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, + * Line, Rectangle or Triangle. The shape should be in world coordinates. + * If no layer specified, the maps current layer is used. + * @param shape A shape in world (pixel) coordinates + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param camera [description] Default main camera. + * @param layer [description] + */ + getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: object, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles in the given rectangular area (in world coordinates) of the layer. + * If no layer specified, the maps current layer is used. + * @param worldX [description] + * @param worldY [description] + * @param width [description] + * @param height [description] + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param camera [description] Default main camera. + * @param layer [description] + */ + getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: object, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile[]; + + /** + * Gets the index of the Tileset within this.tilesets that has the given `name`, or null if an + * invalid `name` is given. + * @param name The name of the Tileset to get. + */ + getTilesetIndex(name: string): integer; + + /** + * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * + * If no layer specified, the map's current layer is used. + * @param tileX [description] + * @param tileY [description] + * @param layer [description] + */ + hasTileAt(tileX: integer, tileY: integer, layer?: Phaser.Tilemaps.LayerData): boolean; + + /** + * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * + * If no layer specified, the maps current layer is used. + * @param worldX [description] + * @param worldY [description] + * @param camera [description] Default main camera. + * @param layer [description] + */ + hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): boolean; + + /** + * The LayerData object that is currently selected in the map. You can set this property using + * any type supported by setLayer. + */ + layer: Phaser.Tilemaps.LayerData; + + /** + * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index + * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified + * location. If you pass in an index, only the index at the specified location will be changed. + * Collision information will be recalculated at the specified location. + * + * If no layer specified, the maps current layer is used. + * + * This cannot be applied to StaticTilemapLayers. + * @param tile The index of this tile to set or a Tile object. + * @param tileX [description] + * @param tileY [description] + * @param recalculateFaces [description] Default true. + * @param layer [description] + */ + putTileAt(tile: integer | Phaser.Tilemaps.Tile, tileX: integer, tileY: integer, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile; + + /** + * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either + * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the + * specified location. If you pass in an index, only the index at the specified location will be + * changed. Collision information will be recalculated at the specified location. + * + * If no layer specified, the maps current layer is used. This + * cannot be applied to StaticTilemapLayers. + * @param tile The index of this tile to set or a Tile object. + * @param worldX [description] + * @param worldY [description] + * @param recalculateFaces [description] Default true. + * @param camera [description] Default main camera. + * @param layer [description] + */ + putTileAtWorldXY(tile: integer | Phaser.Tilemaps.Tile, worldX: integer, worldY: integer, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile; + + /** + * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified + * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile, + * all attributes will be copied over to the specified location. If you pass in an index, only the + * index at the specified location will be changed. Collision information will be recalculated + * within the region tiles were changed. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tile A row (array) or grid (2D array) of Tiles + * or tile indexes to place. + * @param tileX [description] + * @param tileY [description] + * @param recalculateFaces [description] Default true. + * @param layer [description] + */ + putTilesAt(tile: integer[] | integer[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: integer, tileY: integer, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the + * specified layer. Each tile will recieve a new index. If an array of indexes is passed in, then + * those will be used for randomly assigning new tile indexes. If an array is not provided, the + * indexes found within the region (excluding -1) will be used for randomly assigning new tile + * indexes. This method only modifies tile indexes and does not change collision information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param indexes An array of indexes to randomly draw from during randomization. + * @param layer [description] + */ + randomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, indexes?: integer[], layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting + * faces are used internally for optimizing collisions against tiles. This method is mostly used + * internally to optimize recalculating faces when only one tile has been changed. + * + * If no layer specified, the maps current layer is used. + * @param tileX [description] + * @param tileY [description] + * @param layer [description] + */ + calculateFacesAt(tileX: integer, tileY: integer, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the + * layer. Interesting faces are used internally for optimizing collisions against tiles. This method + * is mostly used internally. + * + * If no layer specified, the map's current layer is used. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param layer [description] + */ + calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Removes all layers from this Tilemap and destroys any associated StaticTilemapLayers or + * DynamicTilemapLayers. + */ + removeAllLayers(): Phaser.Tilemaps.Tilemap; + + /** + * Removes the tile at the given tile coordinates in the specified layer and updates the layer's + * collision information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tileX [description] + * @param tileY [description] + * @param replaceWithNull If true, this will replace the tile at the specified + * location with null instead of a Tile with an index of -1. Default true. + * @param recalculateFaces [description] Default true. + * @param layer [description] + */ + removeTileAt(tileX: integer, tileY: integer, replaceWithNull?: boolean, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile; + + /** + * Removes the tile at the given world coordinates in the specified layer and updates the layer's + * collision information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param worldX [description] + * @param worldY [description] + * @param replaceWithNull If true, this will replace the tile at the specified + * location with null instead of a Tile with an index of -1. Default true. + * @param recalculateFaces [description] Default true. + * @param camera [description] Default main camera. + * @param layer [description] + */ + removeTileAtWorldXY(worldX: number, worldY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile; + + /** + * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to + * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles + * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation + * wherever you want on the screen. + * + * If no layer specified, the maps current layer is used. + * @param graphics The target Graphics object to draw upon. + * @param styleConfig An object specifying the colors to use for the debug drawing. + * @param styleConfig.tileColor Color to use for drawing a filled rectangle at + * non-colliding tile locations. If set to null, non-colliding tiles will not be drawn. Default blue. + * @param styleConfig.collidingTileColor Color to use for drawing a filled + * rectangle at colliding tile locations. If set to null, colliding tiles will not be drawn. Default orange. + * @param styleConfig.faceColor Color to use for drawing a line at interesting + * tile faces. If set to null, interesting tile faces will not be drawn. Default grey. + * @param layer [description] + */ + renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: object, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching + * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does + * not change collision information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param findIndex [description] + * @param newIndex [description] + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param layer [description] + */ + replaceByIndex(findIndex: integer, newIndex: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on the given tile or tiles within a layer by index. You can pass in either a + * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if + * collision will be enabled (true) or disabled (false). + * + * If no layer specified, the map's current layer is used. + * @param indexes Either a single tile index, or an array of tile indexes. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + * @param layer [description] + */ + setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on a range of tiles in a layer whose index is between the specified `start` and + * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set + * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be + * enabled (true) or disabled (false). + * + * If no layer specified, the map's current layer is used. + * @param start The first index of the tile to be set for collision. + * @param stop The last index of the tile to be set for collision. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + * @param layer [description] + */ + setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property + * that matches the given properties object, its collision flag will be set. The `collides` + * parameter controls if collision will be enabled (true) or disabled (false). Passing in + * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that + * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can + * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a + * "types" property that matches any of those values, its collision flag will be updated. + * + * If no layer specified, the map's current layer is used. + * @param properties An object with tile properties and corresponding values that should + * be checked. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + * @param layer [description] + */ + setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on all tiles in the given layer, except for tiles that have an index specified in + * the given array. The `collides` parameter controls if collision will be enabled (true) or + * disabled (false). + * + * If no layer specified, the map's current layer is used. + * @param indexes An array of the tile indexes to not be counted for collision. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + * @param layer [description] + */ + setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Sets collision on the tiles within a layer by checking each tile's collision group data + * (typically defined in Tiled within the tileset collision editor). If any objects are found within + * a tile's collision group, the tile's colliding information will be set. The `collides` parameter + * controls if collision will be enabled (true) or disabled (false). + * + * If no layer specified, the map's current layer is used. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + * @param layer [description] + */ + setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Sets a global collision callback for the given tile index within the layer. This will affect all + * tiles on this layer that have the same index. If a callback is already set for the tile index it + * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile + * at a specific location on the map then see setTileLocationCallback. + * + * If no layer specified, the map's current layer is used. + * @param indexes Either a single tile index, or an array of tile indexes to have a + * collision callback set for. + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + * @param layer [description] + */ + setTileIndexCallback(indexes: integer | any[], callback: Function, callbackContext: object, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Sets a collision callback for the given rectangular area (in tile coordindates) within the layer. + * If a callback is already set for the tile index it will be replaced. Set the callback to null to + * remove it. + * + * If no layer specified, the map's current layer is used. + * @param tileX [description] + * @param tileY [description] + * @param width [description] + * @param height [description] + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + * @param layer [description] + */ + setTileLocationCallback(tileX: integer, tileY: integer, width: integer, height: integer, callback: Function, callbackContext?: object, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Sets the current layer to the LayerData associated with `layer`. + * @param layer The name of the + * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a + * StaticTilemapLayer. If not given will default to the map's current layer index. + */ + setLayer(layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Sets the base tile size for the map. Note: this does not necessarily match the tileWidth and + * tileHeight for all layers. This also updates the base size on all tiles across all layers. + * @param tileWidth The width of the tiles the map uses for calculations. + * @param tileHeight The height of the tiles the map uses for calculations. + */ + setBaseTileSize(tileWidth: integer, tileHeight: integer): Phaser.Tilemaps.Tilemap; + + /** + * Sets the tile size for a specific `layer`. Note: this does not necessarily match the map's + * tileWidth and tileHeight for all layers. This will set the tile size for the layer and any + * tiles the layer has. + * @param tileWidth The width of the tiles (in pixels) in the layer. + * @param tileHeight The height of the tiles (in pixels) in the layer. + * @param layer The name of the + * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a + * StaticTilemapLayer. If not given will default to the map's current layer index. + */ + setLayerTileSize(tileWidth: integer, tileHeight: integer, layer?: string | integer | Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer): Phaser.Tilemaps.Tilemap; + + /** + * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given + * layer. It will only randomize the tiles in that area, so if they're all the same nothing will + * appear to have changed! This method only modifies tile indexes and does not change collision + * information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param layer [description] + */ + shuffle(tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching + * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision + * information. + * + * If no layer specified, the maps current layer is used. + * This cannot be applied to StaticTilemapLayers. + * @param tileA First tile index. + * @param tileB Second tile index. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param layer [description] + */ + swapByIndex(tileA: integer, tileB: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the + * layers position, scale and scroll. + * + * If no layer specified, the maps current layer is used. + * @param tileX [description] + * @param camera [description] Default main camera. + * @param layer [description] + */ + tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): number; + + /** + * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the + * layers position, scale and scroll. + * + * If no layer specified, the maps current layer is used. + * @param tileY [description] + * @param camera [description] Default main camera. + * @param layer [description] + */ + tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): number; + + /** + * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * + * If no layer specified, the maps current layer is used. + * @param tileX [description] + * @param tileY [description] + * @param point [description] + * @param camera [description] Default main camera. + * @param layer [description] + */ + tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2; + + /** + * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the + * specified layer. Each tile will receive a new index. New indexes are drawn from the given + * weightedIndexes array. An example weighted array: + * + * [ + * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8 + * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8 + * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8 + * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8 + * ] + * + * The probability of any index being choose is (the index's weight) / (sum of all weights). This + * method only modifies tile indexes and does not change collision information. + * + * If no layer specified, the map's current layer is used. This + * cannot be applied to StaticTilemapLayers. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param weightedIndexes An array of objects to randomly draw from during + * randomization. They should be in the form: { index: 0, weight: 4 } or + * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes. + * @param layer [description] + */ + weightedRandomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, weightedIndexes?: object[], layer?: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tilemap; + + /** + * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the + * layers position, scale and scroll. + * + * If no layer specified, the maps current layer is used. + * @param worldX [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param camera [description] Default main camera. + * @param layer [description] + */ + worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): number; + + /** + * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the + * layers position, scale and scroll. + * + * If no layer specified, the maps current layer is used. + * @param worldY [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param camera [description] Default main camera. + * @param layer [description] + */ + worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): number; + + /** + * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * + * If no layer specified, the maps current layer is used. + * @param worldX [description] + * @param worldY [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param point [description] + * @param camera [description] Default main camera. + * @param layer [description] + */ + worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera, layer?: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2; + + } + + /** + * A Tileset is a combination of an image containing the tiles and a container for data about + * each tile. + */ + class Tileset { + /** + * + * @param name The name of the tileset in the map data. + * @param firstgid The first tile index this tileset contains. + * @param tileWidth Width of each tile (in pixels). Default 32. + * @param tileHeight Height of each tile (in pixels). Default 32. + * @param tileMargin The margin around all tiles in the sheet (in pixels). Default 0. + * @param tileSpacing The spacing between each tile in the sheet (in pixels). Default 0. + * @param tileProperties Custom properties defined per tile in the Tileset. + * These typically are custom properties created in Tiled when editing a tileset. Default {}. + * @param tileData Data stored per tile. These typically are created in Tiled + * when editing a tileset, e.g. from Tiled's tile collision editor or terrain editor. Default {}. + */ + constructor(name: string, firstgid: integer, tileWidth?: integer, tileHeight?: integer, tileMargin?: integer, tileSpacing?: integer, tileProperties?: object, tileData?: object); + + /** + * The name of the Tileset. + */ + name: string; + + /** + * The starting index of the first tile index this Tileset contains. + */ + firstgid: integer; + + /** + * The width of each tile (in pixels). Use setTileSize to change. + */ + readonly tileWidth: integer; + + /** + * The height of each tile (in pixels). Use setTileSize to change. + */ + readonly tileHeight: integer; + + /** + * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. + */ + readonly tileMargin: integer; + + /** + * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. + */ + readonly tileSpacing: integer; + + /** + * Tileset-specific properties per tile that are typically defined in the Tiled editor in the + * Tileset editor. + */ + tileProperties: object; + + /** + * Tileset-specific data per tile that are typically defined in the Tiled editor, e.g. within + * the Tileset collision editor. This is where collision objects and terrain are stored. + */ + tileData: object; + + /** + * The cached image that contains the individual tiles. Use setImage to set. + */ + readonly image: Phaser.Textures.Texture; + + /** + * The gl texture used by the WebGL renderer. + */ + readonly glTexture: WebGLTexture; + + /** + * The number of tile rows in the the tileset. + */ + readonly rows: integer; + + /** + * The number of tile columns in the tileset. + */ + readonly columns: integer; + + /** + * The total number of tiles in the tileset. + */ + readonly total: integer; + + /** + * The look-up table to specific tile image texture coordinates (UV in pixels). Each element + * contains the coordinates for a tile in an object of the form {x, y}. + */ + readonly texCoordinates: object[]; + + /** + * Get a tiles properties that are stored in the Tileset. Returns null if tile index is not + * contained in this Tileset. This is typically defined in Tiled under the Tileset editor. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + getTileProperties(tileIndex: integer): object | undefined; + + /** + * Get a tile's data that is stored in the Tileset. Returns null if tile index is not contained + * in this Tileset. This is typically defined in Tiled and will contain both Tileset collision + * info and terrain mapping. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + getTileData(tileIndex: integer): object | undefined; + + /** + * Get a tile's collision group that is stored in the Tileset. Returns null if tile index is not + * contained in this Tileset. This is typically defined within Tiled's tileset collision editor. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + getTileCollisionGroup(tileIndex: integer): object; + + /** + * Returns true if and only if this Tileset contains the given tile index. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + containsTileIndex(tileIndex: integer): boolean; + + /** + * Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index. + * Returns null if tile index is not contained in this Tileset. + * @param tileIndex The unique id of the tile across all tilesets in the map. + */ + getTileTextureCoordinates(tileIndex: integer): object; + + /** + * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). + * @param texture The image that contains the tiles. + */ + setImage(texture: Phaser.Textures.Texture): Phaser.Tilemaps.Tileset; + + /** + * Sets the tile width & height and updates the tile data (rows, columns, etc.). + * @param tileWidth The width of a tile in pixels. + * @param tileHeight The height of a tile in pixels. + */ + setTileSize(tileWidth?: integer, tileHeight?: integer): Phaser.Tilemaps.Tileset; + + /** + * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). + * @param margin The margin around the tiles in the sheet (in pixels). + * @param spacing The spacing between the tiles in the sheet (in pixels). + */ + setSpacing(margin?: integer, spacing?: integer): Phaser.Tilemaps.Tileset; + + /** + * Updates tile texture coordinates and tileset data. + * @param imageWidth The (expected) width of the image to slice. + * @param imageHeight The (expected) height of the image to slice. + */ + updateTileData(imageWidth: integer, imageHeight: integer): Phaser.Tilemaps.Tileset; + + } + + namespace Components { + } + + /** + * A DynamicTilemapLayer is a game object that renders LayerData from a Tilemap. A + * DynamicTilemapLayer can only render tiles from a single tileset. + * + * A DynamicTilemapLayer trades some speed for being able to apply powerful effects. Unlike a + * StaticTilemapLayer, you can apply per-tile effects like tint or alpha, and you can change the + * tiles in a DynamicTilemapLayer. Use this over a StaticTilemapLayer when you need those + * features. + */ + class DynamicTilemapLayer extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + /** + * + * @param scene [description] + * @param tilemap The Tilemap this layer is a part of. + * @param layerIndex The index of the LayerData associated with this layer. + * @param tileset The tileset used to render the tiles in this layer. + * @param x The world x position where the top left of this layer will be placed. Default 0. + * @param y The world y position where the top left of this layer will be placed. Default 0. + */ + constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: integer, tileset: Phaser.Tilemaps.Tileset, x?: number, y?: number); + + /** + * Used internally by physics system to perform fast type checks. + */ + readonly isTilemap: boolean; + + /** + * The Tilemap that this layer is a part of. + */ + tilemap: Phaser.Tilemaps.Tilemap; + + /** + * The index of the LayerData associated with this layer. + */ + layerIndex: integer; + + /** + * The LayerData associated with this layer. LayerData can only be associated with one + * tilemap layer. + */ + layer: Phaser.Tilemaps.LayerData; + + /** + * The Tileset associated with this layer. A tilemap layer can only render from one Tileset. + */ + tileset: Phaser.Tilemaps.Tileset; + + /** + * Used internally with the canvas render. This holds the tiles that are visible within the + * camera. + */ + culledTiles: any[]; + + /** + * You can control if the Cameras should cull tiles before rendering them or not. + * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. + * + * However, there are some instances when you may wish to disable this, and toggling this flag allows + * you to do so. Also see `setSkipCull` for a chainable method that does the same thing. + */ + skipCull: boolean; + + /** + * The total number of tiles drawn by the renderer in the last frame. + */ + readonly tilesDrawn: number; + + /** + * The total number of tiles in this layer. Updated every frame. + */ + readonly tilesTotal: number; + + /** + * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size. + * + * See the method `setCullPadding` for more details. + */ + cullPaddingX: number; + + /** + * The amount of extra tiles to add into the cull rectangle when calculating its vertical size. + * + * See the method `setCullPadding` for more details. + */ + cullPaddingY: number; + + /** + * The callback that is invoked when the tiles are culled. + * + * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like. + * + * It will be sent 3 arguments: + * + * 1) The Phaser.Tilemaps.LayerData object for this Layer + * 2) The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull. + * 3) A reference to the `culledTiles` array, which should be used to store the tiles you want rendered. + * + * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system. + */ + cullCallback: Function; + + /** + * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting + * faces are used internally for optimizing collisions against tiles. This method is mostly used + * internally to optimize recalculating faces when only one tile has been changed. + * @param tileX The x coordinate. + * @param tileY The y coordinate. + */ + calculateFacesAt(tileX: integer, tileY: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the + * layer. Interesting faces are used internally for optimizing collisions against tiles. This method + * is mostly used internally. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + */ + calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Creates a Sprite for every object matching the given tile indexes in the layer. You can + * optionally specify if each tile will be replaced with a new tile after the Sprite has been + * created. This is useful if you want to lay down special tiles in a level that are converted to + * Sprites, but want to replace the tile itself with a floor tile or similar once converted. + * @param indexes The tile index, or array of indexes, to create Sprites from. + * @param replacements The tile index, or array of indexes, to change a converted + * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a + * one-to-one mapping with the indexes array. + * @param spriteConfig The config object to pass into the Sprite creator (i.e. + * scene.make.sprite). + * @param scene The Scene to create the Sprites within. Default scene the map is within. + * @param camera The Camera to use when determining the world XY Default main camera. + */ + createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: object, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[]; + + /** + * Returns the tiles in the given layer that are within the cameras viewport. + * This is used internally. + * @param camera The Camera to run the cull check against. + */ + cull(camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Copies the tiles in the source rectangular area to a new destination (all specified in tile + * coordinates) within the layer. This copies all tile properties & recalculates collision + * information in the destination region. + * @param srcTileX [description] + * @param srcTileY [description] + * @param width [description] + * @param height [description] + * @param destTileX [description] + * @param destTileY [description] + * @param recalculateFaces [description] Default true. + */ + copy(srcTileX: integer, srcTileY: integer, width: integer, height: integer, destTileX: integer, destTileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Destroys this DynamicTilemapLayer and removes its link to the associated LayerData. + */ + destroy(): void; + + /** + * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the + * specified index. Tiles will be set to collide if the given index is a colliding index. + * Collision information in the region will be recalculated. + * @param index [description] + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param recalculateFaces [description] Default true. + */ + fill(index: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns + * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. The callback should return true for tiles that pass the + * filter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + */ + filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object): Phaser.Tilemaps.Tile[]; + + /** + * Searches the entire map layer for the first tile matching the given index, then returns that Tile + * object. If no match is found, it returns null. The search starts from the top-left tile and + * continues horizontally until it hits the end of the row, then it drops down to the next column. + * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to + * the top-left. + * @param index The tile index value to search for. + * @param skip The number of times to skip a matching tile before returning. Default 0. + * @param reverse If true it will scan the layer in reverse, starting at the + * bottom-right. Otherwise it scans from the top-left. Default false. + */ + findByIndex(index: integer, skip?: integer, reverse?: boolean): Phaser.Tilemaps.Tile; + + /** + * Find the first tile in the given rectangular area (in tile coordinates) of the layer that + * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns + * true. Similar to Array.prototype.find in vanilla JS. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + */ + findTile(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object): Phaser.Tilemaps.Tile; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * callback. Similar to Array.prototype.forEach in vanilla JS. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + */ + forEachTile(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Gets a tile at the given tile coordinates from the given layer. + * @param tileX X position to get the tile from (given in tile units, not pixels). + * @param tileY Y position to get the tile from (given in tile units, not pixels). + * @param nonNull If true getTile won't return null for empty tiles, but a Tile + * object with an index of -1. Default false. + */ + getTileAt(tileX: integer, tileY: integer, nonNull?: boolean): Phaser.Tilemaps.Tile; + + /** + * Gets a tile at the given world coordinates from the given layer. + * @param worldX X position to get the tile from (given in pixels) + * @param worldY Y position to get the tile from (given in pixels) + * @param nonNull If true, function won't return null for empty tiles, but a Tile + * object with an index of -1. Default false. + * @param camera [description] Default main camera. + */ + getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; + + /** + * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + */ + getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, + * Line, Rectangle or Triangle. The shape should be in world coordinates. + * @param shape A shape in world (pixel) coordinates + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param camera [description] Default main camera. + */ + getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: object, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles in the given rectangular area (in world coordinates) of the layer. + * @param worldX [description] + * @param worldY [description] + * @param width [description] + * @param height [description] + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param camera [description] Default main camera. + */ + getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: object, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * @param tileX [description] + * @param tileY [description] + */ + hasTileAt(tileX: integer, tileY: integer): boolean; + + /** + * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * @param worldX [description] + * @param worldY [description] + * @param camera [description] Default main camera. + */ + hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera): boolean; + + /** + * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index + * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified + * location. If you pass in an index, only the index at the specified location will be changed. + * Collision information will be recalculated at the specified location. + * @param tile The index of this tile to set or a Tile object. + * @param tileX [description] + * @param tileY [description] + * @param recalculateFaces [description] Default true. + */ + putTileAt(tile: integer | Phaser.Tilemaps.Tile, tileX: integer, tileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; + + /** + * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either + * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the + * specified location. If you pass in an index, only the index at the specified location will be + * changed. Collision information will be recalculated at the specified location. + * @param tile The index of this tile to set or a Tile object. + * @param worldX [description] + * @param worldY [description] + * @param recalculateFaces [description] Default true. + * @param camera [description] + */ + putTileAtWorldXY(tile: integer | Phaser.Tilemaps.Tile, worldX: integer, worldY: integer, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; + + /** + * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified + * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile, + * all attributes will be copied over to the specified location. If you pass in an index, only the + * index at the specified location will be changed. Collision information will be recalculated + * within the region tiles were changed. + * @param tile A row (array) or grid (2D array) of Tiles + * or tile indexes to place. + * @param tileX [description] + * @param tileY [description] + * @param recalculateFaces [description] Default true. + */ + putTilesAt(tile: integer[] | integer[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: integer, tileY: integer, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the + * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then + * those will be used for randomly assigning new tile indexes. If an array is not provided, the + * indexes found within the region (excluding -1) will be used for randomly assigning new tile + * indexes. This method only modifies tile indexes and does not change collision information. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param indexes An array of indexes to randomly draw from during randomization. + */ + randomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, indexes?: integer[]): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Removes the tile at the given tile coordinates in the specified layer and updates the layer's + * collision information. + * @param tile The index of this tile to set or a Tile object. + * @param tileX [description] + * @param tileY [description] + * @param replaceWithNull If true, this will replace the tile at the specified + * location with null instead of a Tile with an index of -1. Default true. + * @param recalculateFaces [description] Default true. + */ + removeTileAt(tile: integer | Phaser.Tilemaps.Tile, tileX: integer, tileY: integer, replaceWithNull?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.Tile; + + /** + * Removes the tile at the given world coordinates in the specified layer and updates the layer's + * collision information. + * @param tile The index of this tile to set or a Tile object. + * @param worldX [description] + * @param worldY [description] + * @param replaceWithNull If true, this will replace the tile at the specified + * location with null instead of a Tile with an index of -1. Default true. + * @param recalculateFaces [description] Default true. + * @param camera [description] Default main camera. + */ + removeTileAtWorldXY(tile: integer | Phaser.Tilemaps.Tile, worldX: number, worldY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; + + /** + * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to + * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles + * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation + * wherever you want on the screen. + * @param graphics The target Graphics object to draw upon. + * @param styleConfig An object specifying the colors to use for the debug drawing. + * @param styleConfig.tileColor Color to use for drawing a filled rectangle at + * non-colliding tile locations. If set to null, non-colliding tiles will not be drawn. Default blue. + * @param styleConfig.collidingTileColor Color to use for drawing a filled + * rectangle at colliding tile locations. If set to null, colliding tiles will not be drawn. Default orange. + * @param styleConfig.faceColor Color to use for drawing a line at interesting + * tile faces. If set to null, interesting tile faces will not be drawn. Default grey. + */ + renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: object): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching + * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does + * not change collision information. + * @param findIndex [description] + * @param newIndex [description] + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + */ + replaceByIndex(findIndex: integer, newIndex: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * You can control if the Cameras should cull tiles before rendering them or not. + * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer. + * + * However, there are some instances when you may wish to disable this. + * @param value Set to `true` to stop culling tiles. Set to `false` to enable culling again. Default true. + */ + setSkipCull(value?: boolean): this; + + /** + * When a Camera culls the tiles in this layer it does so using its view into the world, building up a + * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size + * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so + * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px + * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale) + * @param paddingX The amount of extra horizontal tiles to add to the cull check padding. Default 1. + * @param paddingY The amount of extra vertical tiles to add to the cull check padding. Default 1. + */ + setCullPadding(paddingX?: number, paddingY?: number): this; + + /** + * Sets collision on the given tile or tiles within a layer by index. You can pass in either a + * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if + * collision will be enabled (true) or disabled (false). + * @param indexes Either a single tile index, or an array of tile indexes. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets collision on a range of tiles in a layer whose index is between the specified `start` and + * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set + * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be + * enabled (true) or disabled (false). + * @param start The first index of the tile to be set for collision. + * @param stop The last index of the tile to be set for collision. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property + * that matches the given properties object, its collision flag will be set. The `collides` + * parameter controls if collision will be enabled (true) or disabled (false). Passing in + * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that + * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can + * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a + * "types" property that matches any of those values, its collision flag will be updated. + * @param properties An object with tile properties and corresponding values that should + * be checked. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets collision on all tiles in the given layer, except for tiles that have an index specified in + * the given array. The `collides` parameter controls if collision will be enabled (true) or + * disabled (false). + * @param indexes An array of the tile indexes to not be counted for collision. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets collision on the tiles within a layer by checking each tiles collision group data + * (typically defined in Tiled within the tileset collision editor). If any objects are found within + * a tiles collision group, the tile's colliding information will be set. The `collides` parameter + * controls if collision will be enabled (true) or disabled (false). + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets a global collision callback for the given tile index within the layer. This will affect all + * tiles on this layer that have the same index. If a callback is already set for the tile index it + * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile + * at a specific location on the map then see setTileLocationCallback. + * @param indexes Either a single tile index, or an array of tile indexes to have a + * collision callback set for. + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + */ + setTileIndexCallback(indexes: integer | any[], callback: Function, callbackContext: object): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. + * If a callback is already set for the tile index it will be replaced. Set the callback to null to + * remove it. + * @param tileX [description] + * @param tileY [description] + * @param width [description] + * @param height [description] + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + */ + setTileLocationCallback(tileX: integer, tileY: integer, width: integer, height: integer, callback: Function, callbackContext?: object): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given + * layer. It will only randomize the tiles in that area, so if they're all the same nothing will + * appear to have changed! This method only modifies tile indexes and does not change collision + * information. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + */ + shuffle(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching + * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision + * information. + * @param tileA First tile index. + * @param tileB Second tile index. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + */ + swapByIndex(tileA: integer, tileB: integer, tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the + * layers position, scale and scroll. + * @param tileX [description] + * @param camera [description] Default main camera. + */ + tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the + * layers position, scale and scroll. + * @param tileY [description] + * @param camera [description] Default main camera. + */ + tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * @param tileX [description] + * @param tileY [description] + * @param point [description] + * @param camera [description] Default main camera. + */ + tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; + + /** + * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the + * specified layer. Each tile will recieve a new index. New indexes are drawn from the given + * weightedIndexes array. An example weighted array: + * + * [ + * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8 + * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8 + * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8 + * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8 + * ] + * + * The probability of any index being choose is (the index's weight) / (sum of all weights). This + * method only modifies tile indexes and does not change collision information. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param weightedIndexes An array of objects to randomly draw from during + * randomization. They should be in the form: { index: 0, weight: 4 } or + * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes. + */ + weightedRandomize(tileX?: integer, tileY?: integer, width?: integer, height?: integer, weightedIndexes?: object[]): Phaser.Tilemaps.DynamicTilemapLayer; + + /** + * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the + * layers position, scale and scroll. + * @param worldX [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param camera [description] Default main camera. + */ + worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the + * layers position, scale and scroll. + * @param worldY [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param camera [description] Default main camera. + */ + worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * @param worldX [description] + * @param worldY [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param point [description] + * @param camera [description] Default main camera. + */ + worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + } + + /** + * A class for representing data about about a layer in a map. Maps are parsed from CSV, Tiled, + * etc. into this format. Tilemap, StaticTilemapLayer and DynamicTilemapLayer have a reference + * to this data and use it to look up and perform operations on tiles. + */ + class LayerData { + /** + * + * @param config [description] + */ + constructor(config?: object); + + /** + * [description] + */ + name: string; + + /** + * [description] + */ + x: number; + + /** + * [description] + */ + y: number; + + /** + * [description] + */ + width: number; + + /** + * [description] + */ + height: number; + + /** + * [description] + */ + tileWidth: number; + + /** + * [description] + */ + tileHeight: number; + + /** + * [description] + */ + baseTileWidth: number; + + /** + * [description] + */ + baseTileHeight: number; + + /** + * [description] + */ + widthInPixels: number; + + /** + * [description] + */ + heightInPixels: number; + + /** + * [description] + */ + alpha: number; + + /** + * [description] + */ + visible: boolean; + + /** + * [description] + */ + properties: object; + + /** + * [description] + */ + indexes: any[]; + + /** + * [description] + */ + collideIndexes: any[]; + + /** + * [description] + */ + callbacks: any[]; + + /** + * [description] + */ + bodies: any[]; + + /** + * [description] + */ + data: any[]; + + /** + * [description] + */ + tilemapLayer: Phaser.Tilemaps.DynamicTilemapLayer | Phaser.Tilemaps.StaticTilemapLayer; + + } + + /** + * A class for representing data about a map. Maps are parsed from CSV, Tiled, etc. into this + * format. A Tilemap object get a copy of this data and then unpacks the needed properties into + * itself. + */ + class MapData { + /** + * + * @param config [description] + */ + constructor(config?: object); + + /** + * [description] + */ + name: string; + + /** + * [description] + */ + width: number; + + /** + * [description] + */ + height: number; + + /** + * [description] + */ + tileWidth: number; + + /** + * [description] + */ + tileHeight: number; + + /** + * [description] + */ + widthInPixels: number; + + /** + * [description] + */ + heightInPixels: number; + + /** + * [description] + */ + format: integer; + + /** + * [description] + */ + orientation: string; + + /** + * [description] + */ + version: string; + + /** + * [description] + */ + properties: object; + + /** + * [description] + */ + layers: any[]; + + /** + * [description] + */ + images: any[]; + + /** + * [description] + */ + objects: object; + + /** + * [description] + */ + collision: object; + + /** + * [description] + */ + tilesets: any[]; + + /** + * [description] + */ + imageCollections: any[]; + + /** + * [description] + */ + tiles: any[]; + + } + + /** + * A class for representing a Tiled object layer in a map. This mirrors the structure of a Tiled + * object layer, except: + * - "x" & "y" properties are ignored since these cannot be changed in Tiled. + * - "offsetx" & "offsety" are applied to the individual object coordinates directly, so they + * are ignored as well. + * - "draworder" is ignored. + */ + class ObjectLayer { + /** + * + * @param config [description] + */ + constructor(config?: object); + + /** + * [description] + */ + name: string; + + /** + * [description] + */ + opacity: number; + + /** + * [description] + */ + properties: object; + + /** + * [description] + */ + propertyTypes: object; + + /** + * [description] + */ + type: string; + + /** + * [description] + */ + visible: boolean; + + /** + * [description] + */ + objects: Phaser.GameObjects.GameObject[]; + + } + + namespace Parsers { + /** + * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format + * is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth & + * tileHeight. When parsing from a map from Tiled, the tileWidth & tileHeight will be pulled from + * the map data. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param mapFormat See ../Formats.js. + * @param data 2D array, CSV string or Tiled JSON object. + * @param tileWidth The width of a tile in pixels. Required for 2D array and CSV, but + * ignored for Tiled JSON. + * @param tileHeight The height of a tile in pixels. Required for 2D array and CSV, but + * ignored for Tiled JSON. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function Parse(name: string, mapFormat: integer, data: integer[][] | string | object, tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; + + /** + * Parses a 2D array of tile indexes into a new MapData object with a single layer. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param data 2D array, CSV string or Tiled JSON object. + * @param tileWidth The width of a tile in pixels. + * @param tileHeight The height of a tile in pixels. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function Parse2DArray(name: string, data: integer[][], tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; + + /** + * Parses a CSV string of tile indexes into a new MapData object with a single layer. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param data CSV string of tile indexes. + * @param tileWidth The width of a tile in pixels. + * @param tileHeight The height of a tile in pixels. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function ParseCSV(name: string, data: string, tileWidth: integer, tileHeight: integer, insertNull: boolean): Phaser.Tilemaps.MapData; + + namespace Impact { + /** + * [description] + * @param json [description] + * @param insertNull [description] + */ + function ParseTileLayers(json: object, insertNull: boolean): any[]; + + /** + * [description] + * @param json [description] + */ + function ParseTilesets(json: object): any[]; + + /** + * Parses a Weltmeister JSON object into a new MapData object. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param json The Weltmeister JSON object. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function ParseWeltmeister(name: string, json: object, insertNull: boolean): object; + + } + + namespace Tiled { + /** + * Copy properties from tileset to tiles. + * @param mapData [description] + */ + function AssignTileProperties(mapData: Phaser.Tilemaps.MapData): void; + + /** + * [description] + * @param data [description] + */ + function Base64Decode(data: object): any[]; + + /** + * Master list of tiles -> x, y, index in tileset. + * @param mapData [description] + */ + function BuildTilesetIndex(mapData: Phaser.Tilemaps.MapData): any[]; + + /** + * See Tiled documentation on tile flipping: + * http://docs.mapeditor.org/en/latest/reference/tmx-map-format/ + * @param gid [description] + */ + function ParseGID(gid: number): object; + + /** + * [description] + * @param json [description] + */ + function ParseImageLayers(json: object): any[]; + + /** + * Parses a Tiled JSON object into a new MapData object. + * @param name The name of the tilemap, used to set the name on the MapData. + * @param json The Tiled JSON object. + * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map + * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty + * location will get a Tile object with an index of -1. If you've a large sparsely populated map and + * the tile data doesn't need to change then setting this value to `true` will help with memory + * consumption. However if your map is small or you need to update the tiles dynamically, then leave + * the default value set. + */ + function ParseJSONTiled(name: string, json: object, insertNull: boolean): Phaser.Tilemaps.MapData; + + /** + * [description] + * @param tiledObject [description] + * @param offsetX [description] Default 0. + * @param offsetY [description] Default 0. + */ + function ParseObject(tiledObject: object, offsetX?: number, offsetY?: number): object; + + /** + * [description] + * @param json [description] + */ + function ParseObjectLayers(json: object): any[]; + + /** + * [description] + * @param json [description] + * @param insertNull [description] + */ + function ParseTileLayers(json: object, insertNull: boolean): any[]; + + /** + * Tilesets & Image Collections + * @param json [description] + */ + function ParseTilesets(json: object): object; + + /** + * [description] + * @param object [description] + * @param keys [description] + */ + function Pick(object: object, keys: any[]): object; + + } + + } + + /** + * A StaticTilemapLayer is a game object that renders LayerData from a Tilemap. A + * StaticTilemapLayer can only render tiles from a single tileset. + * + * A StaticTilemapLayer is optimized for speed over flexibility. You cannot apply per-tile + * effects like tint or alpha. You cannot change the tiles in a StaticTilemapLayer. Use this + * over a DynamicTilemapLayer when you don't need either of those features. + */ + class StaticTilemapLayer extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScaleMode, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor { + /** + * + * @param scene [description] + * @param tilemap The Tilemap this layer is a part of. + * @param layerIndex The index of the LayerData associated with this layer. + * @param tileset The tileset used to render the tiles in this layer. + * @param x The world x position where the top left of this layer will be placed. Default 0. + * @param y The world y position where the top left of this layer will be placed. Default 0. + */ + constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: integer, tileset: Phaser.Tilemaps.Tileset, x?: number, y?: number); + + /** + * Used internally by physics system to perform fast type checks. + */ + readonly isTilemap: boolean; + + /** + * The Tilemap that this layer is a part of. + */ + tilemap: Phaser.Tilemaps.Tilemap; + + /** + * The index of the LayerData associated with this layer. + */ + layerIndex: integer; + + /** + * The LayerData associated with this layer. LayerData can only be associated with one + * tilemap layer. + */ + layer: Phaser.Tilemaps.LayerData; + + /** + * The Tileset associated with this layer. A tilemap layer can only render from one Tileset. + */ + tileset: Phaser.Tilemaps.Tileset; + + /** + * Used internally with the canvas render. This holds the tiles that are visible within the + * camera. + */ + culledTiles: any[]; + + /** + * Upload the tile data to a VBO. + * @param camera The camera to render to. + */ + upload(camera: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting + * faces are used internally for optimizing collisions against tiles. This method is mostly used + * internally to optimize recalculating faces when only one tile has been changed. + * @param tileX The x coordinate. + * @param tileY The y coordinate. + */ + calculateFacesAt(tileX: integer, tileY: integer): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the + * layer. Interesting faces are used internally for optimizing collisions against tiles. This method + * is mostly used internally. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + */ + calculateFacesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Creates a Sprite for every object matching the given tile indexes in the layer. You can + * optionally specify if each tile will be replaced with a new tile after the Sprite has been + * created. This is useful if you want to lay down special tiles in a level that are converted to + * Sprites, but want to replace the tile itself with a floor tile or similar once converted. + * @param indexes The tile index, or array of indexes, to create Sprites from. + * @param replacements The tile index, or array of indexes, to change a converted + * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a + * one-to-one mapping with the indexes array. + * @param spriteConfig The config object to pass into the Sprite creator (i.e. + * scene.make.sprite). + * @param scene The Scene to create the Sprites within. Default scene the map is within. + * @param camera The Camera to use when determining the world XY Default main camera. + */ + createFromTiles(indexes: integer | any[], replacements: integer | any[], spriteConfig: object, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[]; + + /** + * Returns the tiles in the given layer that are within the cameras viewport. + * This is used internally. + * @param camera The Camera to run the cull check against. + */ + cull(camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Destroys this StaticTilemapLayer and removes its link to the associated LayerData. + */ + destroy(): void; + + /** + * Searches the entire map layer for the first tile matching the given index, then returns that Tile + * object. If no match is found, it returns null. The search starts from the top-left tile and + * continues horizontally until it hits the end of the row, then it drops down to the next column. + * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to + * the top-left. + * @param index The tile index value to search for. + * @param skip The number of times to skip a matching tile before returning. Default 0. + * @param reverse If true it will scan the layer in reverse, starting at the + * bottom-right. Otherwise it scans from the top-left. Default false. + */ + findByIndex(index: integer, skip?: integer, reverse?: boolean): Phaser.Tilemaps.Tile; + + /** + * Find the first tile in the given rectangular area (in tile coordinates) of the layer that + * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns + * true. Similar to Array.prototype.find in vanilla JS. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + */ + findTile(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object): Phaser.Tilemaps.Tile; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns + * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. The callback should return true for tiles that pass the + * filter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + */ + filterTiles(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object): Phaser.Tilemaps.Tile[]; + + /** + * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given + * callback. Similar to Array.prototype.forEach in vanilla JS. + * @param callback The callback. Each tile in the given area will be passed to this + * callback as the first and only parameter. + * @param context The context under which the callback should be run. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide + * on at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + */ + forEachTile(callback: Function, context?: object, tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Gets a tile at the given tile coordinates from the given layer. + * @param tileX X position to get the tile from (given in tile units, not pixels). + * @param tileY Y position to get the tile from (given in tile units, not pixels). + * @param nonNull If true getTile won't return null for empty tiles, but a Tile + * object with an index of -1. Default false. + */ + getTileAt(tileX: integer, tileY: integer, nonNull?: boolean): Phaser.Tilemaps.Tile; + + /** + * Gets a tile at the given world coordinates from the given layer. + * @param worldX X position to get the tile from (given in pixels) + * @param worldY Y position to get the tile from (given in pixels) + * @param nonNull If true, function won't return null for empty tiles, but a Tile + * object with an index of -1. Default false. + * @param camera [description] Default main camera. + */ + getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile; + + /** + * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. + * @param tileX [description] Default 0. + * @param tileY [description] Default 0. + * @param width [description] Default max width based on tileX. + * @param height [description] Default max height based on tileY. + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + */ + getTilesWithin(tileX?: integer, tileY?: integer, width?: integer, height?: integer, filteringOptions?: object): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles in the given rectangular area (in world coordinates) of the layer. + * @param worldX [description] + * @param worldY [description] + * @param width [description] + * @param height [description] + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param camera [description] Default main camera. + */ + getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: object, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle, + * Line, Rectangle or Triangle. The shape should be in world coordinates. + * @param shape A shape in world (pixel) coordinates + * @param filteringOptions Optional filters to apply when getting the tiles. + * @param filteringOptions.isNotEmpty If true, only return tiles that don't have + * -1 for an index. Default false. + * @param filteringOptions.isColliding If true, only return tiles that collide on + * at least one side. Default false. + * @param filteringOptions.hasInterestingFace If true, only return tiles that + * have at least one interesting face. Default false. + * @param camera [description] Default main camera. + */ + getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: object, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[]; + + /** + * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * @param tileX [description] + * @param tileY [description] + */ + hasTileAt(tileX: integer, tileY: integer): boolean; + + /** + * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns + * false if there is no tile or if the tile at that location has an index of -1. + * @param worldX [description] + * @param worldY [description] + * @param camera [description] Default main camera. + */ + hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera): boolean; + + /** + * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to + * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles + * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation + * wherever you want on the screen. + * @param graphics The target Graphics object to draw upon. + * @param styleConfig An object specifying the colors to use for the debug drawing. + * @param styleConfig.tileColor Color to use for drawing a filled rectangle at + * non-colliding tile locations. If set to null, non-colliding tiles will not be drawn. Default blue. + * @param styleConfig.collidingTileColor Color to use for drawing a filled + * rectangle at colliding tile locations. If set to null, colliding tiles will not be drawn. Default orange. + * @param styleConfig.faceColor Color to use for drawing a line at interesting + * tile faces. If set to null, interesting tile faces will not be drawn. Default grey. + */ + renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: object): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on the given tile or tiles within a layer by index. You can pass in either a + * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if + * collision will be enabled (true) or disabled (false). + * @param indexes Either a single tile index, or an array of tile indexes. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollision(indexes: integer | any[], collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on a range of tiles in a layer whose index is between the specified `start` and + * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set + * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be + * enabled (true) or disabled (false). + * @param start The first index of the tile to be set for collision. + * @param stop The last index of the tile to be set for collision. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionBetween(start: integer, stop: integer, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property + * that matches the given properties object, its collision flag will be set. The `collides` + * parameter controls if collision will be enabled (true) or disabled (false). Passing in + * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that + * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can + * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a + * "types" property that matches any of those values, its collision flag will be updated. + * @param properties An object with tile properties and corresponding values that should + * be checked. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on all tiles in the given layer, except for tiles that have an index specified in + * the given array. The `collides` parameter controls if collision will be enabled (true) or + * disabled (false). + * @param indexes An array of the tile indexes to not be counted for collision. + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionByExclusion(indexes: integer[], collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets a global collision callback for the given tile index within the layer. This will affect all + * tiles on this layer that have the same index. If a callback is already set for the tile index it + * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile + * at a specific location on the map then see setTileLocationCallback. + * @param indexes Either a single tile index, or an array of tile indexes to have a + * collision callback set for. + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + */ + setTileIndexCallback(indexes: integer | any[], callback: Function, callbackContext: object): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets collision on the tiles within a layer by checking each tiles collision group data + * (typically defined in Tiled within the tileset collision editor). If any objects are found within + * a tiles collision group, the tile's colliding information will be set. The `collides` parameter + * controls if collision will be enabled (true) or disabled (false). + * @param collides If true it will enable collision. If false it will clear + * collision. Default true. + * @param recalculateFaces Whether or not to recalculate the tile faces after the + * update. Default true. + */ + setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. + * If a callback is already set for the tile index it will be replaced. Set the callback to null to + * remove it. + * @param tileX [description] + * @param tileY [description] + * @param width [description] + * @param height [description] + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + */ + setTileLocationCallback(tileX: integer, tileY: integer, width: integer, height: integer, callback: Function, callbackContext?: object): Phaser.Tilemaps.StaticTilemapLayer; + + /** + * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the + * layers position, scale and scroll. + * @param tileX [description] + * @param camera [description] Default main camera. + */ + tileToWorldX(tileX: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the + * layers position, scale and scroll. + * @param tileY [description] + * @param camera [description] Default main camera. + */ + tileToWorldY(tileY: integer, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * @param tileX [description] + * @param tileY [description] + * @param point [description] + * @param camera [description] Default main camera. + */ + tileToWorldXY(tileX: integer, tileY: integer, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; + + /** + * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the + * layers position, scale and scroll. + * @param worldX [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param camera [description] Default main camera. + */ + worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the + * layers position, scale and scroll. + * @param worldY [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param camera [description] Default main camera. + */ + worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number; + + /** + * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the + * layers position, scale and scroll. This will return a new Vector2 object or update the given + * `point` object. + * @param worldX [description] + * @param worldY [description] + * @param snapToFloor Whether or not to round the tile coordinate down to the + * nearest integer. Default true. + * @param point [description] + * @param camera [description] Default main camera. + */ + worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2; + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + */ + clearAlpha(): this; + + /** + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1. + * @param topRight The alpha value used for the top-right of the Game Object. WebGL only. + * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only. + */ + setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this; + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + */ + alpha: number; + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopLeft: number; + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaTopRight: number; + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomLeft: number; + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + */ + alphaBottomRight: number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + */ + blendMode: Phaser.BlendModes | string; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * ADD + * * MULTIPLY + * * SCREEN + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. + * @param value The BlendMode value. Either a string or a CONST. + */ + setBlendMode(value: string | Phaser.BlendModes): this; + + /** + * The native (un-scaled) width of this Game Object. + */ + width: number; + + /** + * The native (un-scaled) height of this Game Object. + */ + height: number; + + /** + * The displayed width of this Game Object. + * This value takes into account the scale factor. + */ + displayWidth: number; + + /** + * The displayed height of this Game Object. + * This value takes into account the scale factor. + */ + displayHeight: number; + + /** + * Sets the size of this Game Object. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setSize(width: number, height: number): this; + + /** + * Sets the display size of this Game Object. + * Calling this will adjust the scale. + * @param width The width of this Game Object. + * @param height The height of this Game Object. + */ + setDisplaySize(width: number, height: number): this; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + */ + depth: number; + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * @param value The depth of this Game Object. + */ + setDepth(value: integer): this; + + /** + * The horizontally flipped state of the Game Object. + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipX: boolean; + + /** + * The vertically flipped state of the Game Object. + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + */ + flipY: boolean; + + /** + * Toggles the horizontal flipped state of this Game Object. + */ + toggleFlipX(): this; + + /** + * Toggles the vertical flipped state of this Game Object. + */ + toggleFlipY(): this; + + /** + * Sets the horizontal flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipX(value: boolean): this; + + /** + * Sets the vertical flipped state of this Game Object. + * @param value The flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlipY(value: boolean): this; + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param y The horizontal flipped state. `false` for no flip, or `true` to be flipped. + */ + setFlip(x: boolean, y: boolean): this; + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + */ + resetFlip(): this; + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + */ + getCenter(output?: O): O; + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getTopRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomLeft(output?: O, includeParent?: boolean): O; + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * @param output An object to store the values in. If not provided a new Vector2 will be created. + * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false. + */ + getBottomRight(output?: O, includeParent?: boolean): O; + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * @param output An object to store the values in. If not provided a new Rectangle will be created. + */ + getBounds(output?: O): O; + + /** + * The horizontal origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the left of the Game Object. + */ + originX: number; + + /** + * The vertical origin of this Game Object. + * The origin maps the relationship between the size and position of the Game Object. + * The default value is 0.5, meaning all Game Objects are positioned based on their center. + * Setting the value to 0 means the position now relates to the top of the Game Object. + */ + originY: number; + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginX: number; + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + */ + displayOriginY: number; + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * @param x The horizontal origin value. Default 0.5. + * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x. + */ + setOrigin(x?: number, y?: number): this; + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + */ + setOriginFromFrame(): this; + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * @param x The horizontal display origin value. Default 0. + * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x. + */ + setDisplayOrigin(x?: number, y?: number): this; + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + */ + updateDisplayOrigin(): this; + + /** + * The initial WebGL pipeline of this Game Object. + */ + defaultPipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * The current WebGL pipeline of this Game Object. + */ + pipeline: Phaser.Renderer.WebGL.WebGLPipeline; + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * This should only be called during the instantiation of the Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + initPipeline(pipelineName: string): boolean; + + /** + * Sets the active WebGL Pipeline of this Game Object. + * @param pipelineName The name of the pipeline to set on this Game Object. + */ + setPipeline(pipelineName: string): this; + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + */ + resetPipeline(): boolean; + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + */ + getPipelineName(): string; + + /** + * The Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + */ + scaleMode: Phaser.ScaleModes; + + /** + * Sets the Scale Mode being used by this Game Object. + * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. + * @param value The Scale Mode to be used by this Game Object. + */ + setScaleMode(value: Phaser.ScaleModes): this; + + /** + * The x position of this Game Object. + */ + x: number; + + /** + * The y position of this Game Object. + */ + y: number; + + /** + * The z position of this Game Object. + * Note: Do not use this value to set the z-index, instead see the `depth` property. + */ + z: number; + + /** + * The w position of this Game Object. + */ + w: number; + + /** + * The horizontal scale of this Game Object. + */ + scaleX: number; + + /** + * The vertical scale of this Game Object. + */ + scaleY: number; + + /** + * The angle of this Game Object as expressed in degrees. + * + * Where 0 is to the right, 90 is down, 180 is left. + * + * If you prefer to work in radians, see the `rotation` property instead. + */ + angle: integer; + + /** + * The angle of this Game Object in radians. + * + * If you prefer to work in degrees, see the `angle` property instead. + */ + rotation: number; + + /** + * Sets the position of this Game Object. + * @param x The x position of this Game Object. Default 0. + * @param y The y position of this Game Object. If not set it will use the `x` value. Default x. + * @param z The z position of this Game Object. Default 0. + * @param w The w position of this Game Object. Default 0. + */ + setPosition(x?: number, y?: number, z?: number, w?: number): this; + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * @param x The x position of the top-left of the random area. Default 0. + * @param y The y position of the top-left of the random area. Default 0. + * @param width The width of the random area. + * @param height The height of the random area. + */ + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + + /** + * Sets the rotation of this Game Object. + * @param radians The rotation of this Game Object, in radians. Default 0. + */ + setRotation(radians?: number): this; + + /** + * Sets the angle of this Game Object. + * @param degrees The rotation of this Game Object, in degrees. Default 0. + */ + setAngle(degrees?: number): this; + + /** + * Sets the scale of this Game Object. + * @param x The horizontal scale of this Game Object. + * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. + */ + setScale(x: number, y?: number): this; + + /** + * Sets the x position of this Game Object. + * @param value The x position of this Game Object. Default 0. + */ + setX(value?: number): this; + + /** + * Sets the y position of this Game Object. + * @param value The y position of this Game Object. Default 0. + */ + setY(value?: number): this; + + /** + * Sets the z position of this Game Object. + * @param value The z position of this Game Object. Default 0. + */ + setZ(value?: number): this; + + /** + * Sets the w position of this Game Object. + * @param value The w position of this Game Object. Default 0. + */ + setW(value?: number): this; + + /** + * Gets the local transform matrix for this Game Object. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * @param tempMatrix The matrix to populate with the values from this Game Object. + */ + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + */ + visible: boolean; + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * @param value The visible state of the Game Object. + */ + setVisible(value: boolean): this; + + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + } + + } + + namespace Time { + /** + * [description] + */ + class Clock { + /** + * + * @param scene [description] + */ + constructor(scene: Phaser.Scene); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + systems: Phaser.Scenes.Systems; + + /** + * [description] + */ + now: number; + + /** + * [description] + */ + timeScale: number; + + /** + * [description] + */ + paused: boolean; + + /** + * [description] + * @param config [description] + */ + addEvent(config: TimerEventConfig): Phaser.Time.TimerEvent; + + /** + * [description] + * @param delay [description] + * @param callback [description] + * @param args [description] + * @param callbackScope [description] + */ + delayedCall(delay: number, callback: Function, args: any[], callbackScope: any): Phaser.Time.TimerEvent; + + /** + * [description] + */ + clearPendingEvents(): Phaser.Time.Clock; + + /** + * [description] + */ + removeAllEvents(): Phaser.Time.Clock; + + /** + * [description] + * @param time [description] + * @param delta [description] + */ + preUpdate(time: number, delta: number): void; + + /** + * [description] + * @param time [description] + * @param delta [description] + */ + update(time: number, delta: number): void; + + } + + /** + * [description] + */ + class TimerEvent { + /** + * + * @param config [description] + */ + constructor(config: TimerEventConfig); + + /** + * The delay in ms at which this TimerEvent fires. + */ + readonly delay: number; + + /** + * The total number of times this TimerEvent will repeat before finishing. + */ + readonly repeat: number; + + /** + * If repeating this contains the current repeat count. + */ + repeatCount: number; + + /** + * True if this TimerEvent loops, otherwise false. + */ + readonly loop: boolean; + + /** + * The callback that will be called when the TimerEvent occurs. + */ + callback: Function; + + /** + * The scope in which the callback will be called. + */ + callbackScope: object; + + /** + * Additional arguments to be passed to the callback. + */ + args: any[]; + + /** + * Scale the time causing this TimerEvent to update. + */ + timeScale: number; + + /** + * Start this many MS into the elapsed (useful if you want a long duration with repeat, but for the first loop to fire quickly) + */ + startAt: number; + + /** + * [description] + */ + elapsed: number; + + /** + * [description] + */ + paused: boolean; + + /** + * [description] + */ + hasDispatched: boolean; + + /** + * [description] + * @param config [description] + */ + reset(config: TimerEventConfig): Phaser.Time.TimerEvent; + + /** + * Gets the progress of the current iteration, not factoring in repeats. + */ + getProgress(): number; + + /** + * Gets the progress of the timer overall, factoring in repeats. + */ + getOverallProgress(): number; + + /** + * [description] + */ + getRepeatCount(): number; + + /** + * [description] + */ + getElapsed(): number; + + /** + * [description] + */ + getElapsedSeconds(): number; + + /** + * [description] + * @param dispatchCallback [description] + */ + remove(dispatchCallback: Function): void; + + /** + * [description] + */ + destroy(): void; + + } + + } + + namespace Tweens { + /** + * [description] + */ + class Timeline extends Phaser.Events.EventEmitter { + /** + * + * @param manager [description] + */ + constructor(manager: Phaser.Tweens.TweenManager); + + /** + * [description] + */ + manager: Phaser.Tweens.TweenManager; + + /** + * [description] + */ + isTimeline: boolean; + + /** + * An array of Tween objects, each containing a unique property and target being tweened. + */ + data: any[]; + + /** + * data array doesn't usually change, so we can cache the length + */ + totalData: number; + + /** + * If true then duration, delay, etc values are all frame totals. + */ + useFrames: boolean; + + /** + * Scales the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on. + * Value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only. + */ + timeScale: number; + + /** + * Loop this tween? Can be -1 for an infinite loop, or an integer. + * When enabled it will play through ALL TweenDatas again (use TweenData.repeat to loop a single TD) + */ + loop: number; + + /** + * Time in ms/frames before the tween loops. + */ + loopDelay: number; + + /** + * How many loops are left to run? + */ + loopCounter: number; + + /** + * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = true (as it never completes) + */ + completeDelay: number; + + /** + * Countdown timer (used by loopDelay and completeDelay) + */ + countdown: number; + + /** + * The current state of the tween + */ + state: integer; + + /** + * Does the Tween start off paused? (if so it needs to be started with Tween.play) + */ + paused: boolean; + + /** + * Elapsed time in ms/frames of this run through the Tween. + */ + elapsed: number; + + /** + * Total elapsed time in ms/frames of the entire Tween, including looping. + */ + totalElapsed: number; + + /** + * Time in ms/frames for the whole Tween to play through once, excluding loop amounts and loop delays. + */ + duration: number; + + /** + * Value between 0 and 1. The amount through the Tween, excluding loops. + */ + progress: number; + + /** + * Time in ms/frames for all Tweens to complete (including looping) + */ + totalDuration: number; + + /** + * Value between 0 and 1. The amount through the entire Tween, including looping. + */ + totalProgress: number; + + /** + * [description] + * @param value [description] + */ + setTimeScale(value: number): Phaser.Tweens.Timeline; + + /** + * [description] + */ + getTimeScale(): number; + + /** + * [description] + */ + isPlaying(): boolean; + + /** + * [description] + * @param config [description] + */ + add(config: object): Phaser.Tweens.Timeline; + + /** + * [description] + * @param tween [description] + */ + queue(tween: Phaser.Tweens.Tween): Phaser.Tweens.Timeline; + + /** + * [description] + * @param tween [description] + */ + hasOffset(tween: Phaser.Tweens.Tween): boolean; + + /** + * [description] + * @param value [description] + */ + isOffsetAbsolute(value: number): boolean; + + /** + * [description] + * @param value [description] + */ + isOffsetRelative(value: string): boolean; + + /** + * [description] + * @param value [description] + * @param base [description] + */ + getRelativeOffset(value: string, base: number): number; + + /** + * [description] + */ + calcDuration(): void; + + /** + * [description] + */ + init(): boolean; + + /** + * [description] + * @param resetFromLoop [description] + */ + resetTweens(resetFromLoop: boolean): void; + + /** + * [description] + * @param type [description] + * @param callback [description] + * @param params [description] + * @param scope [description] + */ + setCallback(type: string, callback: Function, params?: any[], scope?: object): Phaser.Tweens.Timeline; + + /** + * Delegates #makeActive to the Tween manager. + * @param tween The tween object to make active. + */ + makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + + /** + * [description] + */ + play(): void; + + /** + * [description] + */ + nextState(): void; + + /** + * Returns 'true' if this Timeline has finished and should be removed from the Tween Manager. + * Otherwise, returns false. + * @param timestamp [description] + * @param delta [description] + */ + update(timestamp: number, delta: number): boolean; + + /** + * Stops the Tween immediately, whatever stage of progress it is at and flags it for removal by the TweenManager. + */ + stop(): void; + + /** + * [description] + */ + pause(): Phaser.Tweens.Timeline; + + /** + * [description] + */ + resume(): Phaser.Tweens.Timeline; + + /** + * [description] + * @param target [description] + */ + hasTarget(target: object): boolean; + + /** + * [description] + */ + destroy(): void; + + } + + /** + * [description] + */ + class TweenManager { + /** + * + * @param scene [description] + */ + constructor(scene: Phaser.Scene); + + /** + * [description] + */ + scene: Phaser.Scene; + + /** + * [description] + */ + systems: Phaser.Scenes.Systems; + + /** + * [description] + */ + timeScale: number; + + /** + * Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists. + * @param config [description] + */ + createTimeline(config: object): Phaser.Tweens.Timeline; + + /** + * Create a Tween Timeline and add it to the active Tween list/ + * @param config [description] + */ + timeline(config: object): Phaser.Tweens.Timeline; + + /** + * Create a Tween and return it, but do NOT add it to the active or pending Tween lists. + * @param config [description] + */ + create(config: object): Phaser.Tweens.Tween; + + /** + * Create a Tween and add it to the active Tween list. + * @param config [description] + */ + add(config: object): Phaser.Tweens.Tween; + + /** + * Add an existing tween into the active Tween list. + * @param tween [description] + */ + existing(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + + /** + * Create a Tween and add it to the active Tween list. + * @param config [description] + */ + addCounter(config: object): Phaser.Tweens.Tween; + + /** + * [description] + */ + preUpdate(): void; + + /** + * [description] + * @param timestamp [description] + * @param delta [description] + */ + update(timestamp: number, delta: number): void; + + /** + * [description] + * @param tween [description] + */ + makeActive(tween: Phaser.Tweens.Tween): Phaser.Tweens.TweenManager; + + /** + * Passes all Tweens to the given callback. + * @param callback [description] + * @param scope [description] + * @param args [description] + */ + each(callback: Function, scope?: object, ...args: any[]): void; + + /** + * [description] + */ + getAllTweens(): Phaser.Tweens.Tween[]; + + /** + * [description] + */ + getGlobalTimeScale(): number; + + /** + * [description] + * @param target [description] + */ + getTweensOf(target: object | any[]): Phaser.Tweens.Tween[]; + + /** + * [description] + * @param target [description] + */ + isTweening(target: object): boolean; + + /** + * [description] + */ + killAll(): Phaser.Tweens.TweenManager; + + /** + * [description] + * @param target [description] + */ + killTweensOf(target: object | any[]): Phaser.Tweens.TweenManager; + + /** + * [description] + */ + pauseAll(): Phaser.Tweens.TweenManager; + + /** + * [description] + */ + resumeAll(): Phaser.Tweens.TweenManager; + + /** + * [description] + * @param value [description] + */ + setGlobalTimeScale(value: number): Phaser.Tweens.TweenManager; + + /** + * The Scene that owns this plugin is shutting down. + * We need to kill and reset all internal properties as well as stop listening to Scene events. + */ + shutdown(): void; + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + */ + destroy(): void; + + } + + namespace Builders { + /** + * [description] + * @param source [description] + * @param key [description] + * @param defaultValue [description] + */ + function GetBoolean(source: object, key: string, defaultValue: any): any; + + /** + * [description] + * @param ease [description] + * @param easeParams [description] + */ + function GetEaseFunction(ease: string | Function, easeParams: any[]): Function; + + /** + * [description] + * @param source [description] + * @param key [description] + * @param defaultValue [description] + */ + function GetNewValue(source: object, key: string, defaultValue: any): Function; + + /** + * [description] + * @param config [description] + */ + function GetProps(config: object): any[]; + + /** + * [description] + * @param config [description] + */ + function GetTargets(config: object): any[]; + + /** + * [description] + * @param config [description] + */ + function GetTweens(config: object): any[]; + + /** + * [description] + * @param key [description] + * @param propertyValue [description] + */ + function GetValueOp(key: string, propertyValue: any): Function; + + /** + * [description] + * @param parent [description] + * @param config [description] + * @param defaults [description] + */ + function NumberTweenBuilder(parent: Phaser.Tweens.TweenManager | Phaser.Tweens.Timeline, config: object, defaults: Phaser.Tweens.TweenConfigDefaults): Phaser.Tweens.Tween; + + /** + * [description] + * @param manager [description] + * @param config [description] + */ + function TimelineBuilder(manager: Phaser.Tweens.TweenManager, config: object): Phaser.Tweens.Timeline; + + /** + * [description] + * @param parent [description] + * @param config [description] + * @param defaults [description] + */ + function TweenBuilder(parent: Phaser.Tweens.TweenManager | Phaser.Tweens.Timeline, config: object, defaults: Phaser.Tweens.TweenConfigDefaults): Phaser.Tweens.Tween; + + } + + type TweenConfigDefaults = { + /** + * [description] + */ + targets: object | object[]; + /** + * [description] + */ + delay?: number; + /** + * [description] + */ + duration?: number; + /** + * [description] + */ + ease?: string; + /** + * [description] + */ + easeParams?: any[]; + /** + * [description] + */ + hold?: number; + /** + * [description] + */ + repeat?: number; + /** + * [description] + */ + repeatDelay?: number; + /** + * [description] + */ + yoyo?: boolean; + /** + * [description] + */ + flipX?: boolean; + /** + * [description] + */ + flipY?: boolean; + }; + + /** + * [description] + */ + class Tween { + /** + * + * @param parent [description] + * @param data [description] + * @param targets [description] + */ + constructor(parent: Phaser.Tweens.TweenManager | Phaser.Tweens.Timeline, data: Phaser.Tweens.TweenDataConfig[], targets: any[]); + + /** + * [description] + */ + parent: Phaser.Tweens.TweenManager | Phaser.Tweens.Timeline; + + /** + * Is the parent of this Tween a Timeline? + */ + parentIsTimeline: boolean; + + /** + * An array of TweenData objects, each containing a unique property and target being tweened. + */ + data: Phaser.Tweens.TweenDataConfig[]; + + /** + * data array doesn't change, so we can cache the length + */ + totalData: integer; + + /** + * An array of references to the target/s this Tween is operating on + */ + targets: object[]; + + /** + * Cached target total (not necessarily the same as the data total) + */ + totalTargets: integer; + + /** + * If true then duration, delay, etc values are all frame totals. + */ + useFrames: boolean; + + /** + * Scales the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on. + * Value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only. + */ + timeScale: number; + + /** + * Loop this tween? Can be -1 for an infinite loop, or an integer. + * When enabled it will play through ALL TweenDatas again (use TweenData.repeat to loop a single TD) + */ + loop: number; + + /** + * Time in ms/frames before the tween loops. + */ + loopDelay: number; + + /** + * How many loops are left to run? + */ + loopCounter: number; + + /** + * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = -1 (as it never completes) + */ + completeDelay: number; + + /** + * Countdown timer (used by timeline offset, loopDelay and completeDelay) + */ + countdown: number; + + /** + * Set only if this Tween is part of a Timeline. + */ + offset: number; + + /** + * Set only if this Tween is part of a Timeline. The calculated offset amount. + */ + calculatedOffset: number; + + /** + * The current state of the tween + */ + state: integer; + + /** + * Does the Tween start off paused? (if so it needs to be started with Tween.play) + */ + paused: boolean; + + /** + * Elapsed time in ms/frames of this run through the Tween. + */ + elapsed: number; + + /** + * Total elapsed time in ms/frames of the entire Tween, including looping. + */ + totalElapsed: number; + + /** + * Time in ms/frames for the whole Tween to play through once, excluding loop amounts and loop delays. + */ + duration: number; + + /** + * Value between 0 and 1. The amount through the Tween, excluding loops. + */ + progress: number; + + /** + * Time in ms/frames for the Tween to complete (including looping) + */ + totalDuration: number; + + /** + * Value between 0 and 1. The amount through the entire Tween, including looping. + */ + totalProgress: number; + + /** + * An object containing the various Tween callback references. + */ + callbacks: object; + + /** + * [description] + */ + getValue(): number; + + /** + * [description] + * @param value [description] + */ + setTimeScale(value: number): Phaser.Tweens.Tween; + + /** + * [description] + */ + getTimeScale(): number; + + /** + * [description] + */ + isPlaying(): boolean; + + /** + * [description] + */ + isPaused(): boolean; + + /** + * [description] + * @param target [description] + */ + hasTarget(target: object): boolean; + + /** + * [description] + * @param key [description] + * @param value [description] + * @param startToCurrent [description] + */ + updateTo(key: string, value: any, startToCurrent: boolean): Phaser.Tweens.Tween; + + /** + * [description] + */ + restart(): void; + + /** + * [description] + */ + calcDuration(): void; + + /** + * Called by TweenManager.preUpdate as part of its loop to check pending and active tweens. + * Should not be called directly. + */ + init(): boolean; + + /** + * [description] + */ + nextState(): void; + + /** + * [description] + */ + pause(): Phaser.Tweens.Tween; + + /** + * [description] + * @param resetFromTimeline [description] + */ + play(resetFromTimeline: boolean): void; + + /** + * [description] + * @param resetFromLoop [description] + */ + resetTweenData(resetFromLoop: boolean): void; + + /** + * [description] + */ + resume(): Phaser.Tweens.Tween; + + /** + * [description] + * @param toPosition A value between 0 and 1. + */ + seek(toPosition: number): void; + + /** + * [description] + * @param type [description] + * @param callback [description] + * @param params [description] + * @param scope [description] + */ + setCallback(type: string, callback: Function, params?: any[], scope?: object): Phaser.Tweens.Tween; + + /** + * Flags the Tween as being complete, whatever stage of progress it is at. + * + * If an onComplete callback has been defined it will automatically invoke it, unless a `delay` + * argument is provided, in which case the Tween will delay for that period of time before calling the callback. + * + * If you don't need a delay, or have an onComplete callback, then call `Tween.stop` instead. + * @param delay The time to wait before invoking the complete callback. If zero it will fire immediately. Default 0. + */ + complete(delay?: number): void; + + /** + * Stops the Tween immediately, whatever stage of progress it is at and flags it for removal by the TweenManager. + * @param resetTo A value between 0 and 1. + */ + stop(resetTo?: number): void; + + /** + * [description] + * @param timestamp [description] + * @param delta [description] + */ + update(timestamp: number, delta: number): boolean; + + /** + * [description] + * @param tween [description] + * @param tweenData [description] + * @param diff [description] + */ + setStateFromEnd(tween: Phaser.Tweens.Tween, tweenData: Phaser.Tweens.TweenDataConfig, diff: number): integer; + + /** + * Was PLAYING_BACKWARD and has hit the start. + * @param tween [description] + * @param tweenData [description] + * @param diff [description] + */ + setStateFromStart(tween: Phaser.Tweens.Tween, tweenData: Phaser.Tweens.TweenDataConfig, diff: number): integer; + + /** + * [description] + * @param tween [description] + * @param tweenData [description] + * @param delta Either a value in ms, or 1 if Tween.useFrames is true + */ + updateTweenData(tween: Phaser.Tweens.Tween, tweenData: Phaser.Tweens.TweenDataConfig, delta: number): boolean; + + } + + type TweenDataConfig = { + /** + * The target to tween. + */ + target: object; + /** + * The property of the target being tweened. + */ + key: string; + /** + * The returned value sets what the property will be at the END of the Tween. + */ + getEndValue: Function; + /** + * The returned value sets what the property will be at the START of the Tween. + */ + getStartValue: Function; + /** + * The ease function this tween uses. + */ + ease: Function; + /** + * Duration of the tween in ms/frames, excludes time for yoyo or repeats. + */ + duration?: number; + /** + * The total calculated duration of this TweenData (based on duration, repeat, delay and yoyo) + */ + totalDuration?: number; + /** + * Time in ms/frames before tween will start. + */ + delay?: number; + /** + * Cause the tween to return back to its start value after hold has expired. + */ + yoyo?: boolean; + /** + * Time in ms/frames the tween will pause before running the yoyo or starting a repeat. + */ + hold?: number; + /** + * Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice. + */ + repeat?: integer; + /** + * Time in ms/frames before the repeat will start. + */ + repeatDelay?: number; + /** + * Automatically call toggleFlipX when the TweenData yoyos or repeats + */ + flipX?: boolean; + /** + * Automatically call toggleFlipY when the TweenData yoyos or repeats + */ + flipY?: boolean; + /** + * Between 0 and 1 showing completion of this TweenData. + */ + progress?: number; + /** + * Delta counter + */ + elapsed?: number; + /** + * How many repeats are left to run? + */ + repeatCounter?: integer; + /** + * Ease value data. + */ + start?: number; + /** + * Ease value data. + */ + current?: number; + /** + * Ease value data. + */ + end?: number; + /** + * Time duration 1. + */ + t1?: number; + /** + * Time duration 2. + */ + t2?: number; + /** + * LoadValue generation functions. + */ + gen?: TweenDataGenConfig; + /** + * TWEEN_CONST.CREATED + */ + state?: integer; + }; + + /** + * [description] + * @param target [description] + * @param key [description] + * @param getEnd [description] + * @param getStart [description] + * @param ease [description] + * @param delay [description] + * @param duration [description] + * @param yoyo [description] + * @param hold [description] + * @param repeat [description] + * @param repeatDelay [description] + * @param flipX [description] + * @param flipY [description] + */ + function TweenData(target: object, key: string, getEnd: Function, getStart: Function, ease: Function, delay: number, duration: number, yoyo: boolean, hold: number, repeat: number, repeatDelay: number, flipX: boolean, flipY: boolean): TweenDataConfig; + + /** + * TweenData state. + */ + var CREATED: integer; + + /** + * TweenData state. + */ + var INIT: integer; + + /** + * TweenData state. + */ + var DELAY: integer; + + /** + * TweenData state. + */ + var OFFSET_DELAY: integer; + + /** + * TweenData state. + */ + var PENDING_RENDER: integer; + + /** + * TweenData state. + */ + var PLAYING_FORWARD: integer; + + /** + * TweenData state. + */ + var PLAYING_BACKWARD: integer; + + /** + * TweenData state. + */ + var HOLD_DELAY: integer; + + /** + * TweenData state. + */ + var REPEAT_DELAY: integer; + + /** + * TweenData state. + */ + var COMPLETE: integer; + + /** + * Tween state. + */ + var PENDING_ADD: integer; + + /** + * Tween state. + */ + var PAUSED: integer; + + /** + * Tween state. + */ + var LOOP_DELAY: integer; + + /** + * Tween state. + */ + var ACTIVE: integer; + + /** + * Tween state. + */ + var COMPLETE_DELAY: integer; + + /** + * Tween state. + */ + var PENDING_REMOVE: integer; + + /** + * Tween state. + */ + var REMOVED: integer; + + } + + namespace Utils { + /** + * A NOOP (No Operation) callback function. + * + * Used internally by Phaser when it's more expensive to determine if a callback exists + * than it is to just invoke an empty function. + */ + function NOOP(): void; + + namespace Array { + /** + * Adds the given item, or array of items, to the array. + * + * Each item must be unique within the array. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * @param array The array to be added to. + * @param item The item, or array of items, to add to the array. Each item must be unique within the array. + * @param limit Optional limit which caps the size of the array. + * @param callback A callback to be invoked for each item successfully added to the array. + * @param context The context in which the callback is invoked. + */ + function Add(array: any[], item: any | any[], limit?: integer, callback?: Function, context?: object): any[]; + + /** + * Adds the given item, or array of items, to the array starting at the index specified. + * + * Each item must be unique within the array. + * + * Existing elements in the array are shifted up. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * @param array The array to be added to. + * @param item The item, or array of items, to add to the array. + * @param index The index in the array where the item will be inserted. Default 0. + * @param limit Optional limit which caps the size of the array. + * @param callback A callback to be invoked for each item successfully added to the array. + * @param context The context in which the callback is invoked. + */ + function AddAt(array: any[], item: any | any[], index?: integer, limit?: integer, callback?: Function, context?: object): any[]; + + /** + * Moves the given element to the top of the array. + * The array is modified in-place. + * @param array The array. + * @param item The element to move. + */ + function BringToTop(array: any[], item: any): any; + + /** + * Returns the total number of elements in the array which have a property matching the given value. + * @param array The array to search. + * @param property The property to test on each array element. + * @param value The value to test the property against. Must pass a strict (`===`) comparison check. + * @param startIndex An optional start index to search from. + * @param endIndex An optional end index to search to. + */ + function CountAllMatching(array: any[], property: string, value: any, startIndex?: integer, endIndex?: integer): integer; + + /** + * Passes each element in the array to the given callback. + * @param array The array to search. + * @param callback A callback to be invoked for each item in the array. + * @param context The context in which the callback is invoked. + * @param args Additional arguments that will be passed to the callback, after the current array item. + */ + function Each(array: any[], callback: Function, context: object, ...args: any[]): any[]; + + /** + * Passes each element in the array, between the start and end indexes, to the given callback. + * @param array The array to search. + * @param callback A callback to be invoked for each item in the array. + * @param context The context in which the callback is invoked. + * @param startIndex The start index to search from. + * @param endIndex The end index to search to. + * @param args Additional arguments that will be passed to the callback, after the child. + */ + function EachInRange(array: any[], callback: Function, context: object, startIndex: integer, endIndex: integer, ...args: any[]): any[]; + + /** + * [description] + * @param value The value to search for in the array. + * @param array The array to search, which must be sorted. + * @param key An optional property key. If specified the array elements property will be checked against value. + */ + function FindClosestInSorted(value: number, array: any[], key?: string): number | object; + + /** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * @param array The array to search. + * @param property The property to test on each array element. + * @param value The value to test the property against. Must pass a strict (`===`) comparison check. + * @param startIndex An optional start index to search from. + * @param endIndex An optional end index to search to. + */ + function GetAll(array: any[], property?: string, value?: any, startIndex?: integer, endIndex?: integer): any[]; + + /** + * Returns the first element in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. + * @param array The array to search. + * @param property The property to test on each array element. + * @param value The value to test the property against. Must pass a strict (`===`) comparison check. + * @param startIndex An optional start index to search from. Default 0. + * @param endIndex An optional end index to search up to (but not included) Default array.length. + */ + function GetFirst(array: any[], property?: string, value?: any, startIndex?: integer, endIndex?: integer): object; + + /** + * Returns a Random element from the array. + * @param array The array to select the random entry from. + * @param startIndex An optional start index. Default 0. + * @param length An optional length, the total number of elements (from the startIndex) to choose from. Default array.length. + */ + function GetRandom(array: any[], startIndex?: integer, length?: integer): any; + + /** + * Moves the given array element down one place in the array. + * The array is modified in-place. + * @param array The input array. + * @param item The element to move down the array. + */ + function MoveDown(array: any[], item: any): any[]; + + /** + * Moves an element in an array to a new position within the same array. + * The array is modified in-place. + * @param array The array. + * @param item The element to move. + * @param index The new index that the element will be moved to. + */ + function MoveTo(array: any[], item: any, index: integer): any; + + /** + * Moves the given array element up one place in the array. + * The array is modified in-place. + * @param array The input array. + * @param item The element to move up the array. + */ + function MoveUp(array: any[], item: any): any[]; + + /** + * Create an array representing the range of numbers (usually integers), between, and inclusive of, + * the given `start` and `end` arguments. For example: + * + * `var array = numberArray(2, 4); // array = [2, 3, 4]` + * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * + * This is equivalent to `numberArrayStep(start, end, 1)`. + * + * You can optionally provide a prefix and / or suffix string. If given the array will contain + * strings, not integers. For example: + * + * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * @param start The minimum value the array starts with. + * @param end The maximum value the array contains. + * @param prefix Optional prefix to place before the number. If provided the array will contain strings, not integers. + * @param suffix Optional suffix to place after the number. If provided the array will contain strings, not integers. + */ + function NumberArray(start: number, end: number, prefix?: string, suffix?: string): number[] | string[]; + + /** + * Create an array of numbers (positive and/or negative) progressing from `start` + * up to but not including `end` by advancing by `step`. + * + * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified. + * + * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; + * for forward compatibility make sure to pass in actual numbers. + * @param start The start of the range. Default 0. + * @param end The end of the range. Default null. + * @param step The value to increment or decrement by. Default 1. + */ + function NumberArrayStep(start?: number, end?: number, step?: number): number[]; + + /** + * [description] + * @param arr [description] + * @param k [description] + * @param left [description] + * @param right [description] + * @param compare [description] + */ + function QuickSelect(arr: any[], k: number, left: number, right: number, compare: Function): void; + + /** + * [description] + * @param a [description] + * @param b [description] + * @param options [description] + */ + function Range(a: any[], b: any[], options: object): any[]; + + /** + * Removes the given item, or array of items, from the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for each item successfully removed from the array. + * @param array The array to be modified. + * @param item The item, or array of items, to be removed from the array. + * @param callback A callback to be invoked for each item successfully removed from the array. + * @param context The context in which the callback is invoked. + */ + function Remove(array: any[], item: any | any[], callback?: Function, context?: object): any | any[]; + + /** + * Removes the item from the given position in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array. + * @param array The array to be modified. + * @param index The array index to remove the item from. The index must be in bounds or it will throw an error. + * @param callback A callback to be invoked for the item removed from the array. + * @param context The context in which the callback is invoked. + */ + function RemoveAt(array: any[], index: integer, callback?: Function, context?: object): any; + + /** + * Removes the item within the given range in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item/s successfully removed from the array. + * @param array The array to be modified. + * @param startIndex The start index to remove from. + * @param endIndex The end index to remove to. + * @param callback A callback to be invoked for the item removed from the array. + * @param context The context in which the callback is invoked. + */ + function RemoveBetween(array: any[], startIndex: integer, endIndex: integer, callback?: Function, context?: object): any[]; + + /** + * Removes a random object from the given array and returns it. + * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index. + * @param array The array to removed a random element from. + * @param start The array index to start the search from. Default 0. + * @param length Optional restriction on the number of elements to randomly select from. Default array.length. + */ + function RemoveRandomElement(array: any[], start?: integer, length?: integer): object; + + /** + * Replaces an element of the array with the new element. + * The new element cannot already be a member of the array. + * The array is modified in-place. + * @param oldChild The element in the array that will be replaced. + * @param newChild The element to be inserted into the array at the position of `oldChild`. + */ + function Replace(oldChild: any, newChild: any): boolean; + + /** + * Moves the element at the start of the array to the end, shifting all items in the process. + * The "rotation" happens to the left. + * @param array The array to shift to the left. This array is modified in place. + * @param total The number of times to shift the array. Default 1. + */ + function RotateLeft(array: any[], total?: integer): any; + + /** + * Moves the element at the end of the array to the start, shifting all items in the process. + * The "rotation" happens to the right. + * @param array The array to shift to the right. This array is modified in place. + * @param total The number of times to shift the array. Default 1. + */ + function RotateRight(array: any[], total?: integer): any; + + /** + * Tests if the start and end indexes are a safe range for the given array. + * @param array The array to check. + * @param startIndex The start index. + * @param endIndex The end index. + * @param throwError Throw an error if the range is out of bounds. Default true. + */ + function SafeRange(array: any[], startIndex: integer, endIndex: integer, throwError?: boolean): boolean; + + /** + * Moves the given element to the bottom of the array. + * The array is modified in-place. + * @param array The array. + * @param item The element to move. + */ + function SendToBack(array: any[], item: any): any; + + /** + * Scans the array for elements with the given property. If found, the property is set to the `value`. + * + * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements. + * @param array The array to search. + * @param property The property to test for on each array element. + * @param value The value to set the property to. + * @param startIndex An optional start index to search from. + * @param endIndex An optional end index to search to. + */ + function SetAll(array: any[], property: string, value: any, startIndex?: integer, endIndex?: integer): any[]; + + /** + * Shuffles the contents of the given array using the Fisher-Yates implementation. + * + * The original array is modified directly and returned. + * @param array The array to shuffle. This array is modified in place. + */ + function Shuffle(array: any[]): any[]; + + /** + * Removes a single item from an array and returns it without creating gc, like the native splice does. + * Based on code by Mike Reinstein. + * @param array [description] + * @param index [description] + */ + function SpliceOne(array: any[], index: integer): any; + + /** + * Swaps the position of two elements in the given array. + * The elements must exist in the same array. + * The array is modified in-place. + * @param array The input array. + * @param item1 The first element to swap. + * @param item2 The second element to swap. + */ + function Swap(array: any[], item1: any, item2: any): any[]; + + namespace Matrix { + /** + * [description] + * @param matrix [description] + */ + function CheckMatrix(matrix: any[]): boolean; + + /** + * [description] + * @param matrix [description] + */ + function MatrixToString(matrix: any[]): string; + + /** + * [description] + * @param matrix [description] + */ + function ReverseColumns(matrix: any[]): any[]; + + /** + * [description] + * @param matrix [description] + */ + function ReverseRows(matrix: any[]): any[]; + + /** + * [description] + * @param matrix [description] + */ + function Rotate180(matrix: any[]): any[]; + + /** + * [description] + * @param matrix [description] + */ + function RotateLeft(matrix: any[]): any[]; + + /** + * [description] + * @param matrix The array to rotate. + * @param direction The amount to rotate the matrix by. The value can be given in degrees: 90, -90, 270, -270 or 180, or a string command: `rotateLeft`, `rotateRight` or `rotate180`. Default 90. + */ + function RotateMatrix(matrix: any[], direction?: number | string): any[]; + + /** + * [description] + * @param matrix [description] + */ + function RotateRight(matrix: any[]): any[]; + + /** + * [description] + * @param array The array matrix to transpose. + */ + function TransposeMatrix(array: any[]): any[]; + + } + + } + + namespace Object { + /** + * Shallow Object Clone. Will not clone nested objects. + * @param obj the object from which to clone + */ + function Clone(obj: object): object; + + /** + * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ + */ + function Extend(): object; + + /** + * [description] + * @param source [description] + * @param key [description] + * @param defaultValue [description] + */ + function GetAdvancedValue(source: object, key: string, defaultValue: any): any; + + /** + * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue} + * @param source The object to search + * @param key The key for the property on source. Must exist at the top level of the source object (no periods) + * @param defaultValue The default value to use if the key does not exist. + */ + function GetFastValue(source: object, key: string, defaultValue?: any): any; + + /** + * [description] + * @param source [description] + * @param key [description] + * @param min [description] + * @param max [description] + * @param defaultValue [description] + */ + function GetMinMaxValue(source: object, key: string, min: number, max: number, defaultValue: number): number; + + /** + * [description] + * @param source [description] + * @param key [description] + * @param defaultValue [description] + */ + function GetValue(source: object, key: string, defaultValue: any): any; + + /** + * Verifies that an object contains all requested keys + * @param source an object on which to check for key existence + * @param keys an array of keys to ensure the source object contains + */ + function HasAll(source: object, keys: string[]): boolean; + + /** + * Verifies that an object contains at least one of the requested keys + * @param source an object on which to check for key existence + * @param keys an array of keys to search the object for + */ + function HasAny(source: object, keys: string[]): boolean; + + /** + * [description] + * @param source [description] + * @param key [description] + */ + function HasValue(source: object, key: string): boolean; + + /** + * This is a slightly modified version of jQuery.isPlainObject. + * A plain object is an object whose internal class property is [object Object]. + * @param obj The object to inspect. + */ + function IsPlainObject(obj: object): boolean; + + /** + * Creates a new Object using all values from obj1 and obj2. + * If a value exists in both obj1 and obj2, the value in obj1 is used. + * @param obj1 [description] + * @param obj2 [description] + */ + function Merge(obj1: object, obj2: object): object; + + /** + * Creates a new Object using all values from obj1. + * + * Then scans obj2. If a property is found in obj2 that *also* exists in obj1, the value from obj2 is used, otherwise the property is skipped. + * @param obj1 [description] + * @param obj2 [description] + */ + function MergeRight(obj1: object, obj2: object): object; + + } + + namespace String { + /** + * Takes a string and replaces instances of markers with values in the given array. + * The markers take the form of `%1`, `%2`, etc. I.e.: + * + * `Format("The %1 is worth %2 gold", [ 'Sword', 500 ])` + * @param string The string containing the replacement markers. + * @param values An array containing values that will replace the markers. If no value exists an empty string is inserted instead. + */ + function Format(string: string, values: any[]): string; + + /** + * Takes the given string and pads it out, to the length required, using the character + * specified. For example if you need a string to be 6 characters long, you can call: + * + * `pad('bob', 6, '-', 2)` + * + * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right. + * + * You can also use it to pad numbers (they are always returned as strings): + * + * `pad(512, 6, '0', 1)` + * + * Would return: `000512` with the string padded to the left. + * + * If you don't specify a direction it'll pad to both sides: + * + * `pad('c64', 7, '*')` + * + * Would return: `**c64**` + * @param str The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. + * @param len The number of characters to be added. Default 0. + * @param pad The string to pad it out with (defaults to a space). Default " ". + * @param dir The direction dir = 1 (left), 2 (right), 3 (both). Default 3. + */ + function Pad(str: string, len?: integer, pad?: string, dir?: integer): string; + + /** + * Takes the given string and reverses it, returning the reversed string. + * For example if given the string `Atari 520ST` it would return `TS025 iratA`. + * @param string The string to be reversed. + */ + function ReverseString(string: string): string; + + /** + * Capitalizes the first letter of a string if there is one. + * @param str The string to capitalize. + */ + function UppercaseFirst(str: string): string; + + } + + } + +} + +declare type ArcadeBodyBounds = { + /** + * The left edge. + */ + x: number; + /** + * The upper edge. + */ + y: number; + /** + * The right edge. + */ + right: number; + /** + * The lower edge. + */ + bottom: number; +}; + +declare type ArcadeBodyCollision = { + /** + * True if the Body is not colliding. + */ + none: boolean; + /** + * True if the Body is colliding on its upper edge. + */ + up: boolean; + /** + * True if the Body is colliding on its lower edge. + */ + down: boolean; + /** + * True if the Body is colliding on its left edge. + */ + left: boolean; + /** + * True if the Body is colliding on its right edge. + */ + right: boolean; +}; + +declare type PhysicsGroupConfig = GroupConfig & { + /** + * Sets {@link Phaser.Physics.Arcade.Body#collideWorldBounds}. + */ + collideWorldBounds?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.Body#acceleration acceleration.x}. + */ + accelerationX?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#acceleration acceleration.y}. + */ + accelerationY?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#allowDrag}. + */ + allowDrag?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.Body#allowGravity}. + */ + allowGravity?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.Body#allowRotation}. + */ + allowRotation?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.Body#bounce bounce.x}. + */ + bounceX?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#bounce bounce.y}. + */ + bounceY?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#drag drag.x}. + */ + dragX?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#drag drag.y}. + */ + dragY?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#gravity gravity.x}. + */ + gravityX?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#gravity gravity.y}. + */ + gravityY?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#friction friction.x}. + */ + frictionX?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#friction friction.y}. + */ + frictionY?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#velocity velocity.x}. + */ + velocityX?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#velocity velocity.y}. + */ + velocityY?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#angularVelocity}. + */ + angularVelocity?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#angularAcceleration}. + */ + angularAcceleration?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#angularDrag}. + */ + angularDrag?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#mass}. + */ + mass?: number; + /** + * Sets {@link Phaser.Physics.Arcade.Body#immovable}. + */ + immovable?: boolean; +}; + +declare type PhysicsGroupDefaults = { + /** + * [description] + */ + setCollideWorldBounds: boolean; + /** + * [description] + */ + setAccelerationX: number; + /** + * [description] + */ + setAccelerationY: number; + /** + * [description] + */ + setAllowDrag: boolean; + /** + * [description] + */ + setAllowGravity: boolean; + /** + * [description] + */ + setAllowRotation: boolean; + /** + * [description] + */ + setBounceX: number; + /** + * [description] + */ + setBounceY: number; + /** + * [description] + */ + setDragX: number; + /** + * [description] + */ + setDragY: number; + /** + * [description] + */ + setGravityX: number; + /** + * [description] + */ + setGravityY: number; + /** + * [description] + */ + setFrictionX: number; + /** + * [description] + */ + setFrictionY: number; + /** + * [description] + */ + setVelocityX: number; + /** + * [description] + */ + setVelocityY: number; + /** + * [description] + */ + setAngularVelocity: number; + /** + * [description] + */ + setAngularAcceleration: number; + /** + * [description] + */ + setAngularDrag: number; + /** + * [description] + */ + setMass: number; + /** + * [description] + */ + setImmovable: boolean; +}; + +declare type ArcadeWorldConfig = { + /** + * Sets {@link Phaser.Physics.Arcade.World#fps}. + */ + fps?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#timeScale}. + */ + timeScale?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#gravity}. + */ + gravity?: object; + /** + * The horizontal world gravity value. + */ + "gravity.x"?: number; + /** + * The vertical world gravity value. + */ + "gravity.y"?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#bounds bounds.x}. + */ + x?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#bounds bounds.y}. + */ + y?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#bounds bounds.width}. + */ + width?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#bounds bounds.height}. + */ + height?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#checkCollision}. + */ + checkCollision?: object; + /** + * Should bodies collide with the top of the world bounds? + */ + "checkCollision.up"?: boolean; + /** + * Should bodies collide with the bottom of the world bounds? + */ + "checkCollision.down"?: boolean; + /** + * Should bodies collide with the left of the world bounds? + */ + "checkCollision.left"?: boolean; + /** + * Should bodies collide with the right of the world bounds? + */ + "checkCollision.right"?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.World#OVERLAP_BIAS}. + */ + overlapBias?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#TILE_BIAS}. + */ + tileBias?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#forceX}. + */ + forceX?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.World#isPaused}. + */ + isPaused?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.World#debug}. + */ + debug?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.World#defaults debugShowBody}. + */ + debugShowBody?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.World#defaults debugShowStaticBody}. + */ + debugShowStaticBody?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.World#defaults debugShowStaticBody}. + */ + debugShowVelocity?: boolean; + /** + * Sets {@link Phaser.Physics.Arcade.World#defaults debugBodyColor}. + */ + debugBodyColor?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#defaults debugStaticBodyColor}. + */ + debugStaticBodyColor?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#defaults debugVelocityColor}. + */ + debugVelocityColor?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#maxEntries}. + */ + maxEntries?: number; + /** + * Sets {@link Phaser.Physics.Arcade.World#useTree}. + */ + useTree?: boolean; +}; + +declare type CheckCollisionObject = { + /** + * [description] + */ + up: boolean; + /** + * [description] + */ + down: boolean; + /** + * [description] + */ + left: boolean; + /** + * [description] + */ + right: boolean; +}; + +declare type ArcadeWorldDefaults = { + /** + * [description] + */ + debugShowBody: boolean; + /** + * [description] + */ + debugShowStaticBody: boolean; + /** + * [description] + */ + debugShowVelocity: boolean; + /** + * [description] + */ + bodyDebugColor: number; + /** + * [description] + */ + staticBodyDebugColor: number; + /** + * [description] + */ + velocityDebugColor: number; +}; + +declare type ArcadeWorldTreeMinMax = { + /** + * [description] + */ + minX: number; + /** + * [description] + */ + minY: number; + /** + * [description] + */ + maxX: number; + /** + * [description] + */ + maxY: number; +}; + +/** + * An Arcade Physics Collider Type. + */ +declare type ArcadeColliderType = () => void; + +declare type ArcadePhysicsCallback = (object1: Phaser.GameObjects.GameObject, object2: Phaser.GameObjects.GameObject) => void; + +declare type BodyUpdateCallback = (body: Phaser.Physics.Impact.Body) => void; + +declare type JSONImpactBody = { + /** + * [description] + */ + name: string; + /** + * [description] + */ + size: object; + /** + * [description] + */ + pos: object; + /** + * [description] + */ + vel: object; + /** + * [description] + */ + accel: object; + /** + * [description] + */ + friction: object; + /** + * [description] + */ + maxVel: object; + /** + * [description] + */ + gravityFactor: number; + /** + * [description] + */ + bounciness: number; + /** + * [description] + */ + minBounceVelocity: number; + /** + * [description] + */ + type: Phaser.Physics.Impact.TYPE; + /** + * [description] + */ + checkAgainst: Phaser.Physics.Impact.TYPE; + /** + * [description] + */ + collides: Phaser.Physics.Impact.COLLIDES; +}; + +declare type CollideCallback = (body: Phaser.Physics.Impact.Body, other: Phaser.Physics.Impact.Body, axis: string) => void; + +declare namespace MatterJS { + /** + * The `Matter.Body` module contains methods for creating and manipulating body models. + * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`. + * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`. + */ + class Body { + } + + /** + * The `Matter.Composite` module contains methods for creating and manipulating composite bodies. + * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure. + * It is important to use the functions in this module to modify composites, rather than directly modifying their properties. + * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`. + */ + class Composite { + } + + /** + * The `Matter.World` module contains methods for creating and manipulating the world composite. + * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`. + * A `Matter.World` has a few additional properties including `gravity` and `bounds`. + * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties. + * There are also a few methods here that alias those in `Matter.Composite` for easier readability. + */ + class World extends MatterJS.Composite { + } + + /** + * The `Matter.Constraint` module contains methods for creating and manipulating constraints. + * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). + * The stiffness of constraints can be modified to create springs or elastic. + */ + class Constraint { + } + + /** + * The `Matter.Engine` module contains methods for creating and manipulating engines. + * An engine is a controller that manages updating the simulation of the world. + */ + class Engine { + } + +} + +declare type CorePluginContainer = { + /** + * The unique name of this plugin in the core plugin cache. + */ + key: string; + /** + * The plugin to be stored. Should be the source object, not instantiated. + */ + plugin: Function; + /** + * If this plugin is to be injected into the Scene Systems, this is the property key map used. + */ + mapping?: string; + /** + * Core Scene plugin or a Custom Scene plugin? + */ + custom?: boolean; +}; + +declare type CustomPluginContainer = { + /** + * The unique name of this plugin in the custom plugin cache. + */ + key: string; + /** + * The plugin to be stored. Should be the source object, not instantiated. + */ + plugin: Function; +}; + +declare namespace Phaser.Plugins.PluginCache { + /** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * Plugin is the object to instantiate to create the plugin + * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) + * @param key A reference used to get this plugin from the plugin cache. + * @param plugin The plugin to be stored. Should be the core object, not instantiated. + * @param mapping If this plugin is to be injected into the Scene Systems, this is the property key map used. + * @param custom Core Scene plugin or a Custom Scene plugin? Default false. + */ + function register(key: string, plugin: Function, mapping: string, custom?: boolean): void; + + /** + * Stores a custom plugin in the global plugin cache. + * The key must be unique, within the scope of the cache. + * @param key A reference used to get this plugin from the plugin cache. + * @param plugin The plugin to be stored. Should be the core object, not instantiated. + * @param mapping If this plugin is to be injected into the Scene Systems, this is the property key map used. + */ + function registerCustom(key: string, plugin: Function, mapping: string): void; + + /** + * Checks if the given key is already being used in the core plugin cache. + * @param key The key to check for. + */ + function hasCore(key: string): boolean; + + /** + * Checks if the given key is already being used in the custom plugin cache. + * @param key The key to check for. + */ + function hasCustom(key: string): boolean; + + /** + * Returns the core plugin object from the cache based on the given key. + * @param key The key of the core plugin to get. + */ + function getCore(key: string): CorePluginContainer; + + /** + * Returns the custom plugin object from the cache based on the given key. + * @param key The key of the custom plugin to get. + */ + function getCustom(key: string): CustomPluginContainer; + + /** + * Returns an object from the custom cache based on the given key that can be instantiated. + * @param key The key of the custom plugin to get. + */ + function getCustomClass(key: string): Function; + + /** + * Removes a core plugin based on the given key. + * @param key The key of the core plugin to remove. + */ + function remove(key: string): void; + + /** + * Removes a custom plugin based on the given key. + * @param key The key of the custom plugin to remove. + */ + function removeCustom(key: string): void; + +} + +declare type GlobalPlugin = { + /** + * The unique name of this plugin within the plugin cache. + */ + key: string; + /** + * An instance of the plugin. + */ + plugin: Function; + /** + * Is the plugin active or not? + */ + active?: boolean; + /** + * If this plugin is to be injected into the Scene Systems, this is the property key map used. + */ + mapping?: string; +}; + +declare type RendererConfig = { + /** + * [description] + */ + clearBeforeRender: boolean; + /** + * [description] + */ + antialias: boolean; + /** + * [description] + */ + backgroundColor: Phaser.Display.Color; + /** + * [description] + */ + resolution: number; + /** + * [description] + */ + autoResize: boolean; + /** + * [description] + */ + roundPixels: boolean; +}; + +declare type SnapshotCallback = (snapshot: HTMLImageElement) => void; + +declare type WebGLContextCallback = (renderer: Phaser.Renderer.WebGL.WebGLRenderer) => void; + +declare type SnapshotState = { + /** + * [description] + */ + callback: SnapshotCallback; + /** + * [description] + */ + type: string; + /** + * [description] + */ + encoder: number; +}; + +/** + * Implements a model view projection matrices. + * Pipelines can implement this for doing 2D and 3D rendering. + */ +declare interface ModelViewProjection { + /** + * Dirty flag for checking if model matrix needs to be updated on GPU. + */ + modelMatrixDirty: any; + /** + * Dirty flag for checking if view matrix needs to be updated on GPU. + */ + viewMatrixDirty: any; + /** + * Dirty flag for checking if projection matrix needs to be updated on GPU. + */ + projectionMatrixDirty: any; + /** + * Model matrix + */ + modelMatrix: any; + /** + * View matrix + */ + viewMatrix: any; + /** + * Projection matrix + */ + projectionMatrix: any; + /** + * Initializes MVP matrices with an identity matrix + */ + mvpInit(): void; + /** + * If dirty flags are set then the matrices are uploaded to the GPU. + */ + mvpUpdate(): void; + /** + * Loads an identity matrix to the model matrix + */ + modelIdentity(): void; + /** + * Scale model matrix + */ + modelScale(): void; + /** + * Translate model matrix + */ + modelTranslate(): void; + /** + * Rotates the model matrix in the X axis. + */ + modelRotateX(): void; + /** + * Rotates the model matrix in the Y axis. + */ + modelRotateY(): void; + /** + * Rotates the model matrix in the Z axis. + */ + modelRotateZ(): void; + /** + * Loads identity matrix into the view matrix + */ + viewIdentity(): void; + /** + * Scales view matrix + */ + viewScale(): void; + /** + * Translates view matrix + */ + viewTranslate(): void; + /** + * Rotates view matrix in the X axis. + */ + viewRotateX(): void; + /** + * Rotates view matrix in the Y axis. + */ + viewRotateY(): void; + /** + * Rotates view matrix in the Z axis. + */ + viewRotateZ(): void; + /** + * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix + */ + viewLoad2D(): void; + /** + * Copies a 4x4 matrix into the view matrix + */ + viewLoad(): void; + /** + * Loads identity matrix into the projection matrix. + */ + projIdentity(): void; + /** + * Sets up an orthographics projection matrix + */ + projOrtho(): void; + /** + * Sets up a perspective projection matrix + */ + projPersp(): void; +} + +declare namespace Phaser.Scenes.ScenePlugin { + type SceneTransitionConfig = { + /** + * The Scene key to transition to. + */ + target: string; + /** + * The duration, in ms, for the transition to last. + */ + duration?: integer; + /** + * Will the Scene responsible for the transition be sent to sleep on completion (`true`), or stopped? (`false`) + */ + sleep?: boolean; + /** + * Will the Scenes Input system be able to process events while it is transitioning in or out? + */ + allowInput?: boolean; + /** + * Move the target Scene to be above this one before the transition starts. + */ + moveAbove?: boolean; + /** + * Move the target Scene to be below this one before the transition starts. + */ + moveBelow?: boolean; + /** + * This callback is invoked every frame for the duration of the transition. + */ + onUpdate?: Function; + /** + * The context in which the callback is invoked. + */ + onUpdateScope?: any; + /** + * An object containing any data you wish to be passed to the target Scenes init / create methods. + */ + data?: any; + }; + +} + +declare type EachActiveSoundCallback = (manager: Phaser.Sound.BaseSoundManager, sound: Phaser.Sound.BaseSound, index: number, sounds: Phaser.Sound.BaseSound[]) => void; + +declare namespace Phaser.Sound.BaseSound { + /** + * Audio sprite sound type. + */ + type AudioSpriteSound = () => void; + +} + +/** + * Config object containing various sound settings. + */ +declare type SoundConfig = { + /** + * Boolean indicating whether the sound should be muted or not. + */ + mute?: boolean; + /** + * A value between 0 (silence) and 1 (full volume). + */ + volume?: number; + /** + * Defines the speed at which the sound should be played. + */ + rate?: number; + /** + * Represents detuning of sound in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + */ + detune?: number; + /** + * Position of playback for this sound, in seconds. + */ + seek?: number; + /** + * Whether or not the sound or current sound marker should loop. + */ + loop?: boolean; + /** + * Time, in seconds, that should elapse before the sound actually starts its playback. + */ + delay?: number; +}; + +/** + * Marked section of a sound represented by name, and optionally start time, duration, and config object. + */ +declare type SoundMarker = { + /** + * Unique identifier of a sound marker. + */ + name: string; + /** + * Sound position offset at witch playback should start. + */ + start?: number; + /** + * Playback duration of this marker. + */ + duration?: number; + /** + * An optional config object containing default marker settings. + */ + config?: SoundConfig; +}; + +declare type EachListCallback = (item: any, ...args: any[]) => void; + +declare type EachMapCallback = (key: string, entry: any) => void; + +declare type EachSetCallback = (entry: any, index: number) => void; + +declare type EachTextureCallback = (texture: Phaser.Textures.Texture, ...args: any[]) => void; + +declare type SpriteSheetConfig = { + /** + * The fixed width of each frame. + */ + frameWidth: integer; + /** + * The fixed height of each frame. If not set it will use the frameWidth as the height. + */ + frameHeight?: integer; + /** + * Skip a number of frames. Useful when there are multiple sprite sheets in one Texture. + */ + startFrame?: integer; + /** + * The total number of frames to extract from the Sprite Sheet. The default value of -1 means "extract all frames". + */ + endFrame?: integer; + /** + * If the frames have been drawn with a margin, specify the amount here. + */ + margin?: integer; + /** + * If the frames have been drawn with spacing between them, specify the amount here. + */ + spacing?: integer; +}; + +declare type SpriteSheetFromAtlasConfig = { + /** + * The key of the Texture Atlas in which this Sprite Sheet can be found. + */ + atlas: string; + /** + * The key of the Texture Atlas Frame in which this Sprite Sheet can be found. + */ + frame: string; + /** + * The fixed width of each frame. + */ + frameWidth: integer; + /** + * The fixed height of each frame. If not set it will use the frameWidth as the height. + */ + frameHeight?: integer; + /** + * Skip a number of frames. Useful when there are multiple sprite sheets in one Texture. + */ + startFrame?: integer; + /** + * The total number of frames to extract from the Sprite Sheet. The default value of -1 means "extract all frames". + */ + endFrame?: integer; + /** + * If the frames have been drawn with a margin, specify the amount here. + */ + margin?: integer; + /** + * If the frames have been drawn with spacing between them, specify the amount here. + */ + spacing?: integer; +}; + +declare type TilemapFilterCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[]) => void; + +declare type TilemapFindCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[]) => void; + +declare type TilemapConfig = { + /** + * The key in the Phaser cache that corresponds to the loaded tilemap data. + */ + key?: string; + /** + * Instead of loading from the cache, you can also load directly from a 2D array of tile indexes. + */ + data?: integer[][]; + /** + * The width of a tile in pixels. + */ + tileWidth?: integer; + /** + * The height of a tile in pixels. + */ + tileHeight?: integer; + /** + * The width of the map in tiles. + */ + width?: integer; + /** + * The height of the map in tiles. + */ + height?: integer; + /** + * Controls how empty tiles, tiles with an index of -1, + * in the map data are handled. If `true`, empty locations will get a value of `null`. If `false`, + * empty location will get a Tile object with an index of -1. If you've a large sparsely populated + * map and the tile data doesn't need to change then setting this value to `true` will help with + * memory consumption. However if your map is small or you need to update the tiles dynamically, + * then leave the default value set. + */ + insertNull?: boolean; +}; + +declare type FindTileCallback = (value: Phaser.Tilemaps.Tile, index: number, array: Phaser.Tilemaps.Tile[]) => void; + +declare type EachTileCallback = (value: Phaser.Tilemaps.Tile, index: number, array: Phaser.Tilemaps.Tile[]) => void; + +declare type GetTilesWithinFilteringOptions = { + /** + * If true, only return tiles that don't have -1 for an index. + */ + isNotEmpty?: boolean; + /** + * If true, only return tiles that collide on at least one side. + */ + isColliding?: boolean; + /** + * If true, only return tiles that have at least one interesting face. + */ + hasInterestingFace?: boolean; +}; + +declare type TimerEventConfig = { + /** + * [description] + */ + delay?: number; + /** + * [description] + */ + repeat?: number; + /** + * [description] + */ + loop?: boolean; + /** + * [description] + */ + callback?: Function; + /** + * [description] + */ + callbackScope?: any; + /** + * [description] + */ + args?: any[]; + /** + * [description] + */ + timeScale?: number; + /** + * [description] + */ + startAt?: number; + /** + * [description] + */ + paused?: boolean; +}; + +declare type TweenDataGenConfig = { + /** + * [description] + */ + delay: Function; + /** + * [description] + */ + duration: Function; + /** + * [description] + */ + hold: Function; + /** + * [description] + */ + repeat: Function; + /** + * [description] + */ + repeatDelay: Function; +}; + +/** + * Class + */ +declare class Class { + /** + * + * @param definition a dictionary of functions for the class + */ + constructor(definition: Object); + +} + +declare type integer = number; + +interface ActiveXObject { + new (s: string): any; +} + +declare var ActiveXObject: ActiveXObject; + +declare module 'phaser' { + export = Phaser; + +} \ No newline at end of file diff --git a/example/index.ts b/example/index.ts index c2f738ca..5ac229f6 100644 --- a/example/index.ts +++ b/example/index.ts @@ -5,17 +5,13 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -/// +/// import "reflect-metadata"; import { Game } from "./Game"; (window).initGame = function() { - let game: Game = new Game( - window.innerWidth * window.devicePixelRatio, - window.innerHeight * window.devicePixelRatio, - Phaser.AUTO - ); + let game: Game = new Game(window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio, Phaser.AUTO); (window).game = game; }; diff --git a/karma.conf.js b/karma.conf.js index c76104f6..ce0696de 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -6,72 +6,62 @@ const webpackConfig = require("./webpack.config.js")({ production: false, karma: delete webpackConfig.entry; module.exports = config => { + var configuration = { + basePath: "", + frameworks: ["mocha", "chai", "sinon", "es6-shim"], + files: [ + { pattern: "node_modules/reflect-metadata/Reflect.js", include: true }, + { pattern: "node_modules/bluebird/js/browser/bluebird.js", include: true }, + { pattern: "node_modules/phaser/dist/phaser.js", include: true }, + { pattern: "./test/**/**/**.test.ts", include: true }, + { pattern: "**/*.map", served: true, included: false, watched: true } + ], + preprocessors: { + "./**/**/**/**.ts": ["sourcemap"], + "./test/**/**/**.test.ts": ["webpack"] + }, + webpack: webpackConfig, + webpackMiddleware: { + noInfo: true + }, + plugins: [ + "karma-webpack", + "karma-sourcemap-writer", + "karma-sourcemap-loader", + "karma-remap-istanbul", + "karma-mocha-reporter", + "karma-mocha", + "karma-chai", + "karma-sinon", + "karma-es6-shim", + "karma-coverage-istanbul-reporter" + ], + reporters: config.singleRun ? ["dots", "mocha", "coverage-istanbul"] : ["dots", "mocha"], + coverageIstanbulReporter: { + reports: ["html", "lcov", "lcovonly", "text-summary"], + dir: "coverage", + fixWebpackSourcePaths: true, + "report-config": { + html: { + subdir: "html-report" + } + } + }, + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: [], + browserNoActivityTimeout: 50000 + }; - var configuration = { - basePath: "", - frameworks: [ - "mocha", - "chai", - "sinon", - "es6-shim" - ], - files: [ - { pattern: "node_modules/reflect-metadata/Reflect.js", include: true }, - { pattern: "node_modules/bluebird/js/browser/bluebird.js", include: true }, - { pattern: "node_modules/phaser-ce/build/phaser.js", include: true }, - { pattern: "./test/**/**/**.test.ts", include: true }, - { pattern: '**/*.map', served: true, included: false, watched: true } - ], - preprocessors: { - "./**/**/**/**.ts": ["sourcemap"], - "./test/**/**/**.test.ts": ["webpack"] - }, - webpack: webpackConfig, - webpackMiddleware: { - noInfo: true - }, - plugins: [ - "karma-webpack", - "karma-sourcemap-writer", - "karma-sourcemap-loader", - "karma-remap-istanbul", - "karma-mocha-reporter", - "karma-mocha", - "karma-chai", - "karma-sinon", - "karma-es6-shim", - "karma-coverage-istanbul-reporter" - ], - reporters: ( - config.singleRun ? - ["dots", "mocha", "coverage-istanbul"] : - ["dots", "mocha"] - ), - coverageIstanbulReporter: { - reports: ["html", "lcov", "lcovonly", "text-summary"], - dir: "coverage", - fixWebpackSourcePaths: true, - "report-config": { - html: { - subdir: "html-report" - } - } - }, - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: [], - browserNoActivityTimeout: 50000 - }; + if (process.env.TRAVIS) { + configuration.browsers.push("PhantomJS"); + configuration.plugins.push("karma-phantomjs-launcher"); + } else { + configuration.browsers.push("PhantomJS"); + configuration.plugins.push("karma-phantomjs-launcher"); + } - if (process.env.TRAVIS) { - configuration.browsers.push("PhantomJS"); - configuration.plugins.push("karma-phantomjs-launcher"); - } else { - configuration.browsers.push("PhantomJS"); - configuration.plugins.push("karma-phantomjs-launcher"); - } - - config.set(configuration); + config.set(configuration); }; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..f2397c25 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13053 @@ +{ + "name": "@robotlegsjs/phaser", + "version": "0.0.5", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@choojs/findup": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@choojs/findup/-/findup-0.2.1.tgz", + "integrity": "sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw==", + "dev": true, + "requires": { + "commander": "^2.15.1" + } + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz", + "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==", + "dev": true + }, + "@robotlegsjs/core": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@robotlegsjs/core/-/core-0.2.0.tgz", + "integrity": "sha512-Lo9iEt9uj/v34jN2amjr49aTXGMDem9I8w1QgFHiiZYB+z6eToJypd0mKfiSZpKry4PN2B53sYVaI/4fhgrF6A==", + "requires": { + "inversify": "^4.13.0", + "tslib": "^1.9.3" + } + }, + "@sinonjs/formatio": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "@sinonjs/samsam": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.0.0.tgz", + "integrity": "sha512-D7VxhADdZbDJ0HjUTMnSQ5xIGb4H2yWpg8k9Sf1T08zfFiQYlaxM8LZydpR4FQ2E6LZJX8IlabNZ5io4vdChwg==", + "dev": true + }, + "@types/bluebird": { + "version": "3.5.23", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.23.tgz", + "integrity": "sha512-xlehmc6RT+wMEhy9ZqeqmozVmuFzTfsaV2NlfFFWhigy7n6sjMbUUB+SZBWK78lZgWHA4DBAdQvQxUvcB8N1tw==", + "dev": true + }, + "@types/chai": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.4.tgz", + "integrity": "sha512-h6+VEw2Vr3ORiFCyyJmcho2zALnUq9cvdB/IO8Xs9itrJVCenC7o26A6+m7D0ihTTr65eS259H5/Ghl/VjYs6g==", + "dev": true + }, + "@types/mocha": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", + "integrity": "sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==", + "dev": true + }, + "@types/sinon": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-5.0.1.tgz", + "integrity": "sha512-yxzBCIjE3lp9lYjfBbIK/LRCoXgCLLbIIBIje7eNCcUIIR2CZZtyX5uto2hVoMSMqLrsRrT6mwwUEd0yFgOwpA==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.5.13.tgz", + "integrity": "sha512-49nwvW/Hx9i+OYHg+mRhKZfAlqThr11Dqz8TsrvqGKMhdI2ijy3KBJOun2Z4770TPjrIJhR6KxChQIDaz8clDA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/wast-parser": "1.5.13", + "debug": "^3.1.0", + "mamacro": "^0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.13.tgz", + "integrity": "sha512-vrvvB18Kh4uyghSKb0NTv+2WZx871WL2NzwMj61jcq2bXkyhRC+8Q0oD7JGVf0+5i/fKQYQSBCNMMsDMRVAMqA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.13.tgz", + "integrity": "sha512-dBh2CWYqjaDlvMmRP/kudxpdh30uXjIbpkLj9HQe+qtYlwvYjPRjdQXrq1cTAAOUSMTtzqbXIxEdEZmyKfcwsg==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.13.tgz", + "integrity": "sha512-v7igWf1mHcpJNbn4m7e77XOAWXCDT76Xe7Is1VQFXc4K5jRcFrl9D0NrqM4XifQ0bXiuTSkTKMYqDxu5MhNljA==", + "dev": true, + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.13.tgz", + "integrity": "sha512-yN6ScQQDFCiAXnVctdVO/J5NQRbwyTbQzsGzEgXsAnrxhjp0xihh+nNHQTMrq5UhOqTb5LykpJAvEv9AT0jnAQ==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.5.13" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.13.tgz", + "integrity": "sha512-hSIKzbXjVMRvy3Jzhgu+vDd/aswJ+UMEnLRCkZDdknZO3Z9e6rp1DAs0tdLItjCFqkz9+0BeOPK/mk3eYvVzZg==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.13.tgz", + "integrity": "sha512-zxJXULGPLB7r+k+wIlvGlXpT4CYppRz8fLUM/xobGHc9Z3T6qlmJD9ySJ2jknuktuuiR9AjnNpKYDECyaiX+QQ==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "mamacro": "^0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.13.tgz", + "integrity": "sha512-0n3SoNGLvbJIZPhtMFq0XmmnA/YmQBXaZKQZcW8maGKwLpVcgjNrxpFZHEOLKjXJYVN5Il8vSfG7nRX50Zn+aw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.13.tgz", + "integrity": "sha512-IJ/goicOZ5TT1axZFSnlAtz4m8KEjYr12BNOANAwGFPKXM4byEDaMNXYowHMG0yKV9a397eU/NlibFaLwr1fbw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-buffer": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/wasm-gen": "1.5.13", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/ieee754": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.5.13.tgz", + "integrity": "sha512-TseswvXEPpG5TCBKoLx9tT7+/GMACjC1ruo09j46ULRZWYm8XHpDWaosOjTnI7kr4SRJFzA6MWoUkAB+YCGKKg==", + "dev": true, + "requires": { + "ieee754": "^1.1.11" + } + }, + "@webassemblyjs/leb128": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.5.13.tgz", + "integrity": "sha512-0NRMxrL+GG3eISGZBmLBLAVjphbN8Si15s7jzThaw1UE9e5BY1oH49/+MA1xBzxpf1OW5sf9OrPDOclk9wj2yg==", + "dev": true, + "requires": { + "long": "4.0.0" + }, + "dependencies": { + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "dev": true + } + } + }, + "@webassemblyjs/utf8": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.5.13.tgz", + "integrity": "sha512-Ve1ilU2N48Ew0lVGB8FqY7V7hXjaC4+PeZM+vDYxEd+R2iQ0q+Wb3Rw8v0Ri0+rxhoz6gVGsnQNb4FjRiEH/Ng==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.13.tgz", + "integrity": "sha512-X7ZNW4+Hga4f2NmqENnHke2V/mGYK/xnybJSIXImt1ulxbCOEs/A+ZK/Km2jgihjyVxp/0z0hwIcxC6PrkWtgw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-buffer": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/helper-wasm-section": "1.5.13", + "@webassemblyjs/wasm-gen": "1.5.13", + "@webassemblyjs/wasm-opt": "1.5.13", + "@webassemblyjs/wasm-parser": "1.5.13", + "@webassemblyjs/wast-printer": "1.5.13", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.13.tgz", + "integrity": "sha512-yfv94Se8R73zmr8GAYzezFHc3lDwE/lBXQddSiIZEKZFuqy7yWtm3KMwA1uGbv5G1WphimJxboXHR80IgX1hQA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/ieee754": "1.5.13", + "@webassemblyjs/leb128": "1.5.13", + "@webassemblyjs/utf8": "1.5.13" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.13.tgz", + "integrity": "sha512-IkXSkgzVhQ0QYAdIayuCWMmXSYx0dHGU8Ah/AxJf1gBvstMWVnzJnBwLsXLyD87VSBIcsqkmZ28dVb0mOC3oBg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-buffer": "1.5.13", + "@webassemblyjs/wasm-gen": "1.5.13", + "@webassemblyjs/wasm-parser": "1.5.13", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.13.tgz", + "integrity": "sha512-XnYoIcu2iqq8/LrtmdnN3T+bRjqYFjRHqWbqK3osD/0r/Fcv4d9ecRzjVtC29ENEuNTK4mQ9yyxCBCbK8S/cpg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-api-error": "1.5.13", + "@webassemblyjs/helper-wasm-bytecode": "1.5.13", + "@webassemblyjs/ieee754": "1.5.13", + "@webassemblyjs/leb128": "1.5.13", + "@webassemblyjs/utf8": "1.5.13" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.5.13.tgz", + "integrity": "sha512-Lbz65T0LQ1LgzKiUytl34CwuhMNhaCLgrh0JW4rJBN6INnBB8NMwUfQM+FxTnLY9qJ+lHJL/gCM5xYhB9oWi4A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/floating-point-hex-parser": "1.5.13", + "@webassemblyjs/helper-api-error": "1.5.13", + "@webassemblyjs/helper-code-frame": "1.5.13", + "@webassemblyjs/helper-fsm": "1.5.13", + "long": "^3.2.0", + "mamacro": "^0.0.3" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.5.13.tgz", + "integrity": "sha512-QcwogrdqcBh8Z+eUF8SG+ag5iwQSXxQJELBEHmLkk790wgQgnIMmntT2sMAMw53GiFNckArf5X0bsCA44j3lWQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/wast-parser": "1.5.13", + "long": "^3.2.0" + } + }, + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", + "dev": true, + "requires": { + "acorn": "^5.0.0" + } + }, + "addressparser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz", + "integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y=", + "dev": true, + "optional": true + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "dev": true + }, + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "always-error": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/always-error/-/always-error-1.0.0.tgz", + "integrity": "sha1-lchAQs+obzjIbKbCzELAoBA0QbI=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "amqplib": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.5.2.tgz", + "integrity": "sha512-l9mCs6LbydtHqRniRwYkKdqxVa6XMz3Vw1fh+2gJaaVgTM6Jk3o8RccAKWKtlhT1US5sWrFh+KKxsVUALURSIA==", + "dev": true, + "optional": true, + "requires": { + "bitsyntax": "~0.0.4", + "bluebird": "^3.4.6", + "buffer-more-ints": "0.0.2", + "readable-stream": "1.x >=1.1.9", + "safe-buffer": "^5.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } + } + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "^2.0.0" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "dev": true + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-flatten": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", + "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", + "dev": true + }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "ast-types": { + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.5.tgz", + "integrity": "sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw==", + "dev": true, + "optional": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "dev": true + }, + "axios": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.15.3.tgz", + "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", + "dev": true, + "optional": true, + "requires": { + "follow-redirects": "1.0.0" + }, + "dependencies": { + "follow-redirects": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.0.0.tgz", + "integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=", + "dev": true, + "optional": true, + "requires": { + "debug": "^2.2.0" + } + } + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "ban-sensitive-files": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/ban-sensitive-files/-/ban-sensitive-files-1.9.2.tgz", + "integrity": "sha512-8dlYLybLhAKvd2fGoDd2zskdbO8pm/FKxTwy+iA5mqq4bKovZNM4xNAzYWbttW9yjbxTz1O3SN+cyUx3LEG5CQ==", + "dev": true, + "requires": { + "bluebird": "3.5.1", + "check-more-types": "2.24.0", + "debug": "3.1.0", + "ggit": "2.4.2", + "lazy-ass": "1.6.0", + "pluralize": "7.0.0", + "ramda": "0.25.0", + "update-notifier": "2.3.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "base64id": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "dev": true, + "requires": { + "callsite": "1.0.0" + } + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bitsyntax": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/bitsyntax/-/bitsyntax-0.0.4.tgz", + "integrity": "sha1-6xDMb4K4xJDj6FaY8H6D1G4MuoI=", + "dev": true, + "optional": true, + "requires": { + "buffer-more-ints": "0.0.2" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "blob": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", + "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "dev": true, + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.x.x" + } + }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-versionify": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/browserify-versionify/-/browserify-versionify-1.0.6.tgz", + "integrity": "sha1-qy3GHWoRnmJ77Eh1mNGYO3/bJ14=", + "dev": true, + "requires": { + "find-root": "^0.1.1", + "through2": "0.6.3" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", + "dev": true + }, + "buffer-more-ints": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-0.0.2.tgz", + "integrity": "sha1-JrOIXRD6E9t/wBquOquHAZngEkw=", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "buildmail": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/buildmail/-/buildmail-4.0.1.tgz", + "integrity": "sha1-h393OLeHKYccmhBeO4N9K+EaenI=", + "dev": true, + "optional": true, + "requires": { + "addressparser": "1.0.1", + "libbase64": "0.1.0", + "libmime": "3.0.0", + "libqp": "1.1.0", + "nodemailer-fetch": "1.6.0", + "nodemailer-shared": "1.1.0", + "punycode": "1.4.1" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cacache": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + }, + "dependencies": { + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", + "dev": true + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } + } + }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chai": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", + "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", + "dev": true, + "requires": { + "assertion-error": "^1.0.1", + "check-error": "^1.0.1", + "deep-eql": "^3.0.0", + "get-func-name": "^2.0.0", + "pathval": "^1.0.0", + "type-detect": "^4.0.0" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "chdir-promise": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/chdir-promise/-/chdir-promise-0.6.2.tgz", + "integrity": "sha512-EG5MutQt4qTxoQPfBtPCfU1A/MqborgaO66xrPSD/dRTB40OLN0wy+YAo5ZAw7DawhtCPdZHAdQ206fyWkhoiw==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "check-more-types": "2.24.0", + "debug": "3.1.0", + "lazy-ass": "1.6.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=", + "dev": true + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", + "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "circular-json": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.5.tgz", + "integrity": "sha512-13YaR6kiz0kBNmIVM87Io8Hp7bWOo4r61vkEANy8iH9R9bc6avud/1FT0SBpqR1RpIQADOh/Q+yHZDA1iL6ysA==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", + "dev": true, + "requires": { + "source-map": "0.5.x" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "dev": true, + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + } + } + }, + "cli-table2": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cli-table2/-/cli-table2-0.2.0.tgz", + "integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=", + "dev": true, + "requires": { + "colors": "^1.1.2", + "lodash": "^3.10.1", + "string-width": "^1.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "colors": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.1.tgz", + "integrity": "sha512-jg/vxRmv430jixZrC+La5kMbUWqIg32/JsYNZb94+JEmzceYbWKTsv1OuTp+7EaqiaWRR2tPcykibwCRgclIsw==", + "dev": true + }, + "combine-lists": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", + "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", + "dev": true, + "requires": { + "lodash": "^4.5.0" + } + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz", + "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compare-versions": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz", + "integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==", + "dev": true + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", + "dev": true + }, + "compressible": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", + "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", + "dev": true, + "requires": { + "mime-db": ">= 1.34.0 < 2" + } + }, + "compression": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", + "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.14", + "debug": "2.6.9", + "on-headers": "~1.0.1", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "configstore": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, + "connect": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "~1.3.2", + "utils-merge": "1.0.1" + } + }, + "connect-history-api-fallback": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", + "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cp-sugar": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cp-sugar/-/cp-sugar-1.0.0.tgz", + "integrity": "sha1-HCb5vcocA89q90SmVSOf+THMq28=", + "dev": true, + "requires": { + "cross-spawn-async": "^2.1.6", + "pinkie-promise": "^2.0.0", + "promisify-event": "^1.0.0", + "shell-quote": "^1.4.3" + } + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "cross-spawn-async": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz", + "integrity": "sha1-hF/wwINKPe2dFg2sptOQkGuyiMw=", + "dev": true, + "requires": { + "lru-cache": "^4.0.0", + "which": "^1.2.8" + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "optional": true, + "requires": { + "boom": "2.x.x" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", + "dev": true + }, + "cvss": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cvss/-/cvss-1.0.3.tgz", + "integrity": "sha512-1FfNhEFVfeC+fgZpEr6oCOOTXifJicZS+Lq/mmUKI4Om+2O8zYspc/uhw51He+CTM5givI1dqIw5JUqyi1BWtA==", + "dev": true + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "^0.10.9" + } + }, + "d3-helpers": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/d3-helpers/-/d3-helpers-0.3.0.tgz", + "integrity": "sha1-SzHc5KISGnczY4RXTYk/vtX7KT0=", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-uri-to-buffer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", + "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", + "dev": true, + "optional": true + }, + "date-format": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", + "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=", + "dev": true + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true, + "requires": { + "foreach": "^2.0.5", + "object-keys": "^1.0.8" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "degenerator": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", + "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", + "dev": true, + "optional": true, + "requires": { + "ast-types": "0.x.x", + "escodegen": "1.x.x", + "esprima": "3.x.x" + } + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "dev": true, + "requires": { + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "detect-node": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", + "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", + "dev": true + }, + "di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", + "dev": true + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "dev": true, + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "dev": true, + "requires": { + "buffer-indexof": "^1.0.0" + } + }, + "dom-converter": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", + "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", + "dev": true, + "requires": { + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "dev": true, + "requires": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "~1.1.1", + "entities": "~1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "double-ended-queue": { + "version": "2.1.0-0", + "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", + "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", + "dev": true, + "optional": true + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "~1.1.9" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", + "dev": true + }, + "elegant-status": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/elegant-status/-/elegant-status-1.1.0.tgz", + "integrity": "sha1-Qe9KXy0DZCmDurtPZKS1drEVUhU=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "elegant-spinner": "^1.0.1", + "log-update": "^1.0.2", + "os-family": "^1.0.0" + } + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "engine.io": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz", + "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "uws": "~9.14.0", + "ws": "~3.3.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "engine.io-client": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.6.tgz", + "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "engine.io-parser": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.2.tgz", + "integrity": "sha512-dInLFzr80RijZ1rGpx1+56/uFoH7/7InhH3kZt+Ms6hT8tNx3NGW/WNSA/f8As1WkOfkuyb3tnRyuXGxusclMw==", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.4", + "has-binary2": "~1.0.2" + } + }, + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", + "dev": true + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "es5-ext": { + "version": "0.10.45", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", + "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" + } + }, + "es5-shim": { + "version": "4.5.10", + "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.10.tgz", + "integrity": "sha512-vmryBdqKRO8Ei9LJ4yyEk/EOmAOGIagcHDYPpTAi6pot4IMHS1AC2q5cTKPmydpijg2iX8DVmCuqgrNxIWj8Yg==", + "dev": true + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-promise": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", + "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-shim": { + "version": "0.35.3", + "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.3.tgz", + "integrity": "sha1-m/tzY/7//4emzbbNk+QF7DxLbyY=", + "dev": true + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", + "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", + "dev": true, + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + } + }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "eventsource": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", + "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", + "dev": true, + "requires": { + "original": ">=0.0.5" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-braces": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", + "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", + "dev": true, + "requires": { + "array-slice": "^0.2.3", + "array-unique": "^0.2.1", + "braces": "^0.1.2" + }, + "dependencies": { + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", + "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", + "dev": true, + "requires": { + "expand-range": "^0.1.0" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-range": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", + "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", + "dev": true, + "requires": { + "is-number": "^0.1.1", + "repeat-string": "^0.2.2" + }, + "dependencies": { + "is-number": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", + "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=", + "dev": true + }, + "repeat-string": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", + "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=", + "dev": true + } + } + }, + "express": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.3", + "qs": "6.5.1", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "http-errors": "~1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "~2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "~1.6.15" + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true + } + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "extract-zip": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", + "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "dev": true, + "requires": { + "concat-stream": "1.6.2", + "debug": "2.6.9", + "mkdirp": "0.5.1", + "yauzl": "2.4.1" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "falafel": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.1.0.tgz", + "integrity": "sha1-lrsXdh2rqU9G0AFzizzt86Z/4Gw=", + "dev": true, + "requires": { + "acorn": "^5.0.0", + "foreach": "^2.0.5", + "isarray": "0.0.1", + "object-keys": "^1.0.6" + } + }, + "fancy-log": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "time-stamp": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", + "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" + } + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "fd-slicer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "^7.0.3", + "minimatch": "^3.0.3" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + }, + "dependencies": { + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + } + }, + "find-root": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-0.1.2.tgz", + "integrity": "sha1-mNImfP8ZFsyvJ0OzoO6oHXnX3NE=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "follow-redirects": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.2.tgz", + "integrity": "sha512-kssLorP/9acIdpQ2udQVTiCS5LQmdEz9mvdIfDcl1gYX2tPKFADHSyFdvJS040XdFsPzemWtgI3q8mFVCxtX8A==", + "dev": true, + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", + "dev": true, + "requires": { + "null-check": "^1.0.0" + } + }, + "fs-extra": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", + "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "minipass": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", + "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.0.tgz", + "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz", + "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz", + "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz", + "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz", + "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "yallist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", + "dev": true + } + } + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "dev": true, + "requires": { + "fstream": "^1.0.0", + "inherits": "2", + "minimatch": "^3.0.0" + } + }, + "fstream-npm": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.2.1.tgz", + "integrity": "sha512-iBHpm/LmD1qw0TlHMAqVd9rwdU6M+EHRUnPkXpRi5G/Hf0FIFH+oZFryodAU2MFNfGRh/CzhUFlMKV3pdeOTDw==", + "dev": true, + "requires": { + "fstream-ignore": "^1.0.0", + "inherits": "2" + } + }, + "ftp": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", + "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "1.1.x", + "xregexp": "2.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", + "dev": true, + "optional": true + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "optional": true, + "requires": { + "is-property": "^1.0.0" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-uri": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.2.tgz", + "integrity": "sha512-ZD325dMZOgerGqF/rF6vZXyFGTAay62svjQIT+X/oU2PtxYpFxvSkbsdi+oxIrsNxlZVd4y8wUDqkaExWTI/Cw==", + "dev": true, + "optional": true, + "requires": { + "data-uri-to-buffer": "1", + "debug": "2", + "extend": "3", + "file-uri-to-path": "1", + "ftp": "~0.3.10", + "readable-stream": "2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "ggit": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/ggit/-/ggit-2.4.2.tgz", + "integrity": "sha512-4pltyhG4cjVT1Nqs9pq8Iykc/lTibc4LKRUAxszA9+OgwpfGhbsFgzhtyXwh5AbiWZrBa87nIHzyVGlJoT4nCw==", + "dev": true, + "requires": { + "always-error": "1.0.0", + "bluebird": "3.5.1", + "chdir-promise": "0.6.2", + "check-more-types": "2.24.0", + "cli-table": "0.3.1", + "colors": "1.1.2", + "commander": "2.12.2", + "d3-helpers": "0.3.0", + "debug": "3.1.0", + "find-up": "2.1.0", + "glob": "7.1.2", + "lazy-ass": "1.6.0", + "lodash": "4.17.4", + "moment": "2.19.3", + "moment-timezone": "0.5.14", + "optimist": "0.6.1", + "pluralize": "7.0.0", + "q": "2.0.3", + "quote": "0.4.0", + "ramda": "0.25.0", + "semver": "5.4.1" + }, + "dependencies": { + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "commander": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", + "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "^1.3.4" + } + }, + "global-modules-path": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/global-modules-path/-/global-modules-path-2.3.0.tgz", + "integrity": "sha512-HchvMJNYh9dGSCy8pOQ2O8u/hoXaL+0XhnrwH0RyLiSXMMTl9W3N6KUU73+JFOg5PGjtzl6VZzUQsnrpm7Szag==", + "dev": true + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "glogg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "glsl-inject-defines": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/glsl-inject-defines/-/glsl-inject-defines-1.0.3.tgz", + "integrity": "sha1-3RqswsF/yyvT/DJBHGYz0Ne2D9Q=", + "dev": true, + "requires": { + "glsl-token-inject-block": "^1.0.0", + "glsl-token-string": "^1.0.1", + "glsl-tokenizer": "^2.0.2" + } + }, + "glsl-resolve": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/glsl-resolve/-/glsl-resolve-0.0.1.tgz", + "integrity": "sha1-iUvvc5ENeSyBtRQxgANdCnivdtM=", + "dev": true, + "requires": { + "resolve": "^0.6.1", + "xtend": "^2.1.2" + }, + "dependencies": { + "resolve": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", + "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=", + "dev": true + }, + "xtend": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.2.0.tgz", + "integrity": "sha1-7vax8ZjByN6vrYsXZaBNrUoBxak=", + "dev": true + } + } + }, + "glsl-token-assignments": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/glsl-token-assignments/-/glsl-token-assignments-2.0.2.tgz", + "integrity": "sha1-pdgqt4SZwuimuDy2lJXm5mXOAZ8=", + "dev": true + }, + "glsl-token-defines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glsl-token-defines/-/glsl-token-defines-1.0.0.tgz", + "integrity": "sha1-y4kqqVmTYjFyhHDU90AySJaX+p0=", + "dev": true, + "requires": { + "glsl-tokenizer": "^2.0.0" + } + }, + "glsl-token-depth": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/glsl-token-depth/-/glsl-token-depth-1.1.2.tgz", + "integrity": "sha1-I8XjDuK9JViEtKKLyFC495HpXYQ=", + "dev": true + }, + "glsl-token-descope": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glsl-token-descope/-/glsl-token-descope-1.0.2.tgz", + "integrity": "sha1-D8kKsyYYa4L1l7LnfcniHvzTIHY=", + "dev": true, + "requires": { + "glsl-token-assignments": "^2.0.0", + "glsl-token-depth": "^1.1.0", + "glsl-token-properties": "^1.0.0", + "glsl-token-scope": "^1.1.0" + } + }, + "glsl-token-inject-block": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/glsl-token-inject-block/-/glsl-token-inject-block-1.1.0.tgz", + "integrity": "sha1-4QFfWYDBCRgkraomJfHf3ovQADQ=", + "dev": true + }, + "glsl-token-properties": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glsl-token-properties/-/glsl-token-properties-1.0.1.tgz", + "integrity": "sha1-SD3D2Dnw1LXGFx0VkfJJvlPCip4=", + "dev": true + }, + "glsl-token-scope": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/glsl-token-scope/-/glsl-token-scope-1.1.2.tgz", + "integrity": "sha1-oXKOeN8kRE+cuT/RjvD3VQOmQ7E=", + "dev": true + }, + "glsl-token-string": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glsl-token-string/-/glsl-token-string-1.0.1.tgz", + "integrity": "sha1-WUQdL4V958NEnJRWZgIezjWOSOw=", + "dev": true + }, + "glsl-token-whitespace-trim": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glsl-token-whitespace-trim/-/glsl-token-whitespace-trim-1.0.0.tgz", + "integrity": "sha1-RtHf6Yx1vX1QTAXX0RsbPpzJOxA=", + "dev": true + }, + "glsl-tokenizer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/glsl-tokenizer/-/glsl-tokenizer-2.1.2.tgz", + "integrity": "sha1-cgMHUi4DxXrzXABVGVDEpw7y37k=", + "dev": true, + "requires": { + "through2": "^0.6.3" + } + }, + "glslify": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/glslify/-/glslify-6.2.1.tgz", + "integrity": "sha512-rII1HbHc/Mr03kCOSsTIo5QN16lsi8w/frQjwRrIYifgyCLhnJp12fBVMzEW66bJoEd8YBys0+O2aRVXwxasLA==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "concat-stream": "^1.5.2", + "duplexify": "^3.4.5", + "falafel": "^2.0.0", + "from2": "^2.3.0", + "glsl-resolve": "0.0.1", + "glsl-token-whitespace-trim": "^1.0.0", + "glslify-bundle": "^5.0.0", + "glslify-deps": "^1.2.5", + "minimist": "^1.2.0", + "resolve": "^1.1.5", + "stack-trace": "0.0.9", + "static-eval": "^2.0.0", + "tape": "^4.6.0", + "through2": "^2.0.1", + "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + } + } + }, + "glslify-bundle": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-5.0.0.tgz", + "integrity": "sha1-AlKtoe+d8wtmAAbguyH9EwtIbkI=", + "dev": true, + "requires": { + "glsl-inject-defines": "^1.0.1", + "glsl-token-defines": "^1.0.0", + "glsl-token-depth": "^1.1.1", + "glsl-token-descope": "^1.0.2", + "glsl-token-scope": "^1.1.1", + "glsl-token-string": "^1.0.1", + "glsl-token-whitespace-trim": "^1.0.0", + "glsl-tokenizer": "^2.0.2", + "murmurhash-js": "^1.0.0", + "shallow-copy": "0.0.1" + } + }, + "glslify-deps": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/glslify-deps/-/glslify-deps-1.3.1.tgz", + "integrity": "sha512-Ogm179MCazwIRyEqs3g3EOY4Y3XIAa0yl8J5RE9rJC6QH1w8weVOp2RZu0mvnYy/2xIas1w166YR2eZdDkWQxg==", + "dev": true, + "requires": { + "@choojs/findup": "^0.2.0", + "events": "^1.0.2", + "glsl-resolve": "0.0.1", + "glsl-tokenizer": "^2.0.0", + "graceful-fs": "^4.1.2", + "inherits": "^2.0.1", + "map-limit": "0.0.1", + "resolve": "^1.0.0" + } + }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gulp-util": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.7.tgz", + "integrity": "sha1-eJJcS4+LSQBawBoBHFV+YhiUHLs=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^1.0.11", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, + "handle-thing": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", + "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + } + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, + "requires": { + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "dev": true, + "requires": { + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + } + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hasha": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", + "integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=", + "dev": true, + "requires": { + "is-stream": "^1.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "optional": true, + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hipchat-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz", + "integrity": "sha1-ttJJdVQ3wZEII2d5nTupoPI7Ix4=", + "dev": true, + "optional": true, + "requires": { + "lodash": "^4.0.0", + "request": "^2.0.0" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "dev": true + }, + "html-minifier": { + "version": "3.5.19", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.19.tgz", + "integrity": "sha512-Qr2JC9nsjK8oCrEmuB430ZIA8YWbF3D5LSjywD75FTuXmeqacwHgIM8wp3vHYzzPbklSjp53RdmDuzR4ub2HzA==", + "dev": true, + "requires": { + "camel-case": "3.0.x", + "clean-css": "4.1.x", + "commander": "2.16.x", + "he": "1.1.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.4.x" + } + }, + "html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", + "dev": true, + "requires": { + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "tapable": "^1.0.0", + "toposort": "^1.0.0", + "util.promisify": "1.0.0" + } + }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" + }, + "dependencies": { + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "dev": true, + "requires": { + "domelementtype": "1" + } + } + } + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "http-parser-js": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", + "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=", + "dev": true + }, + "http-proxy": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "dev": true, + "requires": { + "eventemitter3": "^3.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "dev": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "http-proxy-middleware": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "dev": true, + "requires": { + "http-proxy": "^1.16.2", + "is-glob": "^4.0.0", + "lodash": "^4.17.5", + "micromatch": "^3.1.9" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "httpntlm": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", + "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", + "dev": true, + "requires": { + "httpreq": ">=0.4.22", + "underscore": "~1.7.0" + } + }, + "httpreq": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", + "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "https-proxy-agent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "dev": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imports-loader": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/imports-loader/-/imports-loader-0.8.0.tgz", + "integrity": "sha512-kXWL7Scp8KQ4552ZcdVTeaQCZSLW+e6nJfp3cwUMB673T7Hr98Xjx5JK+ql7ADlJUvj1JS5O01RLbKoutN5QDQ==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "source-map": "^0.6.1" + }, + "dependencies": { + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflection": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", + "integrity": "sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=", + "dev": true, + "optional": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-4.0.2.tgz", + "integrity": "sha512-+f3qDNeZpkhFJ61NBA9jXDrGGhoQuqfEum9A681c9oHoIbGgVqjogKynjB/vNVP+nVu9w3FbFQ35c0ibU0MaIQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "internal-ip": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", + "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", + "dev": true, + "requires": { + "meow": "^3.3.0" + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "inversify": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/inversify/-/inversify-4.13.0.tgz", + "integrity": "sha512-O5d8y7gKtyRwrvTLZzYET3kdFjqUy58sGpBYMARF13mzqDobpfBXVOPLH7HmnD2VR6Q+1HzZtslGvsdQfeb0SA==" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + } + }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "dev": true, + "optional": true + }, + "is-my-json-valid": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", + "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", + "dev": true, + "optional": true, + "requires": { + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true, + "optional": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "istanbul-api": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", + "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", + "dev": true, + "requires": { + "async": "^2.1.4", + "compare-versions": "^3.1.0", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.2.0", + "istanbul-lib-instrument": "^1.10.1", + "istanbul-lib-report": "^1.1.4", + "istanbul-lib-source-maps": "^1.2.4", + "istanbul-reports": "^1.3.0", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + } + } + }, + "istanbul-instrumenter-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", + "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", + "dev": true, + "requires": { + "convert-source-map": "^1.5.0", + "istanbul-lib-instrument": "^1.7.3", + "loader-utils": "^1.1.0", + "schema-utils": "^0.3.0" + }, + "dependencies": { + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + } + } + }, + "istanbul-lib-coverage": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", + "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", + "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", + "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "dev": true, + "requires": { + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.0", + "semver": "^5.3.0" + } + }, + "istanbul-lib-report": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", + "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", + "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", + "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", + "dev": true, + "requires": { + "handlebars": "^4.0.3" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + } + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", + "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", + "dev": true + }, + "karma": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.5.tgz", + "integrity": "sha512-rECezBeY7mjzGUWhFlB7CvPHgkHJLXyUmWg+6vHCEsdWNUTnmiS6jRrIMcJEWgU2DUGZzGWG0bTRVky8fsDTOA==", + "dev": true, + "requires": { + "bluebird": "^3.3.0", + "body-parser": "^1.16.1", + "chokidar": "^2.0.3", + "colors": "^1.1.0", + "combine-lists": "^1.0.0", + "connect": "^3.6.0", + "core-js": "^2.2.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.0", + "expand-braces": "^0.1.1", + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "http-proxy": "^1.13.0", + "isbinaryfile": "^3.0.0", + "lodash": "^4.17.4", + "log4js": "^2.5.3", + "mime": "^1.3.4", + "minimatch": "^3.0.2", + "optimist": "^0.6.1", + "qjobs": "^1.1.4", + "range-parser": "^1.2.0", + "rimraf": "^2.6.0", + "safe-buffer": "^5.0.1", + "socket.io": "2.0.4", + "source-map": "^0.6.1", + "tmp": "0.0.33", + "useragent": "2.2.1" + } + }, + "karma-chai": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz", + "integrity": "sha1-vuWtQEAFF4Ea40u5RfdikJEIt5o=", + "dev": true + }, + "karma-chrome-launcher": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", + "dev": true, + "requires": { + "fs-access": "^1.0.0", + "which": "^1.2.1" + } + }, + "karma-coverage-istanbul-reporter": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.1.tgz", + "integrity": "sha512-UcgrHkFehI5+ivMouD8NH/UOHiX4oCAtwaANylzPFdcAuD52fnCUuelacq2gh8tZ4ydhU3+xiXofSq7j5Ehygw==", + "dev": true, + "requires": { + "istanbul-api": "^1.3.1", + "minimatch": "^3.0.4" + } + }, + "karma-es6-shim": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/karma-es6-shim/-/karma-es6-shim-1.0.0.tgz", + "integrity": "sha1-qutTCGK895NA69WI9PnlfehCtHk=", + "dev": true, + "requires": { + "es5-shim": "~4.5.8", + "es6-shim": "~0.35.0" + } + }, + "karma-mocha": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-1.3.0.tgz", + "integrity": "sha1-7qrH/8DiAetjxGdEDStpx883eL8=", + "dev": true, + "requires": { + "minimist": "1.2.0" + } + }, + "karma-mocha-reporter": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz", + "integrity": "sha1-FRIAlejtgZGG5HoLAS8810GJVWA=", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "log-symbols": "^2.1.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "karma-phantomjs-launcher": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.4.tgz", + "integrity": "sha1-0jyjSAG9qYY60xjju0vUBisTrNI=", + "dev": true, + "requires": { + "lodash": "^4.0.1", + "phantomjs-prebuilt": "^2.1.7" + } + }, + "karma-remap-istanbul": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/karma-remap-istanbul/-/karma-remap-istanbul-0.6.0.tgz", + "integrity": "sha1-l/O3cAZSVPm0ck8tm+SjouG69vw=", + "dev": true, + "requires": { + "istanbul": "^0.4.3", + "remap-istanbul": "^0.9.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "remap-istanbul": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/remap-istanbul/-/remap-istanbul-0.9.6.tgz", + "integrity": "sha512-l0WDBsVjaTzP8m3glERJO6bjlAFUahcgfcgvcX+owZw7dKeDLT3CVRpS7UO4L9LfGcMiNsqk223HopwVxlh8Hg==", + "dev": true, + "requires": { + "amdefine": "^1.0.0", + "gulp-util": "3.0.7", + "istanbul": "0.4.5", + "minimatch": "^3.0.3", + "source-map": "^0.6.1", + "through2": "2.0.1" + } + }, + "through2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "dev": true, + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + } + } + } + }, + "karma-sinon": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/karma-sinon/-/karma-sinon-1.0.5.tgz", + "integrity": "sha1-TjRD8oMP3s/2JNN0cWPxIX2qKpo=", + "dev": true + }, + "karma-sinon-chai": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/karma-sinon-chai/-/karma-sinon-chai-2.0.2.tgz", + "integrity": "sha512-SDgh6V0CUd+7ruL1d3yG6lFzmJNGRNQuEuCYXLaorruNP9nwQfA7hpsp4clx4CbOo5Gsajh3qUOT7CrVStUKMw==", + "dev": true + }, + "karma-sourcemap-loader": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.7.tgz", + "integrity": "sha1-kTIsd/jxPUb+0GKwQuEAnUxFBdg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "karma-sourcemap-writer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/karma-sourcemap-writer/-/karma-sourcemap-writer-0.1.2.tgz", + "integrity": "sha1-NGXgB0orQYHT2xrEGSo8jkbQISo=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.3" + } + }, + "karma-webpack": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-3.0.0.tgz", + "integrity": "sha512-Ja1o9LLoqWaJyUNhTKaXjWiEH9y7a9H3mzP8pYB30SBsgoF5KBS/65NeHFd+QPuT9ITrym8xFt8BZeGbcOfujA==", + "dev": true, + "requires": { + "async": "^2.0.0", + "babel-runtime": "^6.0.0", + "loader-utils": "^1.0.0", + "lodash": "^4.0.0", + "source-map": "^0.5.6", + "webpack-dev-middleware": "^2.0.6" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "kew": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", + "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=", + "dev": true + }, + "killable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", + "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "^4.0.0" + } + }, + "lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha1-eZllXoZGwX8In90YfRUNMyTVRRM=", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "libbase64": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", + "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=", + "dev": true + }, + "libmime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.0.0.tgz", + "integrity": "sha1-UaGp50SOy9Ms2lRCFnW7IbwJPaY=", + "dev": true, + "requires": { + "iconv-lite": "0.4.15", + "libbase64": "0.1.0", + "libqp": "1.1.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=", + "dev": true + } + } + }, + "libqp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", + "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "^3.0.0" + } + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } + }, + "lodash.toarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", + "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "log-update": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "dev": true, + "requires": { + "ansi-escapes": "^1.0.0", + "cli-cursor": "^1.0.2" + } + }, + "log4js": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.11.0.tgz", + "integrity": "sha512-z1XdwyGFg8/WGkOyF6DPJjivCWNLKrklGdViywdYnSKOvgtEBo2UyEMZS5sD2mZrQlU3TvO8wDWLc8mzE1ncBQ==", + "dev": true, + "requires": { + "amqplib": "^0.5.2", + "axios": "^0.15.3", + "circular-json": "^0.5.4", + "date-format": "^1.2.0", + "debug": "^3.1.0", + "hipchat-notifier": "^1.1.0", + "loggly": "^1.1.0", + "mailgun-js": "^0.18.0", + "nodemailer": "^2.5.0", + "redis": "^2.7.1", + "semver": "^5.5.0", + "slack-node": "~0.2.0", + "streamroller": "0.7.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "loggly": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/loggly/-/loggly-1.1.1.tgz", + "integrity": "sha1-Cg/B0/o6XsRP3HuJe+uipGlc6+4=", + "dev": true, + "optional": true, + "requires": { + "json-stringify-safe": "5.0.x", + "request": "2.75.x", + "timespan": "2.3.x" + }, + "dependencies": { + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true, + "optional": true + }, + "bl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", + "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "~2.0.5" + } + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz", + "integrity": "sha1-bwrrrcxdoWwT4ezBETfYX5uIOyU=", + "dev": true, + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.11" + } + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "dev": true, + "optional": true, + "requires": { + "chalk": "^1.1.1", + "commander": "^2.9.0", + "is-my-json-valid": "^2.12.4", + "pinkie-promise": "^2.0.0" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true, + "optional": true + }, + "qs": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "request": { + "version": "2.75.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz", + "integrity": "sha1-0rgmiihtoT6qXQGt9dGMyQ9lfZM=", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "bl": "~1.1.2", + "caseless": "~0.11.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.0.0", + "har-validator": "~2.0.6", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "node-uuid": "~1.4.7", + "oauth-sign": "~0.8.1", + "qs": "~6.2.0", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "~0.4.1" + } + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true, + "optional": true + } + } + }, + "loglevel": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", + "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", + "dev": true + }, + "loglevelnext": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", + "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==", + "dev": true, + "requires": { + "es6-symbol": "^3.1.1", + "object.assign": "^4.1.0" + } + }, + "lolex": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", + "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", + "dev": true + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "mailcomposer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", + "integrity": "sha1-DhxEsqB890DuF9wUm6AJ8Zyt/rQ=", + "dev": true, + "optional": true, + "requires": { + "buildmail": "4.0.1", + "libmime": "3.0.0" + } + }, + "mailgun-js": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/mailgun-js/-/mailgun-js-0.18.1.tgz", + "integrity": "sha512-lvuMP14u24HS2uBsJEnzSyPMxzU2b99tQsIx1o6QNjqxjk8b3WvR+vq5oG1mjqz/IBYo+5gF+uSoDS0RkMVHmg==", + "dev": true, + "optional": true, + "requires": { + "async": "~2.6.0", + "debug": "~3.1.0", + "form-data": "~2.3.0", + "inflection": "~1.12.0", + "is-stream": "^1.1.0", + "path-proxy": "~1.0.0", + "promisify-call": "^2.0.2", + "proxy-agent": "~3.0.0", + "tsscmp": "~1.0.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "optional": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "make-error": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", + "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", + "dev": true + }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-limit": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/map-limit/-/map-limit-0.0.1.tgz", + "integrity": "sha1-63lhAxwPDo0AG/LVb6toXViCLzg=", + "dev": true, + "requires": { + "once": "~1.3.0" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "1" + } + } + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge2": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", + "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", + "dev": true, + "requires": { + "mime-db": "~1.35.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mississippi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + } + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "dependencies": { + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "moment": { + "version": "2.19.3", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.3.tgz", + "integrity": "sha1-vbmdJw1tf9p4zA+6zoVeJ/59pp8=", + "dev": true + }, + "moment-timezone": { + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.14.tgz", + "integrity": "sha1-TrOP+VOLgBCLpGekWPPtQmjM/LE=", + "dev": true, + "requires": { + "moment": ">= 2.9.0" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "dev": true, + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", + "dev": true + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, + "murmurhash-js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz", + "integrity": "sha1-sGJ44h/Gw3+lMTcysEEry2rhX1E=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, + "neo-async": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "dev": true + }, + "netmask": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", + "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", + "dev": true, + "optional": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "dev": true + }, + "nise": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", + "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^2.0.0", + "just-extend": "^1.1.27", + "lolex": "^2.3.2", + "path-to-regexp": "^1.7.0", + "text-encoding": "^0.6.4" + } + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "node-emoji": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.8.1.tgz", + "integrity": "sha512-+ktMAh1Jwas+TnGodfCfjUbJKoANqPaJFN0z0iqh41eqD8dvguNzcitVSBSVK1pidz0AqGbLKcoVuVLRVZ/aVg==", + "dev": true, + "requires": { + "lodash.toarray": "^4.4.0" + } + }, + "node-forge": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", + "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", + "dev": true + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "nodemailer": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", + "integrity": "sha1-8kLmSa7q45tsftdA73sGHEBNMPk=", + "dev": true, + "optional": true, + "requires": { + "libmime": "3.0.0", + "mailcomposer": "4.0.1", + "nodemailer-direct-transport": "3.3.2", + "nodemailer-shared": "1.1.0", + "nodemailer-smtp-pool": "2.8.2", + "nodemailer-smtp-transport": "2.7.2", + "socks": "1.1.9" + }, + "dependencies": { + "socks": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.9.tgz", + "integrity": "sha1-Yo1+TQSRJDVEWsC25Fk3bLPm1pE=", + "dev": true, + "optional": true, + "requires": { + "ip": "^1.1.2", + "smart-buffer": "^1.0.4" + } + } + } + }, + "nodemailer-direct-transport": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz", + "integrity": "sha1-6W+vuQNYVglH5WkBfZfmBzilCoY=", + "dev": true, + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-fetch": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz", + "integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q=", + "dev": true + }, + "nodemailer-shared": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz", + "integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=", + "dev": true, + "requires": { + "nodemailer-fetch": "1.6.0" + } + }, + "nodemailer-smtp-pool": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz", + "integrity": "sha1-LrlNbPhXgLG0clzoU7nL1ejajHI=", + "dev": true, + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "nodemailer-wellknown": "0.1.10", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-smtp-transport": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz", + "integrity": "sha1-A9ccdjFPFKx9vHvwM6am0W1n+3c=", + "dev": true, + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "nodemailer-wellknown": "0.1.10", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-wellknown": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz", + "integrity": "sha1-WG24EB2zDLRDjrVGc3pBqtDPE9U=", + "dev": true + }, + "nodesecurity-npm-utils": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nodesecurity-npm-utils/-/nodesecurity-npm-utils-6.0.0.tgz", + "integrity": "sha512-NLRle1woNaT2orR6fue2jNqkhxDTktgJj3sZxvR/8kp21pvOY7Gwlx5wvo0H8ZVPqdgd2nE2ADB9wDu5Cl8zNg==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "nsp": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/nsp/-/nsp-3.2.1.tgz", + "integrity": "sha512-dLmGi7IGixJEHKetErIH460MYiYIzAoxuVsloZFu9e1p9U8K0yULx7YQ1+VzrjZbB+wqq67ES1SfOvKVb/qMDQ==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "cli-table2": "^0.2.0", + "cvss": "^1.0.2", + "https-proxy-agent": "^2.1.0", + "inquirer": "^3.3.0", + "nodesecurity-npm-utils": "^6.0.0", + "semver": "^5.4.1", + "wreck": "^12.5.1", + "yargs": "^9.0.1" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", + "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "read-pkg-up": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^7.0.0" + } + } + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "null-check": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-inspect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", + "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==", + "dev": true + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "opn": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", + "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "original": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.1.tgz", + "integrity": "sha512-IEvtB5vM5ULvwnqMxWBLxkS13JIEXbakizMSo3yoPNPCIWzg8TG3Usn/UhXoZFM/m+FuEA20KdzPSFq/0rS+UA==", + "dev": true, + "requires": { + "url-parse": "~1.4.0" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-family": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/os-family/-/os-family-1.0.0.tgz", + "integrity": "sha1-0SMIxCSjYwKhwQapUoe73VyiR38=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pac-proxy-agent": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.2.tgz", + "integrity": "sha512-cDNAN1Ehjbf5EHkNY5qnRhGPUCp6SnpyVof5fRzN800QV1Y2OkzbH9rmjZkbBRa8igof903yOnjIl6z0SlAhxA==", + "dev": true, + "optional": true, + "requires": { + "agent-base": "^4.2.0", + "debug": "^3.1.0", + "get-uri": "^2.0.0", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.1", + "pac-resolver": "^3.0.0", + "raw-body": "^2.2.0", + "socks-proxy-agent": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "socks-proxy-agent": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", + "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", + "dev": true, + "optional": true, + "requires": { + "agent-base": "^4.1.0", + "socks": "^1.1.10" + } + } + } + }, + "pac-resolver": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", + "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", + "dev": true, + "optional": true, + "requires": { + "co": "^4.6.0", + "degenerator": "^1.0.4", + "ip": "^1.1.5", + "netmask": "^1.0.6", + "thunkify": "^2.1.2" + } + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + } + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-proxy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-proxy/-/path-proxy-1.0.0.tgz", + "integrity": "sha1-GOijaFn8nS8aU7SN7hOFQ8Ag3l4=", + "dev": true, + "optional": true, + "requires": { + "inflection": "~1.3.0" + }, + "dependencies": { + "inflection": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.3.8.tgz", + "integrity": "sha1-y9Fg2p91sUw8xjV41POWeEvzAU4=", + "dev": true, + "optional": true + } + } + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "phantomjs-prebuilt": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz", + "integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3", + "extract-zip": "^1.6.5", + "fs-extra": "^1.0.0", + "hasha": "^2.2.0", + "kew": "^0.7.0", + "progress": "^1.1.8", + "request": "^2.81.0", + "request-progress": "^2.0.1", + "which": "^1.2.10" + } + }, + "phaser": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.11.0.tgz", + "integrity": "sha512-mzdabS3phdvbdOWvqKLbOCRlazWGDLG4XT0vsazpyYiyeElYk3TRhc4RZJ6su6taIcGejBY3t8NI3copk0aZ0Q==", + "requires": { + "eventemitter3": "^3.1.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + } + } + }, + "pkgd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pkgd/-/pkgd-1.1.2.tgz", + "integrity": "sha1-aaumxykr0s8Dun8+LqqBydOj5Gk=", + "dev": true, + "requires": { + "fstream-npm": "^1.0.7", + "normalize-path": "^2.0.1", + "pinkie-promise": "^2.0.1" + } + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + } + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "pop-iterate": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pop-iterate/-/pop-iterate-1.0.1.tgz", + "integrity": "sha1-zqz9q0q/NT16DyqqLB/Hs/lBO6M=", + "dev": true + }, + "portfinder": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", + "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", + "dev": true, + "requires": { + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "prettier": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.0.tgz", + "integrity": "sha512-KtQ2EGaUwf2EyDfp1fxyEb0PqGKakVm0WyXwDt6u+cAoxbO2Z2CwKvOe3+b4+F2IlO9lYHi1kqFuRM70ddBnow==", + "dev": true + }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "dev": true, + "requires": { + "renderkid": "^2.0.1", + "utila": "~0.4" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "promisify-call": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/promisify-call/-/promisify-call-2.0.4.tgz", + "integrity": "sha1-1IwtRWUszM1SgB3ey9UzptS9X7o=", + "dev": true, + "optional": true, + "requires": { + "with-callback": "^1.0.2" + } + }, + "promisify-event": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/promisify-event/-/promisify-event-1.0.0.tgz", + "integrity": "sha1-vXUj6ga3AWLzcJeQFrU6aGxg6Q8=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "proxy-agent": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.1.tgz", + "integrity": "sha512-mAZexaz9ZxQhYPWfAjzlrloEjW+JHiBFryE4AJXFDTnaXfmH/FKqC1swTRKuEPbHWz02flQNXFOyDUF7zfEG6A==", + "dev": true, + "optional": true, + "requires": { + "agent-base": "^4.2.0", + "debug": "^3.1.0", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.1", + "lru-cache": "^4.1.2", + "pac-proxy-agent": "^2.0.1", + "proxy-from-env": "^1.0.0", + "socks-proxy-agent": "^4.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=", + "dev": true, + "optional": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "publish-please": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/publish-please/-/publish-please-3.2.0.tgz", + "integrity": "sha512-HmOSUx//Jmba8WY3BMn8zH7bsSGh/cyCYtgXmZXfd9erruJjTgIUTOGYn7992ysfF5mpXq4h20hpLFFILQ+GxA==", + "dev": true, + "requires": { + "ban-sensitive-files": "1.9.2", + "chalk": "2.4.1", + "cp-sugar": "^1.0.0", + "elegant-status": "1.1.0", + "globby": "8.0.1", + "inquirer": "4.0.2", + "lodash": "4.17.10", + "node-emoji": "1.8.1", + "nsp": "3.2.1", + "pinkie-promise": "^2.0.1", + "pkgd": "^1.1.2", + "promisify-event": "^1.0.0", + "read-pkg": "3.0.0", + "semver": "5.5.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "q": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/q/-/q-2.0.3.tgz", + "integrity": "sha1-dbjbAlWhpa+C9Yw/Oqoe/sfQ0TQ=", + "dev": true, + "requires": { + "asap": "^2.0.0", + "pop-iterate": "^1.0.1", + "weak-map": "^1.0.5" + } + }, + "qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "querystringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", + "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==", + "dev": true + }, + "quote": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/quote/-/quote-0.4.0.tgz", + "integrity": "sha1-EIOSF/bBNiuJGUBE0psjP9fzLwE=", + "dev": true + }, + "ramda": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz", + "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==", + "dev": true + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "redis": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", + "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", + "dev": true, + "optional": true, + "requires": { + "double-ended-queue": "^2.1.0-0", + "redis-commands": "^1.2.0", + "redis-parser": "^2.6.0" + } + }, + "redis-commands": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.5.tgz", + "integrity": "sha512-foGF8u6MXGFF++1TZVC6icGXuMYPftKXt1FBT2vrfU9ZATNtZJ8duRC5d1lEfE8hyVe3jhelHGB91oB7I6qLsA==", + "dev": true, + "optional": true + }, + "redis-parser": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", + "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", + "dev": true, + "optional": true + }, + "reflect-metadata": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", + "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remap-istanbul": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/remap-istanbul/-/remap-istanbul-0.11.1.tgz", + "integrity": "sha512-Itv3XvYjD6G+9xDzAeFohx4GUwbFjfqFt0UXlC826jHR18E49fEiEGqZUxUASwMq4z7wwUv2H9/XF2d6qj0iaQ==", + "dev": true, + "requires": { + "amdefine": "^1.0.0", + "istanbul": "0.4.5", + "minimatch": "^3.0.3", + "plugin-error": "^0.1.2", + "source-map": "^0.6.1", + "through2": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "through2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "dev": true, + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + } + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "renderkid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", + "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", + "dev": true, + "requires": { + "css-select": "^1.1.0", + "dom-converter": "~0.1", + "htmlparser2": "~3.3.0", + "strip-ansi": "^3.0.0", + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + } + }, + "request-progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz", + "integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=", + "dev": true, + "requires": { + "throttleit": "^1.0.0" + } + }, + "requestretry": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.13.0.tgz", + "integrity": "sha512-Lmh9qMvnQXADGAQxsXHP4rbgO6pffCfuR8XUBdP9aitJcLQJxhp7YZK4xAVYXnPJ5E52mwrfiKQtKonPL8xsmg==", + "dev": true, + "optional": true, + "requires": { + "extend": "^3.0.0", + "lodash": "^4.15.0", + "request": "^2.74.0", + "when": "^3.7.7" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "resumer": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", + "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", + "dev": true, + "requires": { + "through": "~2.3.4" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "*" + } + }, + "rxjs": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", + "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "dev": true + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "selfsigned": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.3.tgz", + "integrity": "sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q==", + "dev": true, + "requires": { + "node-forge": "0.7.5" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "^5.0.3" + } + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", + "dev": true + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-copy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", + "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sinon": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.4.tgz", + "integrity": "sha512-NFEts+4D4jp2sBjL94fQpZk5o73kzn/g58+I9Dp15i9vsnT4Lk1UEyUf2jACODWLG6Pz/llF0sArYUw47Aarmg==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^2.0.0", + "@sinonjs/samsam": "^2.0.0", + "diff": "^3.5.0", + "lodash.get": "^4.4.2", + "lolex": "^2.7.1", + "nise": "^1.4.2", + "supports-color": "^5.4.0", + "type-detect": "^4.0.8" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "sinon-chai": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.2.0.tgz", + "integrity": "sha512-Z72B4a0l0IQe5uWi9yzcqX/Ml6K9e1Hp03NmkjJnRG3gDsKTX7KvLFZsVUmCaz0eqeXLLK089mwTsP1P1W+DUQ==", + "dev": true + }, + "slack-node": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", + "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", + "dev": true, + "optional": true, + "requires": { + "requestretry": "^1.2.2" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "smart-buffer": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", + "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", + "dev": true, + "optional": true + }, + "smtp-connection": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", + "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", + "dev": true, + "requires": { + "httpntlm": "1.6.1", + "nodemailer-shared": "1.1.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "optional": true, + "requires": { + "hoek": "2.x.x" + } + }, + "socket.io": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", + "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", + "dev": true, + "requires": { + "debug": "~2.6.6", + "engine.io": "~3.1.0", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.0.4", + "socket.io-parser": "~3.1.1" + } + }, + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", + "dev": true + }, + "socket.io-client": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", + "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", + "dev": true, + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~2.6.4", + "engine.io-client": "~3.1.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.1.1", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.3.tgz", + "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "has-binary2": "~1.0.2", + "isarray": "2.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + } + } + }, + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "dev": true, + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" + } + }, + "sockjs-client": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz", + "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", + "dev": true, + "requires": { + "debug": "^2.6.6", + "eventsource": "0.1.6", + "faye-websocket": "~0.11.0", + "inherits": "^2.0.1", + "json3": "^3.3.2", + "url-parse": "^1.1.8" + }, + "dependencies": { + "faye-websocket": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", + "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + } + } + }, + "socks": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", + "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", + "dev": true, + "optional": true, + "requires": { + "ip": "^1.1.4", + "smart-buffer": "^1.0.13" + } + }, + "socks-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", + "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", + "dev": true, + "optional": true, + "requires": { + "agent-base": "~4.2.0", + "socks": "~2.2.0" + }, + "dependencies": { + "smart-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", + "integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", + "dev": true, + "optional": true + }, + "socks": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.1.tgz", + "integrity": "sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w==", + "dev": true, + "optional": true, + "requires": { + "ip": "^1.1.5", + "smart-buffer": "^4.0.1" + } + } + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "spdy": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "handle-thing": "^1.2.5", + "http-deceiver": "^1.2.7", + "safe-buffer": "^5.0.1", + "select-hose": "^2.0.0", + "spdy-transport": "^2.0.18" + } + }, + "spdy-transport": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", + "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", + "dev": true, + "requires": { + "debug": "^2.6.8", + "detect-node": "^2.0.3", + "hpack.js": "^2.1.6", + "obuf": "^1.1.1", + "readable-stream": "^2.2.9", + "safe-buffer": "^5.0.1", + "wbuf": "^1.7.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "stack-trace": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", + "integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=", + "dev": true + }, + "static-eval": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.0.tgz", + "integrity": "sha512-6flshd3F1Gwm+Ksxq463LtFd1liC77N/PX1FVVc3OzL3hAmo2fwHFbuArkcfi7s9rTNsLEhcRmXGFZhlgy40uw==", + "dev": true, + "requires": { + "escodegen": "^1.8.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "streamroller": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", + "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", + "dev": true, + "requires": { + "date-format": "^1.2.0", + "debug": "^3.1.0", + "mkdirp": "^0.5.1", + "readable-stream": "^2.3.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string.prototype.trim": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", + "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.0", + "function-bind": "^1.0.2" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + }, + "tapable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", + "dev": true + }, + "tape": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.1.tgz", + "integrity": "sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw==", + "dev": true, + "requires": { + "deep-equal": "~1.0.1", + "defined": "~1.0.0", + "for-each": "~0.3.3", + "function-bind": "~1.1.1", + "glob": "~7.1.2", + "has": "~1.0.3", + "inherits": "~2.0.3", + "minimist": "~1.2.0", + "object-inspect": "~1.6.0", + "resolve": "~1.7.1", + "resumer": "~0.0.0", + "string.prototype.trim": "~1.1.2", + "through": "~2.3.8" + }, + "dependencies": { + "resolve": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + } + } + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "^0.7.0" + } + }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, + "throttleit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.3.tgz", + "integrity": "sha1-eVKS/enyVMKjaLOPnMXRvUZjr7Y=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "thunkify": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", + "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", + "dev": true, + "optional": true + }, + "thunky": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", + "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", + "dev": true + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "timespan": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", + "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", + "dev": true, + "optional": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toposort": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", + "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", + "dev": true + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "requires": { + "punycode": "^1.4.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "ts-loader": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-4.4.2.tgz", + "integrity": "sha512-Z3Y1a7A0KZZ1s/mAZkt74l1NAF7Y5xUhD1V9VB8/1eUlUOk8Qa/oo46tO2Uu5kQ3wXypOlbv77lLQySjXEDcdw==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^1.0.2", + "micromatch": "^3.1.4", + "semver": "^5.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "ts-node": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.0.tgz", + "integrity": "sha512-klJsfswHP0FuOLsvBZ/zzCfUvakOSSxds78mVeK7I+qP76YWtxf16hEZsp3U+b0kIo82R5UatGFeblYMqabb2Q==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + }, + "tslint": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", + "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.27.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tslint-config-prettier": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.14.0.tgz", + "integrity": "sha512-SomD+aLvAwoihMtyCfkhhWKt9wcpSY2ZpgDV6OuxLYi8+7uOwE2g03aa+jJLSmY0Ys8s3ZLM5Iwfuwu3giCSQQ==", + "dev": true + }, + "tsscmp": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", + "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", + "dev": true, + "optional": true + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.1.tgz", + "integrity": "sha512-zQIMOmC+372pC/CCVLqnQ0zSBiY7HHodU7mpQdjiZddek4GMj31I3dUJ7gAs9o65X7mnRma6OokOkc6f9jjfBg==", + "dev": true + }, + "uglify-js": { + "version": "3.4.6", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.6.tgz", + "integrity": "sha512-O1D7L6WcOzS1qW2ehopEm4cWm5yA6bQBozlks8jO8ODxYCy4zv+bR/la4Lwp01tpkYGNonnpXvUpYtrvSu8Yzg==", + "dev": true, + "requires": { + "commander": "~2.16.0", + "source-map": "~0.6.1" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz", + "integrity": "sha512-1VicfKhCYHLS8m1DCApqBhoulnASsEoJ/BvpUpP4zoNAPpKzdH+ghk0olGJMmwX2/jprK2j3hAHdUbczBSy2FA==", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "ajv": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + } + } + } + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "^1.0.0" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "update-notifier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", + "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "dev": true, + "requires": { + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-join": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", + "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", + "dev": true + }, + "url-parse": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz", + "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==", + "dev": true, + "requires": { + "querystringify": "^2.0.0", + "requires-port": "^1.0.0" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "useragent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", + "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", + "dev": true, + "requires": { + "lru-cache": "2.2.x", + "tmp": "0.0.x" + }, + "dependencies": { + "lru-cache": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", + "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", + "dev": true + } + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "uws": { + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz", + "integrity": "sha512-HNMztPP5A1sKuVFmdZ6BPVpBQd5bUjNC8EFMFiICK+oho/OQsAJy5hnIx4btMHiOk8j04f/DbIlqnEZ9d72dqg==", + "dev": true, + "optional": true + }, + "v8-compile-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz", + "integrity": "sha512-qNdTUMaCjPs4eEnM3W9H94R3sU70YCuT+/ST7nUf+id1bVOrdjrpUaeZLqPBPRph3hsgn4a4BvwpxhHZx+oSDg==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "dev": true + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "weak-map": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/weak-map/-/weak-map-1.0.5.tgz", + "integrity": "sha1-eWkVhNmGB/UHC9O3CkDmuyLkAes=", + "dev": true + }, + "webpack": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.16.4.tgz", + "integrity": "sha512-RqUfwp4qMqv3oFwBQQOoK69C2tdu2FHJEqPABPqgjGDvOIOLqkTOhmmdJjpiRabzNAAH1ahmkA3z4xowlHN+VA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-module-context": "1.5.13", + "@webassemblyjs/wasm-edit": "1.5.13", + "@webassemblyjs/wasm-opt": "1.5.13", + "@webassemblyjs/wasm-parser": "1.5.13", + "acorn": "^5.6.2", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.0", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + }, + "dependencies": { + "ajv": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "webpack-cli": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.0.tgz", + "integrity": "sha512-p5NeKDtYwjZozUWq6kGNs9w+Gtw/CPvyuXjXn2HMdz8Tie+krjEg8oAtonvIyITZdvpF7XG9xDHwscLr2c+ugQ==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.0.0", + "global-modules-path": "^2.1.0", + "import-local": "^1.0.0", + "inquirer": "^6.0.0", + "interpret": "^1.1.0", + "loader-utils": "^1.1.0", + "supports-color": "^5.4.0", + "v8-compile-cache": "^2.0.0", + "yargs": "^12.0.1" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.5.0.tgz", + "integrity": "sha512-9ZTaoBaePSCFvNlNGrsyI8ZVACP2svUtq0DkM7t4K2ClAa96sqOIRjAzDTc8zXzFt1cZR46rRzLTiHFSJ+Qw0g==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "decamelize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", + "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", + "dev": true, + "requires": { + "xregexp": "4.0.0" + } + }, + "external-editor": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.0.tgz", + "integrity": "sha512-mpkfj0FEdxrIhOC04zk85X7StNtr0yXnG7zCb+8ikO8OJi2jsHh5YGoknNTyXgsbHOf1WOOcVU3kPFWT2WgCkQ==", + "dev": true, + "requires": { + "chardet": "^0.5.0", + "iconv-lite": "^0.4.22", + "tmp": "^0.0.33" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "inquirer": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.0.0.tgz", + "integrity": "sha512-tISQWRwtcAgrz+SHPhTH7d3e73k31gsOy6i1csonLc0u1dVK/wYvuOnFeiWqC5OXFIYbmrIFInef31wbT8MEJg==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.1.0", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "xregexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", + "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", + "dev": true + }, + "yargs": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.1.tgz", + "integrity": "sha512-B0vRAp1hRX4jgIOWFtjfNjd9OA9RWYZ6tqGA9/I/IrTMsxmKvtWy+ersM+jzpQqbC3YfLzeABPdeTgcJ9eu1qQ==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^2.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^10.1.0" + } + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "webpack-concat-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/webpack-concat-plugin/-/webpack-concat-plugin-3.0.0.tgz", + "integrity": "sha512-DLdDbZXyrFR99wyAVC9P06HLjr2XujBmQdSbnQMK2o01H9U2NHsN5W76jeTVeXDq5OLvZf8r/se65ftRo3Prow==", + "dev": true, + "requires": { + "concat-with-sourcemaps": "^1.0.5", + "globby": "^8.0.1", + "schema-utils": "^0.4.5", + "uglify-es": "^3.3.9", + "upath": "^1.1.0" + }, + "dependencies": { + "ajv": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + } + } + } + }, + "webpack-dev-middleware": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz", + "integrity": "sha512-tj5LLD9r4tDuRIDa5Mu9lnY2qBBehAITv6A9irqXhw/HQquZgTx3BCd57zYbU2gMDnncA49ufK2qVQSbaKJwOw==", + "dev": true, + "requires": { + "loud-rejection": "^1.6.0", + "memory-fs": "~0.4.1", + "mime": "^2.1.0", + "path-is-absolute": "^1.0.0", + "range-parser": "^1.0.3", + "url-join": "^2.0.2", + "webpack-log": "^1.0.1" + }, + "dependencies": { + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", + "dev": true + } + } + }, + "webpack-dev-server": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.5.tgz", + "integrity": "sha512-LVHg+EPwZLHIlfvokSTgtJqO/vI5CQi89fASb5JEDtVMDjY0yuIEqPPdMiKaBJIB/Ab7v/UN/sYZ7WsZvntQKw==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "array-includes": "^3.0.3", + "bonjour": "^3.5.0", + "chokidar": "^2.0.0", + "compression": "^1.5.2", + "connect-history-api-fallback": "^1.3.0", + "debug": "^3.1.0", + "del": "^3.0.0", + "express": "^4.16.2", + "html-entities": "^1.2.0", + "http-proxy-middleware": "~0.18.0", + "import-local": "^1.0.0", + "internal-ip": "1.2.0", + "ip": "^1.1.5", + "killable": "^1.0.0", + "loglevel": "^1.4.1", + "opn": "^5.1.0", + "portfinder": "^1.0.9", + "selfsigned": "^1.9.1", + "serve-index": "^1.7.2", + "sockjs": "0.3.19", + "sockjs-client": "1.1.5", + "spdy": "^3.4.1", + "strip-ansi": "^3.0.0", + "supports-color": "^5.1.0", + "webpack-dev-middleware": "3.1.3", + "webpack-log": "^1.1.2", + "yargs": "11.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "url-join": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", + "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=", + "dev": true + }, + "webpack-dev-middleware": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz", + "integrity": "sha512-I6Mmy/QjWU/kXwCSFGaiOoL5YEQIVmbb0o45xMoCyQAg/mClqZVTcsX327sPfekDyJWpCxb+04whNyLOIxpJdQ==", + "dev": true, + "requires": { + "loud-rejection": "^1.6.0", + "memory-fs": "~0.4.1", + "mime": "^2.1.0", + "path-is-absolute": "^1.0.0", + "range-parser": "^1.0.3", + "url-join": "^4.0.0", + "webpack-log": "^1.0.1" + } + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "webpack-log": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", + "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "log-symbols": "^2.1.0", + "loglevelnext": "^1.0.1", + "uuid": "^3.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "websocket-driver": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", + "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", + "dev": true, + "requires": { + "http-parser-js": ">=0.4.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "dev": true + }, + "when": { + "version": "3.7.8", + "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", + "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", + "dev": true, + "optional": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "widest-line": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", + "dev": true, + "requires": { + "string-width": "^2.1.1" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "with-callback": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/with-callback/-/with-callback-1.0.2.tgz", + "integrity": "sha1-oJYpuakgAo1yFAT7Q1vc/1yRvCE=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "wreck": { + "version": "12.5.1", + "resolved": "https://registry.npmjs.org/wreck/-/wreck-12.5.1.tgz", + "integrity": "sha512-l5DUGrc+yDyIflpty1x9XuMj1ehVjC/dTbF3/BasOO77xk0EdEa4M/DuOY8W88MQDAD0fEDqyjc8bkIMHd2E9A==", + "dev": true, + "requires": { + "boom": "5.x.x", + "hoek": "4.x.x" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "dev": true, + "requires": { + "hoek": "4.x.x" + } + }, + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", + "dev": true + } + } + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "xmlhttprequest-ssl": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", + "dev": true + }, + "xregexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", + "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", + "dev": true, + "optional": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + }, + "yauzl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", + "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "dev": true, + "requires": { + "fd-slicer": "~1.0.1" + } + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", + "dev": true + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true + } + } +} diff --git a/package.json b/package.json index 83d67b9e..ad03adc1 100644 --- a/package.json +++ b/package.json @@ -1,104 +1,104 @@ { - "name": "@robotlegsjs/phaser", - "version": "0.0.5", - "description": "RobotlegsJS integration with Phaser State Manager", - "main": "lib/index.js", - "typings": "lib/index.d.ts", - "scripts": { - "start": "webpack-dev-server --config ./webpack.example.config.js", - "test": "karma start --single-run", - "mocha": "mocha test/**/*.test.ts --require ts-node/register", - "autoformat": "prettier --config .prettierrc --write {src,test,example}/**/*.ts", - "tslint-check:src": "tslint-config-prettier-check ./tslint.json", - "tslint-check:test": "tslint-config-prettier-check ./tslint.test.json", - "tslint:src": "tslint --project tsconfig.json", - "tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json", - "tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test", - "clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf dist && rimraf dist-test", - "compile:src": "tsc -d --importHelpers", - "compile:test": "tsc -p tsconfig.test.json -d --importHelpers", - "dev": "webpack", - "build": "webpack --env.production", - "prepare": "npm run clean-up && npm run compile:src", - "prepublishOnly": "publish-please guard", - "publish-please": "npm run tslint && npm run autoformat && npm run clean-up && npm run test && publish-please" - }, - "repository": { - "type": "git", - "url": "git@github.com:RobotlegsJS/RobotlegsJS-Phaser.git" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org" - }, - "keywords": [ - "TypeScript", - "Robotlegs", - "IoC", - "Phaser" - ], - "author": "RobotlegsJS", - "contributors": [ - "Endel Dreyer ", - "Tiago Schenkel " - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser/issues" - }, - "homepage": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser#readme", - "dependencies": { - "@robotlegsjs/core": "^0.2.0", - "phaser-ce": "^2.11.0", - "tslib": "^1.9.3" - }, - "devDependencies": { - "@types/bluebird": "^3.5.23", - "@types/chai": "^4.1.4", - "@types/mocha": "^5.2.5", - "@types/sinon": "^5.0.1", - "bluebird": "^3.5.1", - "browserify-versionify": "^1.0.6", - "chai": "^4.1.2", - "es6-map": "^0.1.5", - "es6-symbol": "^3.1.1", - "glslify": "^6.2.1", - "html-webpack-plugin": "^3.2.0", - "imports-loader": "^0.8.0", - "istanbul": "^0.4.5", - "istanbul-instrumenter-loader": "^3.0.1", - "karma": "^2.0.5", - "karma-chai": "^0.1.0", - "karma-chrome-launcher": "^2.2.0", - "karma-coverage-istanbul-reporter": "^2.0.1", - "karma-es6-shim": "^1.0.0", - "karma-mocha": "^1.3.0", - "karma-mocha-reporter": "^2.2.5", - "karma-phantomjs-launcher": "^1.0.4", - "karma-remap-istanbul": "^0.6.0", - "karma-sinon": "^1.0.5", - "karma-sinon-chai": "^2.0.2", - "karma-sourcemap-loader": "^0.3.7", - "karma-sourcemap-writer": "^0.1.2", - "karma-webpack": "^3.0.0", - "mocha": "^5.2.0", - "prettier": "^1.14.0", - "publish-please": "^3.2.0", - "reflect-metadata": "^0.1.12", - "remap-istanbul": "^0.11.1", - "rimraf": "^2.6.2", - "sinon": "^6.1.4", - "sinon-chai": "^3.2.0", - "ts-loader": "^4.4.2", - "ts-node": "^7.0.0", - "tslint": "^5.11.0", - "tslint-config-prettier": "^1.14.0", - "typescript": "^3.0.1", - "webpack": "^4.16.4", - "webpack-cli": "^3.1.0", - "webpack-concat-plugin": "^3.0.0", - "webpack-dev-server": "^3.1.5" - }, - "peerDependencies": { - "reflect-metadata": "^0.1.12" - } + "name": "@robotlegsjs/phaser", + "version": "0.0.5", + "description": "RobotlegsJS integration with Phaser State Manager", + "main": "lib/index.js", + "typings": "lib/index.d.ts", + "scripts": { + "start": "webpack-dev-server --config ./webpack.example.config.js", + "test": "karma start --single-run", + "mocha": "mocha test/**/*.test.ts --require ts-node/register", + "autoformat": "prettier --config .prettierrc --write {src,test,example}/**/*.ts", + "tslint-check:src": "tslint-config-prettier-check ./tslint.json", + "tslint-check:test": "tslint-config-prettier-check ./tslint.test.json", + "tslint:src": "tslint --project tsconfig.json", + "tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json", + "tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test", + "clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf dist && rimraf dist-test", + "compile:src": "tsc -d --importHelpers", + "compile:test": "tsc -p tsconfig.test.json -d --importHelpers", + "dev": "webpack", + "build": "webpack --env.production", + "prepare": "npm run clean-up && npm run compile:src", + "prepublishOnly": "publish-please guard", + "publish-please": "npm run tslint && npm run autoformat && npm run clean-up && npm run test && publish-please" + }, + "repository": { + "type": "git", + "url": "git@github.com:RobotlegsJS/RobotlegsJS-Phaser.git" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org" + }, + "keywords": [ + "TypeScript", + "Robotlegs", + "IoC", + "Phaser" + ], + "author": "RobotlegsJS", + "contributors": [ + "Endel Dreyer ", + "Tiago Schenkel " + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser/issues" + }, + "homepage": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser#readme", + "dependencies": { + "@robotlegsjs/core": "^0.2.0", + "phaser": "^3.11.0", + "tslib": "^1.9.3" + }, + "devDependencies": { + "@types/bluebird": "^3.5.23", + "@types/chai": "^4.1.4", + "@types/mocha": "^5.2.5", + "@types/sinon": "^5.0.1", + "bluebird": "^3.5.1", + "browserify-versionify": "^1.0.6", + "chai": "^4.1.2", + "es6-map": "^0.1.5", + "es6-symbol": "^3.1.1", + "glslify": "^6.2.1", + "html-webpack-plugin": "^3.2.0", + "imports-loader": "^0.8.0", + "istanbul": "^0.4.5", + "istanbul-instrumenter-loader": "^3.0.1", + "karma": "^2.0.5", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage-istanbul-reporter": "^2.0.1", + "karma-es6-shim": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", + "karma-phantomjs-launcher": "^1.0.4", + "karma-remap-istanbul": "^0.6.0", + "karma-sinon": "^1.0.5", + "karma-sinon-chai": "^2.0.2", + "karma-sourcemap-loader": "^0.3.7", + "karma-sourcemap-writer": "^0.1.2", + "karma-webpack": "^3.0.0", + "mocha": "^5.2.0", + "prettier": "^1.14.0", + "publish-please": "^3.2.0", + "reflect-metadata": "^0.1.12", + "remap-istanbul": "^0.11.1", + "rimraf": "^2.6.2", + "sinon": "^6.1.4", + "sinon-chai": "^3.2.0", + "ts-loader": "^4.4.2", + "ts-node": "^7.0.0", + "tslint": "^5.11.0", + "tslint-config-prettier": "^1.14.0", + "typescript": "^3.0.1", + "webpack": "^4.16.4", + "webpack-cli": "^3.1.0", + "webpack-concat-plugin": "^3.0.0", + "webpack-dev-server": "^3.1.5" + }, + "peerDependencies": { + "reflect-metadata": "^0.1.12" + } } diff --git a/src/index.ts b/src/index.ts old mode 100644 new mode 100755 index 006cd7e6..343fbd32 --- a/src/index.ts +++ b/src/index.ts @@ -1,31 +1,29 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ // ContextStateManager -export { IContextStateManager } from "./robotlegs/bender/extensions/contextStateManager/api/IContextStateManager"; -export { ContextStateManager } from "./robotlegs/bender/extensions/contextStateManager/impl/ContextStateManager"; -export { - ContextStateManagerListenerConfig -} from "./robotlegs/bender/extensions/contextStateManager/impl/ContextStateManagerListenerConfig"; -export { ContextStateManagerExtension } from "./robotlegs/bender/extensions/contextStateManager/ContextStateManagerExtension"; - -// StateMediatorMap -export { IStateMediator } from "./robotlegs/bender/extensions/stateMediatorMap/api/IStateMediator"; -export { IStateMediatorMap } from "./robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMap"; -export { IStateMediatorMapping } from "./robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMapping"; -export { StateMediator } from "./robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator"; -export { StateMediatorMapExtension } from "./robotlegs/bender/extensions/stateMediatorMap/StateMediatorMapExtension"; - -// StateManager -export { IStateHandler } from "./robotlegs/bender/extensions/stateManager/api/IStateHandler"; -export { IStateManager } from "./robotlegs/bender/extensions/stateManager/api/IStateManager"; -export { StateManagerExtension } from "./robotlegs/bender/extensions/stateManager/StateManagerExtension"; - /** * Bundles */ +/// export { PhaserBundle } from "./robotlegs/bender/bundles/phaser/PhaserBundle"; +export { IContextSceneManager } from "./robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager"; +export { ContextSceneManagerExtension } from "./robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension"; +export { ContextSceneManager } from "./robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"; +export { + ContextSceneManagerListenerConfig +} from "./robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig"; +// StateManager +export { ISceneHandler } from "./robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; +export { ISceneManager } from "./robotlegs/bender/extensions/sceneManager/api/ISceneManager"; +export { SceneManagerExtension } from "./robotlegs/bender/extensions/sceneManager/SceneManagerExtension"; +// StateMediatorMap +export { ISceneMediator } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator"; +export { ISceneMediatorMap } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap"; +export { ISceneMediatorMapping } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping"; +export { SceneMediator } from "./robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator"; +export { SceneMediatorMapExtension } from "./robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension"; diff --git a/src/robotlegs/bender/bundles/phaser/PhaserBundle.ts b/src/robotlegs/bender/bundles/phaser/PhaserBundle.ts old mode 100644 new mode 100755 index ba5fc2be..45285158 --- a/src/robotlegs/bender/bundles/phaser/PhaserBundle.ts +++ b/src/robotlegs/bender/bundles/phaser/PhaserBundle.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -7,11 +7,11 @@ import { IBundle, IContext } from "@robotlegsjs/core"; -import { ContextStateManagerExtension } from "../../extensions/contextStateManager/ContextStateManagerExtension"; -import { StateManagerExtension } from "../../extensions/stateManager/StateManagerExtension"; -import { StateMediatorMapExtension } from "../../extensions/stateMediatorMap/StateMediatorMapExtension"; -import { ContextStateManagerListenerConfig } from "../../extensions/contextStateManager/impl/ContextStateManagerListenerConfig"; -import { StateManagerObserverExtension } from "../../extensions/stateManager/StateManagerObserverExtension"; +import { ContextSceneManagerExtension } from "../../extensions/contextSceneManager/ContextSceneManagerExtension"; +import { SceneManagerExtension } from "../../extensions/sceneManager/SceneManagerExtension"; +import { SceneMediatorMapExtension } from "../../extensions/sceneMediatorMap/SceneMediatorMapExtension"; +import { ContextSceneManagerListenerConfig } from "../../extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig"; +import { SceneManagerObserverExtension } from "../../extensions/sceneManager/SceneManagerObserverExtension"; /** * For that Classic Robotlegs flavour @@ -28,8 +28,8 @@ export class PhaserBundle implements IBundle { * @inheritDoc */ public extend(context: IContext): void { - context.install(ContextStateManagerExtension, StateManagerExtension, StateManagerObserverExtension, StateMediatorMapExtension); + context.install(ContextSceneManagerExtension, SceneManagerExtension, SceneManagerObserverExtension, SceneMediatorMapExtension); - context.configure(ContextStateManagerListenerConfig); + context.configure(ContextSceneManagerListenerConfig); } } diff --git a/src/robotlegs/bender/extensions/contextStateManager/ContextStateManagerExtension.ts b/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts old mode 100644 new mode 100755 similarity index 64% rename from src/robotlegs/bender/extensions/contextStateManager/ContextStateManagerExtension.ts rename to src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts index 20321147..8a7e5b00 --- a/src/robotlegs/bender/extensions/contextStateManager/ContextStateManagerExtension.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts @@ -1,14 +1,13 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { instanceOfType, IContext, IExtension, IInjector, ILogger } from "@robotlegsjs/core"; - -import { IContextStateManager } from "./api/IContextStateManager"; -import { ContextStateManager } from "./impl/ContextStateManager"; +import { IContext, IExtension, IInjector, ILogger, instanceOfType } from "@robotlegsjs/core"; +import { IContextSceneManager } from "./api/IContextSceneManager"; +import { ContextSceneManager } from "./impl/ContextSceneManager"; /** *

This Extension waits for a ContextStateManager to be added as a configuration @@ -16,7 +15,7 @@ import { ContextStateManager } from "./impl/ContextStateManager"; * *

It should be installed before context initialization.

*/ -export class ContextStateManagerExtension implements IExtension { +export class ContextSceneManagerExtension implements IExtension { /*============================================================================*/ /* Private Properties */ /*============================================================================*/ @@ -36,26 +35,26 @@ export class ContextStateManagerExtension implements IExtension { this._injector = context.injector; this._logger = context.getLogger(this); context.beforeInitializing(this.beforeInitializing.bind(this)); - context.addConfigHandler(instanceOfType(ContextStateManager), this.handleContextStateManager.bind(this)); + context.addConfigHandler(instanceOfType(ContextSceneManager), this.handleContextStateManager.bind(this)); } /*============================================================================*/ /* Private Functions */ /*============================================================================*/ - private handleContextStateManager(contextStateManager: IContextStateManager): void { - if (this._injector.isBound(IContextStateManager)) { - this._logger.warn("A contextStateManager has already been installed, ignoring {0}", [contextStateManager.stateManager]); + private handleContextStateManager(contextSceneManager: IContextSceneManager): void { + if (this._injector.isBound(IContextSceneManager)) { + this._logger.warn("A contextSceneManager has already been installed, ignoring {0}", [contextSceneManager.sceneManager]); } else { - this._logger.debug("Mapping {0} as contextStateManager", [contextStateManager.stateManager]); + this._logger.debug("Mapping {0} as contextSceneManager", [contextSceneManager.sceneManager]); - this._injector.bind(IContextStateManager).toConstantValue(contextStateManager); + this._injector.bind(IContextSceneManager).toConstantValue(contextSceneManager); } } private beforeInitializing(): void { - if (!this._injector.isBound(IContextStateManager)) { - this._logger.error("A ContextStateManager must be installed if you install the ContextStateManagerExtension."); + if (!this._injector.isBound(IContextSceneManager)) { + this._logger.error("A ContextSceneManager must be installed if you install the ContextStateManagerExtension."); } } } diff --git a/src/robotlegs/bender/extensions/contextStateManager/api/IContextStateManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts old mode 100644 new mode 100755 similarity index 60% rename from src/robotlegs/bender/extensions/contextStateManager/api/IContextStateManager.ts rename to src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts index 68c7db3c..31cd3cdf --- a/src/robotlegs/bender/extensions/contextStateManager/api/IContextStateManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -export let IContextStateManager = Symbol("IContextStateManager"); -export interface IContextStateManager { - stateManager: Phaser.StateManager; +export let IContextSceneManager = Symbol("IContextSceneManager"); +export interface IContextSceneManager { + sceneManager: Phaser.Scenes.SceneManager; } diff --git a/src/robotlegs/bender/extensions/contextStateManager/impl/ContextStateManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts old mode 100644 new mode 100755 similarity index 54% rename from src/robotlegs/bender/extensions/contextStateManager/impl/ContextStateManager.ts rename to src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts index a88eff7a..179f957f --- a/src/robotlegs/bender/extensions/contextStateManager/impl/ContextStateManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts @@ -1,29 +1,28 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import { IContextSceneManager } from "../api/IContextSceneManager"; import { IConfig } from "@robotlegsjs/core"; -import { IContextStateManager } from "../api/IContextStateManager"; - /** - * The Context StateManager represents the Phaser.StateManager for a Context + * The Context StateManager represents the Phaser.Scenes.SceneManager for a Context */ -export class ContextStateManager implements IContextStateManager, IConfig { +export class ContextSceneManager implements IContextSceneManager, IConfig { /*============================================================================*/ /* Public Properties */ /*============================================================================*/ - private _stateManager: Phaser.StateManager; + private _sceneManager: Phaser.Scenes.SceneManager; /** - * The root Phaser.StateManager for this Context + * The root Phaser.Scenes.SceneManager for this Context */ - public get stateManager(): Phaser.StateManager { - return this._stateManager; + public get sceneManager(): Phaser.Scenes.SceneManager { + return this._sceneManager; } /*============================================================================*/ @@ -31,14 +30,14 @@ export class ContextStateManager implements IContextStateManager, IConfig { /*============================================================================*/ /** - * The StateManager represents the root Phaser.StateManager for a Context - * @param stateManager The root State Manager for this Context + * The StateManager represents the root Phaser.Scenes.SceneManager for a Context + * @param sceneManager The root State Manager for this Context */ - constructor(stateManager: Phaser.StateManager) { - if (stateManager !== null && stateManager !== undefined) { - this._stateManager = stateManager; + constructor(sceneManager: Phaser.Scenes.SceneManager) { + if (sceneManager !== null && sceneManager !== undefined) { + this._sceneManager = sceneManager; } else { - throw new Error("StateManager can't be null or undefined"); + throw new Error("SceneManager can't be null or undefined"); } } diff --git a/src/robotlegs/bender/extensions/contextStateManager/impl/ContextStateManagerListenerConfig.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts old mode 100644 new mode 100755 similarity index 66% rename from src/robotlegs/bender/extensions/contextStateManager/impl/ContextStateManagerListenerConfig.ts rename to src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts index 074b8b2b..f4fecfad --- a/src/robotlegs/bender/extensions/contextStateManager/impl/ContextStateManagerListenerConfig.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts @@ -1,14 +1,14 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { injectable, inject, IConfig } from "@robotlegsjs/core"; - -import { IContextStateManager } from "../api/IContextStateManager"; -import { IStateManager } from "../../stateManager/api/IStateManager"; +import { IConfig } from "@robotlegsjs/core"; +import { inject, injectable } from "inversify"; +import { ISceneManager } from "../../sceneManager/api/ISceneManager"; +import { IContextSceneManager } from "../api/IContextSceneManager"; /** * This configuration file adds the ContextStateManager to the stateManager. @@ -17,22 +17,22 @@ import { IStateManager } from "../../stateManager/api/IStateManager"; * and a ContextStateManager have been installed. */ @injectable() -export class ContextStateManagerListenerConfig implements IConfig { +export class ContextSceneManagerListenerConfig implements IConfig { /*============================================================================*/ /* Private Properties */ /*============================================================================*/ - private _contextStateManager: IContextStateManager; + private _contextStateManager: IContextSceneManager; - private _stateManager: IStateManager; + private _stateManager: ISceneManager; /*============================================================================*/ /* Public Functions */ /*============================================================================*/ constructor( - @inject(IContextStateManager) contextStateManager: IContextStateManager, - @inject(IStateManager) stateManager: IStateManager + @inject(IContextSceneManager) contextStateManager: IContextSceneManager, + @inject(ISceneManager) stateManager: ISceneManager ) { this._contextStateManager = contextStateManager; this._stateManager = stateManager; @@ -43,6 +43,6 @@ export class ContextStateManagerListenerConfig implements IConfig { */ public configure(): void { // Adds the StateManager to the View Manager at startup - this._stateManager.addStateManager(this._contextStateManager.stateManager); + this._stateManager.addSceneManager(this._contextStateManager.sceneManager); } } diff --git a/src/robotlegs/bender/extensions/stateManager/StateManagerExtension.ts b/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts old mode 100644 new mode 100755 similarity index 71% rename from src/robotlegs/bender/extensions/stateManager/StateManagerExtension.ts rename to src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts index 91f77fc1..79e36e0e --- a/src/robotlegs/bender/extensions/stateManager/StateManagerExtension.ts +++ b/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts @@ -1,27 +1,25 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ import { IContext, IExtension, IInjector } from "@robotlegsjs/core"; - -import { IStateManager } from "./api/IStateManager"; -import { StateManager } from "./impl/StateManager"; - -import { StateRegistry } from "./impl/StateRegistry"; +import { ISceneManager } from "./api/ISceneManager"; +import { SceneManager } from "./impl/SceneManager"; +import { SceneRegistry } from "./impl/SceneRegistry"; /** * This extension install a State Manager into the context */ -export class StateManagerExtension implements IExtension { +export class SceneManagerExtension implements IExtension { /*============================================================================*/ /* Private Static Properties */ /*============================================================================*/ // Really? Yes, there can be only one. - private static _stateRegistry: StateRegistry; + private static _containerRegistry: SceneRegistry; /*============================================================================*/ /* Private Properties */ @@ -29,7 +27,7 @@ export class StateManagerExtension implements IExtension { private _injector: IInjector; - private _viewManager: IStateManager; + private _viewManager: ISceneManager; /*============================================================================*/ /* Public Functions */ @@ -45,13 +43,13 @@ export class StateManagerExtension implements IExtension { this._injector = context.injector; // Just one Container Registry - StateManagerExtension._stateRegistry = StateManagerExtension._stateRegistry || new StateRegistry(); - this._injector.bind(StateRegistry).toConstantValue(StateManagerExtension._stateRegistry); + SceneManagerExtension._containerRegistry = SceneManagerExtension._containerRegistry || new SceneRegistry(); + this._injector.bind(SceneRegistry).toConstantValue(SceneManagerExtension._containerRegistry); // But you get your own View Manager this._injector - .bind(IStateManager) - .to(StateManager) + .bind(ISceneManager) + .to(SceneManager) .inSingletonScope(); } @@ -60,12 +58,12 @@ export class StateManagerExtension implements IExtension { /*============================================================================*/ private whenInitializing(): void { - this._viewManager = this._injector.get(IStateManager); + this._viewManager = this._injector.get(ISceneManager); } private whenDestroying(): void { this._viewManager.removeAllHandlers(); - this._injector.unbind(IStateManager); - this._injector.unbind(StateRegistry); + this._injector.unbind(ISceneManager); + this._injector.unbind(SceneRegistry); } } diff --git a/src/robotlegs/bender/extensions/stateManager/StateManagerObserverExtension.ts b/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts old mode 100644 new mode 100755 similarity index 76% rename from src/robotlegs/bender/extensions/stateManager/StateManagerObserverExtension.ts rename to src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts index e2f6c9b7..ac7fd6cd --- a/src/robotlegs/bender/extensions/stateManager/StateManagerObserverExtension.ts +++ b/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts @@ -1,27 +1,26 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ import { IContext, IExtension, IInjector, ILogger } from "@robotlegsjs/core"; - -import { StateRegistry } from "./impl/StateRegistry"; -import { StateManagerObserver } from "./impl/StateManagerObserver"; +import { SceneManagerObserver } from "./impl/SceneManagerObserver"; +import { SceneRegistry } from "./impl/SceneRegistry"; let installCount: number = 0; /** * This extension install an automatic State Manager Observer */ -export class StateManagerObserverExtension implements IExtension { +export class SceneManagerObserverExtension implements IExtension { /*============================================================================*/ /* Private Static Properties */ /*============================================================================*/ // Really? Yes, there can be only one. - private static _stageObserver: StateManagerObserver = null; + private static _stageObserver: SceneManagerObserver = null; /*============================================================================*/ /* Private Properties */ @@ -52,10 +51,10 @@ export class StateManagerObserverExtension implements IExtension { private whenInitializing(): void { // Hark, an actual Singleton! - if (!StateManagerObserverExtension._stageObserver) { - let containerRegistry: StateRegistry = this._injector.get(StateRegistry); + if (!SceneManagerObserverExtension._stageObserver) { + const containerRegistry: SceneRegistry = this._injector.get(SceneRegistry); this._logger.debug("Creating genuine StateManagerObserver Singleton"); - StateManagerObserverExtension._stageObserver = new StateManagerObserver(containerRegistry); + SceneManagerObserverExtension._stageObserver = new SceneManagerObserver(containerRegistry); } } @@ -63,8 +62,8 @@ export class StateManagerObserverExtension implements IExtension { installCount--; if (installCount === 0) { this._logger.debug("Destroying genuine StateManagerObserver Singleton"); - StateManagerObserverExtension._stageObserver.destroy(); - StateManagerObserverExtension._stageObserver = null; + SceneManagerObserverExtension._stageObserver.destroy(); + SceneManagerObserverExtension._stageObserver = null; } } } diff --git a/src/robotlegs/bender/extensions/stateManager/api/IStateHandler.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts old mode 100644 new mode 100755 similarity index 58% rename from src/robotlegs/bender/extensions/stateManager/api/IStateHandler.ts rename to src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts index dd5af9d8..afb6c868 --- a/src/robotlegs/bender/extensions/stateManager/api/IStateHandler.ts +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -8,13 +8,13 @@ import { IClass } from "@robotlegsjs/core"; /** - * State handler contract + * Scene handler contract */ -export interface IStateHandler { +export interface ISceneHandler { /** * View handler method - * @param state The state instance to handle - * @param type The class of the state instance + * @param scene The scene instance to handle + * @param type The class of the scene instance */ - handleState(state: Phaser.State, type: IClass): void; + handleScene(scene: Phaser.Scene, type: IClass): void; } diff --git a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts new file mode 100755 index 00000000..5f1066e6 --- /dev/null +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts @@ -0,0 +1,49 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + +import { IEventDispatcher } from "@robotlegsjs/core"; +import { ISceneHandler } from "./ISceneHandler"; + +/** + * The State Manager allows you to add multiple "scene managers" to a context + */ +export let ISceneManager = Symbol("ISceneManager"); +export interface ISceneManager extends IEventDispatcher { + /** + * A list of currently registered SceneManagers + */ + sceneManagers: Phaser.Scenes.SceneManager[]; + + /** + * Adds a SceneManager as a "scene root" into the context + * @param sceneManager + */ + addSceneManager(sceneManager: Phaser.Scenes.SceneManager): void; + + /** + * Removes a sceneManager from this context + * @param sceneManager + */ + removeSceneManager(sceneManager: Phaser.Scenes.SceneManager): void; + + /** + * Registers a scene handler + * @param handler + */ + addSceneHandler(handler: ISceneHandler): void; + + /** + * Removes a scene handler + * @param handler + */ + removeSceneHandler(handler: ISceneHandler): void; + + /** + * Removes all scene handlers from this context + */ + removeAllHandlers(): void; +} diff --git a/src/robotlegs/bender/extensions/stateManager/impl/ConfigureStateEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts old mode 100644 new mode 100755 similarity index 73% rename from src/robotlegs/bender/extensions/stateManager/impl/ConfigureStateEvent.ts rename to src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts index 19426092..4a3b3845 --- a/src/robotlegs/bender/extensions/stateManager/impl/ConfigureStateEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts @@ -8,27 +8,27 @@ import { Event } from "@robotlegsjs/core"; /** - * State Configuration Event + * Scene Configuration Event * @private */ -export class ConfigureStateEvent extends Event { +export class ConfigureSceneEvent extends Event { /*============================================================================*/ /* Public Static Properties */ /*============================================================================*/ - public static CONFIGURE_STATE: string = "configureState"; + public static CONFIGURE_SCENE: string = "configureScene"; /*============================================================================*/ /* Public Properties */ /*============================================================================*/ - private _state: Phaser.State; + private _scene: Phaser.Scene; /** - * The state instance associated with this event + * The scene instance associated with this event */ - public get state(): Phaser.State { - return this._state; + public get scene(): Phaser.Scene { + return this._scene; } /*============================================================================*/ @@ -36,13 +36,13 @@ export class ConfigureStateEvent extends Event { /*============================================================================*/ /** - * Creates a state configuration event + * Creates a scene configuration event * @param type The event type - * @param state The associated state instance + * @param scene The associated scene instance */ - constructor(type: string, state?: Phaser.State) { + constructor(type: string, scene?: Phaser.Scene) { super(type, true); - this._state = state; + this._scene = scene; } /*============================================================================*/ @@ -52,7 +52,7 @@ export class ConfigureStateEvent extends Event { /** * @inheritDoc */ - public clone(): ConfigureStateEvent { - return new ConfigureStateEvent(this.type, this._state); + public clone(): ConfigureSceneEvent { + return new ConfigureSceneEvent(this.type, this._scene); } } diff --git a/src/robotlegs/bender/extensions/stateManager/impl/StateManager.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts old mode 100644 new mode 100755 similarity index 53% rename from src/robotlegs/bender/extensions/stateManager/impl/StateManager.ts rename to src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts index 6d82503a..4e0e6dfd --- a/src/robotlegs/bender/extensions/stateManager/impl/StateManager.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts @@ -7,39 +7,39 @@ import { injectable, EventDispatcher } from "@robotlegsjs/core"; -import { IStateHandler } from "../api/IStateHandler"; -import { IStateManager } from "../api/IStateManager"; +import { ISceneHandler } from "../api/ISceneHandler"; +import { ISceneManager } from "../api/ISceneManager"; -import { StateManagerEvent } from "./StateManagerEvent"; +import { SceneManagerEvent } from "./SceneManagerEvent"; -import { StateRegistry } from "./StateRegistry"; -import { StateManagerBinding } from "./StateManagerBinding"; +import { SceneRegistry } from "./SceneRegistry"; +import { SceneManagerBinding } from "./SceneManagerBinding"; /** * @private */ @injectable() -export class StateManager extends EventDispatcher implements IStateManager { +export class SceneManager extends EventDispatcher implements ISceneManager { /*============================================================================*/ /* Public Properties */ /*============================================================================*/ - private _stateManagers: Phaser.StateManager[] = []; + private _sceneManagers: Phaser.Scenes.SceneManager[] = []; /** * @inheritDoc */ - public get stateManagers(): Phaser.StateManager[] { - return this._stateManagers; + public get sceneManagers(): Phaser.Scenes.SceneManager[] { + return this._sceneManagers; } /*============================================================================*/ /* Private Properties */ /*============================================================================*/ - private _handlers: IStateHandler[] = []; + private _handlers: ISceneHandler[] = []; - private _registry: StateRegistry; + private _registry: SceneRegistry; /*============================================================================*/ /* Constructor */ @@ -48,9 +48,9 @@ export class StateManager extends EventDispatcher implements IStateManager { /** * @private */ - constructor(stateRegistry: StateRegistry) { + constructor(sceneRegistry: SceneRegistry) { super(); - this._registry = stateRegistry; + this._registry = sceneRegistry; } /*============================================================================*/ @@ -60,62 +60,62 @@ export class StateManager extends EventDispatcher implements IStateManager { /** * @inheritDoc */ - public addStateManager(stateManager: Phaser.StateManager): void { - if (!this.validStateManager(stateManager)) { + public addSceneManager(sceneManager: Phaser.Scenes.SceneManager): void { + if (!this.validSceneManager(sceneManager)) { return; } - this._stateManagers.push(stateManager); + this._sceneManagers.push(sceneManager); - this._handlers.forEach((handler: IStateHandler) => { - this._registry.addStateManager(stateManager).addHandler(handler); + this._handlers.forEach((handler: ISceneHandler) => { + this._registry.addSceneManager(sceneManager).addHandler(handler); }); - this.dispatchEvent(new StateManagerEvent(StateManagerEvent.STATE_MANAGER_ADD, stateManager)); + this.dispatchEvent(new SceneManagerEvent(SceneManagerEvent.SCENE_MANAGER_ADD, sceneManager)); } /** * @inheritDoc */ - public removeStateManager(stateManager: Phaser.StateManager): void { - let index: number = this._stateManagers.indexOf(stateManager); + public removeSceneManager(sceneManager: Phaser.Scenes.SceneManager): void { + let index: number = this._sceneManagers.indexOf(sceneManager); if (index === -1) { return; } - this._stateManagers.splice(index, 1); + this._sceneManagers.splice(index, 1); - let binding: StateManagerBinding = this._registry.getBinding(stateManager); + let binding: SceneManagerBinding = this._registry.getBinding(sceneManager); - this._handlers.forEach((handler: IStateHandler) => { + this._handlers.forEach((handler: ISceneHandler) => { binding.removeHandler(handler); }); - this.dispatchEvent(new StateManagerEvent(StateManagerEvent.STATE_MANAGER_REMOVE, stateManager)); + this.dispatchEvent(new SceneManagerEvent(SceneManagerEvent.SCENE_MANAGER_REMOVE, sceneManager)); } /** * @inheritDoc */ - public addStateHandler(handler: IStateHandler): void { + public addSceneHandler(handler: ISceneHandler): void { if (this._handlers.indexOf(handler) !== -1) { return; } this._handlers.push(handler); - this._stateManagers.forEach((stateManager: Phaser.StateManager) => { - this._registry.addStateManager(stateManager).addHandler(handler); + this._sceneManagers.forEach((sceneManager: Phaser.Scenes.SceneManager) => { + this._registry.addSceneManager(sceneManager).addHandler(handler); }); - this.dispatchEvent(new StateManagerEvent(StateManagerEvent.HANDLER_ADD, null, handler)); + this.dispatchEvent(new SceneManagerEvent(SceneManagerEvent.HANDLER_ADD, null, handler)); } /** * @inheritDoc */ - public removeStateHandler(handler: IStateHandler): void { + public removeSceneHandler(handler: ISceneHandler): void { let index: number = this._handlers.indexOf(handler); if (index === -1) { @@ -124,21 +124,21 @@ export class StateManager extends EventDispatcher implements IStateManager { this._handlers.splice(index, 1); - this._stateManagers.forEach((stateManager: Phaser.StateManager) => { - this._registry.getBinding(stateManager).removeHandler(handler); + this._sceneManagers.forEach((sceneManager: Phaser.Scenes.SceneManager) => { + this._registry.getBinding(sceneManager).removeHandler(handler); }); - this.dispatchEvent(new StateManagerEvent(StateManagerEvent.HANDLER_REMOVE, null, handler)); + this.dispatchEvent(new SceneManagerEvent(SceneManagerEvent.HANDLER_REMOVE, null, handler)); } /** * @inheritDoc */ public removeAllHandlers(): void { - this._stateManagers.forEach((stateManager: Phaser.StateManager) => { - let binding: StateManagerBinding = this._registry.getBinding(stateManager); + this._sceneManagers.forEach((sceneManager: Phaser.Scenes.SceneManager) => { + let binding: SceneManagerBinding = this._registry.getBinding(sceneManager); - this._handlers.forEach((handler: IStateHandler) => { + this._handlers.forEach((handler: ISceneHandler) => { binding.removeHandler(handler); }); }); @@ -148,11 +148,11 @@ export class StateManager extends EventDispatcher implements IStateManager { /* Private Functions */ /*============================================================================*/ - private validStateManager(stateManager: Phaser.StateManager): boolean { + private validSceneManager(sceneManager: Phaser.Scenes.SceneManager): boolean { let valid: boolean = true; - this._stateManagers.forEach((registeredStateManager: Phaser.StateManager) => { - if (stateManager === registeredStateManager) { + this._sceneManagers.forEach((registeredSceneManager: Phaser.Scenes.SceneManager) => { + if (sceneManager === registeredSceneManager) { valid = false; } }); diff --git a/src/robotlegs/bender/extensions/stateManager/impl/StateManagerBinding.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts old mode 100644 new mode 100755 similarity index 68% rename from src/robotlegs/bender/extensions/stateManager/impl/StateManagerBinding.ts rename to src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts index e3728610..6333cac9 --- a/src/robotlegs/bender/extensions/stateManager/impl/StateManagerBinding.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts @@ -7,48 +7,48 @@ import { IClass, EventDispatcher } from "@robotlegsjs/core"; -import { IStateHandler } from "../api/IStateHandler"; +import { ISceneHandler } from "../api/ISceneHandler"; -import { StateManagerBindingEvent } from "./StateManagerBindingEvent"; +import { SceneManagerBindingEvent } from "./SceneManagerBindingEvent"; /** * @private */ -export class StateManagerBinding extends EventDispatcher { +export class SceneManagerBinding extends EventDispatcher { /*============================================================================*/ /* Public Properties */ /*============================================================================*/ - private _parent: StateManagerBinding; + private _parent: SceneManagerBinding; /** * @private */ - public get parent(): StateManagerBinding { + public get parent(): SceneManagerBinding { return this._parent; } /** * @private */ - public set parent(value: StateManagerBinding) { + public set parent(value: SceneManagerBinding) { this._parent = value; } - private _stateManager: Phaser.StateManager; + private _sceneManager: Phaser.Scenes.SceneManager; /** * @private */ - public get stateManager(): Phaser.StateManager { - return this._stateManager; + public get sceneManager(): Phaser.Scenes.SceneManager { + return this._sceneManager; } /*============================================================================*/ /* Private Properties */ /*============================================================================*/ - private _handlers: IStateHandler[] = []; + private _handlers: ISceneHandler[] = []; /*============================================================================*/ /* Constructor */ @@ -57,9 +57,9 @@ export class StateManagerBinding extends EventDispatcher { /** * @private */ - constructor(stateManager: Phaser.StateManager) { + constructor(sceneManager: Phaser.Scenes.SceneManager) { super(); - this._stateManager = stateManager; + this._sceneManager = sceneManager; } /*============================================================================*/ @@ -69,7 +69,7 @@ export class StateManagerBinding extends EventDispatcher { /** * @private */ - public addHandler(handler: IStateHandler): void { + public addHandler(handler: ISceneHandler): void { if (this._handlers.indexOf(handler) > -1) { return; } @@ -79,12 +79,12 @@ export class StateManagerBinding extends EventDispatcher { /** * @private */ - public removeHandler(handler: IStateHandler): void { + public removeHandler(handler: ISceneHandler): void { let index: number = this._handlers.indexOf(handler); if (index > -1) { this._handlers.splice(index, 1); if (this._handlers.length === 0) { - this.dispatchEvent(new StateManagerBindingEvent(StateManagerBindingEvent.BINDING_EMPTY)); + this.dispatchEvent(new SceneManagerBindingEvent(SceneManagerBindingEvent.BINDING_EMPTY)); } } } @@ -92,9 +92,9 @@ export class StateManagerBinding extends EventDispatcher { /** * @private */ - public handleState(state: Phaser.State, type: IClass): void { - this._handlers.forEach((handler: IStateHandler) => { - handler.handleState(state, type); + public handleScene(scene: Phaser.Scene, type: IClass): void { + this._handlers.forEach((handler: ISceneHandler) => { + handler.handleScene(scene, type); }); } } diff --git a/src/robotlegs/bender/extensions/stateManager/impl/StateManagerBindingEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBindingEvent.ts old mode 100644 new mode 100755 similarity index 89% rename from src/robotlegs/bender/extensions/stateManager/impl/StateManagerBindingEvent.ts rename to src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBindingEvent.ts index efb43da6..2873ad9c --- a/src/robotlegs/bender/extensions/stateManager/impl/StateManagerBindingEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBindingEvent.ts @@ -10,7 +10,7 @@ import { Event } from "@robotlegsjs/core"; /** * @private */ -export class StateManagerBindingEvent extends Event { +export class SceneManagerBindingEvent extends Event { /*============================================================================*/ /* Public Static Properties */ /*============================================================================*/ @@ -35,7 +35,7 @@ export class StateManagerBindingEvent extends Event { /** * @inheritDoc */ - public clone(): StateManagerBindingEvent { - return new StateManagerBindingEvent(this.type); + public clone(): SceneManagerBindingEvent { + return new SceneManagerBindingEvent(this.type); } } diff --git a/src/robotlegs/bender/extensions/stateManager/impl/StateManagerEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts old mode 100644 new mode 100755 similarity index 64% rename from src/robotlegs/bender/extensions/stateManager/impl/StateManagerEvent.ts rename to src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts index da2f00f8..1631c71b --- a/src/robotlegs/bender/extensions/stateManager/impl/StateManagerEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts @@ -7,20 +7,20 @@ import { Event } from "@robotlegsjs/core"; -import { IStateHandler } from "../api/IStateHandler"; +import { ISceneHandler } from "../api/ISceneHandler"; /** - * StateManager existence event + * SceneManager existence event * @private */ -export class StateManagerEvent extends Event { +export class SceneManagerEvent extends Event { /*============================================================================*/ /* Public Static Properties */ /*============================================================================*/ - public static STATE_MANAGER_ADD: string = "stateManagerAdd"; + public static SCENE_MANAGER_ADD: string = "sceneManagerAdd"; - public static STATE_MANAGER_REMOVE: string = "stateManagerRemove"; + public static SCENE_MANAGER_REMOVE: string = "sceneManagerRemove"; public static HANDLER_ADD: string = "handlerAdd"; @@ -30,21 +30,21 @@ export class StateManagerEvent extends Event { /* Public Properties */ /*============================================================================*/ - private _stateManager: Phaser.StateManager; + private _sceneManager: Phaser.Scenes.SceneManager; /** - * The stateManager associated with this event + * The sceneManager associated with this event */ - public get stateManager(): Phaser.StateManager { - return this._stateManager; + public get sceneManager(): Phaser.Scenes.SceneManager { + return this._sceneManager; } - private _handler: IStateHandler; + private _handler: ISceneHandler; /** - * The state handler associated with this event + * The scene handler associated with this event */ - public get handler(): IStateHandler { + public get handler(): ISceneHandler { return this._handler; } @@ -53,14 +53,14 @@ export class StateManagerEvent extends Event { /*============================================================================*/ /** - * Creates a state manager event + * Creates a scene manager event * @param type The event type - * @param stateManager The Phaser.StateManager associated with this event - * @param handler The state handler associated with this event + * @param sceneManager The Phaser.Scenes.SceneManager associated with this event + * @param handler The scene handler associated with this event */ - constructor(type: string, stateManager?: Phaser.StateManager, handler?: IStateHandler) { + constructor(type: string, sceneManager?: Phaser.Scenes.SceneManager, handler?: ISceneHandler) { super(type, true); - this._stateManager = stateManager; + this._sceneManager = sceneManager; this._handler = handler; } @@ -71,7 +71,7 @@ export class StateManagerEvent extends Event { /** * @inheritDoc */ - public clone(): StateManagerEvent { - return new StateManagerEvent(this.type, this._stateManager, this._handler); + public clone(): SceneManagerEvent { + return new SceneManagerEvent(this.type, this._sceneManager, this._handler); } } diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts new file mode 100755 index 00000000..0fb35f75 --- /dev/null +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts @@ -0,0 +1,119 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + +import { SceneManagerBinding } from "./SceneManagerBinding"; +import { SceneRegistry } from "./SceneRegistry"; +import { SceneRegistryEvent } from "./SceneRegistryEvent"; + +/** + * @private + */ +export class SceneManagerObserver { + private _registry: SceneRegistry; + + /*============================================================================*/ + /* Constructor */ + /*============================================================================*/ + + /** + * @private + */ + constructor(containerRegistry: SceneRegistry) { + this._registry = containerRegistry; + + // We only care about roots + this._registry.addEventListener(SceneRegistryEvent.ROOT_STATE_MANAGER_ADD, this.onRootSceneManagerAdd, this); + this._registry.addEventListener(SceneRegistryEvent.ROOT_STATE_MANAGER_REMOVE, this.onRootSceneManagerRemove, this); + + // We might have arrived late on the scene + this._registry.rootBindings.forEach((binding: SceneManagerBinding) => { + this.addRootListener(binding.sceneManager); + }); + } + + /*============================================================================*/ + /* Public Functions */ + /*============================================================================*/ + + /** + * @private + */ + public destroy(): void { + this._registry.removeEventListener(SceneRegistryEvent.ROOT_STATE_MANAGER_ADD, this.onRootSceneManagerAdd, this); + this._registry.removeEventListener(SceneRegistryEvent.ROOT_STATE_MANAGER_REMOVE, this.onRootSceneManagerRemove, this); + + this._registry.rootBindings.forEach((binding: SceneManagerBinding) => { + this.removeRootListener(binding.sceneManager); + }); + } + + /*============================================================================*/ + /* Private Functions */ + /*============================================================================*/ + + private onRootSceneManagerAdd(event: SceneRegistryEvent): void { + this.addRootListener(event.sceneManager); + } + + private onRootSceneManagerRemove(event: SceneRegistryEvent): void { + this.removeRootListener(event.sceneManager); + } + + private addRootListener(sceneManager: Phaser.Scenes.SceneManager): void { + if (sceneManager) { + (sceneManager as any).createSceneFromInstance = this.patchCreateSceneMethod( + sceneManager, + (sceneManager as any).createSceneFromInstance + ); + (sceneManager as any).createSceneFromFunction = this.patchCreateSceneMethod( + sceneManager, + (sceneManager as any).createSceneFromFunction + ); + (sceneManager as any).createSceneFromObject = this.patchCreateSceneMethod( + sceneManager, + (sceneManager as any).createSceneFromObject + ); + } + } + + private patchCreateSceneMethod(sceneManager: Phaser.Scenes.SceneManager, originalMethod: any): (...args: any[]) => Phaser.Scene { + return (...args) => { + const scene: Phaser.Scene = originalMethod.apply(sceneManager, args); + this.onSceneInit(scene); + return scene; + }; + } + + private onSceneInit(scene: Phaser.Scene): void { + let rootBindings: SceneManagerBinding[] = this._registry.rootBindings; + let stateManager: Phaser.Scenes.SceneManager; + + for (const rootBinding of rootBindings) { + stateManager = rootBinding.sceneManager; + + if (stateManager) { + let binding: SceneManagerBinding = this._registry.getBinding(scene.game.scene); + if (binding) { + // this.events.emit('resume', this); + // this.events.emit('wake', this); + // this.events.emit('start', this); + scene.sys.events.on("start", this.onSceneStart, this); + } + } + } + } + + private onSceneStart(sys: Phaser.Scenes.Systems): void { + sys.events.off("start", this.onSceneStart, this, false); + const binding: SceneManagerBinding = this._registry.getBinding(sys.game.scene); + if (binding) { + binding.handleScene(sys.scene, sys.scene["constructor"] as FunctionConstructor); + } + } + + private removeRootListener(container: any): void {} +} diff --git a/src/robotlegs/bender/extensions/stateManager/impl/StateRegistry.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts old mode 100644 new mode 100755 similarity index 54% rename from src/robotlegs/bender/extensions/stateManager/impl/StateRegistry.ts rename to src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts index 5ee9409f..b41c3cf0 --- a/src/robotlegs/bender/extensions/stateManager/impl/StateRegistry.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts @@ -7,21 +7,24 @@ import { EventDispatcher } from "@robotlegsjs/core"; -import { StateManagerBinding } from "./StateManagerBinding"; -import { StateManagerBindingEvent } from "./StateManagerBindingEvent"; -import { StateRegistryEvent } from "./StateRegistryEvent"; +import { SceneManagerBinding } from "./SceneManagerBinding"; +import { SceneManagerBindingEvent } from "./SceneManagerBindingEvent"; +import { SceneRegistryEvent } from "./SceneRegistryEvent"; /** * @private */ -export class StateRegistry extends EventDispatcher { +export class SceneRegistry extends EventDispatcher { /*============================================================================*/ /* Private Properties */ /*============================================================================*/ - private _rootBindings: StateManagerBinding[] = []; - private _bindings: StateManagerBinding[] = []; - private _bindingByStateManager: Map = new Map(); + private _rootBindings: SceneManagerBinding[] = []; + private _bindings: SceneManagerBinding[] = []; + private _bindingBySceneManager: Map = new Map< + Phaser.Scenes.SceneManager, + SceneManagerBinding + >(); /*============================================================================*/ /* Public Properties */ @@ -30,14 +33,14 @@ export class StateRegistry extends EventDispatcher { /** * @private */ - public get rootBindings(): StateManagerBinding[] { + public get rootBindings(): SceneManagerBinding[] { return this._rootBindings; } /** * @private */ - public get bindings(): StateManagerBinding[] { + public get bindings(): SceneManagerBinding[] { return this._bindings; } @@ -48,12 +51,12 @@ export class StateRegistry extends EventDispatcher { /** * @private */ - public addStateManager(stateManager: Phaser.StateManager): StateManagerBinding { - let binding: StateManagerBinding = this._bindingByStateManager.get(stateManager); + public addSceneManager(sceneManager: Phaser.Scenes.SceneManager): SceneManagerBinding { + let binding: SceneManagerBinding = this._bindingBySceneManager.get(sceneManager); if (!binding) { - binding = this.createBinding(stateManager); - this._bindingByStateManager.set(stateManager, binding); + binding = this.createBinding(sceneManager); + this._bindingBySceneManager.set(sceneManager, binding); } return binding; @@ -62,8 +65,8 @@ export class StateRegistry extends EventDispatcher { /** * @private */ - public removeStateManager(stateManager: Phaser.StateManager): StateManagerBinding { - let binding: StateManagerBinding = this._bindingByStateManager.get(stateManager); + public removeSceneManager(sceneManager: Phaser.Scenes.SceneManager): SceneManagerBinding { + let binding: SceneManagerBinding = this._bindingBySceneManager.get(sceneManager); if (binding) { this.removeBinding(binding); @@ -77,68 +80,68 @@ export class StateRegistry extends EventDispatcher { * * @private */ - public findParentBinding(target: Phaser.StateManager): StateManagerBinding { + public findParentBinding(target: Phaser.Scenes.SceneManager): SceneManagerBinding { return null; } /** * @private */ - public getBinding(stateManager: Phaser.StateManager): StateManagerBinding { - return this._bindingByStateManager.get(stateManager); + public getBinding(sceneManager: Phaser.Scenes.SceneManager): SceneManagerBinding { + return this._bindingBySceneManager.get(sceneManager); } /*============================================================================*/ /* Private Functions */ /*============================================================================*/ - private createBinding(stateManager: Phaser.StateManager): StateManagerBinding { - let binding: StateManagerBinding = new StateManagerBinding(stateManager); + private createBinding(sceneManager: Phaser.Scenes.SceneManager): SceneManagerBinding { + let binding: SceneManagerBinding = new SceneManagerBinding(sceneManager); this._bindings.push(binding); // Add a listener so that we can remove this binding when it has no handlers - binding.addEventListener(StateManagerBindingEvent.BINDING_EMPTY, this.onBindingEmpty); + binding.addEventListener(SceneManagerBindingEvent.BINDING_EMPTY, this.onBindingEmpty); // If the new binding doesn't have a parent it is a Root - binding.parent = this.findParentBinding(stateManager); + binding.parent = this.findParentBinding(sceneManager); if (binding.parent == null) { this.addRootBinding(binding); } - this.dispatchEvent(new StateRegistryEvent(StateRegistryEvent.STATE_MANAGER_ADD, binding.stateManager)); + this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.STATE_MANAGER_ADD, binding.sceneManager)); return binding; } - private removeBinding(binding: StateManagerBinding): void { + private removeBinding(binding: SceneManagerBinding): void { // Remove the binding itself - this._bindingByStateManager.delete(binding.stateManager); + this._bindingBySceneManager.delete(binding.sceneManager); let index: number = this._bindings.indexOf(binding); this._bindings.splice(index, 1); // Drop the empty binding listener - binding.removeEventListener(StateManagerBindingEvent.BINDING_EMPTY, this.onBindingEmpty); + binding.removeEventListener(SceneManagerBindingEvent.BINDING_EMPTY, this.onBindingEmpty); if (!binding.parent) { // This binding didn't have a parent, so it was a Root this.removeRootBinding(binding); } - this.dispatchEvent(new StateRegistryEvent(StateRegistryEvent.STATE_MANAGER_REMOVE, binding.stateManager)); + this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.STATE_MANAGER_REMOVE, binding.sceneManager)); } - private addRootBinding(binding: StateManagerBinding): void { + private addRootBinding(binding: SceneManagerBinding): void { this._rootBindings.push(binding); - this.dispatchEvent(new StateRegistryEvent(StateRegistryEvent.ROOT_STATE_MANAGER_ADD, binding.stateManager)); + this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.ROOT_STATE_MANAGER_ADD, binding.sceneManager)); } - private removeRootBinding(binding: StateManagerBinding): void { + private removeRootBinding(binding: SceneManagerBinding): void { let index: number = this._rootBindings.indexOf(binding); this._rootBindings.splice(index, 1); - this.dispatchEvent(new StateRegistryEvent(StateRegistryEvent.ROOT_STATE_MANAGER_REMOVE, binding.stateManager)); + this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.ROOT_STATE_MANAGER_REMOVE, binding.sceneManager)); } - private onBindingEmpty(event: StateManagerBindingEvent): void { + private onBindingEmpty(event: SceneManagerBindingEvent): void { this.removeBinding(event.target); } } diff --git a/src/robotlegs/bender/extensions/stateManager/impl/StateRegistryEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts old mode 100644 new mode 100755 similarity index 65% rename from src/robotlegs/bender/extensions/stateManager/impl/StateRegistryEvent.ts rename to src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts index 350e7a66..53e860a6 --- a/src/robotlegs/bender/extensions/stateManager/impl/StateRegistryEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts @@ -6,35 +6,35 @@ // ------------------------------------------------------------------------------ /** - * StateManager existence event + * SceneManager existence event * @private */ import { Event } from "@robotlegsjs/core"; -export class StateRegistryEvent extends Event { +export class SceneRegistryEvent extends Event { /*============================================================================*/ /* Public Static Properties */ /*============================================================================*/ - public static STATE_MANAGER_ADD: string = "stateManagerAdd"; + public static STATE_MANAGER_ADD: string = "sceneManagerAdd"; - public static STATE_MANAGER_REMOVE: string = "stateManagerRemove"; + public static STATE_MANAGER_REMOVE: string = "sceneManagerRemove"; - public static ROOT_STATE_MANAGER_ADD: string = "rootStateManagerAdd"; + public static ROOT_STATE_MANAGER_ADD: string = "rootSceneManagerAdd"; - public static ROOT_STATE_MANAGER_REMOVE: string = "rootStateManagerRemove"; + public static ROOT_STATE_MANAGER_REMOVE: string = "rootSceneManagerRemove"; /*============================================================================*/ /* Public Properties */ /*============================================================================*/ - private _stateManager: Phaser.StateManager; + private _sceneManager: Phaser.Scenes.SceneManager; /** - * The stateManager associated with this event + * The sceneManager associated with this event */ - public get stateManager(): Phaser.StateManager { - return this._stateManager; + public get sceneManager(): Phaser.Scenes.SceneManager { + return this._sceneManager; } /*============================================================================*/ @@ -42,13 +42,13 @@ export class StateRegistryEvent extends Event { /*============================================================================*/ /** - * Creates a new stateManager existence event + * Creates a new sceneManager existence event * @param type The event type - * @param stateManager The stateManager associated with this event + * @param sceneManager The sceneManager associated with this event */ - constructor(type: string, stateManager: Phaser.StateManager) { + constructor(type: string, sceneManager: Phaser.Scenes.SceneManager) { super(type); - this._stateManager = stateManager; + this._sceneManager = sceneManager; } /*============================================================================*/ @@ -58,7 +58,7 @@ export class StateRegistryEvent extends Event { /** * @inheritDoc */ - public clone(): StateRegistryEvent { - return new StateRegistryEvent(this.type, this._stateManager); + public clone(): SceneRegistryEvent { + return new SceneRegistryEvent(this.type, this._sceneManager); } } diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/StateMediatorMapExtension.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts old mode 100644 new mode 100755 similarity index 63% rename from src/robotlegs/bender/extensions/stateMediatorMap/StateMediatorMapExtension.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts index eac96297..55267af9 --- a/src/robotlegs/bender/extensions/stateMediatorMap/StateMediatorMapExtension.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts @@ -1,30 +1,28 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ import { IContext, IExtension, IInjector } from "@robotlegsjs/core"; - -import { IStateMediatorMap } from "./api/IStateMediatorMap"; -import { StateMediatorMap } from "./impl/StateMediatorMap"; - -import { IStateManager } from "../stateManager/api/IStateManager"; +import { ISceneMediatorMap } from "./api/ISceneMediatorMap"; +import { ISceneManager } from "../sceneManager/api/ISceneManager"; +import { SceneMediatorMap } from "./impl/SceneMediatorMap"; /** * This extension installs a shared IStateMediatorMap into the context */ -export class StateMediatorMapExtension implements IExtension { +export class SceneMediatorMapExtension implements IExtension { /*============================================================================*/ /* Private Properties */ /*============================================================================*/ private _injector: IInjector; - private _mediatorMap: StateMediatorMap; + private _mediatorMap: SceneMediatorMap; - private _viewManager: IStateManager; + private _viewManager: ISceneManager; /*============================================================================*/ /* Public Functions */ @@ -40,8 +38,8 @@ export class StateMediatorMapExtension implements IExtension { .whenDestroying(this.whenDestroying.bind(this)); this._injector = context.injector; this._injector - .bind(IStateMediatorMap) - .to(StateMediatorMap) + .bind(ISceneMediatorMap) + .to(SceneMediatorMap) .inSingletonScope(); } @@ -50,24 +48,24 @@ export class StateMediatorMapExtension implements IExtension { /*============================================================================*/ private beforeInitializing(): void { - this._mediatorMap = this._injector.get(IStateMediatorMap); - if (this._injector.isBound(IStateManager)) { - this._viewManager = this._injector.get(IStateManager); - this._viewManager.addStateHandler(this._mediatorMap); + this._mediatorMap = this._injector.get(ISceneMediatorMap); + if (this._injector.isBound(ISceneManager)) { + this._viewManager = this._injector.get(ISceneManager); + this._viewManager.addSceneHandler(this._mediatorMap); } } private beforeDestroying(): void { this._mediatorMap.unmediateAll(); - if (this._injector.isBound(IStateManager)) { - this._viewManager = this._injector.get(IStateManager); - this._viewManager.removeStateHandler(this._mediatorMap); + if (this._injector.isBound(ISceneManager)) { + this._viewManager = this._injector.get(ISceneManager); + this._viewManager.removeSceneHandler(this._mediatorMap); } } private whenDestroying(): void { - if (this._injector.isBound(IStateMediatorMap)) { - this._injector.unbind(IStateMediatorMap); + if (this._injector.isBound(ISceneMediatorMap)) { + this._injector.unbind(ISceneMediatorMap); } } } diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts old mode 100644 new mode 100755 similarity index 89% rename from src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediator.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts index cdf32eb1..3a715f69 --- a/src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -8,7 +8,7 @@ /** * Optional StateMediator interface */ -export interface IStateMediator { +export interface ISceneMediator { /** * Initializes the mediator. This is run automatically by the stateMediatorMap when a mediator is created. * Normally the initialize function is where you would add handlers using the eventMap. diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts old mode 100644 new mode 100755 similarity index 75% rename from src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMap.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts index a4cdd65a..e62e96d6 --- a/src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts @@ -1,26 +1,25 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ import { IClass, ITypeMatcher } from "@robotlegsjs/core"; - -import { IStateMediatorMapper } from "../dsl/IStateMediatorMapper"; -import { IStateMediatorUnmapper } from "../dsl/IStateMediatorUnmapper"; +import { ISceneMediatorMapper } from "../dsl/ISceneMediatorMapper"; +import { ISceneMediatorUnmapper } from "../dsl/ISceneMediatorUnmapper"; /** * The StateMediator Map allows you to bind Mediators to Phaser.State objects */ -export let IStateMediatorMap = Symbol("IStateMediatorMap"); -export interface IStateMediatorMap { +export let ISceneMediatorMap = Symbol("ISceneMediatorMap"); +export interface ISceneMediatorMap { /** * Maps a matcher that will be tested against incoming items to be handled. * @param matcher The type or package matcher specifying the rules for matching. * @return the mapper so that you can continue the mapping. */ - mapMatcher(matcher: ITypeMatcher): IStateMediatorMapper; + mapMatcher(matcher: ITypeMatcher): ISceneMediatorMapper; /** * Maps a Phaser.State that will be tested against incoming items to be handled. @@ -28,7 +27,7 @@ export interface IStateMediatorMap { * @param state The class or interface to be matched against. * @return the mapper so that you can continue the mapping. */ - map(state: IClass): IStateMediatorMapper; + map(state: IClass): ISceneMediatorMapper; /** * Removes a mapping that was made against a matcher. @@ -36,7 +35,7 @@ export interface IStateMediatorMap { * @param matcher The type or package matcher specifying the rules for matching. * @return the unmapper so that you can continue the unmapping. */ - unmapMatcher(matcher: ITypeMatcher): IStateMediatorUnmapper; + unmapMatcher(matcher: ITypeMatcher): ISceneMediatorUnmapper; /** * Removes a mapping that was made against a state. @@ -44,19 +43,19 @@ export interface IStateMediatorMap { * @param state The class or interface to be matched against. * @return the unmapper so that you can continue the unmapping. */ - unmap(state: IClass): IStateMediatorUnmapper; + unmap(state: IClass): ISceneMediatorUnmapper; /** * Mediates an state directly. If the state matches any mapped matchers or types then it will be mediated according to those mappings. * @param state The state to create mediators for. */ - mediate(state: IClass): void; + mediate(state: IClass): void; /** * Removes the mediators for an state if there are any. * @param state The state to remove mediators for. */ - unmediate(state: IClass): void; + unmediate(state: IClass): void; /** * Removes all mediators diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMapping.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts old mode 100644 new mode 100755 similarity index 89% rename from src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMapping.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts index 065ce3b8..6f865325 --- a/src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMapping.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -10,7 +10,7 @@ import { IClass, ITypeFilter } from "@robotlegsjs/core"; /** * Represents a StateMediator mapping */ -export interface IStateMediatorMapping { +export interface ISceneMediatorMapping { /** * The matcher for this mapping */ diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorConfigurator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts old mode 100644 new mode 100755 similarity index 74% rename from src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorConfigurator.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts index a8483b37..389ad0f7 --- a/src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorConfigurator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -8,20 +8,20 @@ /** * Configures a mediator mapping */ -export interface IStateMediatorConfigurator { +export interface ISceneMediatorConfigurator { /** * Guards to check before allowing a mediator to be created * @param guards Guards * @return Self */ - withGuards(...guards: any[]): IStateMediatorConfigurator; + withGuards(...guards: any[]): ISceneMediatorConfigurator; /** * Hooks to run before a mediator is created * @param hooks Hooks * @return Self */ - withHooks(...hooks: any[]): IStateMediatorConfigurator; + withHooks(...hooks: any[]): ISceneMediatorConfigurator; /** * Should the mediator be removed when the mediated item looses scope? @@ -32,5 +32,5 @@ export interface IStateMediatorConfigurator { * @param value Boolean * @return Self */ - autoRemove(value: boolean): IStateMediatorConfigurator; + autoRemove(value: boolean): ISceneMediatorConfigurator; } diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorMapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts old mode 100644 new mode 100755 similarity index 72% rename from src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorMapper.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts index 95b5faf2..6bf6a549 --- a/src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorMapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -7,16 +7,16 @@ import { IClass } from "@robotlegsjs/core"; -import { IStateMediatorConfigurator } from "./IStateMediatorConfigurator"; +import { ISceneMediatorConfigurator } from "./ISceneMediatorConfigurator"; /** * Maps a matcher to a concrete StateMediator class */ -export interface IStateMediatorMapper { +export interface ISceneMediatorMapper { /** * Maps a matcher to a concrete StateMediator class * @param mediatorClass The concrete mediator class * @return Mapping configurator */ - toMediator(mediatorClass: IClass): IStateMediatorConfigurator; + toMediator(mediatorClass: IClass): ISceneMediatorConfigurator; } diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorUnmapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts old mode 100644 new mode 100755 similarity index 85% rename from src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorUnmapper.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts index 6e25fe35..01203b24 --- a/src/robotlegs/bender/extensions/stateMediatorMap/dsl/IStateMediatorUnmapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -10,7 +10,7 @@ import { IClass } from "@robotlegsjs/core"; /** * Unmaps a StateMediator */ -export interface IStateMediatorUnmapper { +export interface ISceneMediatorUnmapper { /** * Unmaps a mediator from this matcher * @param mediatorClass StateMediator to unmap diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/impl/NullStateMediatorUnmapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts old mode 100644 new mode 100755 similarity index 80% rename from src/robotlegs/bender/extensions/stateMediatorMap/impl/NullStateMediatorUnmapper.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts index fe7f6021..18341365 --- a/src/robotlegs/bender/extensions/stateMediatorMap/impl/NullStateMediatorUnmapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -7,12 +7,12 @@ import { IClass } from "@robotlegsjs/core"; -import { IStateMediatorUnmapper } from "../dsl/IStateMediatorUnmapper"; +import { ISceneMediatorUnmapper } from "../dsl/ISceneMediatorUnmapper"; /** * @private */ -export class NullStateMediatorUnmapper implements IStateMediatorUnmapper { +export class NullSceneMediatorUnmapper implements ISceneMediatorUnmapper { /*============================================================================*/ /* Public Functions */ /*============================================================================*/ diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts old mode 100644 new mode 100755 similarity index 82% rename from src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts index b5253944..899c68f4 --- a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts @@ -1,13 +1,15 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { injectable, inject, IEventMap, IEventDispatcher, Event } from "@robotlegsjs/core"; +import { injectable, inject } from "inversify"; -import { IStateMediator } from "../api/IStateMediator"; +import { IEventMap, IEventDispatcher, Event } from "@robotlegsjs/core"; + +import { ISceneMediator } from "../api/ISceneMediator"; /** * Classic Robotlegs mediator implementation @@ -15,29 +17,27 @@ import { IStateMediator } from "../api/IStateMediator"; *

Override initialize and destroy to hook into the mediator lifecycle.

*/ @injectable() -export abstract class StateMediator implements IStateMediator { +export abstract class SceneMediator implements ISceneMediator { /*============================================================================*/ /* Protected Properties */ /*============================================================================*/ - @inject(IEventMap) - protected eventMap: IEventMap; + @inject(IEventMap) protected eventMap: IEventMap; - @inject(IEventDispatcher) - protected eventDispatcher: IEventDispatcher; + @inject(IEventDispatcher) protected eventDispatcher: IEventDispatcher; - protected _stateComponent: T; + protected _sceneComponent: T; /*============================================================================*/ /* Public Properties */ /*============================================================================*/ - public set state(state: T) { - this._stateComponent = state; + public set scene(scene: T) { + this._sceneComponent = scene; } - public get state(): T { - return this._stateComponent; + public get scene(): T { + return this._sceneComponent; } /*============================================================================*/ diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorFactory.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorFactory.ts old mode 100644 new mode 100755 similarity index 86% rename from src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorFactory.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorFactory.ts index 3574398e..43b50ac5 --- a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorFactory.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorFactory.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. @@ -7,14 +7,14 @@ import { IClass, IType, IInjector, applyHooks, guardsApprove, instantiateUnmapped, ITypeFilter } from "@robotlegsjs/core"; -import { IStateMediatorMapping } from "../api/IStateMediatorMapping"; +import { ISceneMediatorMapping } from "../api/ISceneMediatorMapping"; -import { StateMediatorManager } from "./StateMediatorManager"; +import { SceneMediatorManager } from "./SceneMediatorManager"; /** * @private */ -export class StateMediatorFactory { +export class SceneMediatorFactory { /*============================================================================*/ /* Private Properties */ /*============================================================================*/ @@ -23,7 +23,7 @@ export class StateMediatorFactory { private _injector: IInjector; - private _manager: StateMediatorManager; + private _manager: SceneMediatorManager; /*============================================================================*/ /* Constructor */ @@ -32,9 +32,9 @@ export class StateMediatorFactory { /** * @private */ - constructor(injector: IInjector, manager?: StateMediatorManager) { + constructor(injector: IInjector, manager?: SceneMediatorManager) { this._injector = injector; - this._manager = manager || new StateMediatorManager(this); + this._manager = manager || new SceneMediatorManager(this); } /*============================================================================*/ @@ -44,7 +44,7 @@ export class StateMediatorFactory { /** * @private */ - public getMediator(item: any, mapping: IStateMediatorMapping): any { + public getMediator(item: any, mapping: ISceneMediatorMapping): any { return this._mediators.get(item) ? this._mediators.get(item).get(mapping) : null; } @@ -55,7 +55,7 @@ export class StateMediatorFactory { let createdMediators: any[] = []; let mediator: any; - mappings.forEach((mapping: IStateMediatorMapping) => { + mappings.forEach((mapping: ISceneMediatorMapping) => { mediator = this.getMediator(item, mapping); if (!mediator) { @@ -76,7 +76,7 @@ export class StateMediatorFactory { * @private */ public removeMediators(item: any): void { - let mediators: Map = this._mediators.get(item); + let mediators: Map = this._mediators.get(item); if (!mediators) { return; } @@ -97,7 +97,7 @@ export class StateMediatorFactory { /* Private Functions */ /*============================================================================*/ - private createMediator(item: any, mapping: IStateMediatorMapping): any { + private createMediator(item: any, mapping: ISceneMediatorMapping): any { let mediator: any = this.getMediator(item, mapping); if (mediator) { @@ -117,8 +117,8 @@ export class StateMediatorFactory { return mediator; } - private addMediator(mediator: any, item: any, mapping: IStateMediatorMapping): void { - let mediatorMap = this._mediators.get(item) || new Map(); + private addMediator(mediator: any, item: any, mapping: ISceneMediatorMapping): void { + let mediatorMap = this._mediators.get(item) || new Map(); this._mediators.set(item, mediatorMap); mediatorMap.set(mapping, mediator); this._manager.addMediator(mediator, item, mapping); diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorManager.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorManager.ts old mode 100644 new mode 100755 similarity index 62% rename from src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorManager.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorManager.ts index e21b8849..0149846c --- a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorManager.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorManager.ts @@ -1,17 +1,17 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { IStateMediatorMapping } from "../api/IStateMediatorMapping"; -import { StateMediatorFactory } from "./StateMediatorFactory"; +import { ISceneMediatorMapping } from "../api/ISceneMediatorMapping"; +import { SceneMediatorFactory } from "./SceneMediatorFactory"; /** * @private */ -export class StateMediatorManager { +export class SceneMediatorManager { /*============================================================================*/ /* Private Static Properties */ /*============================================================================*/ @@ -22,8 +22,8 @@ export class StateMediatorManager { /* Private Properties */ /*============================================================================*/ - private _factory: StateMediatorFactory; - private _autoRemoveMap: Map = new Map(); + private _factory: SceneMediatorFactory; + private _autoRemoveMap: Map = new Map(); /*============================================================================*/ /* Constructor */ @@ -32,7 +32,7 @@ export class StateMediatorManager { /** * @private */ - constructor(factory: StateMediatorFactory) { + constructor(factory: SceneMediatorFactory) { this._factory = factory; } @@ -43,17 +43,18 @@ export class StateMediatorManager { /** * @private */ - public addMediator(mediator: any, item: any, mapping: IStateMediatorMapping): void { - let state: Phaser.State = item; + public addMediator(mediator: any, item: any, mapping: ISceneMediatorMapping): void { + let scene: Phaser.Scene = item; - // Watch state for removal - if (state && mapping.autoRemoveEnabled) { - if (!this._autoRemoveMap.has(state.key)) { - this._autoRemoveMap.set(state.key, state); - } - if (!state.game.state.onStateChange.has(this.onStateChange, this)) { - state.game.state.onStateChange.add(this.onStateChange, this); + // Watch scene for removal + if (scene && mapping.autoRemoveEnabled) { + if (!this._autoRemoveMap.has(scene.sys.settings.key)) { + this._autoRemoveMap.set(scene.sys.settings.key, scene); } + scene.sys.events.on("destroy", this.onSceneDestroy, this); + // scene.sys.events.on("shutdown", this.onSceneDestroy, this); + // scene.sys.events.on("sleep", this.onSceneDestroy, this); + // scene.sys.events.on("pause", this.onSceneDestroy, this); } // Synchronize with item life-cycle @@ -63,7 +64,7 @@ export class StateMediatorManager { /** * @private */ - public removeMediator(mediator: any, item: any, mapping: IStateMediatorMapping): void { + public removeMediator(mediator: any, item: any, mapping: ISceneMediatorMapping): void { this.destroyMediator(mediator); } @@ -71,13 +72,13 @@ export class StateMediatorManager { /* Private Functions */ /*============================================================================*/ - private onStateChange(currentStateKey: string, previousStateKey: string): void { - if (this._autoRemoveMap.has(previousStateKey)) { - let state: Phaser.State = this._autoRemoveMap.get(previousStateKey); - this._autoRemoveMap.delete(previousStateKey); - this._factory.removeMediators(state); + private onSceneDestroy(sys: Phaser.Scenes.Systems): void { + if (this._autoRemoveMap.has(sys.settings.key)) { + let scene: Phaser.Scene = this._autoRemoveMap.get(sys.settings.key); + this._autoRemoveMap.delete(sys.settings.key); + this._factory.removeMediators(scene); if (this._autoRemoveMap.size === 0) { - state.game.state.onStateChange.remove(this.onStateChange, this); + scene.sys.events.off("destroy", this.onSceneDestroy, this, false); } } } @@ -87,8 +88,8 @@ export class StateMediatorManager { mediator.preInitialize(); } - if ("state" in mediator) { - mediator.state = mediatedItem; + if ("scene" in mediator) { + mediator.scene = mediatedItem; } if ("initialize" in mediator) { @@ -109,8 +110,8 @@ export class StateMediatorManager { mediator.destroy(); } - if ("state" in mediator) { - mediator.state = null; + if ("scene" in mediator) { + mediator.scene = null; } if ("postDestroy" in mediator) { diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts old mode 100644 new mode 100755 similarity index 55% rename from src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMap.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts index 898acb27..e2c22ad5 --- a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts @@ -1,41 +1,43 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { injectable, inject, IClass, IContext, ILogger, ITypeMatcher, TypeMatcher } from "@robotlegsjs/core"; +import { IContext, ILogger, ITypeMatcher, TypeMatcher } from "@robotlegsjs/core"; -import { IStateMediatorMap } from "../api/IStateMediatorMap"; -import { IStateMediatorMapper } from "../dsl/IStateMediatorMapper"; -import { IStateMediatorUnmapper } from "../dsl/IStateMediatorUnmapper"; +import { ISceneMediatorMap } from "../api/ISceneMediatorMap"; +import { ISceneMediatorMapper } from "../dsl/ISceneMediatorMapper"; +import { ISceneMediatorUnmapper } from "../dsl/ISceneMediatorUnmapper"; -import { IStateHandler } from "../../stateManager/api/IStateHandler"; +import { ISceneHandler } from "../../sceneManager/api/ISceneHandler"; -import { StateMediatorFactory } from "./StateMediatorFactory"; -import { StateMediatorStateHandler } from "./StateMediatorStateHandler"; -import { NullStateMediatorUnmapper } from "./NullStateMediatorUnmapper"; -import { StateMediatorMapper } from "./StateMediatorMapper"; +import { SceneMediatorFactory } from "./SceneMediatorFactory"; +import { SceneMediatorStateHandler } from "./SceneMediatorStateHandler"; +import { NullSceneMediatorUnmapper } from "./NullSceneMediatorUnmapper"; +import { SceneMediatorMapper } from "./SceneMediatorMapper"; + +import { injectable, inject } from "inversify"; /** * @private */ @injectable() -export class StateMediatorMap implements IStateMediatorMap, IStateHandler { +export class SceneMediatorMap implements ISceneMediatorMap, ISceneHandler { /*============================================================================*/ /* Private Properties */ /*============================================================================*/ - private _mappers: Map = new Map(); + private _mappers: Map = new Map(); private _logger: ILogger; - private _factory: StateMediatorFactory; + private _factory: SceneMediatorFactory; - private _stateHandler: StateMediatorStateHandler; + private _sceneHandler: SceneMediatorStateHandler; - private NULL_UNMAPPER: IStateMediatorUnmapper = new NullStateMediatorUnmapper(); + private NULL_UNMAPPER: ISceneMediatorUnmapper = new NullSceneMediatorUnmapper(); /*============================================================================*/ /* Constructor */ @@ -46,8 +48,8 @@ export class StateMediatorMap implements IStateMediatorMap, IStateHandler { */ constructor(@inject(IContext) context: IContext) { this._logger = context.getLogger(this); - this._factory = new StateMediatorFactory(context.injector); - this._stateHandler = new StateMediatorStateHandler(this._factory); + this._factory = new SceneMediatorFactory(context.injector); + this._sceneHandler = new SceneMediatorStateHandler(this._factory); } /*============================================================================*/ @@ -57,15 +59,15 @@ export class StateMediatorMap implements IStateMediatorMap, IStateHandler { /** * @inheritDoc */ - public mapMatcher(matcher: ITypeMatcher): IStateMediatorMapper { + public mapMatcher(matcher: ITypeMatcher): ISceneMediatorMapper { const desc = matcher.createTypeFilter().descriptor; - let mapper = this._mappers.get(desc); + let mapper: SceneMediatorMapper = this._mappers.get(desc); if (mapper) { return mapper; } - mapper = this.createMapper(matcher); + mapper = this.createMapper(matcher) as SceneMediatorMapper; this._mappers.set(desc, mapper); return mapper; } @@ -73,42 +75,42 @@ export class StateMediatorMap implements IStateMediatorMap, IStateHandler { /** * @inheritDoc */ - public map(type: IClass): IStateMediatorMapper { + public map(type: any): ISceneMediatorMapper { return this.mapMatcher(new TypeMatcher().allOf(type)); } /** * @inheritDoc */ - public unmapMatcher(matcher: ITypeMatcher): IStateMediatorUnmapper { + public unmapMatcher(matcher: ITypeMatcher): ISceneMediatorUnmapper { return this._mappers.get(matcher.createTypeFilter().descriptor) || this.NULL_UNMAPPER; } /** * @inheritDoc */ - public unmap(type: IClass): IStateMediatorUnmapper { + public unmap(type: any): ISceneMediatorUnmapper { return this.unmapMatcher(new TypeMatcher().allOf(type)); } /** * @inheritDoc */ - public handleState(state: Phaser.State, type: IClass): void { - this._stateHandler.handleState(state, type); + public handleScene(state: any, type: any): void { + this._sceneHandler.handleScene(state, type); } /** * @inheritDoc */ - public mediate(item: IClass): void { - this._stateHandler.handleItem(item, >item.constructor); + public mediate(item: any): void { + this._sceneHandler.handleItem(item, item["constructor"]); } /** * @inheritDoc */ - public unmediate(item: IClass): void { + public unmediate(item: any): void { this._factory.removeMediators(item); } @@ -123,7 +125,7 @@ export class StateMediatorMap implements IStateMediatorMap, IStateHandler { /* Private Functions */ /*============================================================================*/ - private createMapper(matcher: ITypeMatcher): StateMediatorMapper { - return new StateMediatorMapper(matcher.createTypeFilter(), this._stateHandler, this._logger); + private createMapper(matcher: ITypeMatcher): ISceneMediatorMapper { + return new SceneMediatorMapper(matcher.createTypeFilter(), this._sceneHandler, this._logger); } } diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapper.ts old mode 100644 new mode 100755 similarity index 70% rename from src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMapper.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapper.ts index c6129f96..07607a53 --- a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapper.ts @@ -1,33 +1,33 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { IClass, ILogger, ITypeFilter } from "@robotlegsjs/core"; +import { ILogger, ITypeFilter, IClass } from "@robotlegsjs/core"; -import { IStateMediatorMapping } from "../api/IStateMediatorMapping"; -import { IStateMediatorConfigurator } from "../dsl/IStateMediatorConfigurator"; -import { IStateMediatorMapper } from "../dsl/IStateMediatorMapper"; -import { IStateMediatorUnmapper } from "../dsl/IStateMediatorUnmapper"; +import { ISceneMediatorMapping } from "../api/ISceneMediatorMapping"; +import { ISceneMediatorConfigurator } from "../dsl/ISceneMediatorConfigurator"; +import { ISceneMediatorMapper } from "../dsl/ISceneMediatorMapper"; +import { ISceneMediatorUnmapper } from "../dsl/ISceneMediatorUnmapper"; -import { StateMediatorStateHandler } from "./StateMediatorStateHandler"; -import { StateMediatorMapping } from "./StateMediatorMapping"; +import { SceneMediatorStateHandler } from "./SceneMediatorStateHandler"; +import { SceneMediatorMapping } from "./SceneMediatorMapping"; /** * @private */ -export class StateMediatorMapper implements IStateMediatorMapper, IStateMediatorUnmapper { +export class SceneMediatorMapper implements ISceneMediatorMapper, ISceneMediatorUnmapper { /*============================================================================*/ /* Private Properties */ /*============================================================================*/ - private _mappings: Map, IStateMediatorMapping> = new Map, IStateMediatorMapping>(); + private _mappings: Map, ISceneMediatorMapping> = new Map, ISceneMediatorMapping>(); private _typeFilter: ITypeFilter; - private _handler: StateMediatorStateHandler; + private _handler: SceneMediatorStateHandler; private _logger: ILogger; @@ -38,7 +38,7 @@ export class StateMediatorMapper implements IStateMediatorMapper, IStateMediator /** * @private */ - constructor(typeFilter: ITypeFilter, handler: StateMediatorStateHandler, logger?: ILogger) { + constructor(typeFilter: ITypeFilter, handler: SceneMediatorStateHandler, logger?: ILogger) { this._typeFilter = typeFilter; this._handler = handler; this._logger = logger; @@ -51,8 +51,8 @@ export class StateMediatorMapper implements IStateMediatorMapper, IStateMediator /** * @inheritDoc */ - public toMediator(mediatorClass: IClass): IStateMediatorConfigurator { - let mapping: IStateMediatorMapping = this._mappings.get(mediatorClass); + public toMediator(mediatorClass: IClass): ISceneMediatorConfigurator { + let mapping: ISceneMediatorMapping = this._mappings.get(mediatorClass); return mapping ? this.overwriteMapping(mapping) : this.createMapping(mediatorClass); } @@ -60,8 +60,7 @@ export class StateMediatorMapper implements IStateMediatorMapper, IStateMediator * @inheritDoc */ public fromMediator(mediatorClass: IClass): void { - let mapping: IStateMediatorMapping = this._mappings.get(mediatorClass); - + let mapping: ISceneMediatorMapping = this._mappings.get(mediatorClass); if (mapping) { this.deleteMapping(mapping); } @@ -78,28 +77,25 @@ export class StateMediatorMapper implements IStateMediatorMapper, IStateMediator /* Private Functions */ /*============================================================================*/ - private createMapping(mediatorClass: IClass): StateMediatorMapping { - let mapping: StateMediatorMapping = new StateMediatorMapping(this._typeFilter, mediatorClass); + private createMapping(mediatorClass: IClass): SceneMediatorMapping { + let mapping: SceneMediatorMapping = new SceneMediatorMapping(this._typeFilter, mediatorClass); this._handler.addMapping(mapping); this._mappings.set(mediatorClass, mapping); - if (this._logger) { this._logger.debug("{0} mapped to {1}", [this._typeFilter, mapping]); } - return mapping; } - private deleteMapping(mapping: IStateMediatorMapping): void { + private deleteMapping(mapping: ISceneMediatorMapping): void { this._handler.removeMapping(mapping); this._mappings.delete(mapping.mediatorClass); - if (this._logger) { this._logger.debug("{0} unmapped from {1}", [this._typeFilter, mapping]); } } - private overwriteMapping(mapping: IStateMediatorMapping): IStateMediatorConfigurator { + private overwriteMapping(mapping: ISceneMediatorMapping): ISceneMediatorConfigurator { if (this._logger) { this._logger.warn( "{0} already mapped to {1}\n" + diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMapping.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapping.ts old mode 100644 new mode 100755 similarity index 72% rename from src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMapping.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapping.ts index 6d4221fd..94ca2160 --- a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorMapping.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapping.ts @@ -1,19 +1,19 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { IClass, ITypeFilter } from "@robotlegsjs/core"; +import { IGuard, IHook, ITypeFilter, IClass } from "@robotlegsjs/core"; -import { IStateMediatorMapping } from "../api/IStateMediatorMapping"; -import { IStateMediatorConfigurator } from "../dsl/IStateMediatorConfigurator"; +import { ISceneMediatorMapping } from "../api/ISceneMediatorMapping"; +import { ISceneMediatorConfigurator } from "../dsl/ISceneMediatorConfigurator"; /** * @private */ -export class StateMediatorMapping implements IStateMediatorMapping, IStateMediatorConfigurator { +export class SceneMediatorMapping implements ISceneMediatorMapping, ISceneMediatorConfigurator { /*============================================================================*/ /* Public Properties */ /*============================================================================*/ @@ -36,21 +36,21 @@ export class StateMediatorMapping implements IStateMediatorMapping, IStateMediat return this._mediatorClass; } - private _guards: any[] = []; + private _guards: IGuard[] = []; /** * @inheritDoc */ - public get guards(): any[] { + public get guards(): IGuard[] { return this._guards; } - private _hooks: any[] = []; + private _hooks: IHook[] = []; /** * @inheritDoc */ - public get hooks(): any[] { + public get hooks(): IHook[] { return this._hooks; } @@ -82,23 +82,23 @@ export class StateMediatorMapping implements IStateMediatorMapping, IStateMediat /** * @inheritDoc */ - public withGuards(...guards: any[]): IStateMediatorConfigurator { - this._guards = this._guards.concat.apply(this._guards, guards); + public withGuards(...guards: IGuard[]): ISceneMediatorConfigurator { + this._guards = this._guards.concat.apply(null, guards); return this; } /** * @inheritDoc */ - public withHooks(...hooks: any[]): IStateMediatorConfigurator { - this._hooks = this._hooks.concat.apply(this._hooks, hooks); + public withHooks(...hooks: IHook[]): ISceneMediatorConfigurator { + this._hooks = this._hooks.concat.apply(null, hooks); return this; } /** * @inheritDoc */ - public autoRemove(value: boolean = true): IStateMediatorConfigurator { + public autoRemove(value: boolean = true): ISceneMediatorConfigurator { this._autoRemoveEnabled = value; return this; } diff --git a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorStateHandler.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts old mode 100644 new mode 100755 similarity index 72% rename from src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorStateHandler.ts rename to src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts index f0eada1b..16d7106f --- a/src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediatorStateHandler.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts @@ -1,30 +1,28 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import { ISceneHandler } from "../../sceneManager/api/ISceneHandler"; +import { ISceneMediatorMapping } from "../api/ISceneMediatorMapping"; +import { SceneMediatorFactory } from "./SceneMediatorFactory"; import { IClass } from "@robotlegsjs/core"; -import { IStateMediatorMapping } from "../api/IStateMediatorMapping"; -import { IStateHandler } from "../../stateManager/api/IStateHandler"; - -import { StateMediatorFactory } from "./StateMediatorFactory"; - /** * @private */ -export class StateMediatorStateHandler implements IStateHandler { +export class SceneMediatorStateHandler implements ISceneHandler { /*============================================================================*/ /* Private Properties */ /*============================================================================*/ - private _mappings: IStateMediatorMapping[] = []; + private _mappings: ISceneMediatorMapping[] = []; - private _knownMappings: Map, IStateMediatorMapping[] | boolean> = new Map, IStateMediatorMapping[]>(); + private _knownMappings: Map, ISceneMediatorMapping[] | boolean> = new Map, ISceneMediatorMapping[]>(); - private _factory: StateMediatorFactory; + private _factory: SceneMediatorFactory; /*============================================================================*/ /* Constructor */ @@ -33,7 +31,7 @@ export class StateMediatorStateHandler implements IStateHandler { /** * @private */ - constructor(factory: StateMediatorFactory) { + constructor(factory: SceneMediatorFactory) { this._factory = factory; } @@ -44,7 +42,7 @@ export class StateMediatorStateHandler implements IStateHandler { /** * @private */ - public addMapping(mapping: IStateMediatorMapping): void { + public addMapping(mapping: ISceneMediatorMapping): void { let index: number = this._mappings.indexOf(mapping); if (index > -1) { return; @@ -56,7 +54,7 @@ export class StateMediatorStateHandler implements IStateHandler { /** * @private */ - public removeMapping(mapping: IStateMediatorMapping): void { + public removeMapping(mapping: ISceneMediatorMapping): void { let index: number = this._mappings.indexOf(mapping); if (index === -1) { return; @@ -68,10 +66,10 @@ export class StateMediatorStateHandler implements IStateHandler { /** * @private */ - public handleState(state: Phaser.State, type: IClass): void { - let interestedMappings = this.getInterestedMappingsFor(state, type); + public handleScene(scene: Phaser.Scene, type: IClass): void { + let interestedMappings = this.getInterestedMappingsFor(scene, type); if (interestedMappings) { - this._factory.createMediators(state, type, interestedMappings); + this._factory.createMediators(scene, type, interestedMappings); } } @@ -90,10 +88,10 @@ export class StateMediatorStateHandler implements IStateHandler { /*============================================================================*/ private flushCache(): void { - this._knownMappings = new Map, IStateMediatorMapping[]>(); + this._knownMappings = new Map, ISceneMediatorMapping[]>(); } - private getInterestedMappingsFor(item: any, type: any): IStateMediatorMapping[] { + private getInterestedMappingsFor(item: any, type: any): ISceneMediatorMapping[] { // we've seen this type before and nobody was interested if (this._knownMappings.get(type) === false) { return null; @@ -103,12 +101,12 @@ export class StateMediatorStateHandler implements IStateHandler { if (this._knownMappings.get(type) === undefined) { this._knownMappings.set(type, false); - this._mappings.forEach((mapping: IStateMediatorMapping) => { + this._mappings.forEach((mapping: ISceneMediatorMapping) => { if (mapping.matcher.matches(item)) { if (!this._knownMappings.get(type)) { this._knownMappings.set(type, []); } - (this._knownMappings.get(type) as IStateMediatorMapping[]).push(mapping); + (this._knownMappings.get(type) as ISceneMediatorMapping[]).push(mapping); } }); @@ -119,6 +117,6 @@ export class StateMediatorStateHandler implements IStateHandler { } // these mappings really do care - return this._knownMappings.get(type) as IStateMediatorMapping[]; + return this._knownMappings.get(type) as ISceneMediatorMapping[]; } } diff --git a/src/robotlegs/bender/extensions/stateManager/api/IStateManager.ts b/src/robotlegs/bender/extensions/stateManager/api/IStateManager.ts deleted file mode 100644 index 0f865b5c..00000000 --- a/src/robotlegs/bender/extensions/stateManager/api/IStateManager.ts +++ /dev/null @@ -1,49 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { IEventDispatcher } from "@robotlegsjs/core"; -import { IStateHandler } from "./IStateHandler"; - -/** - * The State Manager allows you to add multiple "state managers" to a context - */ -export let IStateManager = Symbol("IStateManager"); -export interface IStateManager extends IEventDispatcher { - /** - * A list of currently registered StateManagers - */ - stateManagers: Phaser.StateManager[]; - - /** - * Adds a StateManager as a "state root" into the context - * @param stateManager - */ - addStateManager(stateManager: Phaser.StateManager): void; - - /** - * Removes a StateManager from this context - * @param stateManager - */ - removeStateManager(stateManager: Phaser.StateManager): void; - - /** - * Registers a state handler - * @param handler - */ - addStateHandler(handler: IStateHandler): void; - - /** - * Removes a state handler - * @param handler - */ - removeStateHandler(handler: IStateHandler): void; - - /** - * Removes all state handlers from this context - */ - removeAllHandlers(): void; -} diff --git a/src/robotlegs/bender/extensions/stateManager/impl/StateManagerObserver.ts b/src/robotlegs/bender/extensions/stateManager/impl/StateManagerObserver.ts deleted file mode 100644 index a82f0f76..00000000 --- a/src/robotlegs/bender/extensions/stateManager/impl/StateManagerObserver.ts +++ /dev/null @@ -1,93 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { StateManagerBinding } from "./StateManagerBinding"; -import { StateRegistry } from "./StateRegistry"; -import { StateRegistryEvent } from "./StateRegistryEvent"; - -/** - * @private - */ -export class StateManagerObserver { - private _registry: StateRegistry; - - /*============================================================================*/ - /* Constructor */ - /*============================================================================*/ - - /** - * @private - */ - constructor(containerRegistry: StateRegistry) { - this._registry = containerRegistry; - - // We only care about roots - this._registry.addEventListener(StateRegistryEvent.ROOT_STATE_MANAGER_ADD, this.onRootStateManagerAdd, this); - this._registry.addEventListener(StateRegistryEvent.ROOT_STATE_MANAGER_REMOVE, this.onRootStateManagerRemove, this); - - // We might have arrived late on the scene - this._registry.rootBindings.forEach((binding: StateManagerBinding) => { - this.addRootListener(binding.stateManager); - }); - } - - /*============================================================================*/ - /* Public Functions */ - /*============================================================================*/ - - /** - * @private - */ - public destroy(): void { - this._registry.removeEventListener(StateRegistryEvent.ROOT_STATE_MANAGER_ADD, this.onRootStateManagerAdd, this); - this._registry.removeEventListener(StateRegistryEvent.ROOT_STATE_MANAGER_REMOVE, this.onRootStateManagerRemove, this); - - this._registry.rootBindings.forEach((binding: StateManagerBinding) => { - this.removeRootListener(binding.stateManager); - }); - } - - /*============================================================================*/ - /* Private Functions */ - /*============================================================================*/ - - private onRootStateManagerAdd(event: StateRegistryEvent): void { - this.addRootListener(event.stateManager); - } - - private onRootStateManagerRemove(event: StateRegistryEvent): void { - this.removeRootListener(event.stateManager); - } - - private addRootListener(stateManager: Phaser.StateManager): void { - if (stateManager) { - stateManager.onStateChange.add(this.onStateChange, this, -1); - } - } - - private onStateChange(currentStateKey: string, previousStateKey: string): void { - let rootBindings: StateManagerBinding[] = this._registry.rootBindings; - let stateManager: Phaser.StateManager; - - rootBindings.forEach((rootBinding: StateManagerBinding) => { - stateManager = rootBinding.stateManager; - - if (stateManager && stateManager.states[currentStateKey]) { - let binding: StateManagerBinding = this._registry.getBinding(stateManager.states[currentStateKey]); - if (binding) { - binding.handleState(stateManager.states[currentStateKey], stateManager.states[currentStateKey].constructor); - } - } - }); - } - - private removeRootListener(stateManager: Phaser.StateManager): void { - if (stateManager) { - stateManager.onStateChange.remove(this.onStateChange, this); - } - } -} diff --git a/test/README.md b/test/README.md old mode 100644 new mode 100755 diff --git a/test/entry.ts b/test/entry.ts old mode 100644 new mode 100755 index 43e0d803..2603c5dc --- a/test/entry.ts +++ b/test/entry.ts @@ -1,15 +1,7 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - /// - -/// - -import "reflect-metadata"; +/// import "bluebird/js/browser/bluebird"; -import "es6-symbol/implement"; import "es6-map/implement"; +import "es6-symbol/implement"; +import "phaser"; +import "reflect-metadata"; diff --git a/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts b/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts old mode 100644 new mode 100755 index 504eccec..b4fe3f2f --- a/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts +++ b/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts @@ -1,17 +1,15 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ - import "../../../../entry"; - +import { Context, IContext } from "@robotlegsjs/core"; import { assert } from "chai"; -import { IContext, Context } from "@robotlegsjs/core"; - describe("PhaserBundle", () => { + // let game: Phaser.Game; let context: IContext; afterEach(() => { diff --git a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts old mode 100644 new mode 100755 index ba739834..d933ac3f --- a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts @@ -1,18 +1,14 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import "../../../../entry"; - +import { Context, IContext, LogLevel } from "@robotlegsjs/core"; import { assert } from "chai"; - -import { IContext, Context, LogLevel } from "@robotlegsjs/core"; - -import { IContextStateManager, ContextStateManager, ContextStateManagerExtension } from "../../../../../src"; - +import { ContextSceneManager, ContextSceneManagerExtension, IContextSceneManager } from "../../../../../src"; +import "../../../../entry"; import { CallbackLogTarget } from "./support/CallbackLogTarget"; import { LogParams } from "./support/LogParams"; @@ -31,44 +27,44 @@ describe("ContextStateManagerExtension", () => { it("installing_after_initialization_throws_error", () => { function installExtensionAfterInitialization(): void { context.initialize(); - context.install(ContextStateManagerExtension); + context.install(ContextSceneManagerExtension); } assert.throws(installExtensionAfterInitialization, Error); }); it("contextStateManager_is_mapped", () => { - let phaserStateManager: Phaser.StateManager = new Phaser.StateManager(null); - let actual: ContextStateManager = null; - context.install(ContextStateManagerExtension).configure(new ContextStateManager(phaserStateManager)); + let game: Phaser.Game = new Phaser.Game(); + let actual: ContextSceneManager = null; + context.install(ContextSceneManagerExtension).configure(new ContextSceneManager(game.scene)); context.whenInitializing(() => { - actual = context.injector.get(IContextStateManager); + actual = context.injector.get(IContextSceneManager); }); context.initialize(); - assert.equal(actual.stateManager, phaserStateManager); + assert.equal(actual.sceneManager, game.scene); }); it("second_ContextStateManager_is_ignored", () => { - let phaserStateManager: Phaser.StateManager = new Phaser.StateManager(null); - let actual: ContextStateManager = null; - let secondPhaserStateManager: Phaser.StateManager = new Phaser.StateManager(null); + let game: Phaser.Game = new Phaser.Game(); + let actual: ContextSceneManager = null; + let secondGame: Phaser.Game = new Phaser.Game(); context - .install(ContextStateManagerExtension) - .configure(new ContextStateManager(phaserStateManager), new ContextStateManager(secondPhaserStateManager)); + .install(ContextSceneManagerExtension) + .configure(new ContextSceneManager(game.scene), new ContextSceneManager(secondGame.scene)); context.whenInitializing(() => { - actual = context.injector.get(IContextStateManager); + actual = context.injector.get(IContextSceneManager); }); context.initialize(); - assert.equal(actual.stateManager, phaserStateManager); + assert.equal(actual.sceneManager, game.scene); }); it("extension_logs_error_when_context_initialized_with_no_ContextStateManager", () => { let errorLogged: boolean = false; let logTarget: CallbackLogTarget = new CallbackLogTarget(function(log: LogParams): void { - if (log.source instanceof ContextStateManagerExtension && log.level === LogLevel.ERROR) { + if (log.source instanceof ContextSceneManagerExtension && log.level === LogLevel.ERROR) { errorLogged = true; } }); - context.install(ContextStateManagerExtension); + context.install(ContextSceneManagerExtension); context.addLogTarget(logTarget); context.initialize(); assert.isTrue(errorLogged); diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts old mode 100644 new mode 100755 index 34d28255..eb4d9d41 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts @@ -1,45 +1,43 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import "../../../../../entry"; - import { assert } from "chai"; +import { ContextSceneManager, IContextSceneManager } from "../../../../../../src"; +import "../../../../../entry"; -import { IContextStateManager, ContextStateManager } from "../../../../../../src"; - -describe("ContextStateManager", () => { - let stateManager: Phaser.StateManager; - let contextStateManager: IContextStateManager; +describe("ContextSceneManager", () => { + let game: Phaser.Game; + let contextStateManager: IContextSceneManager; beforeEach(() => { - stateManager = new Phaser.StateManager(null); + game = new Phaser.Game(); }); afterEach(() => { - stateManager = null; + game = null; contextStateManager = null; }); it("stateManager_is_stored", () => { - contextStateManager = new ContextStateManager(stateManager); - assert.isNotNull(contextStateManager.stateManager); - assert.equal(contextStateManager.stateManager, stateManager); + contextStateManager = new ContextSceneManager(game.scene); + assert.isNotNull(contextStateManager.sceneManager); + assert.equal(contextStateManager.sceneManager, game.scene); }); it("ContextStateManager_throws_a_error_when_state_manager_is_null", () => { function inicializeContextStateManagerWithNullStateManager(): void { - contextStateManager = new ContextStateManager(null); + contextStateManager = new ContextSceneManager(null); } assert.throws(inicializeContextStateManagerWithNullStateManager, Error); }); it("ContextStateManager_throws_a_error_when_state_manager_is_undefined", () => { function inicializeContextStateManagerWithUndefinedStateManager(): void { - contextStateManager = new ContextStateManager(undefined); + contextStateManager = new ContextSceneManager(undefined); } assert.throws(inicializeContextStateManagerWithUndefinedStateManager, Error); }); diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts old mode 100644 new mode 100755 index 089d1859..b2326356 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts @@ -1,44 +1,41 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import "../../../../../entry"; - import { assert } from "chai"; - -import { IContextStateManager, ContextStateManager, ContextStateManagerListenerConfig } from "../../../../../../src"; - -import { StateRegistry } from "../../../../../../src/robotlegs/bender/extensions/stateManager/impl/StateRegistry"; -import { StateManager } from "../../../../../../src/robotlegs/bender/extensions/stateManager/impl/StateManager"; +import { ContextSceneManager, ContextSceneManagerListenerConfig, IContextSceneManager } from "../../../../../../src"; +import { SceneManager } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManager"; +import { SceneRegistry } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry"; +import "../../../../../entry"; describe("ContextStateManagerListenerConfig", () => { - let phaserStateManager: Phaser.StateManager; - let contextStateManager: IContextStateManager; - let stateRegistry: StateRegistry; - let stateManager: StateManager; - let contextStateManagerListenerConfig: ContextStateManagerListenerConfig; + let game: Phaser.Game; + let contextStateManager: IContextSceneManager; + let sceneRegistry: SceneRegistry; + let sceneManager: SceneManager; + let contextStateManagerListenerConfig: ContextSceneManagerListenerConfig; beforeEach(() => { - phaserStateManager = new Phaser.StateManager(null); - contextStateManager = new ContextStateManager(phaserStateManager); - stateRegistry = new StateRegistry(); - stateManager = new StateManager(stateRegistry); - contextStateManagerListenerConfig = new ContextStateManagerListenerConfig(contextStateManager, stateManager); + game = new Phaser.Game(); + contextStateManager = new ContextSceneManager(game.scene); + sceneRegistry = new SceneRegistry(); + sceneManager = new SceneManager(sceneRegistry); + contextStateManagerListenerConfig = new ContextSceneManagerListenerConfig(contextStateManager, sceneManager); }); afterEach(() => { - phaserStateManager = null; + game = null; contextStateManager = null; - stateRegistry = null; - stateManager = null; + sceneRegistry = null; + sceneManager = null; contextStateManagerListenerConfig = null; }); it("container_is_added_to_view_manager", () => { contextStateManagerListenerConfig.configure(); - assert.deepEqual(stateManager.stateManagers, [phaserStateManager]); + assert.deepEqual(sceneManager.sceneManagers, [game.scene]); }); }); diff --git a/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts b/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts old mode 100644 new mode 100755 index fb3f6749..e914b6c3 --- a/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts @@ -1,12 +1,11 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2012 the original author or authors. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ import { ILogTarget } from "@robotlegsjs/core"; - import { LogParams } from "./LogParams"; export class CallbackLogTarget implements ILogTarget { diff --git a/test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts b/test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts old mode 100644 new mode 100755 index de2c0510..67fb5108 --- a/test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2012 the original author or authors. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts old mode 100644 new mode 100755 index cdb07ecc..f1894846 --- a/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts @@ -1,46 +1,44 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import "../../../../../entry"; - import { assert } from "chai"; - -import { ConfigureStateEvent } from "../../../../../../src/robotlegs/bender/extensions/stateManager/impl/ConfigureStateEvent"; +import { ConfigureSceneEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent"; +import "../../../../../entry"; describe("ConfigureStateEvent", () => { - let state: Phaser.State = null; - let event: ConfigureStateEvent = null; + let scene: Phaser.Scene = null; + let event: ConfigureSceneEvent = null; beforeEach(() => { - state = new Phaser.State(); - event = new ConfigureStateEvent(ConfigureStateEvent.CONFIGURE_STATE, state); + scene = new Phaser.Scene("theScene"); + event = new ConfigureSceneEvent(ConfigureSceneEvent.CONFIGURE_SCENE, scene); }); afterEach(() => { - state = null; + scene = null; event = null; }); it("ensure_static_properties_will_not_change", () => { - assert.equal(ConfigureStateEvent.CONFIGURE_STATE, "configureState"); + assert.equal(ConfigureSceneEvent.CONFIGURE_SCENE, "configureScene"); }); it("type_is_stored", () => { - assert.equal(event.type, ConfigureStateEvent.CONFIGURE_STATE); + assert.equal(event.type, ConfigureSceneEvent.CONFIGURE_SCENE); }); it("state_is_stored", () => { - assert.equal(event.state, state); + assert.equal(event.scene, scene); }); it("event_is_cloned", () => { - let clone: ConfigureStateEvent = event.clone(); + let clone: ConfigureSceneEvent = event.clone(); assert.equal(clone.type, event.type); - assert.equal(clone.state, event.state); + assert.equal(clone.scene, event.scene); assert.notEqual(clone, event); }); }); diff --git a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerBindingEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts old mode 100644 new mode 100755 similarity index 58% rename from test/robotlegs/bender/extensions/stateManager/impl/stateManagerBindingEvent.test.ts rename to test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts index 10348029..cc5ea0ac --- a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerBindingEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts @@ -1,21 +1,19 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import "../../../../../entry"; - import { assert } from "chai"; +import { SceneManagerBindingEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBindingEvent"; +import "../../../../../entry"; -import { StateManagerBindingEvent } from "../../../../../../src/robotlegs/bender/extensions/stateManager/impl/StateManagerBindingEvent"; - -describe("StateManagerBindingEvent", () => { - let event: StateManagerBindingEvent = null; +describe("StateBindingEvent", () => { + let event: SceneManagerBindingEvent = null; beforeEach(() => { - event = new StateManagerBindingEvent(StateManagerBindingEvent.BINDING_EMPTY); + event = new SceneManagerBindingEvent(SceneManagerBindingEvent.BINDING_EMPTY); }); afterEach(() => { @@ -23,15 +21,15 @@ describe("StateManagerBindingEvent", () => { }); it("ensure_static_properties_will_not_change", () => { - assert.equal(StateManagerBindingEvent.BINDING_EMPTY, "bindingEmpty"); + assert.equal(SceneManagerBindingEvent.BINDING_EMPTY, "bindingEmpty"); }); it("type_is_stored", () => { - assert.equal(event.type, StateManagerBindingEvent.BINDING_EMPTY); + assert.equal(event.type, SceneManagerBindingEvent.BINDING_EMPTY); }); it("event_is_cloned", () => { - let clone: StateManagerBindingEvent = event.clone(); + let clone: SceneManagerBindingEvent = event.clone(); assert.equal(clone.type, event.type); assert.notEqual(clone, event); }); diff --git a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts old mode 100644 new mode 100755 index cd335d82..eeb0fd59 --- a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts @@ -1,49 +1,46 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import "../../../../../entry"; - import { assert } from "chai"; - -import { IStateHandler } from "../../../../../../src/robotlegs/bender/extensions/stateManager/api/IStateHandler"; -import { StateManagerEvent } from "../../../../../../src/robotlegs/bender/extensions/stateManager/impl/StateManagerEvent"; - +import { ISceneHandler } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; +import { SceneManagerEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent"; +import "../../../../../entry"; import { CallbackStateHandler } from "../support/CallbackStateHandler"; describe("StateManagerEvent", () => { - let phaserStateManager: Phaser.StateManager = null; - let handler: IStateHandler = null; - let event: StateManagerEvent = null; + let game: Phaser.Game = null; + let handler: ISceneHandler = null; + let event: SceneManagerEvent = null; beforeEach(() => { - phaserStateManager = new Phaser.StateManager(null); + game = new Phaser.Game(); handler = new CallbackStateHandler(); - event = new StateManagerEvent(StateManagerEvent.STATE_MANAGER_ADD, phaserStateManager, handler); + event = new SceneManagerEvent(SceneManagerEvent.SCENE_MANAGER_ADD, game.scene, handler); }); afterEach(() => { - phaserStateManager = null; + game = null; handler = null; event = null; }); it("ensure_static_properties_will_not_change", () => { - assert.equal(StateManagerEvent.STATE_MANAGER_ADD, "stateManagerAdd"); - assert.equal(StateManagerEvent.STATE_MANAGER_REMOVE, "stateManagerRemove"); - assert.equal(StateManagerEvent.HANDLER_ADD, "handlerAdd"); - assert.equal(StateManagerEvent.HANDLER_REMOVE, "handlerRemove"); + assert.equal(SceneManagerEvent.SCENE_MANAGER_ADD, "sceneManagerAdd"); + assert.equal(SceneManagerEvent.SCENE_MANAGER_REMOVE, "sceneManagerRemove"); + assert.equal(SceneManagerEvent.HANDLER_ADD, "handlerAdd"); + assert.equal(SceneManagerEvent.HANDLER_REMOVE, "handlerRemove"); }); it("type_is_stored", () => { - assert.equal(event.type, StateManagerEvent.STATE_MANAGER_ADD); + assert.equal(event.type, SceneManagerEvent.SCENE_MANAGER_ADD); }); it("stateManager_is_stored", () => { - assert.equal(event.stateManager, phaserStateManager); + assert.equal(event.sceneManager, game.scene); }); it("handler_is_stored", () => { @@ -51,9 +48,9 @@ describe("StateManagerEvent", () => { }); it("event_is_cloned", () => { - let clone: StateManagerEvent = event.clone(); + let clone: SceneManagerEvent = event.clone(); assert.equal(clone.type, event.type); - assert.equal(clone.stateManager, event.stateManager); + assert.equal(clone.sceneManager, event.sceneManager); assert.equal(clone.handler, event.handler); assert.notEqual(clone, event); }); diff --git a/test/robotlegs/bender/extensions/stateManager/support/CallbackStateHandler.ts b/test/robotlegs/bender/extensions/stateManager/support/CallbackStateHandler.ts old mode 100644 new mode 100755 index 3811eada..dbe5f1e5 --- a/test/robotlegs/bender/extensions/stateManager/support/CallbackStateHandler.ts +++ b/test/robotlegs/bender/extensions/stateManager/support/CallbackStateHandler.ts @@ -1,27 +1,26 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ import { IClass } from "@robotlegsjs/core"; - -import { IStateHandler } from "../../../../../../src/robotlegs/bender/extensions/stateManager/api/IStateHandler"; +import { ISceneHandler } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; /** * @private */ -export class CallbackStateHandler implements IStateHandler { +export class CallbackStateHandler implements ISceneHandler { private _callback: Function; constructor(callback: Function = null) { this._callback = callback; } - public handleState(state: Phaser.State, type: IClass): void { + public handleScene(scene: Phaser.Scene, type: IClass): void { if (this._callback) { - this._callback(state, type); + this._callback(scene, type); } } } diff --git a/tsconfig.json b/tsconfig.json index 7ff9b9b5..e952cc39 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,31 +1,26 @@ { - "compilerOptions": { - "outDir": "lib", - "target": "es5", - "lib": ["es7", "dom"], - "types": ["reflect-metadata"], - "sourceMap": true, - "inlineSources": true, - "module": "commonjs", - "moduleResolution": "node", - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "removeComments": false, - "strict": false, - "noImplicitAny": true, - "strictNullChecks": false, - "noImplicitThis": false, - "alwaysStrict": true, - "noUnusedLocals": true, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "include": [ - "./src/**/*.ts" - ], - "files": [ - "./node_modules/phaser-ce/typescript/phaser.d.ts", - "./node_modules/phaser-ce/typescript/pixi.d.ts" - ] + "compilerOptions": { + "outDir": "lib", + "target": "es5", + "lib": ["es7", "dom"], + "types": ["reflect-metadata"], + "sourceMap": true, + "inlineSources": true, + "module": "commonjs", + "moduleResolution": "node", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "removeComments": false, + "strict": false, + "noImplicitAny": true, + "strictNullChecks": false, + "noImplicitThis": false, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["./src/**/*.ts"], + "files": ["./definitions/phaser.d.ts"] } diff --git a/webpack.example.config.js b/webpack.example.config.js index 6921c033..eb71d72c 100644 --- a/webpack.example.config.js +++ b/webpack.example.config.js @@ -4,59 +4,52 @@ const HtmlWebpackPlugin = require("html-webpack-plugin"); const ConcatPlugin = require("webpack-concat-plugin"); const concatPluginConfigGenerator = (name, files) => { - return { - uglify: false, - sourceMap: false, - name: name, - fileName: "[name].js", - filesToConcat: files, - injectType: "none" - }; + return { + uglify: false, + sourceMap: false, + name: name, + fileName: "[name].js", + filesToConcat: files, + injectType: "none" + }; }; module.exports = options => { - return { - mode: "development", - - entry: { - main: path.resolve("example/index.ts") - }, - - output: { - path: __dirname + "/dist", - filename: "bundle.js" - }, - - devtool: 'source-map', - - module: { - rules: [ - { test: /\.ts$/, loader: "ts-loader" } - ] - }, - - plugins: [ - new HtmlWebpackPlugin({ - template: path.resolve("static/index.html"), - inject: false - }), - - new ConcatPlugin(concatPluginConfigGenerator("phaser", [ - path.resolve(__dirname, "node_modules/phaser-ce/build/phaser.js") - ])), - ], - - resolve: { - extensions: ['.ts', '.js', '.json'] - }, - - devServer: { - host: "0.0.0.0", - contentBase: path.join(__dirname, "static"), - hot: true, - disableHostCheck: true, - inline:false - } - - } + return { + mode: "development", + + entry: { + main: path.resolve("example/index.ts") + }, + + output: { + path: __dirname + "/dist", + filename: "bundle.js" + }, + + devtool: "source-map", + + module: { + rules: [{ test: /\.ts$/, loader: "ts-loader" }] + }, + + plugins: [ + new HtmlWebpackPlugin({ + template: path.resolve("static/index.html"), + inject: false + }) + ], + + resolve: { + extensions: [".ts", ".js", ".json"] + }, + + devServer: { + host: "0.0.0.0", + contentBase: path.join(__dirname, "static"), + hot: true, + disableHostCheck: true, + inline: false + } + }; }; From e49fef247cba1db986dd0b58adab74a9eba04a6c Mon Sep 17 00:00:00 2001 From: Sargis Sargsyan Date: Sun, 5 Aug 2018 11:20:52 +0400 Subject: [PATCH 03/27] phaser 3 example is added --- example/Game.ts | 60 ++++++------------- example/commands/MainCommand.ts | 7 +++ example/config/GameConfig.ts | 19 +++--- example/config/SceneMediatorConfig.ts | 25 ++++++++ example/config/StateMediatorConfig.ts | 40 ------------- example/constants/SceneKey.ts | 7 +++ example/constants/StateKey.ts | 14 ----- example/events/MainEven.ts | 5 ++ example/index.ts | 10 +--- example/mediators/BootMediator.ts | 13 +--- example/mediators/GameOverMediator.ts | 7 --- example/mediators/GameTitleMediator.ts | 7 --- example/mediators/MainMediator.ts | 18 ++---- example/mediators/PreloadMediator.ts | 13 +--- example/models/GameModel.ts | 7 --- example/scenes/BaseScene.ts | 13 ++++ example/scenes/Boot.ts | 14 +++++ example/scenes/Main.ts | 13 ++++ example/scenes/Preload.ts | 23 +++++++ example/states/BaseState.ts | 20 ------- example/states/Boot.ts | 20 ------- example/states/GameOver.ts | 20 ------- example/states/GameTitle.ts | 19 ------ example/states/Main.ts | 22 ------- example/states/Preload.ts | 25 -------- src/index.ts | 6 +- .../ContextSceneManagerExtension.ts | 8 +-- .../impl/ContextSceneManager.ts | 6 +- .../impl/ContextSceneManagerListenerConfig.ts | 22 +++---- .../sceneManager/SceneManagerExtension.ts | 2 +- .../SceneManagerObserverExtension.ts | 16 ++--- .../sceneManager/api/ISceneManager.ts | 2 +- .../sceneManager/impl/SceneManagerObserver.ts | 16 ++--- .../sceneManager/impl/SceneRegistry.ts | 8 +-- .../sceneManager/impl/SceneRegistryEvent.ts | 8 +-- .../SceneMediatorMapExtension.ts | 2 +- .../sceneMediatorMap/api/ISceneMediator.ts | 6 +- .../sceneMediatorMap/api/ISceneMediatorMap.ts | 28 ++++----- .../api/ISceneMediatorMapping.ts | 2 +- .../dsl/ISceneMediatorMapper.ts | 4 +- .../dsl/ISceneMediatorUnmapper.ts | 4 +- .../sceneMediatorMap/impl/SceneMediator.ts | 10 ++-- .../sceneMediatorMap/impl/SceneMediatorMap.ts | 4 +- static/index.html | 52 ++++++++-------- 44 files changed, 252 insertions(+), 395 deletions(-) mode change 100644 => 100755 example/Game.ts create mode 100644 example/commands/MainCommand.ts mode change 100644 => 100755 example/config/GameConfig.ts create mode 100755 example/config/SceneMediatorConfig.ts delete mode 100644 example/config/StateMediatorConfig.ts create mode 100755 example/constants/SceneKey.ts delete mode 100644 example/constants/StateKey.ts create mode 100644 example/events/MainEven.ts mode change 100644 => 100755 example/index.ts mode change 100644 => 100755 example/mediators/BootMediator.ts mode change 100644 => 100755 example/mediators/GameOverMediator.ts mode change 100644 => 100755 example/mediators/GameTitleMediator.ts mode change 100644 => 100755 example/mediators/MainMediator.ts mode change 100644 => 100755 example/mediators/PreloadMediator.ts mode change 100644 => 100755 example/models/GameModel.ts create mode 100755 example/scenes/BaseScene.ts create mode 100755 example/scenes/Boot.ts create mode 100755 example/scenes/Main.ts create mode 100755 example/scenes/Preload.ts delete mode 100644 example/states/BaseState.ts delete mode 100644 example/states/Boot.ts delete mode 100644 example/states/GameOver.ts delete mode 100644 example/states/GameTitle.ts delete mode 100644 example/states/Main.ts delete mode 100644 example/states/Preload.ts diff --git a/example/Game.ts b/example/Game.ts old mode 100644 new mode 100755 index f03da5da..85cc73ab --- a/example/Game.ts +++ b/example/Game.ts @@ -1,54 +1,32 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - import { Context, IContext, MVCSBundle } from "@robotlegsjs/core"; +import { ContextSceneManager } from "../src"; import { PhaserBundle } from "../src/robotlegs/bender/bundles/phaser/PhaserBundle"; -import { ContextStateManager } from "../src/robotlegs/bender/extensions/contextStateManager/impl/ContextStateManager"; - -import { StateKey } from "./constants/StateKey"; - -import { Boot } from "./states/Boot"; -import { Preload } from "./states/Preload"; -import { GameTitle } from "./states/GameTitle"; -import { Main } from "./states/Main"; -import { GameOver } from "./states/GameOver"; - +import "phaser"; +import { SceneMediatorConfig } from "./config/SceneMediatorConfig"; +import { Boot } from "./scenes/Boot"; +import { SceneKey } from "./constants/SceneKey"; import { GameConfig } from "./config/GameConfig"; -import { StateMediatorConfig } from "./config/StateMediatorConfig"; export class Game extends Phaser.Game { - private _context: IContext; - constructor( - width?: number | string, - height?: number | string, - renderer?: number, - parent?: any, - state?: any, - transparent?: boolean, - antialias?: boolean, - physicsConfig?: any - ) { - super(width, height, renderer, parent, state, transparent, antialias, physicsConfig); + constructor() { + super({ + type: Phaser.CANVAS, + width: 800, + height: 600, + backgroundColor: "#010101", + parent: "phaser-example" + }); this._context = new Context(); - this._context.install(MVCSBundle, PhaserBundle) - .configure(new ContextStateManager(this.state)) - .configure(StateMediatorConfig) + this._context + .install(MVCSBundle, PhaserBundle) + .configure(new ContextSceneManager((this as any).scene)) + .configure(SceneMediatorConfig) .configure(GameConfig) .initialize(); - - this.state.add(StateKey.BOOT, Boot, false); - this.state.add(StateKey.PRELOAD, Preload, false); - this.state.add(StateKey.GAME_TITLE, GameTitle, false); - this.state.add(StateKey.MAIN, Main, false); - this.state.add(StateKey.GAME_OVER, GameOver, false); - - this.state.start(StateKey.BOOT); + (this as any).scene.add(SceneKey.BOOT, new Boot(SceneKey.BOOT)); + (this as any).scene.start(SceneKey.BOOT); } } diff --git a/example/commands/MainCommand.ts b/example/commands/MainCommand.ts new file mode 100644 index 00000000..34218108 --- /dev/null +++ b/example/commands/MainCommand.ts @@ -0,0 +1,7 @@ +import { injectable, Event } from "../../node_modules/@robotlegsjs/core"; +@injectable() +export class MainCommand { + public execute(event: Event): void { + console.log(event.type, event.data); + } +} diff --git a/example/config/GameConfig.ts b/example/config/GameConfig.ts old mode 100644 new mode 100755 index 68410d8e..2f6e8d4c --- a/example/config/GameConfig.ts +++ b/example/config/GameConfig.ts @@ -1,18 +1,13 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { injectable, inject, IConfig, IContext } from "@robotlegsjs/core"; +import { injectable, inject, IConfig, IContext, IEventCommandMap } from "@robotlegsjs/core"; import { GameModel } from "../models/GameModel"; +import { MainEvent } from "../events/MainEven"; +import { MainCommand } from "../commands/MainCommand"; @injectable() export class GameConfig implements IConfig { - @inject(IContext) - public context: IContext; + @inject(IContext) public context: IContext; + @inject(IEventCommandMap) public commandMap: IEventCommandMap; public configure(): void { this.mapCommands(); @@ -20,7 +15,9 @@ export class GameConfig implements IConfig { this.mapModels(); } - private mapCommands(): void {} + private mapCommands(): void { + this.commandMap.map(MainEvent.GAME_START).toCommand(MainCommand); + } private mapManager(): void {} diff --git a/example/config/SceneMediatorConfig.ts b/example/config/SceneMediatorConfig.ts new file mode 100755 index 00000000..68f5eb58 --- /dev/null +++ b/example/config/SceneMediatorConfig.ts @@ -0,0 +1,25 @@ +import { IConfig, inject, injectable } from "@robotlegsjs/core"; +import { ISceneMediatorMap } from "../../src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap"; +import { PreloadMediator } from "../mediators/PreloadMediator"; +import { BootMediator } from "../mediators/BootMediator"; +import { Preload } from "../scenes/Preload"; +import { Boot } from "../scenes/Boot"; +import { Main } from "../scenes/Main"; +import { MainMediator } from "../mediators/MainMediator"; + +@injectable() +export class SceneMediatorConfig implements IConfig { + @inject(ISceneMediatorMap) public sceneMediatorMap: ISceneMediatorMap; + + public configure(): void { + this.mapStateMediators(); + } + + private mapStateMediators(): void { + this.sceneMediatorMap.map(Boot).toMediator(BootMediator); + this.sceneMediatorMap.map(Preload).toMediator(PreloadMediator); + // this.sceneMediatorMap.map(GameTitle).toMediator(GameTitleMediator); + this.sceneMediatorMap.map(Main).toMediator(MainMediator); + // this.sceneMediatorMap.map(GameOver).toMediator(GameOverMediator); + } +} diff --git a/example/config/StateMediatorConfig.ts b/example/config/StateMediatorConfig.ts deleted file mode 100644 index 950dbae4..00000000 --- a/example/config/StateMediatorConfig.ts +++ /dev/null @@ -1,40 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { injectable, inject, IConfig } from "@robotlegsjs/core"; - -import { IStateMediatorMap } from "../../src/robotlegs/bender/extensions/stateMediatorMap/api/IStateMediatorMap"; - -import { BootMediator } from "../mediators/BootMediator"; -import { PreloadMediator } from "../mediators/PreloadMediator"; -import { GameTitleMediator } from "../mediators/GameTitleMediator"; -import { MainMediator } from "../mediators/MainMediator"; -import { GameOverMediator } from "../mediators/GameOverMediator"; - -import { Boot } from "../states/Boot"; -import { Preload } from "../states/Preload"; -import { GameTitle } from "../states/GameTitle"; -import { Main } from "../states/Main"; -import { GameOver } from "../states/GameOver"; - -@injectable() -export class StateMediatorConfig implements IConfig { - @inject(IStateMediatorMap) - public stateMediatorMap: IStateMediatorMap; - - public configure(): void { - this.mapStateMediators(); - } - - private mapStateMediators(): void { - this.stateMediatorMap.map(Boot).toMediator(BootMediator); - this.stateMediatorMap.map(Preload).toMediator(PreloadMediator); - this.stateMediatorMap.map(GameTitle).toMediator(GameTitleMediator); - this.stateMediatorMap.map(Main).toMediator(MainMediator); - this.stateMediatorMap.map(GameOver).toMediator(GameOverMediator); - } -} diff --git a/example/constants/SceneKey.ts b/example/constants/SceneKey.ts new file mode 100755 index 00000000..fca8a91b --- /dev/null +++ b/example/constants/SceneKey.ts @@ -0,0 +1,7 @@ +export class SceneKey { + public static BOOT: string = "Boot"; + public static PRELOAD: string = "Preload"; + public static GAME_TITLE: string = "GameTitle"; + public static MAIN: string = "Main"; + public static GAME_OVER: string = "GameOver"; +} diff --git a/example/constants/StateKey.ts b/example/constants/StateKey.ts deleted file mode 100644 index 54227f1a..00000000 --- a/example/constants/StateKey.ts +++ /dev/null @@ -1,14 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -export class StateKey { - public static BOOT: string = "Boot"; - public static PRELOAD: string = "Preload"; - public static GAME_TITLE: string = "GameTitle"; - public static MAIN: string = "Main"; - public static GAME_OVER: string = "GameOver"; -} diff --git a/example/events/MainEven.ts b/example/events/MainEven.ts new file mode 100644 index 00000000..87e23ce2 --- /dev/null +++ b/example/events/MainEven.ts @@ -0,0 +1,5 @@ +import { Event } from "../../node_modules/@robotlegsjs/core"; + +export class MainEvent extends Event { + public static readonly GAME_START: string = "game_start"; +} diff --git a/example/index.ts b/example/index.ts old mode 100644 new mode 100755 index 5ac229f6..1285b09e --- a/example/index.ts +++ b/example/index.ts @@ -1,17 +1,9 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - /// import "reflect-metadata"; - import { Game } from "./Game"; (window).initGame = function() { - let game: Game = new Game(window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio, Phaser.AUTO); + let game: Game = new Game(); (window).game = game; }; diff --git a/example/mediators/BootMediator.ts b/example/mediators/BootMediator.ts old mode 100644 new mode 100755 index d67d2fbf..6b49d675 --- a/example/mediators/BootMediator.ts +++ b/example/mediators/BootMediator.ts @@ -1,18 +1,11 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - import { injectable } from "@robotlegsjs/core"; -import { StateMediator } from "../../src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator"; +import { SceneMediator } from "../../src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator"; -import { Boot } from "../states/Boot"; +import { Boot } from "../scenes/Boot"; @injectable() -export class BootMediator extends StateMediator { +export class BootMediator extends SceneMediator { public initialize(): void { console.log("BootMediator: initialize"); } diff --git a/example/mediators/GameOverMediator.ts b/example/mediators/GameOverMediator.ts old mode 100644 new mode 100755 index a341e00d..d10f51ce --- a/example/mediators/GameOverMediator.ts +++ b/example/mediators/GameOverMediator.ts @@ -1,10 +1,3 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - import { injectable } from "@robotlegsjs/core"; import { StateMediator } from "../../src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator"; diff --git a/example/mediators/GameTitleMediator.ts b/example/mediators/GameTitleMediator.ts old mode 100644 new mode 100755 index 9088e940..4d9e8906 --- a/example/mediators/GameTitleMediator.ts +++ b/example/mediators/GameTitleMediator.ts @@ -1,10 +1,3 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - import { injectable } from "@robotlegsjs/core"; import { StateMediator } from "../../src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator"; diff --git a/example/mediators/MainMediator.ts b/example/mediators/MainMediator.ts old mode 100644 new mode 100755 index 6515f923..5e60faac --- a/example/mediators/MainMediator.ts +++ b/example/mediators/MainMediator.ts @@ -1,26 +1,20 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - import { injectable, inject } from "@robotlegsjs/core"; -import { StateMediator } from "../../src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator"; - import { GameModel } from "../models/GameModel"; -import { Main } from "../states/Main"; +import { Main } from "../scenes/Main"; +import { SceneMediator } from "../../src"; +import { MainEvent } from "../events/MainEven"; @injectable() -export class MainMediator extends StateMediator
{ +export class MainMediator extends SceneMediator
{ @inject(GameModel) public gameModel: GameModel; public initialize(): void { - console.log("BootMediator: initialize"); + console.log("MainMediator: initialize"); console.log("score: " + this.gameModel.score); console.log("level: " + this.gameModel.level); + this.dispatch(new MainEvent(MainEvent.GAME_START, true, false, { data: this.gameModel.level })); } public destroy(): void { diff --git a/example/mediators/PreloadMediator.ts b/example/mediators/PreloadMediator.ts old mode 100644 new mode 100755 index 64a3f6af..a6ee9bc0 --- a/example/mediators/PreloadMediator.ts +++ b/example/mediators/PreloadMediator.ts @@ -1,18 +1,11 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - import { injectable } from "@robotlegsjs/core"; -import { StateMediator } from "../../src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator"; +import { SceneMediator } from "../../src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator"; -import { Preload } from "../states/Preload"; +import { Preload } from "../scenes/Preload"; @injectable() -export class PreloadMediator extends StateMediator { +export class PreloadMediator extends SceneMediator { public initialize(): void { console.log("PreloadMediator: initialize"); } diff --git a/example/models/GameModel.ts b/example/models/GameModel.ts old mode 100644 new mode 100755 index fa8af097..d8c3cddb --- a/example/models/GameModel.ts +++ b/example/models/GameModel.ts @@ -1,10 +1,3 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - import { injectable } from "@robotlegsjs/core"; @injectable() diff --git a/example/scenes/BaseScene.ts b/example/scenes/BaseScene.ts new file mode 100755 index 00000000..777b1b75 --- /dev/null +++ b/example/scenes/BaseScene.ts @@ -0,0 +1,13 @@ +export abstract class BaseScene extends Phaser.Scene { + public init(): void { + console.log(this + ": init"); + } + + public create(): void { + console.log(this + ": create"); + } + + public shutdown(): void { + console.log(this + ": shutdown"); + } +} diff --git a/example/scenes/Boot.ts b/example/scenes/Boot.ts new file mode 100755 index 00000000..e5eb2333 --- /dev/null +++ b/example/scenes/Boot.ts @@ -0,0 +1,14 @@ +import { SceneKey } from "../constants/SceneKey"; +import { BaseScene } from "./BaseScene"; +import { Preload } from "./Preload"; + +export class Boot extends BaseScene { + public preload(): void {} + + public create(): void { + super.create(); + (this as any).scene.add(SceneKey.PRELOAD, new Preload(SceneKey.PRELOAD)); + (window).game.scene.remove(this); + (window).game.scene.start(SceneKey.PRELOAD); + } +} diff --git a/example/scenes/Main.ts b/example/scenes/Main.ts new file mode 100755 index 00000000..893fc04a --- /dev/null +++ b/example/scenes/Main.ts @@ -0,0 +1,13 @@ +import { BaseScene } from "./BaseScene"; + +export class Main extends BaseScene { + public create(): void { + super.create(); + + // Enable Arcade Physics + // this.game.physics.startSystem(Phaser.Physics.ARCADE); + + // Set the games background colour + // this.game.stage.backgroundColor = "#cecece"; + } +} diff --git a/example/scenes/Preload.ts b/example/scenes/Preload.ts new file mode 100755 index 00000000..bde8eccc --- /dev/null +++ b/example/scenes/Preload.ts @@ -0,0 +1,23 @@ +import { SceneKey } from "../constants/SceneKey"; +import { BaseScene } from "./BaseScene"; +import { Main } from "./Main"; + +export class Preload extends BaseScene { + public preload(): void { + /* Preload required assets */ + this.load.image("player", "assets/player.png"); + // this.game.load.audio('myAudio', 'assets/my-audio.wav'); + // this.game.load.atlas('myAtlas', 'assets/my-atlas.png', 'assets/my-atlas.json'); + } + + public create(): void { + super.create(); + + // NOTE: Change to GameTitle if required + // this.game.state.start(StateKey.MAIN); + + (this as any).scene.add(SceneKey.MAIN, new Main(SceneKey.MAIN)); + (window).game.scene.remove(this); + (window).game.scene.start(SceneKey.MAIN); + } +} diff --git a/example/states/BaseState.ts b/example/states/BaseState.ts deleted file mode 100644 index 86444eff..00000000 --- a/example/states/BaseState.ts +++ /dev/null @@ -1,20 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -export abstract class BaseState extends Phaser.State { - public init(): void { - console.log(this.key + ": init"); - } - - public create(): void { - console.log(this.key + ": create"); - } - - public shutdown(): void { - console.log(this.key + ": shutdown"); - } -} diff --git a/example/states/Boot.ts b/example/states/Boot.ts deleted file mode 100644 index a6293e0e..00000000 --- a/example/states/Boot.ts +++ /dev/null @@ -1,20 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { StateKey } from "../constants/StateKey"; -import { BaseState } from "./BaseState"; - -export class Boot extends BaseState { - public preload(): void {} - - public create(): void { - super.create(); - - this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; - this.game.state.start(StateKey.PRELOAD); - } -} diff --git a/example/states/GameOver.ts b/example/states/GameOver.ts deleted file mode 100644 index 83f02f0e..00000000 --- a/example/states/GameOver.ts +++ /dev/null @@ -1,20 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { BaseState } from "./BaseState"; - -export class GameOver extends BaseState { - public create(): void { - super.create(); - - this.restartGame(); - } - - public restartGame(): void { - // this.game.state.start(StateKey.MAIN); - } -} diff --git a/example/states/GameTitle.ts b/example/states/GameTitle.ts deleted file mode 100644 index 7a9ac33c..00000000 --- a/example/states/GameTitle.ts +++ /dev/null @@ -1,19 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { StateKey } from "../constants/StateKey"; -import { BaseState } from "./BaseState"; - -export class GameTitle extends BaseState { - public create(): void { - super.create(); - } - - public startGame(): void { - this.game.state.start(StateKey.MAIN); - } -} diff --git a/example/states/Main.ts b/example/states/Main.ts deleted file mode 100644 index 7addcd09..00000000 --- a/example/states/Main.ts +++ /dev/null @@ -1,22 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { BaseState } from "./BaseState"; - -export class Main extends BaseState { - public create(): void { - super.create(); - - // Enable Arcade Physics - this.game.physics.startSystem(Phaser.Physics.ARCADE); - - // Set the games background colour - this.game.stage.backgroundColor = "#cecece"; - } - - public update() {} -} diff --git a/example/states/Preload.ts b/example/states/Preload.ts deleted file mode 100644 index 3fb2df0e..00000000 --- a/example/states/Preload.ts +++ /dev/null @@ -1,25 +0,0 @@ -// ------------------------------------------------------------------------------ -// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. -// -// NOTICE: You are permitted to use, modify, and distribute this file -// in accordance with the terms of the license agreement accompanying it. -// ------------------------------------------------------------------------------ - -import { StateKey } from "../constants/StateKey"; -import { BaseState } from "./BaseState"; - -export class Preload extends BaseState { - public preload(): void { - /* Preload required assets */ - // this.game.load.image('myImage', 'assets/my-image.png'); - // this.game.load.audio('myAudio', 'assets/my-audio.wav'); - // this.game.load.atlas('myAtlas', 'assets/my-atlas.png', 'assets/my-atlas.json'); - } - - public create(): void { - super.create(); - - // NOTE: Change to GameTitle if required - this.game.state.start(StateKey.MAIN); - } -} diff --git a/src/index.ts b/src/index.ts index 343fbd32..e911adc3 100755 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,7 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -// ContextStateManager +// ContextSceneManager /** * Bundles */ @@ -17,11 +17,11 @@ export { ContextSceneManager } from "./robotlegs/bender/extensions/contextSceneM export { ContextSceneManagerListenerConfig } from "./robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig"; -// StateManager +// SceneManager export { ISceneHandler } from "./robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; export { ISceneManager } from "./robotlegs/bender/extensions/sceneManager/api/ISceneManager"; export { SceneManagerExtension } from "./robotlegs/bender/extensions/sceneManager/SceneManagerExtension"; -// StateMediatorMap +// SceneMediatorMap export { ISceneMediator } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator"; export { ISceneMediatorMap } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap"; export { ISceneMediatorMapping } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping"; diff --git a/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts b/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts index 8a7e5b00..d419cd08 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts @@ -10,7 +10,7 @@ import { IContextSceneManager } from "./api/IContextSceneManager"; import { ContextSceneManager } from "./impl/ContextSceneManager"; /** - *

This Extension waits for a ContextStateManager to be added as a configuration + *

This Extension waits for a ContextSceneManager to be added as a configuration * and maps it into the context's injector.

* *

It should be installed before context initialization.

@@ -35,14 +35,14 @@ export class ContextSceneManagerExtension implements IExtension { this._injector = context.injector; this._logger = context.getLogger(this); context.beforeInitializing(this.beforeInitializing.bind(this)); - context.addConfigHandler(instanceOfType(ContextSceneManager), this.handleContextStateManager.bind(this)); + context.addConfigHandler(instanceOfType(ContextSceneManager), this.handleContextSceneManager.bind(this)); } /*============================================================================*/ /* Private Functions */ /*============================================================================*/ - private handleContextStateManager(contextSceneManager: IContextSceneManager): void { + private handleContextSceneManager(contextSceneManager: IContextSceneManager): void { if (this._injector.isBound(IContextSceneManager)) { this._logger.warn("A contextSceneManager has already been installed, ignoring {0}", [contextSceneManager.sceneManager]); } else { @@ -54,7 +54,7 @@ export class ContextSceneManagerExtension implements IExtension { private beforeInitializing(): void { if (!this._injector.isBound(IContextSceneManager)) { - this._logger.error("A ContextSceneManager must be installed if you install the ContextStateManagerExtension."); + this._logger.error("A ContextSceneManager must be installed if you install the ContextSceneManagerExtension."); } } } diff --git a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts index 179f957f..a5595fd6 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts @@ -9,7 +9,7 @@ import { IContextSceneManager } from "../api/IContextSceneManager"; import { IConfig } from "@robotlegsjs/core"; /** - * The Context StateManager represents the Phaser.Scenes.SceneManager for a Context + * The Context SceneManager represents the Phaser.Scenes.SceneManager for a Context */ export class ContextSceneManager implements IContextSceneManager, IConfig { /*============================================================================*/ @@ -30,8 +30,8 @@ export class ContextSceneManager implements IContextSceneManager, IConfig { /*============================================================================*/ /** - * The StateManager represents the root Phaser.Scenes.SceneManager for a Context - * @param sceneManager The root State Manager for this Context + * The SceneManager represents the root Phaser.Scenes.SceneManager for a Context + * @param sceneManager The root Scene Manager for this Context */ constructor(sceneManager: Phaser.Scenes.SceneManager) { if (sceneManager !== null && sceneManager !== undefined) { diff --git a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts index f4fecfad..433763b5 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts @@ -11,10 +11,10 @@ import { ISceneManager } from "../../sceneManager/api/ISceneManager"; import { IContextSceneManager } from "../api/IContextSceneManager"; /** - * This configuration file adds the ContextStateManager to the stateManager. + * This configuration file adds the ContextSceneManager to the sceneManager. * - * It requires that the StateManagerExtension, ContextStateManagerExtension - * and a ContextStateManager have been installed. + * It requires that the SceneManagerExtension, ContextSceneManagerExtension + * and a ContextSceneManager have been installed. */ @injectable() export class ContextSceneManagerListenerConfig implements IConfig { @@ -22,27 +22,27 @@ export class ContextSceneManagerListenerConfig implements IConfig { /* Private Properties */ /*============================================================================*/ - private _contextStateManager: IContextSceneManager; + private _contextSceneManager: IContextSceneManager; - private _stateManager: ISceneManager; + private _sceneManager: ISceneManager; /*============================================================================*/ /* Public Functions */ /*============================================================================*/ constructor( - @inject(IContextSceneManager) contextStateManager: IContextSceneManager, - @inject(ISceneManager) stateManager: ISceneManager + @inject(IContextSceneManager) contextSceneManager: IContextSceneManager, + @inject(ISceneManager) sceneManager: ISceneManager ) { - this._contextStateManager = contextStateManager; - this._stateManager = stateManager; + this._contextSceneManager = contextSceneManager; + this._sceneManager = sceneManager; } /** * @inheritDoc */ public configure(): void { - // Adds the StateManager to the View Manager at startup - this._stateManager.addSceneManager(this._contextStateManager.sceneManager); + // Adds the SceneManager to the View Manager at startup + this._sceneManager.addSceneManager(this._contextSceneManager.sceneManager); } } diff --git a/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts b/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts index 79e36e0e..72280a03 100755 --- a/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts +++ b/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts @@ -11,7 +11,7 @@ import { SceneManager } from "./impl/SceneManager"; import { SceneRegistry } from "./impl/SceneRegistry"; /** - * This extension install a State Manager into the context + * This extension install a Scene Manager into the context */ export class SceneManagerExtension implements IExtension { /*============================================================================*/ diff --git a/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts b/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts index ac7fd6cd..5fa8aba2 100755 --- a/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts +++ b/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts @@ -12,7 +12,7 @@ import { SceneRegistry } from "./impl/SceneRegistry"; let installCount: number = 0; /** - * This extension install an automatic State Manager Observer + * This extension install an automatic Scene Manager Observer */ export class SceneManagerObserverExtension implements IExtension { /*============================================================================*/ @@ -20,7 +20,7 @@ export class SceneManagerObserverExtension implements IExtension { /*============================================================================*/ // Really? Yes, there can be only one. - private static _stageObserver: SceneManagerObserver = null; + private static _sceneObserver: SceneManagerObserver = null; /*============================================================================*/ /* Private Properties */ @@ -51,19 +51,19 @@ export class SceneManagerObserverExtension implements IExtension { private whenInitializing(): void { // Hark, an actual Singleton! - if (!SceneManagerObserverExtension._stageObserver) { + if (!SceneManagerObserverExtension._sceneObserver) { const containerRegistry: SceneRegistry = this._injector.get(SceneRegistry); - this._logger.debug("Creating genuine StateManagerObserver Singleton"); - SceneManagerObserverExtension._stageObserver = new SceneManagerObserver(containerRegistry); + this._logger.debug("Creating genuine SceneManagerObserver Singleton"); + SceneManagerObserverExtension._sceneObserver = new SceneManagerObserver(containerRegistry); } } private whenDestroying(): void { installCount--; if (installCount === 0) { - this._logger.debug("Destroying genuine StateManagerObserver Singleton"); - SceneManagerObserverExtension._stageObserver.destroy(); - SceneManagerObserverExtension._stageObserver = null; + this._logger.debug("Destroying genuine SceneManagerObserver Singleton"); + SceneManagerObserverExtension._sceneObserver.destroy(); + SceneManagerObserverExtension._sceneObserver = null; } } } diff --git a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts index 5f1066e6..0a538244 100755 --- a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts @@ -9,7 +9,7 @@ import { IEventDispatcher } from "@robotlegsjs/core"; import { ISceneHandler } from "./ISceneHandler"; /** - * The State Manager allows you to add multiple "scene managers" to a context + * The Scene Manager allows you to add multiple "scene managers" to a context */ export let ISceneManager = Symbol("ISceneManager"); export interface ISceneManager extends IEventDispatcher { diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts index 0fb35f75..83eb650e 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts @@ -26,8 +26,8 @@ export class SceneManagerObserver { this._registry = containerRegistry; // We only care about roots - this._registry.addEventListener(SceneRegistryEvent.ROOT_STATE_MANAGER_ADD, this.onRootSceneManagerAdd, this); - this._registry.addEventListener(SceneRegistryEvent.ROOT_STATE_MANAGER_REMOVE, this.onRootSceneManagerRemove, this); + this._registry.addEventListener(SceneRegistryEvent.ROOT_SCENE_MANAGER_ADD, this.onRootSceneManagerAdd, this); + this._registry.addEventListener(SceneRegistryEvent.ROOT_SCENE_MANAGER_REMOVE, this.onRootSceneManagerRemove, this); // We might have arrived late on the scene this._registry.rootBindings.forEach((binding: SceneManagerBinding) => { @@ -43,8 +43,8 @@ export class SceneManagerObserver { * @private */ public destroy(): void { - this._registry.removeEventListener(SceneRegistryEvent.ROOT_STATE_MANAGER_ADD, this.onRootSceneManagerAdd, this); - this._registry.removeEventListener(SceneRegistryEvent.ROOT_STATE_MANAGER_REMOVE, this.onRootSceneManagerRemove, this); + this._registry.removeEventListener(SceneRegistryEvent.ROOT_SCENE_MANAGER_ADD, this.onRootSceneManagerAdd, this); + this._registry.removeEventListener(SceneRegistryEvent.ROOT_SCENE_MANAGER_REMOVE, this.onRootSceneManagerRemove, this); this._registry.rootBindings.forEach((binding: SceneManagerBinding) => { this.removeRootListener(binding.sceneManager); @@ -90,13 +90,13 @@ export class SceneManagerObserver { private onSceneInit(scene: Phaser.Scene): void { let rootBindings: SceneManagerBinding[] = this._registry.rootBindings; - let stateManager: Phaser.Scenes.SceneManager; + let sceneManager: Phaser.Scenes.SceneManager; for (const rootBinding of rootBindings) { - stateManager = rootBinding.sceneManager; + sceneManager = rootBinding.sceneManager; - if (stateManager) { - let binding: SceneManagerBinding = this._registry.getBinding(scene.game.scene); + if (sceneManager) { + let binding: SceneManagerBinding = this._registry.getBinding(scene.sys.game.scene); if (binding) { // this.events.emit('resume', this); // this.events.emit('wake', this); diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts index b41c3cf0..02f42fc4 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts @@ -108,7 +108,7 @@ export class SceneRegistry extends EventDispatcher { this.addRootBinding(binding); } - this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.STATE_MANAGER_ADD, binding.sceneManager)); + this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.SCENE_MANAGER_ADD, binding.sceneManager)); return binding; } @@ -127,18 +127,18 @@ export class SceneRegistry extends EventDispatcher { this.removeRootBinding(binding); } - this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.STATE_MANAGER_REMOVE, binding.sceneManager)); + this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.SCENE_MANAGER_REMOVE, binding.sceneManager)); } private addRootBinding(binding: SceneManagerBinding): void { this._rootBindings.push(binding); - this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.ROOT_STATE_MANAGER_ADD, binding.sceneManager)); + this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.ROOT_SCENE_MANAGER_ADD, binding.sceneManager)); } private removeRootBinding(binding: SceneManagerBinding): void { let index: number = this._rootBindings.indexOf(binding); this._rootBindings.splice(index, 1); - this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.ROOT_STATE_MANAGER_REMOVE, binding.sceneManager)); + this.dispatchEvent(new SceneRegistryEvent(SceneRegistryEvent.ROOT_SCENE_MANAGER_REMOVE, binding.sceneManager)); } private onBindingEmpty(event: SceneManagerBindingEvent): void { diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts index 53e860a6..e6453dc6 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts @@ -16,13 +16,13 @@ export class SceneRegistryEvent extends Event { /* Public Static Properties */ /*============================================================================*/ - public static STATE_MANAGER_ADD: string = "sceneManagerAdd"; + public static SCENE_MANAGER_ADD: string = "sceneManagerAdd"; - public static STATE_MANAGER_REMOVE: string = "sceneManagerRemove"; + public static SCENE_MANAGER_REMOVE: string = "sceneManagerRemove"; - public static ROOT_STATE_MANAGER_ADD: string = "rootSceneManagerAdd"; + public static ROOT_SCENE_MANAGER_ADD: string = "rootSceneManagerAdd"; - public static ROOT_STATE_MANAGER_REMOVE: string = "rootSceneManagerRemove"; + public static ROOT_SCENE_MANAGER_REMOVE: string = "rootSceneManagerRemove"; /*============================================================================*/ /* Public Properties */ diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts index 55267af9..ab234cbf 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts @@ -11,7 +11,7 @@ import { ISceneManager } from "../sceneManager/api/ISceneManager"; import { SceneMediatorMap } from "./impl/SceneMediatorMap"; /** - * This extension installs a shared IStateMediatorMap into the context + * This extension installs a shared ISceneMediatorMap into the context */ export class SceneMediatorMapExtension implements IExtension { /*============================================================================*/ diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts index 3a715f69..2018cf18 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts @@ -6,17 +6,17 @@ // ------------------------------------------------------------------------------ /** - * Optional StateMediator interface + * Optional SceneMediator interface */ export interface ISceneMediator { /** - * Initializes the mediator. This is run automatically by the stateMediatorMap when a mediator is created. + * Initializes the mediator. This is run automatically by the sceneMediatorMap when a mediator is created. * Normally the initialize function is where you would add handlers using the eventMap. */ initialize(): void; /** - * Destroys the mediator. This is run automatically by the stateMediatorMap when a mediator is destroyed. + * Destroys the mediator. This is run automatically by the sceneMediatorMap when a mediator is destroyed. * You should clean up any handlers that were added directly (eventMap handlers will be cleaned up automatically). */ destroy(): void; diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts index e62e96d6..a357d696 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts @@ -10,7 +10,7 @@ import { ISceneMediatorMapper } from "../dsl/ISceneMediatorMapper"; import { ISceneMediatorUnmapper } from "../dsl/ISceneMediatorUnmapper"; /** - * The StateMediator Map allows you to bind Mediators to Phaser.State objects + * The SceneMediator Map allows you to bind Mediators to Phaser.Scene objects */ export let ISceneMediatorMap = Symbol("ISceneMediatorMap"); export interface ISceneMediatorMap { @@ -22,12 +22,12 @@ export interface ISceneMediatorMap { mapMatcher(matcher: ITypeMatcher): ISceneMediatorMapper; /** - * Maps a Phaser.State that will be tested against incoming items to be handled. - * Under the hood this will create a TypeMatcher for this state. - * @param state The class or interface to be matched against. + * Maps a Phaser.Scene that will be tested against incoming items to be handled. + * Under the hood this will create a TypeMatcher for this scene. + * @param scene The class or interface to be matched against. * @return the mapper so that you can continue the mapping. */ - map(state: IClass): ISceneMediatorMapper; + map(scene: IClass): ISceneMediatorMapper; /** * Removes a mapping that was made against a matcher. @@ -38,24 +38,24 @@ export interface ISceneMediatorMap { unmapMatcher(matcher: ITypeMatcher): ISceneMediatorUnmapper; /** - * Removes a mapping that was made against a state. + * Removes a mapping that was made against a scene. * No error will be thrown if there isn't a mapping to remove. - * @param state The class or interface to be matched against. + * @param scene The class or interface to be matched against. * @return the unmapper so that you can continue the unmapping. */ - unmap(state: IClass): ISceneMediatorUnmapper; + unmap(scene: IClass): ISceneMediatorUnmapper; /** - * Mediates an state directly. If the state matches any mapped matchers or types then it will be mediated according to those mappings. - * @param state The state to create mediators for. + * Mediates an scene directly. If the scene matches any mapped matchers or types then it will be mediated according to those mappings. + * @param scene The scene to create mediators for. */ - mediate(state: IClass): void; + mediate(scene: IClass): void; /** - * Removes the mediators for an state if there are any. - * @param state The state to remove mediators for. + * Removes the mediators for an scene if there are any. + * @param scene The scene to remove mediators for. */ - unmediate(state: IClass): void; + unmediate(scene: IClass): void; /** * Removes all mediators diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts index 6f865325..b8eafe2d 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts @@ -8,7 +8,7 @@ import { IClass, ITypeFilter } from "@robotlegsjs/core"; /** - * Represents a StateMediator mapping + * Represents a SceneMediator mapping */ export interface ISceneMediatorMapping { /** diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts index 6bf6a549..de3d90b3 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts @@ -10,11 +10,11 @@ import { IClass } from "@robotlegsjs/core"; import { ISceneMediatorConfigurator } from "./ISceneMediatorConfigurator"; /** - * Maps a matcher to a concrete StateMediator class + * Maps a matcher to a concrete SceneMediator class */ export interface ISceneMediatorMapper { /** - * Maps a matcher to a concrete StateMediator class + * Maps a matcher to a concrete SceneMediator class * @param mediatorClass The concrete mediator class * @return Mapping configurator */ diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts index 01203b24..1fab6659 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts @@ -8,12 +8,12 @@ import { IClass } from "@robotlegsjs/core"; /** - * Unmaps a StateMediator + * Unmaps a SceneMediator */ export interface ISceneMediatorUnmapper { /** * Unmaps a mediator from this matcher - * @param mediatorClass StateMediator to unmap + * @param mediatorClass SceneMediator to unmap */ fromMediator(mediatorClass: IClass): void; diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts index 899c68f4..a314e9ab 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts @@ -22,9 +22,11 @@ export abstract class SceneMediator implements ISceneMed /* Protected Properties */ /*============================================================================*/ - @inject(IEventMap) protected eventMap: IEventMap; + @inject(IEventMap) + protected eventMap: IEventMap; - @inject(IEventDispatcher) protected eventDispatcher: IEventDispatcher; + @inject(IEventDispatcher) + protected eventDispatcher: IEventDispatcher; protected _sceneComponent: T; @@ -67,7 +69,7 @@ export abstract class SceneMediator implements ISceneMed /*============================================================================*/ protected addViewListener(eventString: string, listener: Function, eventClass?: Object): void { - // this.eventMap.mapListener(this._stateComponent, eventString, listener, eventClass); + // this.eventMap.mapListener(this._sceneComponent, eventString, listener, eventClass); } protected addContextListener(eventString: string, listener: Function, eventClass?: Object): void { @@ -75,7 +77,7 @@ export abstract class SceneMediator implements ISceneMed } protected removeViewListener(eventString: string, listener: Function, eventClass?: Object): void { - // this.eventMap.unmapListener(this._stateComponent, eventString, listener, eventClass); + // this.eventMap.unmapListener(this._sceneComponent, eventString, listener, eventClass); } protected removeContextListener(eventString: string, listener: Function, eventClass?: Object): void { diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts index e2c22ad5..e199e820 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts @@ -96,8 +96,8 @@ export class SceneMediatorMap implements ISceneMediatorMap, ISceneHandler { /** * @inheritDoc */ - public handleScene(state: any, type: any): void { - this._sceneHandler.handleScene(state, type); + public handleScene(scene: any, type: any): void { + this._sceneHandler.handleScene(scene, type); } /** diff --git a/static/index.html b/static/index.html index 6339aef7..b68073d0 100644 --- a/static/index.html +++ b/static/index.html @@ -1,29 +1,31 @@ - - - RobotlegsJS Phaser Boilerplate - - - + + + RobotlegsJS Phaser Boilerplate + + - - - - - - - + + + + + + + + + + \ No newline at end of file From 27354145b33edfee8c7382f8a1947cd535f4dcb3 Mon Sep 17 00:00:00 2001 From: Sargis Sargsyan Date: Mon, 6 Aug 2018 12:11:19 +0400 Subject: [PATCH 04/27] state renamed to scene in all possible places --- README.md | 66 ++++++++----------- example/config/SceneMediatorConfig.ts | 7 +- example/mediators/GameOverMediator.ts | 16 ----- example/mediators/GameTitleMediator.ts | 16 ----- package.json | 2 +- .../bundles/phaser/phaserBundle.test.ts | 2 +- .../contextStateManagerExtension.test.ts | 8 +-- .../impl/contextStateManager.test.ts | 28 ++++---- .../contextStateManagerListenerConfig.test.ts | 16 ++--- .../impl/configureStateEvent.test.ts | 4 +- .../impl/stateBindingEvent.test.ts | 2 +- .../impl/stateManagerEvent.test.ts | 8 +-- ...tateHandler.ts => CallbackSceneHandler.ts} | 2 +- 13 files changed, 66 insertions(+), 111 deletions(-) delete mode 100755 example/mediators/GameOverMediator.ts delete mode 100755 example/mediators/GameTitleMediator.ts rename test/robotlegs/bender/extensions/stateManager/support/{CallbackStateHandler.ts => CallbackSceneHandler.ts} (93%) diff --git a/README.md b/README.md index 09d48dcf..56af639c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -RobotlegsJS Phaser Extension -=== +# RobotlegsJS Phaser Extension [![GitHub license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/blob/master/LICENSE) [![Gitter chat](https://badges.gitter.im/RobotlegsJS/RobotlegsJS.svg)](https://gitter.im/RobotlegsJS/RobotlegsJS) @@ -14,8 +13,7 @@ RobotlegsJS Phaser Extension Integrate [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS) framework with [Phaser](https://github.com/photonstorm/phaser). -Installation ---- +## Installation You can get the latest release and the type definitions using [NPM](https://www.npmjs.com/): @@ -27,52 +25,42 @@ Or using [Yarn](https://yarnpkg.com/en/): ```bash yarn add @robotlegsjs/phaser -```` +``` -Usage ---- +## Usage ```ts -/// - -import "reflect-metadata"; +/// import { Context, IContext, MVCSBundle } from "@robotlegsjs/core"; -import { PhaserBundle, ContextStateManager } from "@robotlegsjs/phaser"; - -import { StateKey } from "./constants/StateKey"; - -import { Boot } from "./states/Boot"; -import { Preload } from "./states/Preload"; -import { GameTitle } from "./states/GameTitle"; -import { Main } from "./states/Main"; -import { GameOver } from "./states/GameOver"; - +import { ContextSceneManager } from "../src"; +import { PhaserBundle } from "../src/robotlegs/bender/bundles/phaser/PhaserBundle"; +import "phaser"; +import { SceneMediatorConfig } from "./config/SceneMediatorConfig"; +import { SceneKey } from "./constants/SceneKey"; import { GameConfig } from "./config/GameConfig"; -import { StateMediatorConfig } from "./config/StateMediatorConfig"; - -class Game extends Phaser.Game { +export class Game extends Phaser.Game { private _context: IContext; constructor() { - - super(window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio, Phaser.AUTO); + super({ + type: Phaser.CANVAS, + width: 800, + height: 600, + backgroundColor: "#010101", + parent: "phaser-example" + }); this._context = new Context(); - this._context.install(MVCSBundle, PhaserBundle) - .configure(new ContextStateManager(this.state)) - .configure(StateMediatorConfig) + this._context + .install(MVCSBundle, PhaserBundle) + .configure(new ContextSceneManager((this as any).scene)) + .configure(SceneMediatorConfig) .configure(GameConfig) .initialize(); - - this.state.add(StateKey.BOOT, Boot, false); - this.state.add(StateKey.PRELOAD, Preload, false); - this.state.add(StateKey.GAME_TITLE, GameTitle, false); - this.state.add(StateKey.MAIN, Main, false); - this.state.add(StateKey.GAME_OVER, GameOver, false); - - this.state.start(StateKey.BOOT); + this.scene.add(SceneKey.BOOT, new Boot(SceneKey.BOOT)); + this.scene.start(SceneKey.BOOT); } } @@ -81,14 +69,12 @@ new Game(); [See example](example) -RobotlegsJS integration with Phaser CE (Community Edition) ---- +## RobotlegsJS integration with Phaser CE (Community Edition) The `@robotlegsjs/phaser` package was updated to support [Phaser v3](https://www.npmjs.com/package/phaser) plugin. If you are looking for integration with [Phaser CE](https://github.com/photonstorm/phaser-ce) you can use the [RobotlegsJS-Phaser-CE](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-CE) plugin. -License ---- +## License [MIT](LICENSE) diff --git a/example/config/SceneMediatorConfig.ts b/example/config/SceneMediatorConfig.ts index 68f5eb58..4587855a 100755 --- a/example/config/SceneMediatorConfig.ts +++ b/example/config/SceneMediatorConfig.ts @@ -9,13 +9,14 @@ import { MainMediator } from "../mediators/MainMediator"; @injectable() export class SceneMediatorConfig implements IConfig { - @inject(ISceneMediatorMap) public sceneMediatorMap: ISceneMediatorMap; + @inject(ISceneMediatorMap) + public sceneMediatorMap: ISceneMediatorMap; public configure(): void { - this.mapStateMediators(); + this.mapSceneMediators(); } - private mapStateMediators(): void { + private mapSceneMediators(): void { this.sceneMediatorMap.map(Boot).toMediator(BootMediator); this.sceneMediatorMap.map(Preload).toMediator(PreloadMediator); // this.sceneMediatorMap.map(GameTitle).toMediator(GameTitleMediator); diff --git a/example/mediators/GameOverMediator.ts b/example/mediators/GameOverMediator.ts deleted file mode 100755 index d10f51ce..00000000 --- a/example/mediators/GameOverMediator.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { injectable } from "@robotlegsjs/core"; - -import { StateMediator } from "../../src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator"; - -import { GameOver } from "../states/GameOver"; - -@injectable() -export class GameOverMediator extends StateMediator { - public initialize(): void { - console.log("GameOverMediator: initialize"); - } - - public destroy(): void { - console.log("GameOverMediator: destroy"); - } -} diff --git a/example/mediators/GameTitleMediator.ts b/example/mediators/GameTitleMediator.ts deleted file mode 100755 index 4d9e8906..00000000 --- a/example/mediators/GameTitleMediator.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { injectable } from "@robotlegsjs/core"; - -import { StateMediator } from "../../src/robotlegs/bender/extensions/stateMediatorMap/impl/StateMediator"; - -import { GameTitle } from "../states/GameTitle"; - -@injectable() -export class GameTitleMediator extends StateMediator { - public initialize(): void { - console.log("GameTitleMediator: initialize"); - } - - public destroy(): void { - console.log("GameTitleMediator: destroy"); - } -} diff --git a/package.json b/package.json index ad03adc1..4e35c404 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@robotlegsjs/phaser", "version": "0.0.5", - "description": "RobotlegsJS integration with Phaser State Manager", + "description": "RobotlegsJS integration with Phaser Scene Manager", "main": "lib/index.js", "typings": "lib/index.d.ts", "scripts": { diff --git a/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts b/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts index b4fe3f2f..625c6a05 100755 --- a/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts +++ b/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts @@ -26,7 +26,7 @@ describe("PhaserBundle", () => { context = new Context(); context .install(PhaserBundle) - .configure(new ContextStateManager(game.state)) + .configure(new ContextSceneManager(game.scene)) .initialize(); */ // Verify if all extensions are installed diff --git a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts index d933ac3f..24352412 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts @@ -12,7 +12,7 @@ import "../../../../entry"; import { CallbackLogTarget } from "./support/CallbackLogTarget"; import { LogParams } from "./support/LogParams"; -describe("ContextStateManagerExtension", () => { +describe("ContextSceneManagerExtension", () => { let context: IContext; beforeEach(() => { @@ -32,7 +32,7 @@ describe("ContextStateManagerExtension", () => { assert.throws(installExtensionAfterInitialization, Error); }); - it("contextStateManager_is_mapped", () => { + it("contextSceneManager_is_mapped", () => { let game: Phaser.Game = new Phaser.Game(); let actual: ContextSceneManager = null; context.install(ContextSceneManagerExtension).configure(new ContextSceneManager(game.scene)); @@ -43,7 +43,7 @@ describe("ContextStateManagerExtension", () => { assert.equal(actual.sceneManager, game.scene); }); - it("second_ContextStateManager_is_ignored", () => { + it("second_ContextSceneManager_is_ignored", () => { let game: Phaser.Game = new Phaser.Game(); let actual: ContextSceneManager = null; let secondGame: Phaser.Game = new Phaser.Game(); @@ -57,7 +57,7 @@ describe("ContextStateManagerExtension", () => { assert.equal(actual.sceneManager, game.scene); }); - it("extension_logs_error_when_context_initialized_with_no_ContextStateManager", () => { + it("extension_logs_error_when_context_initialized_with_no_ContextSceneManager", () => { let errorLogged: boolean = false; let logTarget: CallbackLogTarget = new CallbackLogTarget(function(log: LogParams): void { if (log.source instanceof ContextSceneManagerExtension && log.level === LogLevel.ERROR) { diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts index eb4d9d41..3bcebb2d 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts @@ -11,7 +11,7 @@ import "../../../../../entry"; describe("ContextSceneManager", () => { let game: Phaser.Game; - let contextStateManager: IContextSceneManager; + let contextSceneManager: IContextSceneManager; beforeEach(() => { game = new Phaser.Game(); @@ -19,26 +19,26 @@ describe("ContextSceneManager", () => { afterEach(() => { game = null; - contextStateManager = null; + contextSceneManager = null; }); - it("stateManager_is_stored", () => { - contextStateManager = new ContextSceneManager(game.scene); - assert.isNotNull(contextStateManager.sceneManager); - assert.equal(contextStateManager.sceneManager, game.scene); + it("sceneManager_is_stored", () => { + contextSceneManager = new ContextSceneManager(game.scene); + assert.isNotNull(contextSceneManager.sceneManager); + assert.equal(contextSceneManager.sceneManager, game.scene); }); - it("ContextStateManager_throws_a_error_when_state_manager_is_null", () => { - function inicializeContextStateManagerWithNullStateManager(): void { - contextStateManager = new ContextSceneManager(null); + it("ContextSceneManager_throws_a_error_when_scene_manager_is_null", () => { + function inicializeContextSceneManagerWithNullSceneManager(): void { + contextSceneManager = new ContextSceneManager(null); } - assert.throws(inicializeContextStateManagerWithNullStateManager, Error); + assert.throws(inicializeContextSceneManagerWithNullSceneManager, Error); }); - it("ContextStateManager_throws_a_error_when_state_manager_is_undefined", () => { - function inicializeContextStateManagerWithUndefinedStateManager(): void { - contextStateManager = new ContextSceneManager(undefined); + it("ContextSceneManager_throws_a_error_when_scene_manager_is_undefined", () => { + function inicializeContextSceneManagerWithUndefinedSceneManager(): void { + contextSceneManager = new ContextSceneManager(undefined); } - assert.throws(inicializeContextStateManagerWithUndefinedStateManager, Error); + assert.throws(inicializeContextSceneManagerWithUndefinedSceneManager, Error); }); }); diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts index b2326356..2b71fc6f 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts @@ -11,31 +11,31 @@ import { SceneManager } from "../../../../../../src/robotlegs/bender/extensions/ import { SceneRegistry } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry"; import "../../../../../entry"; -describe("ContextStateManagerListenerConfig", () => { +describe("ContextSceneManagerListenerConfig", () => { let game: Phaser.Game; - let contextStateManager: IContextSceneManager; + let contextSceneManager: IContextSceneManager; let sceneRegistry: SceneRegistry; let sceneManager: SceneManager; - let contextStateManagerListenerConfig: ContextSceneManagerListenerConfig; + let contextSceneManagerListenerConfig: ContextSceneManagerListenerConfig; beforeEach(() => { game = new Phaser.Game(); - contextStateManager = new ContextSceneManager(game.scene); + contextSceneManager = new ContextSceneManager(game.scene); sceneRegistry = new SceneRegistry(); sceneManager = new SceneManager(sceneRegistry); - contextStateManagerListenerConfig = new ContextSceneManagerListenerConfig(contextStateManager, sceneManager); + contextSceneManagerListenerConfig = new ContextSceneManagerListenerConfig(contextSceneManager, sceneManager); }); afterEach(() => { game = null; - contextStateManager = null; + contextSceneManager = null; sceneRegistry = null; sceneManager = null; - contextStateManagerListenerConfig = null; + contextSceneManagerListenerConfig = null; }); it("container_is_added_to_view_manager", () => { - contextStateManagerListenerConfig.configure(); + contextSceneManagerListenerConfig.configure(); assert.deepEqual(sceneManager.sceneManagers, [game.scene]); }); }); diff --git a/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts index f1894846..b16042e9 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts @@ -9,7 +9,7 @@ import { assert } from "chai"; import { ConfigureSceneEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent"; import "../../../../../entry"; -describe("ConfigureStateEvent", () => { +describe("ConfigureSceneEvent", () => { let scene: Phaser.Scene = null; let event: ConfigureSceneEvent = null; @@ -31,7 +31,7 @@ describe("ConfigureStateEvent", () => { assert.equal(event.type, ConfigureSceneEvent.CONFIGURE_SCENE); }); - it("state_is_stored", () => { + it("scene_is_stored", () => { assert.equal(event.scene, scene); }); diff --git a/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts index cc5ea0ac..754cad4b 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts @@ -9,7 +9,7 @@ import { assert } from "chai"; import { SceneManagerBindingEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBindingEvent"; import "../../../../../entry"; -describe("StateBindingEvent", () => { +describe("SceneBindingEvent", () => { let event: SceneManagerBindingEvent = null; beforeEach(() => { diff --git a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts index eeb0fd59..f24a3504 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts @@ -9,16 +9,16 @@ import { assert } from "chai"; import { ISceneHandler } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; import { SceneManagerEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent"; import "../../../../../entry"; -import { CallbackStateHandler } from "../support/CallbackStateHandler"; +import { CallbackSceneHandler } from "../support/CallbackSceneHandler"; -describe("StateManagerEvent", () => { +describe("SceneManagerEvent", () => { let game: Phaser.Game = null; let handler: ISceneHandler = null; let event: SceneManagerEvent = null; beforeEach(() => { game = new Phaser.Game(); - handler = new CallbackStateHandler(); + handler = new CallbackSceneHandler(); event = new SceneManagerEvent(SceneManagerEvent.SCENE_MANAGER_ADD, game.scene, handler); }); @@ -39,7 +39,7 @@ describe("StateManagerEvent", () => { assert.equal(event.type, SceneManagerEvent.SCENE_MANAGER_ADD); }); - it("stateManager_is_stored", () => { + it("sceneManager_is_stored", () => { assert.equal(event.sceneManager, game.scene); }); diff --git a/test/robotlegs/bender/extensions/stateManager/support/CallbackStateHandler.ts b/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts similarity index 93% rename from test/robotlegs/bender/extensions/stateManager/support/CallbackStateHandler.ts rename to test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts index dbe5f1e5..856f1dad 100755 --- a/test/robotlegs/bender/extensions/stateManager/support/CallbackStateHandler.ts +++ b/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts @@ -11,7 +11,7 @@ import { ISceneHandler } from "../../../../../../src/robotlegs/bender/extensions /** * @private */ -export class CallbackStateHandler implements ISceneHandler { +export class CallbackSceneHandler implements ISceneHandler { private _callback: Function; constructor(callback: Function = null) { From 53eb015118d04154f5260a2c198767b7078015ac Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 11:04:23 +0200 Subject: [PATCH 05/27] remove package-lock.json since yarn is being used --- package-lock.json | 13053 -------------------------------------------- 1 file changed, 13053 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index f2397c25..00000000 --- a/package-lock.json +++ /dev/null @@ -1,13053 +0,0 @@ -{ - "name": "@robotlegsjs/phaser", - "version": "0.0.5", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@choojs/findup": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@choojs/findup/-/findup-0.2.1.tgz", - "integrity": "sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw==", - "dev": true, - "requires": { - "commander": "^2.15.1" - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz", - "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==", - "dev": true - }, - "@robotlegsjs/core": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@robotlegsjs/core/-/core-0.2.0.tgz", - "integrity": "sha512-Lo9iEt9uj/v34jN2amjr49aTXGMDem9I8w1QgFHiiZYB+z6eToJypd0mKfiSZpKry4PN2B53sYVaI/4fhgrF6A==", - "requires": { - "inversify": "^4.13.0", - "tslib": "^1.9.3" - } - }, - "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", - "dev": true, - "requires": { - "samsam": "1.3.0" - } - }, - "@sinonjs/samsam": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.0.0.tgz", - "integrity": "sha512-D7VxhADdZbDJ0HjUTMnSQ5xIGb4H2yWpg8k9Sf1T08zfFiQYlaxM8LZydpR4FQ2E6LZJX8IlabNZ5io4vdChwg==", - "dev": true - }, - "@types/bluebird": { - "version": "3.5.23", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.23.tgz", - "integrity": "sha512-xlehmc6RT+wMEhy9ZqeqmozVmuFzTfsaV2NlfFFWhigy7n6sjMbUUB+SZBWK78lZgWHA4DBAdQvQxUvcB8N1tw==", - "dev": true - }, - "@types/chai": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.4.tgz", - "integrity": "sha512-h6+VEw2Vr3ORiFCyyJmcho2zALnUq9cvdB/IO8Xs9itrJVCenC7o26A6+m7D0ihTTr65eS259H5/Ghl/VjYs6g==", - "dev": true - }, - "@types/mocha": { - "version": "5.2.5", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", - "integrity": "sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==", - "dev": true - }, - "@types/sinon": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-5.0.1.tgz", - "integrity": "sha512-yxzBCIjE3lp9lYjfBbIK/LRCoXgCLLbIIBIje7eNCcUIIR2CZZtyX5uto2hVoMSMqLrsRrT6mwwUEd0yFgOwpA==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.5.13.tgz", - "integrity": "sha512-49nwvW/Hx9i+OYHg+mRhKZfAlqThr11Dqz8TsrvqGKMhdI2ijy3KBJOun2Z4770TPjrIJhR6KxChQIDaz8clDA==", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.5.13", - "@webassemblyjs/helper-wasm-bytecode": "1.5.13", - "@webassemblyjs/wast-parser": "1.5.13", - "debug": "^3.1.0", - "mamacro": "^0.0.3" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.13.tgz", - "integrity": "sha512-vrvvB18Kh4uyghSKb0NTv+2WZx871WL2NzwMj61jcq2bXkyhRC+8Q0oD7JGVf0+5i/fKQYQSBCNMMsDMRVAMqA==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.13.tgz", - "integrity": "sha512-dBh2CWYqjaDlvMmRP/kudxpdh30uXjIbpkLj9HQe+qtYlwvYjPRjdQXrq1cTAAOUSMTtzqbXIxEdEZmyKfcwsg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.13.tgz", - "integrity": "sha512-v7igWf1mHcpJNbn4m7e77XOAWXCDT76Xe7Is1VQFXc4K5jRcFrl9D0NrqM4XifQ0bXiuTSkTKMYqDxu5MhNljA==", - "dev": true, - "requires": { - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.13.tgz", - "integrity": "sha512-yN6ScQQDFCiAXnVctdVO/J5NQRbwyTbQzsGzEgXsAnrxhjp0xihh+nNHQTMrq5UhOqTb5LykpJAvEv9AT0jnAQ==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.5.13" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.13.tgz", - "integrity": "sha512-hSIKzbXjVMRvy3Jzhgu+vDd/aswJ+UMEnLRCkZDdknZO3Z9e6rp1DAs0tdLItjCFqkz9+0BeOPK/mk3eYvVzZg==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.13.tgz", - "integrity": "sha512-zxJXULGPLB7r+k+wIlvGlXpT4CYppRz8fLUM/xobGHc9Z3T6qlmJD9ySJ2jknuktuuiR9AjnNpKYDECyaiX+QQ==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "mamacro": "^0.0.3" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.13.tgz", - "integrity": "sha512-0n3SoNGLvbJIZPhtMFq0XmmnA/YmQBXaZKQZcW8maGKwLpVcgjNrxpFZHEOLKjXJYVN5Il8vSfG7nRX50Zn+aw==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.13.tgz", - "integrity": "sha512-IJ/goicOZ5TT1axZFSnlAtz4m8KEjYr12BNOANAwGFPKXM4byEDaMNXYowHMG0yKV9a397eU/NlibFaLwr1fbw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/helper-buffer": "1.5.13", - "@webassemblyjs/helper-wasm-bytecode": "1.5.13", - "@webassemblyjs/wasm-gen": "1.5.13", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/ieee754": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.5.13.tgz", - "integrity": "sha512-TseswvXEPpG5TCBKoLx9tT7+/GMACjC1ruo09j46ULRZWYm8XHpDWaosOjTnI7kr4SRJFzA6MWoUkAB+YCGKKg==", - "dev": true, - "requires": { - "ieee754": "^1.1.11" - } - }, - "@webassemblyjs/leb128": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.5.13.tgz", - "integrity": "sha512-0NRMxrL+GG3eISGZBmLBLAVjphbN8Si15s7jzThaw1UE9e5BY1oH49/+MA1xBzxpf1OW5sf9OrPDOclk9wj2yg==", - "dev": true, - "requires": { - "long": "4.0.0" - }, - "dependencies": { - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "dev": true - } - } - }, - "@webassemblyjs/utf8": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.5.13.tgz", - "integrity": "sha512-Ve1ilU2N48Ew0lVGB8FqY7V7hXjaC4+PeZM+vDYxEd+R2iQ0q+Wb3Rw8v0Ri0+rxhoz6gVGsnQNb4FjRiEH/Ng==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.13.tgz", - "integrity": "sha512-X7ZNW4+Hga4f2NmqENnHke2V/mGYK/xnybJSIXImt1ulxbCOEs/A+ZK/Km2jgihjyVxp/0z0hwIcxC6PrkWtgw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/helper-buffer": "1.5.13", - "@webassemblyjs/helper-wasm-bytecode": "1.5.13", - "@webassemblyjs/helper-wasm-section": "1.5.13", - "@webassemblyjs/wasm-gen": "1.5.13", - "@webassemblyjs/wasm-opt": "1.5.13", - "@webassemblyjs/wasm-parser": "1.5.13", - "@webassemblyjs/wast-printer": "1.5.13", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.13.tgz", - "integrity": "sha512-yfv94Se8R73zmr8GAYzezFHc3lDwE/lBXQddSiIZEKZFuqy7yWtm3KMwA1uGbv5G1WphimJxboXHR80IgX1hQA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/helper-wasm-bytecode": "1.5.13", - "@webassemblyjs/ieee754": "1.5.13", - "@webassemblyjs/leb128": "1.5.13", - "@webassemblyjs/utf8": "1.5.13" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.13.tgz", - "integrity": "sha512-IkXSkgzVhQ0QYAdIayuCWMmXSYx0dHGU8Ah/AxJf1gBvstMWVnzJnBwLsXLyD87VSBIcsqkmZ28dVb0mOC3oBg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/helper-buffer": "1.5.13", - "@webassemblyjs/wasm-gen": "1.5.13", - "@webassemblyjs/wasm-parser": "1.5.13", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.13.tgz", - "integrity": "sha512-XnYoIcu2iqq8/LrtmdnN3T+bRjqYFjRHqWbqK3osD/0r/Fcv4d9ecRzjVtC29ENEuNTK4mQ9yyxCBCbK8S/cpg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/helper-api-error": "1.5.13", - "@webassemblyjs/helper-wasm-bytecode": "1.5.13", - "@webassemblyjs/ieee754": "1.5.13", - "@webassemblyjs/leb128": "1.5.13", - "@webassemblyjs/utf8": "1.5.13" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.5.13.tgz", - "integrity": "sha512-Lbz65T0LQ1LgzKiUytl34CwuhMNhaCLgrh0JW4rJBN6INnBB8NMwUfQM+FxTnLY9qJ+lHJL/gCM5xYhB9oWi4A==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/floating-point-hex-parser": "1.5.13", - "@webassemblyjs/helper-api-error": "1.5.13", - "@webassemblyjs/helper-code-frame": "1.5.13", - "@webassemblyjs/helper-fsm": "1.5.13", - "long": "^3.2.0", - "mamacro": "^0.0.3" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.5.13.tgz", - "integrity": "sha512-QcwogrdqcBh8Z+eUF8SG+ag5iwQSXxQJELBEHmLkk790wgQgnIMmntT2sMAMw53GiFNckArf5X0bsCA44j3lWQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/wast-parser": "1.5.13", - "long": "^3.2.0" - } - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } - }, - "addressparser": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz", - "integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y=", - "dev": true, - "optional": true - }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "always-error": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/always-error/-/always-error-1.0.0.tgz", - "integrity": "sha1-lchAQs+obzjIbKbCzELAoBA0QbI=", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "amqplib": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.5.2.tgz", - "integrity": "sha512-l9mCs6LbydtHqRniRwYkKdqxVa6XMz3Vw1fh+2gJaaVgTM6Jk3o8RccAKWKtlhT1US5sWrFh+KKxsVUALURSIA==", - "dev": true, - "optional": true, - "requires": { - "bitsyntax": "~0.0.4", - "bluebird": "^3.4.6", - "buffer-more-ints": "0.0.2", - "readable-stream": "1.x >=1.1.9", - "safe-buffer": "^5.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "requires": { - "string-width": "^2.0.0" - } - }, - "ansi-cyan": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", - "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-red": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", - "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", - "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", - "dev": true - }, - "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" - } - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "ast-types": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.5.tgz", - "integrity": "sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw==", - "dev": true, - "optional": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", - "dev": true - }, - "axios": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.15.3.tgz", - "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", - "dev": true, - "optional": true, - "requires": { - "follow-redirects": "1.0.0" - }, - "dependencies": { - "follow-redirects": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.0.0.tgz", - "integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=", - "dev": true, - "optional": true, - "requires": { - "debug": "^2.2.0" - } - } - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "ban-sensitive-files": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/ban-sensitive-files/-/ban-sensitive-files-1.9.2.tgz", - "integrity": "sha512-8dlYLybLhAKvd2fGoDd2zskdbO8pm/FKxTwy+iA5mqq4bKovZNM4xNAzYWbttW9yjbxTz1O3SN+cyUx3LEG5CQ==", - "dev": true, - "requires": { - "bluebird": "3.5.1", - "check-more-types": "2.24.0", - "debug": "3.1.0", - "ggit": "2.4.2", - "lazy-ass": "1.6.0", - "pluralize": "7.0.0", - "ramda": "0.25.0", - "update-notifier": "2.3.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "bitsyntax": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/bitsyntax/-/bitsyntax-0.0.4.tgz", - "integrity": "sha1-6xDMb4K4xJDj6FaY8H6D1G4MuoI=", - "dev": true, - "optional": true, - "requires": { - "buffer-more-ints": "0.0.2" - } - }, - "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "blob": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", - "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=", - "dev": true - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-versionify": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/browserify-versionify/-/browserify-versionify-1.0.6.tgz", - "integrity": "sha1-qy3GHWoRnmJ77Eh1mNGYO3/bJ14=", - "dev": true, - "requires": { - "find-root": "^0.1.1", - "through2": "0.6.3" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-more-ints": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-0.0.2.tgz", - "integrity": "sha1-JrOIXRD6E9t/wBquOquHAZngEkw=", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "buildmail": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/buildmail/-/buildmail-4.0.1.tgz", - "integrity": "sha1-h393OLeHKYccmhBeO4N9K+EaenI=", - "dev": true, - "optional": true, - "requires": { - "addressparser": "1.0.1", - "libbase64": "0.1.0", - "libmime": "3.0.0", - "libqp": "1.1.0", - "nodemailer-fetch": "1.6.0", - "nodemailer-shared": "1.1.0", - "punycode": "1.4.1" - } - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - }, - "dependencies": { - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true, - "optional": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - } - } - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", - "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", - "dev": true, - "requires": { - "assertion-error": "^1.0.1", - "check-error": "^1.0.1", - "deep-eql": "^3.0.0", - "get-func-name": "^2.0.0", - "pathval": "^1.0.0", - "type-detect": "^4.0.0" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "chdir-promise": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/chdir-promise/-/chdir-promise-0.6.2.tgz", - "integrity": "sha512-EG5MutQt4qTxoQPfBtPCfU1A/MqborgaO66xrPSD/dRTB40OLN0wy+YAo5ZAw7DawhtCPdZHAdQ206fyWkhoiw==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "check-more-types": "2.24.0", - "debug": "3.1.0", - "lazy-ass": "1.6.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "check-more-types": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=", - "dev": true - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular-json": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.5.tgz", - "integrity": "sha512-13YaR6kiz0kBNmIVM87Io8Hp7bWOo4r61vkEANy8iH9R9bc6avud/1FT0SBpqR1RpIQADOh/Q+yHZDA1iL6ysA==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", - "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", - "dev": true, - "requires": { - "source-map": "0.5.x" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "cli-table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", - "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", - "dev": true, - "requires": { - "colors": "1.0.3" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - } - } - }, - "cli-table2": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/cli-table2/-/cli-table2-0.2.0.tgz", - "integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=", - "dev": true, - "requires": { - "colors": "^1.1.2", - "lodash": "^3.10.1", - "string-width": "^1.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "optional": true - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "dev": true, - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", - "dev": true - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "colors": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.1.tgz", - "integrity": "sha512-jg/vxRmv430jixZrC+La5kMbUWqIg32/JsYNZb94+JEmzceYbWKTsv1OuTp+7EaqiaWRR2tPcykibwCRgclIsw==", - "dev": true - }, - "combine-lists": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", - "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", - "dev": true, - "requires": { - "lodash": "^4.5.0" - } - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz", - "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "compare-versions": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz", - "integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==", - "dev": true - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true - }, - "compressible": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", - "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", - "dev": true, - "requires": { - "mime-db": ">= 1.34.0 < 2" - } - }, - "compression": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", - "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.14", - "debug": "2.6.9", - "on-headers": "~1.0.1", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "concat-with-sourcemaps": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", - "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - } - }, - "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", - "utils-merge": "1.0.1" - } - }, - "connect-history-api-fallback": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", - "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cp-sugar": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cp-sugar/-/cp-sugar-1.0.0.tgz", - "integrity": "sha1-HCb5vcocA89q90SmVSOf+THMq28=", - "dev": true, - "requires": { - "cross-spawn-async": "^2.1.6", - "pinkie-promise": "^2.0.0", - "promisify-event": "^1.0.0", - "shell-quote": "^1.4.3" - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "cross-spawn-async": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz", - "integrity": "sha1-hF/wwINKPe2dFg2sptOQkGuyiMw=", - "dev": true, - "requires": { - "lru-cache": "^4.0.0", - "which": "^1.2.8" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.x.x" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-what": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", - "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", - "dev": true - }, - "cvss": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cvss/-/cvss-1.0.3.tgz", - "integrity": "sha512-1FfNhEFVfeC+fgZpEr6oCOOTXifJicZS+Lq/mmUKI4Om+2O8zYspc/uhw51He+CTM5givI1dqIw5JUqyi1BWtA==", - "dev": true - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "^0.10.9" - } - }, - "d3-helpers": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/d3-helpers/-/d3-helpers-0.3.0.tgz", - "integrity": "sha1-SzHc5KISGnczY4RXTYk/vtX7KT0=", - "dev": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", - "dev": true, - "optional": true - }, - "date-format": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", - "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.3.0" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - } - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "dev": true, - "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "dev": true, - "optional": true, - "requires": { - "ast-types": "0.x.x", - "escodegen": "1.x.x", - "esprima": "3.x.x" - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "detect-node": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", - "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", - "dev": true - }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - }, - "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-converter": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", - "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", - "dev": true, - "requires": { - "utila": "~0.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", - "dev": true - } - } - }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", - "dev": true, - "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dev": true, - "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", - "dev": true - }, - "domhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", - "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, - "double-ended-queue": { - "version": "2.1.0-0", - "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", - "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", - "dev": true, - "optional": true - }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", - "dev": true - }, - "elegant-status": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/elegant-status/-/elegant-status-1.1.0.tgz", - "integrity": "sha1-Qe9KXy0DZCmDurtPZKS1drEVUhU=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "elegant-spinner": "^1.0.1", - "log-update": "^1.0.2", - "os-family": "^1.0.0" - } - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "engine.io": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz", - "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "uws": "~9.14.0", - "ws": "~3.3.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-client": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.6.tgz", - "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-parser": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.2.tgz", - "integrity": "sha512-dInLFzr80RijZ1rGpx1+56/uFoH7/7InhH3kZt+Ms6hT8tNx3NGW/WNSA/f8As1WkOfkuyb3tnRyuXGxusclMw==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.4", - "has-binary2": "~1.0.2" - } - }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "dev": true, - "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" - } - }, - "es5-ext": { - "version": "0.10.45", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" - } - }, - "es5-shim": { - "version": "4.5.10", - "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.10.tgz", - "integrity": "sha512-vmryBdqKRO8Ei9LJ4yyEk/EOmAOGIagcHDYPpTAi6pot4IMHS1AC2q5cTKPmydpijg2iX8DVmCuqgrNxIWj8Yg==", - "dev": true - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-shim": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.3.tgz", - "integrity": "sha1-m/tzY/7//4emzbbNk+QF7DxLbyY=", - "dev": true - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", - "dev": true, - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - } - }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "eventsource": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", - "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", - "dev": true, - "requires": { - "original": ">=0.0.5" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, - "expand-braces": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", - "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", - "dev": true, - "requires": { - "array-slice": "^0.2.3", - "array-unique": "^0.2.1", - "braces": "^0.1.2" - }, - "dependencies": { - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", - "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", - "dev": true, - "requires": { - "expand-range": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-range": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", - "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", - "dev": true, - "requires": { - "is-number": "^0.1.1", - "repeat-string": "^0.2.2" - }, - "dependencies": { - "is-number": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", - "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=", - "dev": true - }, - "repeat-string": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", - "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=", - "dev": true - } - } - }, - "express": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", - "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.2", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.3", - "qs": "6.5.1", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.1", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "body-parser": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", - "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.1", - "http-errors": "~1.6.2", - "iconv-lite": "0.4.19", - "on-finished": "~2.3.0", - "qs": "6.5.1", - "raw-body": "2.3.2", - "type-is": "~1.6.15" - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", - "dev": true - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - }, - "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", - "dev": true - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "dev": true, - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": ">= 1.3.1 < 2" - } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "extract-zip": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", - "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", - "dev": true, - "requires": { - "concat-stream": "1.6.2", - "debug": "2.6.9", - "mkdirp": "0.5.1", - "yauzl": "2.4.1" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "falafel": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.1.0.tgz", - "integrity": "sha1-lrsXdh2rqU9G0AFzizzt86Z/4Gw=", - "dev": true, - "requires": { - "acorn": "^5.0.0", - "foreach": "^2.0.5", - "isarray": "0.0.1", - "object-keys": "^1.0.6" - } - }, - "fancy-log": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", - "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "time-stamp": "^1.0.0" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "fast-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", - "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", - "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.1", - "micromatch": "^3.1.10" - } - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", - "dev": true, - "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" - }, - "dependencies": { - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - } - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-root": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-0.1.2.tgz", - "integrity": "sha1-mNImfP8ZFsyvJ0OzoO6oHXnX3NE=", - "dev": true - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "follow-redirects": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.2.tgz", - "integrity": "sha512-kssLorP/9acIdpQ2udQVTiCS5LQmdEz9mvdIfDcl1gYX2tPKFADHSyFdvJS040XdFsPzemWtgI3q8mFVCxtX8A==", - "dev": true, - "requires": { - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, - "requires": { - "null-check": "^1.0.0" - } - }, - "fs-extra": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", - "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", - "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "minipass": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", - "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.0.tgz", - "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz", - "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz", - "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz", - "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", - "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz", - "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true - } - } - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", - "dev": true, - "requires": { - "fstream": "^1.0.0", - "inherits": "2", - "minimatch": "^3.0.0" - } - }, - "fstream-npm": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.2.1.tgz", - "integrity": "sha512-iBHpm/LmD1qw0TlHMAqVd9rwdU6M+EHRUnPkXpRi5G/Hf0FIFH+oZFryodAU2MFNfGRh/CzhUFlMKV3pdeOTDw==", - "dev": true, - "requires": { - "fstream-ignore": "^1.0.0", - "inherits": "2" - } - }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "1.1.x", - "xregexp": "2.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true, - "optional": true - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "optional": true, - "requires": { - "is-property": "^1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-uri": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.2.tgz", - "integrity": "sha512-ZD325dMZOgerGqF/rF6vZXyFGTAay62svjQIT+X/oU2PtxYpFxvSkbsdi+oxIrsNxlZVd4y8wUDqkaExWTI/Cw==", - "dev": true, - "optional": true, - "requires": { - "data-uri-to-buffer": "1", - "debug": "2", - "extend": "3", - "file-uri-to-path": "1", - "ftp": "~0.3.10", - "readable-stream": "2" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "ggit": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/ggit/-/ggit-2.4.2.tgz", - "integrity": "sha512-4pltyhG4cjVT1Nqs9pq8Iykc/lTibc4LKRUAxszA9+OgwpfGhbsFgzhtyXwh5AbiWZrBa87nIHzyVGlJoT4nCw==", - "dev": true, - "requires": { - "always-error": "1.0.0", - "bluebird": "3.5.1", - "chdir-promise": "0.6.2", - "check-more-types": "2.24.0", - "cli-table": "0.3.1", - "colors": "1.1.2", - "commander": "2.12.2", - "d3-helpers": "0.3.0", - "debug": "3.1.0", - "find-up": "2.1.0", - "glob": "7.1.2", - "lazy-ass": "1.6.0", - "lodash": "4.17.4", - "moment": "2.19.3", - "moment-timezone": "0.5.14", - "optimist": "0.6.1", - "pluralize": "7.0.0", - "q": "2.0.3", - "quote": "0.4.0", - "ramda": "0.25.0", - "semver": "5.4.1" - }, - "dependencies": { - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "commander": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", - "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", - "dev": true - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true - } - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", - "dev": true, - "requires": { - "ini": "^1.3.4" - } - }, - "global-modules-path": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/global-modules-path/-/global-modules-path-2.3.0.tgz", - "integrity": "sha512-HchvMJNYh9dGSCy8pOQ2O8u/hoXaL+0XhnrwH0RyLiSXMMTl9W3N6KUU73+JFOg5PGjtzl6VZzUQsnrpm7Szag==", - "dev": true - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "glogg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", - "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "glsl-inject-defines": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/glsl-inject-defines/-/glsl-inject-defines-1.0.3.tgz", - "integrity": "sha1-3RqswsF/yyvT/DJBHGYz0Ne2D9Q=", - "dev": true, - "requires": { - "glsl-token-inject-block": "^1.0.0", - "glsl-token-string": "^1.0.1", - "glsl-tokenizer": "^2.0.2" - } - }, - "glsl-resolve": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/glsl-resolve/-/glsl-resolve-0.0.1.tgz", - "integrity": "sha1-iUvvc5ENeSyBtRQxgANdCnivdtM=", - "dev": true, - "requires": { - "resolve": "^0.6.1", - "xtend": "^2.1.2" - }, - "dependencies": { - "resolve": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", - "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=", - "dev": true - }, - "xtend": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.2.0.tgz", - "integrity": "sha1-7vax8ZjByN6vrYsXZaBNrUoBxak=", - "dev": true - } - } - }, - "glsl-token-assignments": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/glsl-token-assignments/-/glsl-token-assignments-2.0.2.tgz", - "integrity": "sha1-pdgqt4SZwuimuDy2lJXm5mXOAZ8=", - "dev": true - }, - "glsl-token-defines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/glsl-token-defines/-/glsl-token-defines-1.0.0.tgz", - "integrity": "sha1-y4kqqVmTYjFyhHDU90AySJaX+p0=", - "dev": true, - "requires": { - "glsl-tokenizer": "^2.0.0" - } - }, - "glsl-token-depth": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/glsl-token-depth/-/glsl-token-depth-1.1.2.tgz", - "integrity": "sha1-I8XjDuK9JViEtKKLyFC495HpXYQ=", - "dev": true - }, - "glsl-token-descope": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glsl-token-descope/-/glsl-token-descope-1.0.2.tgz", - "integrity": "sha1-D8kKsyYYa4L1l7LnfcniHvzTIHY=", - "dev": true, - "requires": { - "glsl-token-assignments": "^2.0.0", - "glsl-token-depth": "^1.1.0", - "glsl-token-properties": "^1.0.0", - "glsl-token-scope": "^1.1.0" - } - }, - "glsl-token-inject-block": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/glsl-token-inject-block/-/glsl-token-inject-block-1.1.0.tgz", - "integrity": "sha1-4QFfWYDBCRgkraomJfHf3ovQADQ=", - "dev": true - }, - "glsl-token-properties": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glsl-token-properties/-/glsl-token-properties-1.0.1.tgz", - "integrity": "sha1-SD3D2Dnw1LXGFx0VkfJJvlPCip4=", - "dev": true - }, - "glsl-token-scope": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/glsl-token-scope/-/glsl-token-scope-1.1.2.tgz", - "integrity": "sha1-oXKOeN8kRE+cuT/RjvD3VQOmQ7E=", - "dev": true - }, - "glsl-token-string": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glsl-token-string/-/glsl-token-string-1.0.1.tgz", - "integrity": "sha1-WUQdL4V958NEnJRWZgIezjWOSOw=", - "dev": true - }, - "glsl-token-whitespace-trim": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/glsl-token-whitespace-trim/-/glsl-token-whitespace-trim-1.0.0.tgz", - "integrity": "sha1-RtHf6Yx1vX1QTAXX0RsbPpzJOxA=", - "dev": true - }, - "glsl-tokenizer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/glsl-tokenizer/-/glsl-tokenizer-2.1.2.tgz", - "integrity": "sha1-cgMHUi4DxXrzXABVGVDEpw7y37k=", - "dev": true, - "requires": { - "through2": "^0.6.3" - } - }, - "glslify": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/glslify/-/glslify-6.2.1.tgz", - "integrity": "sha512-rII1HbHc/Mr03kCOSsTIo5QN16lsi8w/frQjwRrIYifgyCLhnJp12fBVMzEW66bJoEd8YBys0+O2aRVXwxasLA==", - "dev": true, - "requires": { - "bl": "^1.0.0", - "concat-stream": "^1.5.2", - "duplexify": "^3.4.5", - "falafel": "^2.0.0", - "from2": "^2.3.0", - "glsl-resolve": "0.0.1", - "glsl-token-whitespace-trim": "^1.0.0", - "glslify-bundle": "^5.0.0", - "glslify-deps": "^1.2.5", - "minimist": "^1.2.0", - "resolve": "^1.1.5", - "stack-trace": "0.0.9", - "static-eval": "^2.0.0", - "tape": "^4.6.0", - "through2": "^2.0.1", - "xtend": "^4.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - } - } - }, - "glslify-bundle": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/glslify-bundle/-/glslify-bundle-5.0.0.tgz", - "integrity": "sha1-AlKtoe+d8wtmAAbguyH9EwtIbkI=", - "dev": true, - "requires": { - "glsl-inject-defines": "^1.0.1", - "glsl-token-defines": "^1.0.0", - "glsl-token-depth": "^1.1.1", - "glsl-token-descope": "^1.0.2", - "glsl-token-scope": "^1.1.1", - "glsl-token-string": "^1.0.1", - "glsl-token-whitespace-trim": "^1.0.0", - "glsl-tokenizer": "^2.0.2", - "murmurhash-js": "^1.0.0", - "shallow-copy": "0.0.1" - } - }, - "glslify-deps": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/glslify-deps/-/glslify-deps-1.3.1.tgz", - "integrity": "sha512-Ogm179MCazwIRyEqs3g3EOY4Y3XIAa0yl8J5RE9rJC6QH1w8weVOp2RZu0mvnYy/2xIas1w166YR2eZdDkWQxg==", - "dev": true, - "requires": { - "@choojs/findup": "^0.2.0", - "events": "^1.0.2", - "glsl-resolve": "0.0.1", - "glsl-tokenizer": "^2.0.0", - "graceful-fs": "^4.1.2", - "inherits": "^2.0.1", - "map-limit": "0.0.1", - "resolve": "^1.0.0" - } - }, - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "dev": true, - "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "gulp-util": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.7.tgz", - "integrity": "sha1-eJJcS4+LSQBawBoBHFV+YhiUHLs=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^1.0.11", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", - "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "handle-thing": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", - "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "optional": true - } - } - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hasha": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", - "integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=", - "dev": true, - "requires": { - "is-stream": "^1.0.1", - "pinkie-promise": "^2.0.0" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "hipchat-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz", - "integrity": "sha1-ttJJdVQ3wZEII2d5nTupoPI7Ix4=", - "dev": true, - "optional": true, - "requires": { - "lodash": "^4.0.0", - "request": "^2.0.0" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "html-minifier": { - "version": "3.5.19", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.19.tgz", - "integrity": "sha512-Qr2JC9nsjK8oCrEmuB430ZIA8YWbF3D5LSjywD75FTuXmeqacwHgIM8wp3vHYzzPbklSjp53RdmDuzR4ub2HzA==", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.1.x", - "commander": "2.16.x", - "he": "1.1.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - } - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - } - }, - "htmlparser2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", - "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.1", - "domutils": "1.1", - "readable-stream": "1.0" - }, - "dependencies": { - "domutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", - "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", - "dev": true, - "requires": { - "domelementtype": "1" - } - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "http-parser-js": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", - "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", - "dev": true, - "requires": { - "agent-base": "4", - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", - "dev": true, - "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "httpntlm": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", - "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", - "dev": true, - "requires": { - "httpreq": ">=0.4.22", - "underscore": "~1.7.0" - } - }, - "httpreq": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", - "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", - "dev": true - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "import-local": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", - "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", - "dev": true, - "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imports-loader": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/imports-loader/-/imports-loader-0.8.0.tgz", - "integrity": "sha512-kXWL7Scp8KQ4552ZcdVTeaQCZSLW+e6nJfp3cwUMB673T7Hr98Xjx5JK+ql7ADlJUvj1JS5O01RLbKoutN5QDQ==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - } - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflection": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", - "integrity": "sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=", - "dev": true, - "optional": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inquirer": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-4.0.2.tgz", - "integrity": "sha512-+f3qDNeZpkhFJ61NBA9jXDrGGhoQuqfEum9A681c9oHoIbGgVqjogKynjB/vNVP+nVu9w3FbFQ35c0ibU0MaIQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "internal-ip": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", - "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", - "dev": true, - "requires": { - "meow": "^3.3.0" - } - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "inversify": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/inversify/-/inversify-4.13.0.tgz", - "integrity": "sha512-O5d8y7gKtyRwrvTLZzYET3kdFjqUy58sGpBYMARF13mzqDobpfBXVOPLH7HmnD2VR6Q+1HzZtslGvsdQfeb0SA==" - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "dev": true, - "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - } - }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true, - "optional": true - }, - "is-my-json-valid": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", - "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", - "dev": true, - "optional": true, - "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" - } - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true, - "optional": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isbinaryfile": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", - "dev": true, - "requires": { - "buffer-alloc": "^1.2.0" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "istanbul-api": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", - "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", - "dev": true, - "requires": { - "async": "^2.1.4", - "compare-versions": "^3.1.0", - "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.2.0", - "istanbul-lib-instrument": "^1.10.1", - "istanbul-lib-report": "^1.1.4", - "istanbul-lib-source-maps": "^1.2.4", - "istanbul-reports": "^1.3.0", - "js-yaml": "^3.7.0", - "mkdirp": "^0.5.1", - "once": "^1.4.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - } - } - }, - "istanbul-instrumenter-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", - "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", - "dev": true, - "requires": { - "convert-source-map": "^1.5.0", - "istanbul-lib-instrument": "^1.7.3", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - } - } - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", - "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", - "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", - "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", - "semver": "^5.3.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", - "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", - "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", - "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "just-extend": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", - "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", - "dev": true - }, - "karma": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.5.tgz", - "integrity": "sha512-rECezBeY7mjzGUWhFlB7CvPHgkHJLXyUmWg+6vHCEsdWNUTnmiS6jRrIMcJEWgU2DUGZzGWG0bTRVky8fsDTOA==", - "dev": true, - "requires": { - "bluebird": "^3.3.0", - "body-parser": "^1.16.1", - "chokidar": "^2.0.3", - "colors": "^1.1.0", - "combine-lists": "^1.0.0", - "connect": "^3.6.0", - "core-js": "^2.2.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.0", - "expand-braces": "^0.1.1", - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "http-proxy": "^1.13.0", - "isbinaryfile": "^3.0.0", - "lodash": "^4.17.4", - "log4js": "^2.5.3", - "mime": "^1.3.4", - "minimatch": "^3.0.2", - "optimist": "^0.6.1", - "qjobs": "^1.1.4", - "range-parser": "^1.2.0", - "rimraf": "^2.6.0", - "safe-buffer": "^5.0.1", - "socket.io": "2.0.4", - "source-map": "^0.6.1", - "tmp": "0.0.33", - "useragent": "2.2.1" - } - }, - "karma-chai": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz", - "integrity": "sha1-vuWtQEAFF4Ea40u5RfdikJEIt5o=", - "dev": true - }, - "karma-chrome-launcher": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", - "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", - "dev": true, - "requires": { - "fs-access": "^1.0.0", - "which": "^1.2.1" - } - }, - "karma-coverage-istanbul-reporter": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.1.tgz", - "integrity": "sha512-UcgrHkFehI5+ivMouD8NH/UOHiX4oCAtwaANylzPFdcAuD52fnCUuelacq2gh8tZ4ydhU3+xiXofSq7j5Ehygw==", - "dev": true, - "requires": { - "istanbul-api": "^1.3.1", - "minimatch": "^3.0.4" - } - }, - "karma-es6-shim": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/karma-es6-shim/-/karma-es6-shim-1.0.0.tgz", - "integrity": "sha1-qutTCGK895NA69WI9PnlfehCtHk=", - "dev": true, - "requires": { - "es5-shim": "~4.5.8", - "es6-shim": "~0.35.0" - } - }, - "karma-mocha": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-1.3.0.tgz", - "integrity": "sha1-7qrH/8DiAetjxGdEDStpx883eL8=", - "dev": true, - "requires": { - "minimist": "1.2.0" - } - }, - "karma-mocha-reporter": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz", - "integrity": "sha1-FRIAlejtgZGG5HoLAS8810GJVWA=", - "dev": true, - "requires": { - "chalk": "^2.1.0", - "log-symbols": "^2.1.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "karma-phantomjs-launcher": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.4.tgz", - "integrity": "sha1-0jyjSAG9qYY60xjju0vUBisTrNI=", - "dev": true, - "requires": { - "lodash": "^4.0.1", - "phantomjs-prebuilt": "^2.1.7" - } - }, - "karma-remap-istanbul": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/karma-remap-istanbul/-/karma-remap-istanbul-0.6.0.tgz", - "integrity": "sha1-l/O3cAZSVPm0ck8tm+SjouG69vw=", - "dev": true, - "requires": { - "istanbul": "^0.4.3", - "remap-istanbul": "^0.9.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "remap-istanbul": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/remap-istanbul/-/remap-istanbul-0.9.6.tgz", - "integrity": "sha512-l0WDBsVjaTzP8m3glERJO6bjlAFUahcgfcgvcX+owZw7dKeDLT3CVRpS7UO4L9LfGcMiNsqk223HopwVxlh8Hg==", - "dev": true, - "requires": { - "amdefine": "^1.0.0", - "gulp-util": "3.0.7", - "istanbul": "0.4.5", - "minimatch": "^3.0.3", - "source-map": "^0.6.1", - "through2": "2.0.1" - } - }, - "through2": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", - "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", - "dev": true, - "requires": { - "readable-stream": "~2.0.0", - "xtend": "~4.0.0" - } - } - } - }, - "karma-sinon": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/karma-sinon/-/karma-sinon-1.0.5.tgz", - "integrity": "sha1-TjRD8oMP3s/2JNN0cWPxIX2qKpo=", - "dev": true - }, - "karma-sinon-chai": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/karma-sinon-chai/-/karma-sinon-chai-2.0.2.tgz", - "integrity": "sha512-SDgh6V0CUd+7ruL1d3yG6lFzmJNGRNQuEuCYXLaorruNP9nwQfA7hpsp4clx4CbOo5Gsajh3qUOT7CrVStUKMw==", - "dev": true - }, - "karma-sourcemap-loader": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.7.tgz", - "integrity": "sha1-kTIsd/jxPUb+0GKwQuEAnUxFBdg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2" - } - }, - "karma-sourcemap-writer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/karma-sourcemap-writer/-/karma-sourcemap-writer-0.1.2.tgz", - "integrity": "sha1-NGXgB0orQYHT2xrEGSo8jkbQISo=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.3" - } - }, - "karma-webpack": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-3.0.0.tgz", - "integrity": "sha512-Ja1o9LLoqWaJyUNhTKaXjWiEH9y7a9H3mzP8pYB30SBsgoF5KBS/65NeHFd+QPuT9ITrym8xFt8BZeGbcOfujA==", - "dev": true, - "requires": { - "async": "^2.0.0", - "babel-runtime": "^6.0.0", - "loader-utils": "^1.0.0", - "lodash": "^4.0.0", - "source-map": "^0.5.6", - "webpack-dev-middleware": "^2.0.6" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "kew": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", - "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=", - "dev": true - }, - "killable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", - "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true, - "requires": { - "package-json": "^4.0.0" - } - }, - "lazy-ass": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", - "integrity": "sha1-eZllXoZGwX8In90YfRUNMyTVRRM=", - "dev": true - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "libbase64": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", - "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=", - "dev": true - }, - "libmime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.0.0.tgz", - "integrity": "sha1-UaGp50SOy9Ms2lRCFnW7IbwJPaY=", - "dev": true, - "requires": { - "iconv-lite": "0.4.15", - "libbase64": "0.1.0", - "libqp": "1.1.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=", - "dev": true - } - } - }, - "libqp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", - "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=", - "dev": true - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "loader-runner": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", - "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "^3.0.0" - } - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" - } - }, - "lodash.toarray": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", - "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "log-update": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", - "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "dev": true, - "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" - } - }, - "log4js": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.11.0.tgz", - "integrity": "sha512-z1XdwyGFg8/WGkOyF6DPJjivCWNLKrklGdViywdYnSKOvgtEBo2UyEMZS5sD2mZrQlU3TvO8wDWLc8mzE1ncBQ==", - "dev": true, - "requires": { - "amqplib": "^0.5.2", - "axios": "^0.15.3", - "circular-json": "^0.5.4", - "date-format": "^1.2.0", - "debug": "^3.1.0", - "hipchat-notifier": "^1.1.0", - "loggly": "^1.1.0", - "mailgun-js": "^0.18.0", - "nodemailer": "^2.5.0", - "redis": "^2.7.1", - "semver": "^5.5.0", - "slack-node": "~0.2.0", - "streamroller": "0.7.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "loggly": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/loggly/-/loggly-1.1.1.tgz", - "integrity": "sha1-Cg/B0/o6XsRP3HuJe+uipGlc6+4=", - "dev": true, - "optional": true, - "requires": { - "json-stringify-safe": "5.0.x", - "request": "2.75.x", - "timespan": "2.3.x" - }, - "dependencies": { - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true, - "optional": true - }, - "bl": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", - "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "~2.0.5" - } - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz", - "integrity": "sha1-bwrrrcxdoWwT4ezBETfYX5uIOyU=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.11" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "optional": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true, - "optional": true - }, - "qs": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", - "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "request": { - "version": "2.75.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz", - "integrity": "sha1-0rgmiihtoT6qXQGt9dGMyQ9lfZM=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "bl": "~1.1.2", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.0.0", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "node-uuid": "~1.4.7", - "oauth-sign": "~0.8.1", - "qs": "~6.2.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1" - } - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true, - "optional": true - } - } - }, - "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", - "dev": true - }, - "loglevelnext": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", - "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==", - "dev": true, - "requires": { - "es6-symbol": "^3.1.1", - "object.assign": "^4.1.0" - } - }, - "lolex": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", - "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", - "dev": true - }, - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", - "dev": true - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "mailcomposer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", - "integrity": "sha1-DhxEsqB890DuF9wUm6AJ8Zyt/rQ=", - "dev": true, - "optional": true, - "requires": { - "buildmail": "4.0.1", - "libmime": "3.0.0" - } - }, - "mailgun-js": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/mailgun-js/-/mailgun-js-0.18.1.tgz", - "integrity": "sha512-lvuMP14u24HS2uBsJEnzSyPMxzU2b99tQsIx1o6QNjqxjk8b3WvR+vq5oG1mjqz/IBYo+5gF+uSoDS0RkMVHmg==", - "dev": true, - "optional": true, - "requires": { - "async": "~2.6.0", - "debug": "~3.1.0", - "form-data": "~2.3.0", - "inflection": "~1.12.0", - "is-stream": "^1.1.0", - "path-proxy": "~1.0.0", - "promisify-call": "^2.0.2", - "proxy-agent": "~3.0.0", - "tsscmp": "~1.0.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "optional": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "make-error": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", - "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", - "dev": true - }, - "mamacro": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", - "dev": true - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-limit": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/map-limit/-/map-limit-0.0.1.tgz", - "integrity": "sha1-63lhAxwPDo0AG/LVb6toXViCLzg=", - "dev": true, - "requires": { - "once": "~1.3.0" - }, - "dependencies": { - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "dev": true, - "requires": { - "wrappy": "1" - } - } - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge2": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", - "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.35.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.19", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", - "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", - "dev": true, - "requires": { - "mime-db": "~1.35.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - } - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", - "dev": true, - "requires": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - }, - "dependencies": { - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "moment": { - "version": "2.19.3", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.3.tgz", - "integrity": "sha1-vbmdJw1tf9p4zA+6zoVeJ/59pp8=", - "dev": true - }, - "moment-timezone": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.14.tgz", - "integrity": "sha1-TrOP+VOLgBCLpGekWPPtQmjM/LE=", - "dev": true, - "requires": { - "moment": ">= 2.9.0" - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - } - }, - "murmurhash-js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz", - "integrity": "sha1-sGJ44h/Gw3+lMTcysEEry2rhX1E=", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "neo-async": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", - "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", - "dev": true - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", - "dev": true, - "optional": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "nice-try": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", - "dev": true - }, - "nise": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", - "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", - "lolex": "^2.3.2", - "path-to-regexp": "^1.7.0", - "text-encoding": "^0.6.4" - } - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-emoji": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.8.1.tgz", - "integrity": "sha512-+ktMAh1Jwas+TnGodfCfjUbJKoANqPaJFN0z0iqh41eqD8dvguNzcitVSBSVK1pidz0AqGbLKcoVuVLRVZ/aVg==", - "dev": true, - "requires": { - "lodash.toarray": "^4.4.0" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", - "dev": true - }, - "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "nodemailer": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", - "integrity": "sha1-8kLmSa7q45tsftdA73sGHEBNMPk=", - "dev": true, - "optional": true, - "requires": { - "libmime": "3.0.0", - "mailcomposer": "4.0.1", - "nodemailer-direct-transport": "3.3.2", - "nodemailer-shared": "1.1.0", - "nodemailer-smtp-pool": "2.8.2", - "nodemailer-smtp-transport": "2.7.2", - "socks": "1.1.9" - }, - "dependencies": { - "socks": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.9.tgz", - "integrity": "sha1-Yo1+TQSRJDVEWsC25Fk3bLPm1pE=", - "dev": true, - "optional": true, - "requires": { - "ip": "^1.1.2", - "smart-buffer": "^1.0.4" - } - } - } - }, - "nodemailer-direct-transport": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz", - "integrity": "sha1-6W+vuQNYVglH5WkBfZfmBzilCoY=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-fetch": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz", - "integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q=", - "dev": true - }, - "nodemailer-shared": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz", - "integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=", - "dev": true, - "requires": { - "nodemailer-fetch": "1.6.0" - } - }, - "nodemailer-smtp-pool": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz", - "integrity": "sha1-LrlNbPhXgLG0clzoU7nL1ejajHI=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "nodemailer-wellknown": "0.1.10", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-smtp-transport": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz", - "integrity": "sha1-A9ccdjFPFKx9vHvwM6am0W1n+3c=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "nodemailer-wellknown": "0.1.10", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-wellknown": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz", - "integrity": "sha1-WG24EB2zDLRDjrVGc3pBqtDPE9U=", - "dev": true - }, - "nodesecurity-npm-utils": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nodesecurity-npm-utils/-/nodesecurity-npm-utils-6.0.0.tgz", - "integrity": "sha512-NLRle1woNaT2orR6fue2jNqkhxDTktgJj3sZxvR/8kp21pvOY7Gwlx5wvo0H8ZVPqdgd2nE2ADB9wDu5Cl8zNg==", - "dev": true - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "nsp": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/nsp/-/nsp-3.2.1.tgz", - "integrity": "sha512-dLmGi7IGixJEHKetErIH460MYiYIzAoxuVsloZFu9e1p9U8K0yULx7YQ1+VzrjZbB+wqq67ES1SfOvKVb/qMDQ==", - "dev": true, - "requires": { - "chalk": "^2.1.0", - "cli-table2": "^0.2.0", - "cvss": "^1.0.2", - "https-proxy-agent": "^2.1.0", - "inquirer": "^3.3.0", - "nodesecurity-npm-utils": "^6.0.0", - "semver": "^5.4.1", - "wreck": "^12.5.1", - "yargs": "^9.0.1" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", - "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" - } - } - } - }, - "nth-check": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", - "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==", - "dev": true - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "opn": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", - "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "original": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.1.tgz", - "integrity": "sha512-IEvtB5vM5ULvwnqMxWBLxkS13JIEXbakizMSo3yoPNPCIWzg8TG3Usn/UhXoZFM/m+FuEA20KdzPSFq/0rS+UA==", - "dev": true, - "requires": { - "url-parse": "~1.4.0" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-family": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/os-family/-/os-family-1.0.0.tgz", - "integrity": "sha1-0SMIxCSjYwKhwQapUoe73VyiR38=", - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pac-proxy-agent": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.2.tgz", - "integrity": "sha512-cDNAN1Ehjbf5EHkNY5qnRhGPUCp6SnpyVof5fRzN800QV1Y2OkzbH9rmjZkbBRa8igof903yOnjIl6z0SlAhxA==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "^4.2.0", - "debug": "^3.1.0", - "get-uri": "^2.0.0", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "pac-resolver": "^3.0.0", - "raw-body": "^2.2.0", - "socks-proxy-agent": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "^4.1.0", - "socks": "^1.1.10" - } - } - } - }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "degenerator": "^1.0.4", - "ip": "^1.1.5", - "netmask": "^1.0.6", - "thunkify": "^2.1.2" - } - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "dev": true, - "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" - } - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", - "dev": true - }, - "path-proxy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-proxy/-/path-proxy-1.0.0.tgz", - "integrity": "sha1-GOijaFn8nS8aU7SN7hOFQ8Ag3l4=", - "dev": true, - "optional": true, - "requires": { - "inflection": "~1.3.0" - }, - "dependencies": { - "inflection": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.3.8.tgz", - "integrity": "sha1-y9Fg2p91sUw8xjV41POWeEvzAU4=", - "dev": true, - "optional": true - } - } - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "phantomjs-prebuilt": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz", - "integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3", - "extract-zip": "^1.6.5", - "fs-extra": "^1.0.0", - "hasha": "^2.2.0", - "kew": "^0.7.0", - "progress": "^1.1.8", - "request": "^2.81.0", - "request-progress": "^2.0.1", - "which": "^1.2.10" - } - }, - "phaser": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.11.0.tgz", - "integrity": "sha512-mzdabS3phdvbdOWvqKLbOCRlazWGDLG4XT0vsazpyYiyeElYk3TRhc4RZJ6su6taIcGejBY3t8NI3copk0aZ0Q==", - "requires": { - "eventemitter3": "^3.1.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - } - } - }, - "pkgd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pkgd/-/pkgd-1.1.2.tgz", - "integrity": "sha1-aaumxykr0s8Dun8+LqqBydOj5Gk=", - "dev": true, - "requires": { - "fstream-npm": "^1.0.7", - "normalize-path": "^2.0.1", - "pinkie-promise": "^2.0.1" - } - }, - "plugin-error": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", - "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", - "dev": true, - "requires": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" - }, - "dependencies": { - "arr-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", - "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" - } - }, - "arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", - "dev": true - }, - "extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", - "dev": true, - "requires": { - "kind-of": "^1.1.0" - } - }, - "kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", - "dev": true - } - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, - "pop-iterate": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pop-iterate/-/pop-iterate-1.0.1.tgz", - "integrity": "sha1-zqz9q0q/NT16DyqqLB/Hs/lBO6M=", - "dev": true - }, - "portfinder": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", - "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "prettier": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.0.tgz", - "integrity": "sha512-KtQ2EGaUwf2EyDfp1fxyEb0PqGKakVm0WyXwDt6u+cAoxbO2Z2CwKvOe3+b4+F2IlO9lYHi1kqFuRM70ddBnow==", - "dev": true - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", - "dev": true - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "promisify-call": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/promisify-call/-/promisify-call-2.0.4.tgz", - "integrity": "sha1-1IwtRWUszM1SgB3ey9UzptS9X7o=", - "dev": true, - "optional": true, - "requires": { - "with-callback": "^1.0.2" - } - }, - "promisify-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/promisify-event/-/promisify-event-1.0.0.tgz", - "integrity": "sha1-vXUj6ga3AWLzcJeQFrU6aGxg6Q8=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, - "proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.1.tgz", - "integrity": "sha512-mAZexaz9ZxQhYPWfAjzlrloEjW+JHiBFryE4AJXFDTnaXfmH/FKqC1swTRKuEPbHWz02flQNXFOyDUF7zfEG6A==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "^4.2.0", - "debug": "^3.1.0", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "lru-cache": "^4.1.2", - "pac-proxy-agent": "^2.0.1", - "proxy-from-env": "^1.0.0", - "socks-proxy-agent": "^4.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "proxy-from-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=", - "dev": true, - "optional": true - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "publish-please": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/publish-please/-/publish-please-3.2.0.tgz", - "integrity": "sha512-HmOSUx//Jmba8WY3BMn8zH7bsSGh/cyCYtgXmZXfd9erruJjTgIUTOGYn7992ysfF5mpXq4h20hpLFFILQ+GxA==", - "dev": true, - "requires": { - "ban-sensitive-files": "1.9.2", - "chalk": "2.4.1", - "cp-sugar": "^1.0.0", - "elegant-status": "1.1.0", - "globby": "8.0.1", - "inquirer": "4.0.2", - "lodash": "4.17.10", - "node-emoji": "1.8.1", - "nsp": "3.2.1", - "pinkie-promise": "^2.0.1", - "pkgd": "^1.1.2", - "promisify-event": "^1.0.0", - "read-pkg": "3.0.0", - "semver": "5.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "q": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/q/-/q-2.0.3.tgz", - "integrity": "sha1-dbjbAlWhpa+C9Yw/Oqoe/sfQ0TQ=", - "dev": true, - "requires": { - "asap": "^2.0.0", - "pop-iterate": "^1.0.1", - "weak-map": "^1.0.5" - } - }, - "qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", - "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==", - "dev": true - }, - "quote": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/quote/-/quote-0.4.0.tgz", - "integrity": "sha1-EIOSF/bBNiuJGUBE0psjP9fzLwE=", - "dev": true - }, - "ramda": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz", - "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==", - "dev": true - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "redis": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", - "dev": true, - "optional": true, - "requires": { - "double-ended-queue": "^2.1.0-0", - "redis-commands": "^1.2.0", - "redis-parser": "^2.6.0" - } - }, - "redis-commands": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.5.tgz", - "integrity": "sha512-foGF8u6MXGFF++1TZVC6icGXuMYPftKXt1FBT2vrfU9ZATNtZJ8duRC5d1lEfE8hyVe3jhelHGB91oB7I6qLsA==", - "dev": true, - "optional": true - }, - "redis-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", - "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", - "dev": true, - "optional": true - }, - "reflect-metadata": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", - "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true, - "requires": { - "rc": "^1.0.1" - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remap-istanbul": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/remap-istanbul/-/remap-istanbul-0.11.1.tgz", - "integrity": "sha512-Itv3XvYjD6G+9xDzAeFohx4GUwbFjfqFt0UXlC826jHR18E49fEiEGqZUxUASwMq4z7wwUv2H9/XF2d6qj0iaQ==", - "dev": true, - "requires": { - "amdefine": "^1.0.0", - "istanbul": "0.4.5", - "minimatch": "^3.0.3", - "plugin-error": "^0.1.2", - "source-map": "^0.6.1", - "through2": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "through2": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", - "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", - "dev": true, - "requires": { - "readable-stream": "~2.0.0", - "xtend": "~4.0.0" - } - } - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "renderkid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", - "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "~0.1", - "htmlparser2": "~3.3.0", - "strip-ansi": "^3.0.0", - "utila": "~0.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", - "dev": true - } - } - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "request-progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz", - "integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=", - "dev": true, - "requires": { - "throttleit": "^1.0.0" - } - }, - "requestretry": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.13.0.tgz", - "integrity": "sha512-Lmh9qMvnQXADGAQxsXHP4rbgO6pffCfuR8XUBdP9aitJcLQJxhp7YZK4xAVYXnPJ5E52mwrfiKQtKonPL8xsmg==", - "dev": true, - "optional": true, - "requires": { - "extend": "^3.0.0", - "lodash": "^4.15.0", - "request": "^2.74.0", - "when": "^3.7.7" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "dev": true, - "requires": { - "through": "~2.3.4" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "requires": { - "rx-lite": "*" - } - }, - "rxjs": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", - "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.3.tgz", - "integrity": "sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q==", - "dev": true, - "requires": { - "node-forge": "0.7.5" - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "dev": true, - "requires": { - "semver": "^5.0.3" - } - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", - "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", - "dev": true - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-copy": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", - "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "sinon": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.4.tgz", - "integrity": "sha512-NFEts+4D4jp2sBjL94fQpZk5o73kzn/g58+I9Dp15i9vsnT4Lk1UEyUf2jACODWLG6Pz/llF0sArYUw47Aarmg==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^2.0.0", - "@sinonjs/samsam": "^2.0.0", - "diff": "^3.5.0", - "lodash.get": "^4.4.2", - "lolex": "^2.7.1", - "nise": "^1.4.2", - "supports-color": "^5.4.0", - "type-detect": "^4.0.8" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "sinon-chai": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.2.0.tgz", - "integrity": "sha512-Z72B4a0l0IQe5uWi9yzcqX/Ml6K9e1Hp03NmkjJnRG3gDsKTX7KvLFZsVUmCaz0eqeXLLK089mwTsP1P1W+DUQ==", - "dev": true - }, - "slack-node": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", - "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", - "dev": true, - "optional": true, - "requires": { - "requestretry": "^1.2.2" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", - "dev": true, - "optional": true - }, - "smtp-connection": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", - "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", - "dev": true, - "requires": { - "httpntlm": "1.6.1", - "nodemailer-shared": "1.1.0" - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "optional": true, - "requires": { - "hoek": "2.x.x" - } - }, - "socket.io": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", - "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", - "dev": true, - "requires": { - "debug": "~2.6.6", - "engine.io": "~3.1.0", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.0.4", - "socket.io-parser": "~3.1.1" - } - }, - "socket.io-adapter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", - "dev": true - }, - "socket.io-client": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", - "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~2.6.4", - "engine.io-client": "~3.1.0", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.1.1", - "to-array": "0.1.4" - } - }, - "socket.io-parser": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.3.tgz", - "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "has-binary2": "~1.0.2", - "isarray": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, - "sockjs-client": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz", - "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", - "dev": true, - "requires": { - "debug": "^2.6.6", - "eventsource": "0.1.6", - "faye-websocket": "~0.11.0", - "inherits": "^2.0.1", - "json3": "^3.3.2", - "url-parse": "^1.1.8" - }, - "dependencies": { - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - } - } - }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "dev": true, - "optional": true, - "requires": { - "ip": "^1.1.4", - "smart-buffer": "^1.0.13" - } - }, - "socks-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", - "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "~4.2.0", - "socks": "~2.2.0" - }, - "dependencies": { - "smart-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", - "integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", - "dev": true, - "optional": true - }, - "socks": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.1.tgz", - "integrity": "sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w==", - "dev": true, - "optional": true, - "requires": { - "ip": "^1.1.5", - "smart-buffer": "^4.0.1" - } - } - } - }, - "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", - "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", - "dev": true - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", - "dev": true, - "requires": { - "debug": "^2.6.8", - "handle-thing": "^1.2.5", - "http-deceiver": "^1.2.7", - "safe-buffer": "^5.0.1", - "select-hose": "^2.0.0", - "spdy-transport": "^2.0.18" - } - }, - "spdy-transport": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", - "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", - "dev": true, - "requires": { - "debug": "^2.6.8", - "detect-node": "^2.0.3", - "hpack.js": "^2.1.6", - "obuf": "^1.1.1", - "readable-stream": "^2.2.9", - "safe-buffer": "^5.0.1", - "wbuf": "^1.7.2" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "stack-trace": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", - "integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=", - "dev": true - }, - "static-eval": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.0.tgz", - "integrity": "sha512-6flshd3F1Gwm+Ksxq463LtFd1liC77N/PX1FVVc3OzL3hAmo2fwHFbuArkcfi7s9rTNsLEhcRmXGFZhlgy40uw==", - "dev": true, - "requires": { - "escodegen": "^1.8.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "streamroller": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", - "dev": true, - "requires": { - "date-format": "^1.2.0", - "debug": "^3.1.0", - "mkdirp": "^0.5.1", - "readable-stream": "^2.3.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string.prototype.trim": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", - "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.0", - "function-bind": "^1.0.2" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "tapable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", - "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", - "dev": true - }, - "tape": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.1.tgz", - "integrity": "sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw==", - "dev": true, - "requires": { - "deep-equal": "~1.0.1", - "defined": "~1.0.0", - "for-each": "~0.3.3", - "function-bind": "~1.1.1", - "glob": "~7.1.2", - "has": "~1.0.3", - "inherits": "~2.0.3", - "minimist": "~1.2.0", - "object-inspect": "~1.6.0", - "resolve": "~1.7.1", - "resumer": "~0.0.0", - "string.prototype.trim": "~1.1.2", - "through": "~2.3.8" - }, - "dependencies": { - "resolve": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", - "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - } - } - }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - } - }, - "text-encoding": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", - "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", - "dev": true - }, - "throttleit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.3.tgz", - "integrity": "sha1-eVKS/enyVMKjaLOPnMXRvUZjr7Y=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", - "dev": true, - "optional": true - }, - "thunky": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", - "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", - "dev": true - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "timespan": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", - "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", - "dev": true, - "optional": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "requires": { - "punycode": "^1.4.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "ts-loader": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-4.4.2.tgz", - "integrity": "sha512-Z3Y1a7A0KZZ1s/mAZkt74l1NAF7Y5xUhD1V9VB8/1eUlUOk8Qa/oo46tO2Uu5kQ3wXypOlbv77lLQySjXEDcdw==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^1.0.2", - "micromatch": "^3.1.4", - "semver": "^5.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "ts-node": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.0.tgz", - "integrity": "sha512-klJsfswHP0FuOLsvBZ/zzCfUvakOSSxds78mVeK7I+qP76YWtxf16hEZsp3U+b0kIo82R5UatGFeblYMqabb2Q==", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" - } - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" - }, - "tslint": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", - "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "tslint-config-prettier": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.14.0.tgz", - "integrity": "sha512-SomD+aLvAwoihMtyCfkhhWKt9wcpSY2ZpgDV6OuxLYi8+7uOwE2g03aa+jJLSmY0Ys8s3ZLM5Iwfuwu3giCSQQ==", - "dev": true - }, - "tsscmp": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", - "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", - "dev": true, - "optional": true - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.1.tgz", - "integrity": "sha512-zQIMOmC+372pC/CCVLqnQ0zSBiY7HHodU7mpQdjiZddek4GMj31I3dUJ7gAs9o65X7mnRma6OokOkc6f9jjfBg==", - "dev": true - }, - "uglify-js": { - "version": "3.4.6", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.6.tgz", - "integrity": "sha512-O1D7L6WcOzS1qW2ehopEm4cWm5yA6bQBozlks8jO8ODxYCy4zv+bR/la4Lwp01tpkYGNonnpXvUpYtrvSu8Yzg==", - "dev": true, - "requires": { - "commander": "~2.16.0", - "source-map": "~0.6.1" - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "uglifyjs-webpack-plugin": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz", - "integrity": "sha512-1VicfKhCYHLS8m1DCApqBhoulnASsEoJ/BvpUpP4zoNAPpKzdH+ghk0olGJMmwX2/jprK2j3hAHdUbczBSy2FA==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - } - }, - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } - } - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", - "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "dev": true, - "requires": { - "crypto-random-string": "^1.0.0" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "update-notifier": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", - "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", - "dev": true, - "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-join": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", - "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", - "dev": true - }, - "url-parse": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz", - "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==", - "dev": true, - "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "useragent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", - "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", - "dev": true, - "requires": { - "lru-cache": "2.2.x", - "tmp": "0.0.x" - }, - "dependencies": { - "lru-cache": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", - "dev": true - } - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "uws": { - "version": "9.14.0", - "resolved": "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz", - "integrity": "sha512-HNMztPP5A1sKuVFmdZ6BPVpBQd5bUjNC8EFMFiICK+oho/OQsAJy5hnIx4btMHiOk8j04f/DbIlqnEZ9d72dqg==", - "dev": true, - "optional": true - }, - "v8-compile-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz", - "integrity": "sha512-qNdTUMaCjPs4eEnM3W9H94R3sU70YCuT+/ST7nUf+id1bVOrdjrpUaeZLqPBPRph3hsgn4a4BvwpxhHZx+oSDg==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "dev": true - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "weak-map": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/weak-map/-/weak-map-1.0.5.tgz", - "integrity": "sha1-eWkVhNmGB/UHC9O3CkDmuyLkAes=", - "dev": true - }, - "webpack": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.16.4.tgz", - "integrity": "sha512-RqUfwp4qMqv3oFwBQQOoK69C2tdu2FHJEqPABPqgjGDvOIOLqkTOhmmdJjpiRabzNAAH1ahmkA3z4xowlHN+VA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/helper-module-context": "1.5.13", - "@webassemblyjs/wasm-edit": "1.5.13", - "@webassemblyjs/wasm-opt": "1.5.13", - "@webassemblyjs/wasm-parser": "1.5.13", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.0.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "watchpack": "^1.5.0", - "webpack-sources": "^1.0.1" - }, - "dependencies": { - "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "webpack-cli": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.0.tgz", - "integrity": "sha512-p5NeKDtYwjZozUWq6kGNs9w+Gtw/CPvyuXjXn2HMdz8Tie+krjEg8oAtonvIyITZdvpF7XG9xDHwscLr2c+ugQ==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "enhanced-resolve": "^4.0.0", - "global-modules-path": "^2.1.0", - "import-local": "^1.0.0", - "inquirer": "^6.0.0", - "interpret": "^1.1.0", - "loader-utils": "^1.1.0", - "supports-color": "^5.4.0", - "v8-compile-cache": "^2.0.0", - "yargs": "^12.0.1" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.5.0.tgz", - "integrity": "sha512-9ZTaoBaePSCFvNlNGrsyI8ZVACP2svUtq0DkM7t4K2ClAa96sqOIRjAzDTc8zXzFt1cZR46rRzLTiHFSJ+Qw0g==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", - "dev": true, - "requires": { - "xregexp": "4.0.0" - } - }, - "external-editor": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.0.tgz", - "integrity": "sha512-mpkfj0FEdxrIhOC04zk85X7StNtr0yXnG7zCb+8ikO8OJi2jsHh5YGoknNTyXgsbHOf1WOOcVU3kPFWT2WgCkQ==", - "dev": true, - "requires": { - "chardet": "^0.5.0", - "iconv-lite": "^0.4.22", - "tmp": "^0.0.33" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "inquirer": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.0.0.tgz", - "integrity": "sha512-tISQWRwtcAgrz+SHPhTH7d3e73k31gsOy6i1csonLc0u1dVK/wYvuOnFeiWqC5OXFIYbmrIFInef31wbT8MEJg==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", - "dev": true - }, - "yargs": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.1.tgz", - "integrity": "sha512-B0vRAp1hRX4jgIOWFtjfNjd9OA9RWYZ6tqGA9/I/IrTMsxmKvtWy+ersM+jzpQqbC3YfLzeABPdeTgcJ9eu1qQ==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^2.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "webpack-concat-plugin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/webpack-concat-plugin/-/webpack-concat-plugin-3.0.0.tgz", - "integrity": "sha512-DLdDbZXyrFR99wyAVC9P06HLjr2XujBmQdSbnQMK2o01H9U2NHsN5W76jeTVeXDq5OLvZf8r/se65ftRo3Prow==", - "dev": true, - "requires": { - "concat-with-sourcemaps": "^1.0.5", - "globby": "^8.0.1", - "schema-utils": "^0.4.5", - "uglify-es": "^3.3.9", - "upath": "^1.1.0" - }, - "dependencies": { - "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - } - }, - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } - } - }, - "webpack-dev-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz", - "integrity": "sha512-tj5LLD9r4tDuRIDa5Mu9lnY2qBBehAITv6A9irqXhw/HQquZgTx3BCd57zYbU2gMDnncA49ufK2qVQSbaKJwOw==", - "dev": true, - "requires": { - "loud-rejection": "^1.6.0", - "memory-fs": "~0.4.1", - "mime": "^2.1.0", - "path-is-absolute": "^1.0.0", - "range-parser": "^1.0.3", - "url-join": "^2.0.2", - "webpack-log": "^1.0.1" - }, - "dependencies": { - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", - "dev": true - } - } - }, - "webpack-dev-server": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.5.tgz", - "integrity": "sha512-LVHg+EPwZLHIlfvokSTgtJqO/vI5CQi89fASb5JEDtVMDjY0yuIEqPPdMiKaBJIB/Ab7v/UN/sYZ7WsZvntQKw==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "array-includes": "^3.0.3", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", - "import-local": "^1.0.0", - "internal-ip": "1.2.0", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "selfsigned": "^1.9.1", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.1.5", - "spdy": "^3.4.1", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "webpack-dev-middleware": "3.1.3", - "webpack-log": "^1.1.2", - "yargs": "11.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "url-join": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", - "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=", - "dev": true - }, - "webpack-dev-middleware": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz", - "integrity": "sha512-I6Mmy/QjWU/kXwCSFGaiOoL5YEQIVmbb0o45xMoCyQAg/mClqZVTcsX327sPfekDyJWpCxb+04whNyLOIxpJdQ==", - "dev": true, - "requires": { - "loud-rejection": "^1.6.0", - "memory-fs": "~0.4.1", - "mime": "^2.1.0", - "path-is-absolute": "^1.0.0", - "range-parser": "^1.0.3", - "url-join": "^4.0.0", - "webpack-log": "^1.0.1" - } - }, - "yargs": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", - "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - } - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "webpack-log": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", - "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==", - "dev": true, - "requires": { - "chalk": "^2.1.0", - "log-symbols": "^2.1.0", - "loglevelnext": "^1.0.1", - "uuid": "^3.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "webpack-sources": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", - "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } - }, - "websocket-driver": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", - "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, - "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true - }, - "when": { - "version": "3.7.8", - "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", - "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", - "dev": true, - "optional": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "widest-line": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", - "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", - "dev": true, - "requires": { - "string-width": "^2.1.1" - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true - }, - "with-callback": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/with-callback/-/with-callback-1.0.2.tgz", - "integrity": "sha1-oJYpuakgAo1yFAT7Q1vc/1yRvCE=", - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "worker-farm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "wreck": { - "version": "12.5.1", - "resolved": "https://registry.npmjs.org/wreck/-/wreck-12.5.1.tgz", - "integrity": "sha512-l5DUGrc+yDyIflpty1x9XuMj1ehVjC/dTbF3/BasOO77xk0EdEa4M/DuOY8W88MQDAD0fEDqyjc8bkIMHd2E9A==", - "dev": true, - "requires": { - "boom": "5.x.x", - "hoek": "4.x.x" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "dev": true, - "requires": { - "hoek": "4.x.x" - } - }, - "hoek": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", - "dev": true - } - } - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true - }, - "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", - "dev": true - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", - "dev": true, - "optional": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - }, - "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", - "dev": true, - "requires": { - "fd-slicer": "~1.0.1" - } - }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true - } - } -} From 5f325588363ebc2a7d0f341874debf2b22bdadb6 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 11:05:04 +0200 Subject: [PATCH 06/27] move phaser to peerDependencies --- package.json | 205 ++++++++++++++++++++++++++------------------------- 1 file changed, 103 insertions(+), 102 deletions(-) diff --git a/package.json b/package.json index 4e35c404..d58e89e6 100644 --- a/package.json +++ b/package.json @@ -1,104 +1,105 @@ { - "name": "@robotlegsjs/phaser", - "version": "0.0.5", - "description": "RobotlegsJS integration with Phaser Scene Manager", - "main": "lib/index.js", - "typings": "lib/index.d.ts", - "scripts": { - "start": "webpack-dev-server --config ./webpack.example.config.js", - "test": "karma start --single-run", - "mocha": "mocha test/**/*.test.ts --require ts-node/register", - "autoformat": "prettier --config .prettierrc --write {src,test,example}/**/*.ts", - "tslint-check:src": "tslint-config-prettier-check ./tslint.json", - "tslint-check:test": "tslint-config-prettier-check ./tslint.test.json", - "tslint:src": "tslint --project tsconfig.json", - "tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json", - "tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test", - "clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf dist && rimraf dist-test", - "compile:src": "tsc -d --importHelpers", - "compile:test": "tsc -p tsconfig.test.json -d --importHelpers", - "dev": "webpack", - "build": "webpack --env.production", - "prepare": "npm run clean-up && npm run compile:src", - "prepublishOnly": "publish-please guard", - "publish-please": "npm run tslint && npm run autoformat && npm run clean-up && npm run test && publish-please" - }, - "repository": { - "type": "git", - "url": "git@github.com:RobotlegsJS/RobotlegsJS-Phaser.git" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org" - }, - "keywords": [ - "TypeScript", - "Robotlegs", - "IoC", - "Phaser" - ], - "author": "RobotlegsJS", - "contributors": [ - "Endel Dreyer ", - "Tiago Schenkel " - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser/issues" - }, - "homepage": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser#readme", - "dependencies": { - "@robotlegsjs/core": "^0.2.0", - "phaser": "^3.11.0", - "tslib": "^1.9.3" - }, - "devDependencies": { - "@types/bluebird": "^3.5.23", - "@types/chai": "^4.1.4", - "@types/mocha": "^5.2.5", - "@types/sinon": "^5.0.1", - "bluebird": "^3.5.1", - "browserify-versionify": "^1.0.6", - "chai": "^4.1.2", - "es6-map": "^0.1.5", - "es6-symbol": "^3.1.1", - "glslify": "^6.2.1", - "html-webpack-plugin": "^3.2.0", - "imports-loader": "^0.8.0", - "istanbul": "^0.4.5", - "istanbul-instrumenter-loader": "^3.0.1", - "karma": "^2.0.5", - "karma-chai": "^0.1.0", - "karma-chrome-launcher": "^2.2.0", - "karma-coverage-istanbul-reporter": "^2.0.1", - "karma-es6-shim": "^1.0.0", - "karma-mocha": "^1.3.0", - "karma-mocha-reporter": "^2.2.5", - "karma-phantomjs-launcher": "^1.0.4", - "karma-remap-istanbul": "^0.6.0", - "karma-sinon": "^1.0.5", - "karma-sinon-chai": "^2.0.2", - "karma-sourcemap-loader": "^0.3.7", - "karma-sourcemap-writer": "^0.1.2", - "karma-webpack": "^3.0.0", - "mocha": "^5.2.0", - "prettier": "^1.14.0", - "publish-please": "^3.2.0", - "reflect-metadata": "^0.1.12", - "remap-istanbul": "^0.11.1", - "rimraf": "^2.6.2", - "sinon": "^6.1.4", - "sinon-chai": "^3.2.0", - "ts-loader": "^4.4.2", - "ts-node": "^7.0.0", - "tslint": "^5.11.0", - "tslint-config-prettier": "^1.14.0", - "typescript": "^3.0.1", - "webpack": "^4.16.4", - "webpack-cli": "^3.1.0", - "webpack-concat-plugin": "^3.0.0", - "webpack-dev-server": "^3.1.5" - }, - "peerDependencies": { - "reflect-metadata": "^0.1.12" - } + "name": "@robotlegsjs/phaser", + "version": "0.0.5", + "description": "RobotlegsJS integration with Phaser Scene Manager", + "main": "lib/index.js", + "typings": "lib/index.d.ts", + "scripts": { + "start": "webpack-dev-server --config ./webpack.example.config.js", + "test": "karma start --single-run", + "mocha": "mocha test/**/*.test.ts --require ts-node/register", + "autoformat": "prettier --config .prettierrc --write {src,test,example}/**/*.ts", + "tslint-check:src": "tslint-config-prettier-check ./tslint.json", + "tslint-check:test": "tslint-config-prettier-check ./tslint.test.json", + "tslint:src": "tslint --project tsconfig.json", + "tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json", + "tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test", + "clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf dist && rimraf dist-test", + "compile:src": "tsc -d --importHelpers", + "compile:test": "tsc -p tsconfig.test.json -d --importHelpers", + "dev": "webpack", + "build": "webpack --env.production", + "prepare": "npm run clean-up && npm run compile:src", + "prepublishOnly": "publish-please guard", + "publish-please": "npm run tslint && npm run autoformat && npm run clean-up && npm run test && publish-please" + }, + "repository": { + "type": "git", + "url": "git@github.com:RobotlegsJS/RobotlegsJS-Phaser.git" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org" + }, + "keywords": [ + "TypeScript", + "Robotlegs", + "IoC", + "Phaser" + ], + "author": "RobotlegsJS", + "contributors": [ + "Endel Dreyer ", + "Tiago Schenkel " + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser/issues" + }, + "homepage": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser#readme", + "dependencies": { + "@robotlegsjs/core": "^0.2.0", + "tslib": "^1.9.3" + }, + "peerDependencies": { + "phaser": "^3.11.0", + "reflect-metadata": "^0.1.12" + }, + "devDependencies": { + "@types/bluebird": "^3.5.23", + "@types/chai": "^4.1.4", + "@types/mocha": "^5.2.5", + "@types/sinon": "^5.0.1", + "bluebird": "^3.5.1", + "browserify-versionify": "^1.0.6", + "chai": "^4.1.2", + "es6-map": "^0.1.5", + "es6-symbol": "^3.1.1", + "glslify": "^6.2.1", + "html-webpack-plugin": "^3.2.0", + "imports-loader": "^0.8.0", + "istanbul": "^0.4.5", + "istanbul-instrumenter-loader": "^3.0.1", + "karma": "^2.0.5", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage-istanbul-reporter": "^2.0.1", + "karma-es6-shim": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", + "karma-phantomjs-launcher": "^1.0.4", + "karma-remap-istanbul": "^0.6.0", + "karma-sinon": "^1.0.5", + "karma-sinon-chai": "^2.0.2", + "karma-sourcemap-loader": "^0.3.7", + "karma-sourcemap-writer": "^0.1.2", + "karma-webpack": "^3.0.0", + "mocha": "^5.2.0", + "phaser": "^3.11.0", + "prettier": "^1.14.0", + "publish-please": "^3.2.0", + "reflect-metadata": "^0.1.12", + "remap-istanbul": "^0.11.1", + "rimraf": "^2.6.2", + "sinon": "^6.1.4", + "sinon-chai": "^3.2.0", + "ts-loader": "^4.4.2", + "ts-node": "^7.0.0", + "tslint": "^5.11.0", + "tslint-config-prettier": "^1.14.0", + "typescript": "^3.0.1", + "webpack": "^4.16.4", + "webpack-cli": "^3.1.0", + "webpack-concat-plugin": "^3.0.0", + "webpack-dev-server": "^3.1.5" + } } From 51450bc87bf47f74738431bde2b73e328f2bd6e2 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 11:06:06 +0200 Subject: [PATCH 07/27] chore(package): update lockfile --- yarn.lock | 57 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index b843ad8c..a18ac493 100644 --- a/yarn.lock +++ b/yarn.lock @@ -464,8 +464,10 @@ asn1.js@^4.0.0: minimalistic-assert "^1.0.0" asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + version "0.2.4" + resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + dependencies: + safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" @@ -877,6 +879,21 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" +buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + +buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + dependencies: + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + +buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + buffer-from@^1.0.0, buffer-from@^1.1.0: version "1.1.1" resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -1247,10 +1264,14 @@ commander@2.15.1: version "2.15.1" resolved "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" -commander@2.16.x, commander@^2.12.1, commander@^2.15.1, commander@^2.9.0, commander@~2.16.0: +commander@2.16.x, commander@~2.16.0: version "2.16.0" resolved "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" +commander@^2.12.1, commander@^2.15.1, commander@^2.9.0: + version "2.17.0" + resolved "https://registry.npmjs.org/commander/-/commander-2.17.0.tgz#9d07b25e2a6f198b76d8b756a0e8a9604a6a1a60" + commander@~2.13.0: version "2.13.0" resolved "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" @@ -2090,7 +2111,7 @@ event-emitter@~0.3.5: d "1" es5-ext "~0.10.14" -eventemitter3@^3.0.0: +eventemitter3@^3.0.0, eventemitter3@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" @@ -3585,8 +3606,10 @@ isarray@2.0.1: resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" isbinaryfile@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" + version "3.0.3" + resolved "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" + dependencies: + buffer-alloc "^1.2.0" isexe@^2.0.0: version "2.0.0" @@ -5113,8 +5136,8 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + version "1.0.6" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" path-proxy@~1.0.0: version "1.0.0" @@ -5188,9 +5211,11 @@ phantomjs-prebuilt@^2.1.7: request-progress "^2.0.1" which "^1.2.10" -phaser-ce@^2.11.0: - version "2.11.0" - resolved "https://registry.npmjs.org/phaser-ce/-/phaser-ce-2.11.0.tgz#5c4f52991e34d038c72e0aa9f7d49b35b70d78e3" +phaser@^3.11.0: + version "3.11.0" + resolved "https://registry.npmjs.org/phaser/-/phaser-3.11.0.tgz#fa74cc0cbaea5f0f31ca8f25f2bb79c82aecb6cf" + dependencies: + eventemitter3 "^3.1.0" pify@^2.0.0: version "2.3.0" @@ -5879,7 +5904,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -6966,8 +6991,8 @@ v8-compile-cache@^2.0.0: resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz#526492e35fc616864284700b7043e01baee09f0a" validate-npm-package-license@^3.0.1: - version "3.0.3" - resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" + version "3.0.4" + resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" @@ -7120,8 +7145,8 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0: source-map "~0.6.1" webpack@^4.16.4: - version "4.16.4" - resolved "https://registry.npmjs.org/webpack/-/webpack-4.16.4.tgz#6b020f76483bc66339164c296d89978aa100d37a" + version "4.16.5" + resolved "https://registry.npmjs.org/webpack/-/webpack-4.16.5.tgz#29fb39462823d7eb8aefcab8b45f7f241db0d092" dependencies: "@webassemblyjs/ast" "1.5.13" "@webassemblyjs/helper-module-context" "1.5.13" From f387a4db8e95126c3b381a42e4b2489d1b803db4 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 11:19:52 +0200 Subject: [PATCH 08/27] update copyright message --- src/index.ts | 2 +- src/robotlegs/bender/bundles/phaser/PhaserBundle.ts | 2 +- .../contextSceneManager/ContextSceneManagerExtension.ts | 2 +- .../contextSceneManager/api/IContextSceneManager.ts | 2 +- .../contextSceneManager/impl/ContextSceneManager.ts | 2 +- .../impl/ContextSceneManagerListenerConfig.ts | 2 +- .../extensions/sceneManager/SceneManagerExtension.ts | 2 +- .../sceneManager/SceneManagerObserverExtension.ts | 2 +- .../bender/extensions/sceneManager/api/ISceneHandler.ts | 2 +- .../bender/extensions/sceneManager/api/ISceneManager.ts | 2 +- .../sceneMediatorMap/SceneMediatorMapExtension.ts | 2 +- .../extensions/sceneMediatorMap/api/ISceneMediator.ts | 2 +- .../extensions/sceneMediatorMap/api/ISceneMediatorMap.ts | 2 +- .../sceneMediatorMap/api/ISceneMediatorMapping.ts | 2 +- .../sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts | 2 +- .../sceneMediatorMap/dsl/ISceneMediatorMapper.ts | 2 +- .../sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts | 2 +- .../sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts | 2 +- .../extensions/sceneMediatorMap/impl/SceneMediator.ts | 2 +- .../sceneMediatorMap/impl/SceneMediatorFactory.ts | 2 +- .../sceneMediatorMap/impl/SceneMediatorManager.ts | 2 +- .../extensions/sceneMediatorMap/impl/SceneMediatorMap.ts | 2 +- .../sceneMediatorMap/impl/SceneMediatorMapper.ts | 2 +- .../sceneMediatorMap/impl/SceneMediatorMapping.ts | 2 +- .../sceneMediatorMap/impl/SceneMediatorStateHandler.ts | 2 +- test/entry.ts | 7 +++++++ test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts | 3 ++- .../contextStateManagerExtension.test.ts | 2 +- .../contextStateManager/impl/contextStateManager.test.ts | 2 +- .../impl/contextStateManagerListenerConfig.test.ts | 2 +- .../contextStateManager/support/CallbackLogTarget.ts | 2 +- .../extensions/contextStateManager/support/LogParams.ts | 2 +- .../stateManager/impl/configureStateEvent.test.ts | 2 +- .../extensions/stateManager/impl/stateBindingEvent.test.ts | 2 +- .../extensions/stateManager/impl/stateManagerEvent.test.ts | 2 +- .../stateManager/support/CallbackSceneHandler.ts | 2 +- 36 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/index.ts b/src/index.ts index e911adc3..f7a2a150 100755 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/bundles/phaser/PhaserBundle.ts b/src/robotlegs/bender/bundles/phaser/PhaserBundle.ts index 45285158..c68b27d4 100755 --- a/src/robotlegs/bender/bundles/phaser/PhaserBundle.ts +++ b/src/robotlegs/bender/bundles/phaser/PhaserBundle.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts b/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts index d419cd08..b533f0e7 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts index 31cd3cdf..f9ac4672 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts index a5595fd6..6a4d90cf 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts index 433763b5..83c469b8 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts b/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts index 72280a03..c40ab227 100755 --- a/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts +++ b/src/robotlegs/bender/extensions/sceneManager/SceneManagerExtension.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts b/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts index 5fa8aba2..bd49d41a 100755 --- a/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts +++ b/src/robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts index afb6c868..7fbf5b33 100755 --- a/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts index 0a538244..366a9598 100755 --- a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts index ab234cbf..a068ecef 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts index 2018cf18..fbc96f04 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts index a357d696..d178cec7 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts index b8eafe2d..106dd140 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts index 389ad0f7..c0fc7346 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorConfigurator.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts index de3d90b3..f2179e99 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorMapper.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts index 1fab6659..14c13296 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/dsl/ISceneMediatorUnmapper.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts index 18341365..ff8632d5 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/NullSceneMediatorUnmapper.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts index a314e9ab..e156041d 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorFactory.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorFactory.ts index 43b50ac5..53f6be7b 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorFactory.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorFactory.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorManager.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorManager.ts index 0149846c..158af38a 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorManager.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorManager.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts index e199e820..1470756c 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapper.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapper.ts index 07607a53..56c12c8d 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapper.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapper.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapping.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapping.ts index 94ca2160..386637f1 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapping.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMapping.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts index 16d7106f..b103c7ac 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/entry.ts b/test/entry.ts index 2603c5dc..045140d6 100755 --- a/test/entry.ts +++ b/test/entry.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + /// /// import "bluebird/js/browser/bluebird"; diff --git a/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts b/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts index 625c6a05..0887b1d8 100755 --- a/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts +++ b/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts @@ -1,9 +1,10 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ + import "../../../../entry"; import { Context, IContext } from "@robotlegsjs/core"; import { assert } from "chai"; diff --git a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts index 24352412..ecb321fd 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts index 3bcebb2d..7e6c707c 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts index 2b71fc6f..9f92614c 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts b/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts index e914b6c3..83c81c85 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2012 the original author or authors. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts b/test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts index 67fb5108..de2c0510 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/support/LogParams.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2012 the original author or authors. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts index b16042e9..77a85b0a 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts index 754cad4b..25cedd19 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts index f24a3504..5916eb82 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. diff --git a/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts b/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts index 856f1dad..bfce3d1d 100755 --- a/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts +++ b/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------ -// Copyright (c) 2017 RobotlegsJS. All Rights Reserved. +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. From 7047daabad78ffb3fa868ee7913c3aeda8a5fde4 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 11:20:12 +0200 Subject: [PATCH 09/27] add copyright message --- example/Game.ts | 7 +++++++ example/commands/MainCommand.ts | 7 +++++++ example/config/GameConfig.ts | 13 +++++++++++-- example/config/SceneMediatorConfig.ts | 7 +++++++ example/constants/SceneKey.ts | 7 +++++++ example/events/MainEven.ts | 7 +++++++ example/index.ts | 7 +++++++ example/mediators/BootMediator.ts | 7 +++++++ example/mediators/MainMediator.ts | 7 +++++++ example/mediators/PreloadMediator.ts | 7 +++++++ example/models/GameModel.ts | 7 +++++++ example/scenes/BaseScene.ts | 7 +++++++ example/scenes/Boot.ts | 7 +++++++ example/scenes/Main.ts | 7 +++++++ example/scenes/Preload.ts | 7 +++++++ 15 files changed, 109 insertions(+), 2 deletions(-) diff --git a/example/Game.ts b/example/Game.ts index 85cc73ab..3ad02f72 100755 --- a/example/Game.ts +++ b/example/Game.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { Context, IContext, MVCSBundle } from "@robotlegsjs/core"; import { ContextSceneManager } from "../src"; import { PhaserBundle } from "../src/robotlegs/bender/bundles/phaser/PhaserBundle"; diff --git a/example/commands/MainCommand.ts b/example/commands/MainCommand.ts index 34218108..4d774dfa 100644 --- a/example/commands/MainCommand.ts +++ b/example/commands/MainCommand.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { injectable, Event } from "../../node_modules/@robotlegsjs/core"; @injectable() export class MainCommand { diff --git a/example/config/GameConfig.ts b/example/config/GameConfig.ts index 2f6e8d4c..74be49ea 100755 --- a/example/config/GameConfig.ts +++ b/example/config/GameConfig.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { injectable, inject, IConfig, IContext, IEventCommandMap } from "@robotlegsjs/core"; import { GameModel } from "../models/GameModel"; @@ -6,8 +13,10 @@ import { MainCommand } from "../commands/MainCommand"; @injectable() export class GameConfig implements IConfig { - @inject(IContext) public context: IContext; - @inject(IEventCommandMap) public commandMap: IEventCommandMap; + @inject(IContext) + public context: IContext; + @inject(IEventCommandMap) + public commandMap: IEventCommandMap; public configure(): void { this.mapCommands(); diff --git a/example/config/SceneMediatorConfig.ts b/example/config/SceneMediatorConfig.ts index 4587855a..08cf5135 100755 --- a/example/config/SceneMediatorConfig.ts +++ b/example/config/SceneMediatorConfig.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { IConfig, inject, injectable } from "@robotlegsjs/core"; import { ISceneMediatorMap } from "../../src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap"; import { PreloadMediator } from "../mediators/PreloadMediator"; diff --git a/example/constants/SceneKey.ts b/example/constants/SceneKey.ts index fca8a91b..1318587e 100755 --- a/example/constants/SceneKey.ts +++ b/example/constants/SceneKey.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + export class SceneKey { public static BOOT: string = "Boot"; public static PRELOAD: string = "Preload"; diff --git a/example/events/MainEven.ts b/example/events/MainEven.ts index 87e23ce2..60b7374e 100644 --- a/example/events/MainEven.ts +++ b/example/events/MainEven.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { Event } from "../../node_modules/@robotlegsjs/core"; export class MainEvent extends Event { diff --git a/example/index.ts b/example/index.ts index 1285b09e..9c3c8165 100755 --- a/example/index.ts +++ b/example/index.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + /// import "reflect-metadata"; diff --git a/example/mediators/BootMediator.ts b/example/mediators/BootMediator.ts index 6b49d675..c1ab4915 100755 --- a/example/mediators/BootMediator.ts +++ b/example/mediators/BootMediator.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { injectable } from "@robotlegsjs/core"; import { SceneMediator } from "../../src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator"; diff --git a/example/mediators/MainMediator.ts b/example/mediators/MainMediator.ts index 5e60faac..4a70cfe9 100755 --- a/example/mediators/MainMediator.ts +++ b/example/mediators/MainMediator.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { injectable, inject } from "@robotlegsjs/core"; import { GameModel } from "../models/GameModel"; diff --git a/example/mediators/PreloadMediator.ts b/example/mediators/PreloadMediator.ts index a6ee9bc0..abf87292 100755 --- a/example/mediators/PreloadMediator.ts +++ b/example/mediators/PreloadMediator.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { injectable } from "@robotlegsjs/core"; import { SceneMediator } from "../../src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator"; diff --git a/example/models/GameModel.ts b/example/models/GameModel.ts index d8c3cddb..fa8af097 100755 --- a/example/models/GameModel.ts +++ b/example/models/GameModel.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { injectable } from "@robotlegsjs/core"; @injectable() diff --git a/example/scenes/BaseScene.ts b/example/scenes/BaseScene.ts index 777b1b75..fc673922 100755 --- a/example/scenes/BaseScene.ts +++ b/example/scenes/BaseScene.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + export abstract class BaseScene extends Phaser.Scene { public init(): void { console.log(this + ": init"); diff --git a/example/scenes/Boot.ts b/example/scenes/Boot.ts index e5eb2333..a97ac5e8 100755 --- a/example/scenes/Boot.ts +++ b/example/scenes/Boot.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { SceneKey } from "../constants/SceneKey"; import { BaseScene } from "./BaseScene"; import { Preload } from "./Preload"; diff --git a/example/scenes/Main.ts b/example/scenes/Main.ts index 893fc04a..04fbb302 100755 --- a/example/scenes/Main.ts +++ b/example/scenes/Main.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { BaseScene } from "./BaseScene"; export class Main extends BaseScene { diff --git a/example/scenes/Preload.ts b/example/scenes/Preload.ts index bde8eccc..c968cc60 100755 --- a/example/scenes/Preload.ts +++ b/example/scenes/Preload.ts @@ -1,3 +1,10 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. +// +// NOTICE: You are permitted to use, modify, and distribute this file +// in accordance with the terms of the license agreement accompanying it. +// ------------------------------------------------------------------------------ + import { SceneKey } from "../constants/SceneKey"; import { BaseScene } from "./BaseScene"; import { Main } from "./Main"; From c0307c8e7791073770f32f36bc01aab34363fa59 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 11:20:42 +0200 Subject: [PATCH 10/27] update contributors --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index d58e89e6..5d11ec2d 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "author": "RobotlegsJS", "contributors": [ "Endel Dreyer ", + "Sargis Sargsyan ", "Tiago Schenkel " ], "license": "MIT", From f60c464d4927604361fffd03921997d33a2a6ca8 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 12:11:30 +0200 Subject: [PATCH 11/27] rearranges export statements --- src/index.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index f7a2a150..e1eb2a94 100755 --- a/src/index.ts +++ b/src/index.ts @@ -6,24 +6,27 @@ // ------------------------------------------------------------------------------ // ContextSceneManager -/** - * Bundles - */ -/// -export { PhaserBundle } from "./robotlegs/bender/bundles/phaser/PhaserBundle"; export { IContextSceneManager } from "./robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager"; -export { ContextSceneManagerExtension } from "./robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension"; export { ContextSceneManager } from "./robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"; export { ContextSceneManagerListenerConfig } from "./robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig"; +export { ContextSceneManagerExtension } from "./robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension"; + // SceneManager export { ISceneHandler } from "./robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; export { ISceneManager } from "./robotlegs/bender/extensions/sceneManager/api/ISceneManager"; export { SceneManagerExtension } from "./robotlegs/bender/extensions/sceneManager/SceneManagerExtension"; +export { SceneManagerObserverExtension } from "./robotlegs/bender/extensions/sceneManager/SceneManagerObserverExtension"; + // SceneMediatorMap export { ISceneMediator } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediator"; export { ISceneMediatorMap } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap"; export { ISceneMediatorMapping } from "./robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMapping"; export { SceneMediator } from "./robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator"; export { SceneMediatorMapExtension } from "./robotlegs/bender/extensions/sceneMediatorMap/SceneMediatorMapExtension"; + +/** + * Bundles + */ +export { PhaserBundle } from "./robotlegs/bender/bundles/phaser/PhaserBundle"; From b612ad9ca8539a917a2aedd76734cf1a3207d1e5 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 12:11:57 +0200 Subject: [PATCH 12/27] fix tslint issues --- .../impl/ContextSceneManagerListenerConfig.ts | 4 ++-- .../extensions/sceneManager/impl/SceneManagerObserver.ts | 2 +- .../extensions/sceneMediatorMap/impl/SceneMediator.ts | 4 +--- .../extensions/sceneMediatorMap/impl/SceneMediatorMap.ts | 6 ++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts index 83c469b8..fefbc4a5 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig.ts @@ -5,8 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { IConfig } from "@robotlegsjs/core"; -import { inject, injectable } from "inversify"; +import { inject, injectable, IConfig } from "@robotlegsjs/core"; + import { ISceneManager } from "../../sceneManager/api/ISceneManager"; import { IContextSceneManager } from "../api/IContextSceneManager"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts index 83eb650e..40226e15 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts @@ -111,7 +111,7 @@ export class SceneManagerObserver { sys.events.off("start", this.onSceneStart, this, false); const binding: SceneManagerBinding = this._registry.getBinding(sys.game.scene); if (binding) { - binding.handleScene(sys.scene, sys.scene["constructor"] as FunctionConstructor); + binding.handleScene(sys.scene, sys.scene.constructor); } } diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts index e156041d..752c5e6b 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts @@ -5,9 +5,7 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { injectable, inject } from "inversify"; - -import { IEventMap, IEventDispatcher, Event } from "@robotlegsjs/core"; +import { injectable, inject, IEventMap, IEventDispatcher, Event } from "@robotlegsjs/core"; import { ISceneMediator } from "../api/ISceneMediator"; diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts index 1470756c..67ab5524 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorMap.ts @@ -5,7 +5,7 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { IContext, ILogger, ITypeMatcher, TypeMatcher } from "@robotlegsjs/core"; +import { injectable, inject, IContext, ILogger, ITypeMatcher, TypeMatcher } from "@robotlegsjs/core"; import { ISceneMediatorMap } from "../api/ISceneMediatorMap"; import { ISceneMediatorMapper } from "../dsl/ISceneMediatorMapper"; @@ -18,8 +18,6 @@ import { SceneMediatorStateHandler } from "./SceneMediatorStateHandler"; import { NullSceneMediatorUnmapper } from "./NullSceneMediatorUnmapper"; import { SceneMediatorMapper } from "./SceneMediatorMapper"; -import { injectable, inject } from "inversify"; - /** * @private */ @@ -104,7 +102,7 @@ export class SceneMediatorMap implements ISceneMediatorMap, ISceneHandler { * @inheritDoc */ public mediate(item: any): void { - this._sceneHandler.handleItem(item, item["constructor"]); + this._sceneHandler.handleItem(item, item.constructor); } /** From f54b9c16287c852da844f71f85a13d52c560c183 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 12:16:03 +0200 Subject: [PATCH 13/27] update karma config --- karma.conf.js | 122 +++++++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 56 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index ce0696de..b953e9c0 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -6,62 +6,72 @@ const webpackConfig = require("./webpack.config.js")({ production: false, karma: delete webpackConfig.entry; module.exports = config => { - var configuration = { - basePath: "", - frameworks: ["mocha", "chai", "sinon", "es6-shim"], - files: [ - { pattern: "node_modules/reflect-metadata/Reflect.js", include: true }, - { pattern: "node_modules/bluebird/js/browser/bluebird.js", include: true }, - { pattern: "node_modules/phaser/dist/phaser.js", include: true }, - { pattern: "./test/**/**/**.test.ts", include: true }, - { pattern: "**/*.map", served: true, included: false, watched: true } - ], - preprocessors: { - "./**/**/**/**.ts": ["sourcemap"], - "./test/**/**/**.test.ts": ["webpack"] - }, - webpack: webpackConfig, - webpackMiddleware: { - noInfo: true - }, - plugins: [ - "karma-webpack", - "karma-sourcemap-writer", - "karma-sourcemap-loader", - "karma-remap-istanbul", - "karma-mocha-reporter", - "karma-mocha", - "karma-chai", - "karma-sinon", - "karma-es6-shim", - "karma-coverage-istanbul-reporter" - ], - reporters: config.singleRun ? ["dots", "mocha", "coverage-istanbul"] : ["dots", "mocha"], - coverageIstanbulReporter: { - reports: ["html", "lcov", "lcovonly", "text-summary"], - dir: "coverage", - fixWebpackSourcePaths: true, - "report-config": { - html: { - subdir: "html-report" - } - } - }, - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: [], - browserNoActivityTimeout: 50000 - }; - if (process.env.TRAVIS) { - configuration.browsers.push("PhantomJS"); - configuration.plugins.push("karma-phantomjs-launcher"); - } else { - configuration.browsers.push("PhantomJS"); - configuration.plugins.push("karma-phantomjs-launcher"); - } + var configuration = { + basePath: "", + frameworks: [ + "mocha", + "chai", + "sinon", + "es6-shim" + ], + files: [ + { pattern: "node_modules/reflect-metadata/Reflect.js", include: true }, + { pattern: "node_modules/bluebird/js/browser/bluebird.js", include: true }, + { pattern: "node_modules/phaser/dist/phaser.js", include: true }, + { pattern: "./test/**/**/**.test.ts", include: true }, + { pattern: '**/*.map', served: true, included: false, watched: true } + ], + preprocessors: { + "./**/**/**/**.ts": ["sourcemap"], + "./test/**/**/**.test.ts": ["webpack"] + }, + webpack: webpackConfig, + webpackMiddleware: { + noInfo: true + }, + plugins: [ + "karma-webpack", + "karma-sourcemap-writer", + "karma-sourcemap-loader", + "karma-remap-istanbul", + "karma-mocha-reporter", + "karma-mocha", + "karma-chai", + "karma-sinon", + "karma-es6-shim", + "karma-coverage-istanbul-reporter" + ], + reporters: ( + config.singleRun ? + ["dots", "mocha", "coverage-istanbul"] : + ["dots", "mocha"] + ), + coverageIstanbulReporter: { + reports: ["html", "lcov", "lcovonly", "text-summary"], + dir: "coverage", + fixWebpackSourcePaths: true, + "report-config": { + html: { + subdir: "html-report" + } + } + }, + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: [], + browserNoActivityTimeout: 50000 + }; - config.set(configuration); + if (process.env.TRAVIS) { + configuration.browsers.push("PhantomJS"); + configuration.plugins.push("karma-phantomjs-launcher"); + } else { + configuration.browsers.push("PhantomJS"); + configuration.plugins.push("karma-phantomjs-launcher"); + } + + config.set(configuration); }; From 2270f9d357d05d9ded8a2077eadbef703e780098 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 12:16:15 +0200 Subject: [PATCH 14/27] update tsconfig --- tsconfig.json | 52 +++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index e952cc39..c873c2a1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,26 +1,30 @@ { - "compilerOptions": { - "outDir": "lib", - "target": "es5", - "lib": ["es7", "dom"], - "types": ["reflect-metadata"], - "sourceMap": true, - "inlineSources": true, - "module": "commonjs", - "moduleResolution": "node", - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "removeComments": false, - "strict": false, - "noImplicitAny": true, - "strictNullChecks": false, - "noImplicitThis": false, - "alwaysStrict": true, - "noUnusedLocals": true, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["./src/**/*.ts"], - "files": ["./definitions/phaser.d.ts"] + "compilerOptions": { + "outDir": "lib", + "target": "es5", + "lib": ["es7", "dom"], + "types": ["reflect-metadata"], + "sourceMap": true, + "inlineSources": true, + "module": "commonjs", + "moduleResolution": "node", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "removeComments": false, + "strict": false, + "noImplicitAny": true, + "strictNullChecks": false, + "noImplicitThis": false, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "include": [ + "./src/**/*.ts" + ], + "files": [ + "./definitions/phaser.d.ts" + ] } From d0d6ddd7b064a5b67411c0ff751b5a44e6810573 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 12:16:30 +0200 Subject: [PATCH 15/27] update webpack config for example --- webpack.example.config.js | 97 +++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/webpack.example.config.js b/webpack.example.config.js index eb71d72c..e6d7346c 100644 --- a/webpack.example.config.js +++ b/webpack.example.config.js @@ -4,52 +4,59 @@ const HtmlWebpackPlugin = require("html-webpack-plugin"); const ConcatPlugin = require("webpack-concat-plugin"); const concatPluginConfigGenerator = (name, files) => { - return { - uglify: false, - sourceMap: false, - name: name, - fileName: "[name].js", - filesToConcat: files, - injectType: "none" - }; + return { + uglify: false, + sourceMap: false, + name: name, + fileName: "[name].js", + filesToConcat: files, + injectType: "none" + }; }; module.exports = options => { - return { - mode: "development", - - entry: { - main: path.resolve("example/index.ts") - }, - - output: { - path: __dirname + "/dist", - filename: "bundle.js" - }, - - devtool: "source-map", - - module: { - rules: [{ test: /\.ts$/, loader: "ts-loader" }] - }, - - plugins: [ - new HtmlWebpackPlugin({ - template: path.resolve("static/index.html"), - inject: false - }) - ], - - resolve: { - extensions: [".ts", ".js", ".json"] - }, - - devServer: { - host: "0.0.0.0", - contentBase: path.join(__dirname, "static"), - hot: true, - disableHostCheck: true, - inline: false - } - }; + return { + mode: "development", + + entry: { + main: path.resolve("example/index.ts") + }, + + output: { + path: __dirname + "/dist", + filename: "bundle.js" + }, + + devtool: 'source-map', + + module: { + rules: [ + { test: /\.ts$/, loader: "ts-loader" } + ] + }, + + plugins: [ + new HtmlWebpackPlugin({ + template: path.resolve("static/index.html"), + inject: false + }), + + new ConcatPlugin(concatPluginConfigGenerator("phaser", [ + path.resolve(__dirname, "./node_modules/phaser/dist/phaser.js") + ])), + ], + + resolve: { + extensions: ['.ts', '.js', '.json'] + }, + + devServer: { + host: "0.0.0.0", + contentBase: path.join(__dirname, "static"), + hot: true, + disableHostCheck: true, + inline:false + } + + } }; From 16dd4dc898a813d47d1d0ed6b0c55258c763e74a Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 16:28:10 +0200 Subject: [PATCH 16/27] update example --- example/Game.ts | 25 ++++++++++++++------ example/commands/MainCommand.ts | 5 ++-- example/config/GameConfig.ts | 5 ++-- example/config/SceneMediatorConfig.ts | 11 +++++---- example/constants/SceneKey.ts | 2 -- example/events/{MainEven.ts => MainEvent.ts} | 2 +- example/index.ts | 1 + example/mediators/MainMediator.ts | 5 ++-- example/scenes/BaseScene.ts | 6 +++++ example/scenes/Boot.ts | 11 +++++---- example/scenes/Main.ts | 6 +++++ example/scenes/Preload.ts | 10 ++++---- 12 files changed, 60 insertions(+), 29 deletions(-) rename example/events/{MainEven.ts => MainEvent.ts} (88%) diff --git a/example/Game.ts b/example/Game.ts index 3ad02f72..4cfcacc0 100755 --- a/example/Game.ts +++ b/example/Game.ts @@ -5,14 +5,21 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { Context, IContext, MVCSBundle } from "@robotlegsjs/core"; -import { ContextSceneManager } from "../src"; + +import { ContextSceneManager } from "../src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"; import { PhaserBundle } from "../src/robotlegs/bender/bundles/phaser/PhaserBundle"; -import "phaser"; + +import { GameConfig } from "./config/GameConfig"; import { SceneMediatorConfig } from "./config/SceneMediatorConfig"; -import { Boot } from "./scenes/Boot"; + import { SceneKey } from "./constants/SceneKey"; -import { GameConfig } from "./config/GameConfig"; + +import { Boot } from "./scenes/Boot"; +import { Main } from "./scenes/Main"; +import { Preload } from "./scenes/Preload"; export class Game extends Phaser.Game { private _context: IContext; @@ -29,11 +36,15 @@ export class Game extends Phaser.Game { this._context = new Context(); this._context .install(MVCSBundle, PhaserBundle) - .configure(new ContextSceneManager((this as any).scene)) + .configure(new ContextSceneManager(this.scene)) .configure(SceneMediatorConfig) .configure(GameConfig) .initialize(); - (this as any).scene.add(SceneKey.BOOT, new Boot(SceneKey.BOOT)); - (this as any).scene.start(SceneKey.BOOT); + + this.scene.add(SceneKey.BOOT, new Boot()); + this.scene.add(SceneKey.PRELOAD, new Preload()); + this.scene.add(SceneKey.MAIN, new Main()); + + this.scene.start(SceneKey.BOOT); } } diff --git a/example/commands/MainCommand.ts b/example/commands/MainCommand.ts index 4d774dfa..eb8fc3cb 100644 --- a/example/commands/MainCommand.ts +++ b/example/commands/MainCommand.ts @@ -5,9 +5,10 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { injectable, Event } from "../../node_modules/@robotlegsjs/core"; +import { injectable, Event, ICommand } from "@robotlegsjs/core"; + @injectable() -export class MainCommand { +export class MainCommand implements ICommand { public execute(event: Event): void { console.log(event.type, event.data); } diff --git a/example/config/GameConfig.ts b/example/config/GameConfig.ts index 74be49ea..cfce0535 100755 --- a/example/config/GameConfig.ts +++ b/example/config/GameConfig.ts @@ -7,14 +7,15 @@ import { injectable, inject, IConfig, IContext, IEventCommandMap } from "@robotlegsjs/core"; -import { GameModel } from "../models/GameModel"; -import { MainEvent } from "../events/MainEven"; import { MainCommand } from "../commands/MainCommand"; +import { MainEvent } from "../events/MainEvent"; +import { GameModel } from "../models/GameModel"; @injectable() export class GameConfig implements IConfig { @inject(IContext) public context: IContext; + @inject(IEventCommandMap) public commandMap: IEventCommandMap; diff --git a/example/config/SceneMediatorConfig.ts b/example/config/SceneMediatorConfig.ts index 08cf5135..87d5a026 100755 --- a/example/config/SceneMediatorConfig.ts +++ b/example/config/SceneMediatorConfig.ts @@ -6,13 +6,16 @@ // ------------------------------------------------------------------------------ import { IConfig, inject, injectable } from "@robotlegsjs/core"; + import { ISceneMediatorMap } from "../../src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap"; -import { PreloadMediator } from "../mediators/PreloadMediator"; + import { BootMediator } from "../mediators/BootMediator"; -import { Preload } from "../scenes/Preload"; +import { MainMediator } from "../mediators/MainMediator"; +import { PreloadMediator } from "../mediators/PreloadMediator"; + import { Boot } from "../scenes/Boot"; import { Main } from "../scenes/Main"; -import { MainMediator } from "../mediators/MainMediator"; +import { Preload } from "../scenes/Preload"; @injectable() export class SceneMediatorConfig implements IConfig { @@ -26,8 +29,6 @@ export class SceneMediatorConfig implements IConfig { private mapSceneMediators(): void { this.sceneMediatorMap.map(Boot).toMediator(BootMediator); this.sceneMediatorMap.map(Preload).toMediator(PreloadMediator); - // this.sceneMediatorMap.map(GameTitle).toMediator(GameTitleMediator); this.sceneMediatorMap.map(Main).toMediator(MainMediator); - // this.sceneMediatorMap.map(GameOver).toMediator(GameOverMediator); } } diff --git a/example/constants/SceneKey.ts b/example/constants/SceneKey.ts index 1318587e..74686023 100755 --- a/example/constants/SceneKey.ts +++ b/example/constants/SceneKey.ts @@ -8,7 +8,5 @@ export class SceneKey { public static BOOT: string = "Boot"; public static PRELOAD: string = "Preload"; - public static GAME_TITLE: string = "GameTitle"; public static MAIN: string = "Main"; - public static GAME_OVER: string = "GameOver"; } diff --git a/example/events/MainEven.ts b/example/events/MainEvent.ts similarity index 88% rename from example/events/MainEven.ts rename to example/events/MainEvent.ts index 60b7374e..42021820 100644 --- a/example/events/MainEven.ts +++ b/example/events/MainEvent.ts @@ -5,7 +5,7 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { Event } from "../../node_modules/@robotlegsjs/core"; +import { Event } from "@robotlegsjs/core"; export class MainEvent extends Event { public static readonly GAME_START: string = "game_start"; diff --git a/example/index.ts b/example/index.ts index 9c3c8165..8ff5f28a 100755 --- a/example/index.ts +++ b/example/index.ts @@ -8,6 +8,7 @@ /// import "reflect-metadata"; + import { Game } from "./Game"; (window).initGame = function() { diff --git a/example/mediators/MainMediator.ts b/example/mediators/MainMediator.ts index 4a70cfe9..5f2a9a07 100755 --- a/example/mediators/MainMediator.ts +++ b/example/mediators/MainMediator.ts @@ -7,10 +7,11 @@ import { injectable, inject } from "@robotlegsjs/core"; +import { SceneMediator } from "../../src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator"; + +import { MainEvent } from "../events/MainEvent"; import { GameModel } from "../models/GameModel"; import { Main } from "../scenes/Main"; -import { SceneMediator } from "../../src"; -import { MainEvent } from "../events/MainEven"; @injectable() export class MainMediator extends SceneMediator
{ diff --git a/example/scenes/BaseScene.ts b/example/scenes/BaseScene.ts index fc673922..9f5cca17 100755 --- a/example/scenes/BaseScene.ts +++ b/example/scenes/BaseScene.ts @@ -5,7 +5,13 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + export abstract class BaseScene extends Phaser.Scene { + constructor(scene: string) { + super({ key: scene }); + } + public init(): void { console.log(this + ": init"); } diff --git a/example/scenes/Boot.ts b/example/scenes/Boot.ts index a97ac5e8..ffdcd6c8 100755 --- a/example/scenes/Boot.ts +++ b/example/scenes/Boot.ts @@ -6,16 +6,19 @@ // ------------------------------------------------------------------------------ import { SceneKey } from "../constants/SceneKey"; + import { BaseScene } from "./BaseScene"; -import { Preload } from "./Preload"; export class Boot extends BaseScene { + constructor() { + super(SceneKey.BOOT); + } + public preload(): void {} public create(): void { super.create(); - (this as any).scene.add(SceneKey.PRELOAD, new Preload(SceneKey.PRELOAD)); - (window).game.scene.remove(this); - (window).game.scene.start(SceneKey.PRELOAD); + + this.scene.start(SceneKey.PRELOAD); } } diff --git a/example/scenes/Main.ts b/example/scenes/Main.ts index 04fbb302..f998fd3a 100755 --- a/example/scenes/Main.ts +++ b/example/scenes/Main.ts @@ -5,9 +5,15 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import { SceneKey } from "../constants/SceneKey"; + import { BaseScene } from "./BaseScene"; export class Main extends BaseScene { + constructor() { + super(SceneKey.MAIN); + } + public create(): void { super.create(); diff --git a/example/scenes/Preload.ts b/example/scenes/Preload.ts index c968cc60..ab8532f7 100755 --- a/example/scenes/Preload.ts +++ b/example/scenes/Preload.ts @@ -6,10 +6,14 @@ // ------------------------------------------------------------------------------ import { SceneKey } from "../constants/SceneKey"; + import { BaseScene } from "./BaseScene"; -import { Main } from "./Main"; export class Preload extends BaseScene { + constructor() { + super(SceneKey.PRELOAD); + } + public preload(): void { /* Preload required assets */ this.load.image("player", "assets/player.png"); @@ -23,8 +27,6 @@ export class Preload extends BaseScene { // NOTE: Change to GameTitle if required // this.game.state.start(StateKey.MAIN); - (this as any).scene.add(SceneKey.MAIN, new Main(SceneKey.MAIN)); - (window).game.scene.remove(this); - (window).game.scene.start(SceneKey.MAIN); + this.scene.start(SceneKey.MAIN); } } From 05652dbd467d5203c34838a64335dc549d57d148 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 16:28:39 +0200 Subject: [PATCH 17/27] add tsconfig and tslint files for example --- .gitignore | 1 + .npmignore | 3 +++ package.json | 7 +++++-- tsconfig.example.json | 10 ++++++++++ tslint.example.json | 11 +++++++++++ 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 tsconfig.example.json create mode 100644 tslint.example.json diff --git a/.gitignore b/.gitignore index 2940b2b8..b338a26a 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ typings/ dist dist-test lib +lib-example lib-test src/**/*.js src/**/*.js.map diff --git a/.npmignore b/.npmignore index 16a684cf..d0d89337 100644 --- a/.npmignore +++ b/.npmignore @@ -6,6 +6,7 @@ /dist-test /docs /example +/lib-example /lib-test /not-ported-extensions /src @@ -17,8 +18,10 @@ CONTRIBUTING.md ISSUE_TEMPLATE.md PULL_REQUEST_TEMPLATE.md karma.conf.js +tsconfig.example.json tsconfig.json tsconfig.test.json +tslint.example.json tslint.json tslint.test.json webpack.config.js diff --git a/package.json b/package.json index 5d11ec2d..28c79800 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,15 @@ "autoformat": "prettier --config .prettierrc --write {src,test,example}/**/*.ts", "tslint-check:src": "tslint-config-prettier-check ./tslint.json", "tslint-check:test": "tslint-config-prettier-check ./tslint.test.json", + "tslint-check:example": "tslint-config-prettier-check ./tslint.example.json", "tslint:src": "tslint --project tsconfig.json", "tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json", - "tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test", - "clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf dist && rimraf dist-test", + "tslint:example": "tslint --config tslint.example.json --project tsconfig.example.json", + "tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint-check:example && npm run tslint:src && npm run tslint:test && npm run tslint:example", + "clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf lib-example && rimraf dist && rimraf dist-test", "compile:src": "tsc -d --importHelpers", "compile:test": "tsc -p tsconfig.test.json -d --importHelpers", + "compile:example": "tsc -p tsconfig.example.json -d --importHelpers", "dev": "webpack", "build": "webpack --env.production", "prepare": "npm run clean-up && npm run compile:src", diff --git a/tsconfig.example.json b/tsconfig.example.json new file mode 100644 index 00000000..2fcf50cc --- /dev/null +++ b/tsconfig.example.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "lib-example" + }, + "include": [ + "./src/**/*.ts", + "./example/**/*.ts" + ] +} diff --git a/tslint.example.json b/tslint.example.json new file mode 100644 index 00000000..c3a5f133 --- /dev/null +++ b/tslint.example.json @@ -0,0 +1,11 @@ +{ + "extends": [ + "./tslint.json" + ], + "rules": { + "no-implicit-dependencies": [true, "dev"], + "no-reference": false, + "no-submodule-imports": false, + "object-literal-sort-keys": false + } +} From ee30409e07293a10a964ecb9f2cec145bd3c8c38 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 16:30:20 +0200 Subject: [PATCH 18/27] ignore static folder when publishing to npm --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index d0d89337..a736c58d 100644 --- a/.npmignore +++ b/.npmignore @@ -10,6 +10,7 @@ /lib-test /not-ported-extensions /src +/static /test /transpiled-code /typings From 303a081a8ac0640e13af2d6a3cfe3bc19b1e2908 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 16:55:25 +0200 Subject: [PATCH 19/27] update readme --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 56af639c..b19f0a25 100644 --- a/README.md +++ b/README.md @@ -27,18 +27,55 @@ Or using [Yarn](https://yarnpkg.com/en/): yarn add @robotlegsjs/phaser ``` +From version `0.2.0` of this package, the [Phaser](https://github.com/photonstorm/phaser) dependency was moved to **peerDependencies**, +allowing the final user to choose the desired version of the `phaser` library on each project. + +The `@robotlegsjs/phaser` package is compatible with versions between the `>=3.11.0 <4` version range of `phaser` library. + +As example, when you would like to use the version `3.11.0` of `phaser` library, you can run: + +```bash +npm install phaser@3.11.0 reflect-metadata --save-prod +``` + +or + +```bash +yarn add phaser@3.11.0 reflect-metadata +``` + +Then follow the [installation instructions](https://github.com/RobotlegsJS/RobotlegsJS/blob/master/README.md#installation) of **RobotlegsJS** library to complete the setup of your project. + +**Dependencies** + ++ [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS) ++ [tslib](https://github.com/Microsoft/tslib) + +**Peer Dependencies** + ++ [Phaser](https://github.com/photonstorm/phaser) ++ [reflect-metadata](https://github.com/rbuckton/reflect-metadata) + ## Usage ```ts -/// +/// + +import * as Phaser from "phaser"; import { Context, IContext, MVCSBundle } from "@robotlegsjs/core"; -import { ContextSceneManager } from "../src"; + +import { ContextSceneManager } from "../src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"; import { PhaserBundle } from "../src/robotlegs/bender/bundles/phaser/PhaserBundle"; -import "phaser"; + +import { GameConfig } from "./config/GameConfig"; import { SceneMediatorConfig } from "./config/SceneMediatorConfig"; + import { SceneKey } from "./constants/SceneKey"; -import { GameConfig } from "./config/GameConfig"; + +import { Boot } from "./scenes/Boot"; +import { Main } from "./scenes/Main"; +import { Preload } from "./scenes/Preload"; export class Game extends Phaser.Game { private _context: IContext; @@ -55,20 +92,38 @@ export class Game extends Phaser.Game { this._context = new Context(); this._context .install(MVCSBundle, PhaserBundle) - .configure(new ContextSceneManager((this as any).scene)) + .configure(new ContextSceneManager(this.scene)) .configure(SceneMediatorConfig) .configure(GameConfig) .initialize(); - this.scene.add(SceneKey.BOOT, new Boot(SceneKey.BOOT)); + + this.scene.add(SceneKey.BOOT, new Boot()); + this.scene.add(SceneKey.PRELOAD, new Preload()); + this.scene.add(SceneKey.MAIN, new Main()); + this.scene.start(SceneKey.BOOT); } } - -new Game(); ``` [See example](example) +## Running the example + +Run the following commands to run the example: + +```bash +npm install +npm start +``` + +or: + +```bash +yarn install +yarn start +``` + ## RobotlegsJS integration with Phaser CE (Community Edition) The `@robotlegsjs/phaser` package was updated to support [Phaser v3](https://www.npmjs.com/package/phaser) plugin. From 1900fc0b1074cf7dd097c429edb80780697efa77 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 16:55:34 +0200 Subject: [PATCH 20/27] add import statements for phaser --- .../contextSceneManager/api/IContextSceneManager.ts | 2 ++ .../contextSceneManager/impl/ContextSceneManager.ts | 5 ++++- .../bender/extensions/sceneManager/api/ISceneHandler.ts | 2 ++ .../bender/extensions/sceneManager/api/ISceneManager.ts | 3 +++ .../extensions/sceneManager/impl/ConfigureSceneEvent.ts | 2 ++ .../bender/extensions/sceneManager/impl/SceneManager.ts | 2 ++ .../extensions/sceneManager/impl/SceneManagerBinding.ts | 2 ++ .../extensions/sceneManager/impl/SceneManagerEvent.ts | 2 ++ .../extensions/sceneManager/impl/SceneManagerObserver.ts | 2 ++ .../bender/extensions/sceneManager/impl/SceneRegistry.ts | 2 ++ .../extensions/sceneManager/impl/SceneRegistryEvent.ts | 6 ++++-- .../extensions/sceneMediatorMap/api/ISceneMediatorMap.ts | 3 +++ .../extensions/sceneMediatorMap/impl/SceneMediator.ts | 2 ++ .../sceneMediatorMap/impl/SceneMediatorStateHandler.ts | 5 ++++- test/entry.ts | 4 +++- .../contextStateManagerExtension.test.ts | 1 + .../contextStateManager/impl/contextStateManager.test.ts | 1 + .../impl/contextStateManagerListenerConfig.test.ts | 1 + .../extensions/stateManager/support/CallbackSceneHandler.ts | 1 + 19 files changed, 43 insertions(+), 5 deletions(-) diff --git a/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts index f9ac4672..f179a7ea 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + export let IContextSceneManager = Symbol("IContextSceneManager"); export interface IContextSceneManager { sceneManager: Phaser.Scenes.SceneManager; diff --git a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts index 6a4d90cf..40b0da51 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts @@ -5,9 +5,12 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import { IContextSceneManager } from "../api/IContextSceneManager"; +import * as Phaser from "phaser"; + import { IConfig } from "@robotlegsjs/core"; +import { IContextSceneManager } from "../api/IContextSceneManager"; + /** * The Context SceneManager represents the Phaser.Scenes.SceneManager for a Context */ diff --git a/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts index 7fbf5b33..0a3748d8 100755 --- a/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { IClass } from "@robotlegsjs/core"; /** diff --git a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts index 366a9598..59405adc 100755 --- a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts @@ -5,7 +5,10 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { IEventDispatcher } from "@robotlegsjs/core"; + import { ISceneHandler } from "./ISceneHandler"; /** diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts index 4a3b3845..1011e041 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { Event } from "@robotlegsjs/core"; /** diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts index 4e0e6dfd..d8aab5bb 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { injectable, EventDispatcher } from "@robotlegsjs/core"; import { ISceneHandler } from "../api/ISceneHandler"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts index 6333cac9..16b4e038 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { IClass, EventDispatcher } from "@robotlegsjs/core"; import { ISceneHandler } from "../api/ISceneHandler"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts index 1631c71b..4bd1998e 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { Event } from "@robotlegsjs/core"; import { ISceneHandler } from "../api/ISceneHandler"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts index 40226e15..04250346 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { SceneManagerBinding } from "./SceneManagerBinding"; import { SceneRegistry } from "./SceneRegistry"; import { SceneRegistryEvent } from "./SceneRegistryEvent"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts index 02f42fc4..cc3e5dd8 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { EventDispatcher } from "@robotlegsjs/core"; import { SceneManagerBinding } from "./SceneManagerBinding"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts index e6453dc6..ed19dc8d 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts @@ -5,12 +5,14 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + +import { Event } from "@robotlegsjs/core"; + /** * SceneManager existence event * @private */ -import { Event } from "@robotlegsjs/core"; - export class SceneRegistryEvent extends Event { /*============================================================================*/ /* Public Static Properties */ diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts index d178cec7..25d367a9 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts @@ -5,7 +5,10 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { IClass, ITypeMatcher } from "@robotlegsjs/core"; + import { ISceneMediatorMapper } from "../dsl/ISceneMediatorMapper"; import { ISceneMediatorUnmapper } from "../dsl/ISceneMediatorUnmapper"; diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts index 752c5e6b..7a0c16ba 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts @@ -5,6 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + import { injectable, inject, IEventMap, IEventDispatcher, Event } from "@robotlegsjs/core"; import { ISceneMediator } from "../api/ISceneMediator"; diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts index b103c7ac..6da668f2 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts @@ -5,10 +5,13 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; + +import { IClass } from "@robotlegsjs/core"; + import { ISceneHandler } from "../../sceneManager/api/ISceneHandler"; import { ISceneMediatorMapping } from "../api/ISceneMediatorMapping"; import { SceneMediatorFactory } from "./SceneMediatorFactory"; -import { IClass } from "@robotlegsjs/core"; /** * @private diff --git a/test/entry.ts b/test/entry.ts index 045140d6..485d9d08 100755 --- a/test/entry.ts +++ b/test/entry.ts @@ -5,8 +5,10 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -/// /// + +/// + import "bluebird/js/browser/bluebird"; import "es6-map/implement"; import "es6-symbol/implement"; diff --git a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts index ecb321fd..0ee14480 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts @@ -5,6 +5,7 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; import { Context, IContext, LogLevel } from "@robotlegsjs/core"; import { assert } from "chai"; import { ContextSceneManager, ContextSceneManagerExtension, IContextSceneManager } from "../../../../../src"; diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts index 7e6c707c..e67b12d5 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts @@ -5,6 +5,7 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; import { assert } from "chai"; import { ContextSceneManager, IContextSceneManager } from "../../../../../../src"; import "../../../../../entry"; diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts index 9f92614c..c7a76b1e 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts @@ -5,6 +5,7 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; import { assert } from "chai"; import { ContextSceneManager, ContextSceneManagerListenerConfig, IContextSceneManager } from "../../../../../../src"; import { SceneManager } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManager"; diff --git a/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts b/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts index bfce3d1d..1afd1d52 100755 --- a/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts +++ b/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts @@ -5,6 +5,7 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import * as Phaser from "phaser"; import { IClass } from "@robotlegsjs/core"; import { ISceneHandler } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; From 11c072896250dcae0b2ab5c6eb34e44f448d974c Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 17:03:50 +0200 Subject: [PATCH 21/27] update changelog --- CHANGELOG.md | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c92ef453..a7104302 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,22 @@ # RobotlegsJS Phaser Changelog: -## RobotlegsJS Phaser 0.1.0 +## RobotlegsJS Phaser 0.2.0 -### v0.1.0 +### v0.2.0 -- Update @robotlegsjs/core to version 0.2.0 (see #51). +Major Breaking Changes: +--- -- Update phaser-ce to version 2.11.0 (see #46). +- Implement support for [phaser](https://github.com/photonstorm/phaser) plugin version 3. Suppor for [phaser-ce](https://github.com/photonstorm/phaser-ce) plugin was moved to [RobotlegsJS-Phaser-CE](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-CE) (see #52). -- Remove eventemitter3 dependency (see #45). +- Move `phaser` library to **peerDependencies**, allowing the final user to choose the desired version of the [phaser](https://github.com/photonstorm/phaser) library on each project (see #52). + +- Update `@robotlegsjs/core` to version `0.2.0` (see #51). + +- Remove `eventemitter3` dependency (see #45). + +Features Or Improvements: +--- - Add changelog (see #35). @@ -38,9 +46,9 @@ ### [v0.0.5](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.5) - 2017-09-26 -- Update @robotlegsjs/core to version 0.0.6 (see #9). +- Update `@robotlegsjs/core` to version `0.0.6` (see #9). -- Update phaser-ce to version 2.8.8 (see #10). +- Update `phaser-ce` to version `2.8.8` (see #10). - Adapt to NPM [v5.0.0](http://blog.npmjs.org/post/161081169345/v500) (see #7). @@ -48,9 +56,9 @@ ### [v0.0.4](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.4) - 2017-09-15 -- Update @robotlegsjs/core to version 0.0.5 (see #5). +- Update `@robotlegsjs/core` to version `0.0.5` (see #5). -- Update phaser-ce to version 2.8.7 (see #6). +- Update `phaser-ce` to version `2.8.7` (see #6). - Update TSLint rules (see #6). @@ -62,9 +70,9 @@ ### [v0.0.3](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.3) - 2017-08-30 -- Update @robotlegsjs/core to version 0.0.4 (see #4). +- Update `@robotlegsjs/core` to version `0.0.4` (see #4). -- Update phaser-ce to version 2.8.4. +- Update `phaser-ce` to version `2.8.4`. - Enable GreenKeeper. @@ -72,7 +80,7 @@ ### [v0.0.2](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.2) - 2017-08-12 -- Update @robotlegsjs/core to version 0.0.3. +- Update `@robotlegsjs/core` to version `0.0.3`. - Update contributing guidelines. From 20024aec6db364587ba31a404a8ad7c5dcd8542a Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Mon, 6 Aug 2018 17:26:04 +0200 Subject: [PATCH 22/27] fix(package): update webpack to version 4.16.5 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 28c79800..038458d8 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "tslint": "^5.11.0", "tslint-config-prettier": "^1.14.0", "typescript": "^3.0.1", - "webpack": "^4.16.4", + "webpack": "^4.16.5", "webpack-cli": "^3.1.0", "webpack-concat-plugin": "^3.0.0", "webpack-dev-server": "^3.1.5" diff --git a/yarn.lock b/yarn.lock index a18ac493..5e49cc91 100644 --- a/yarn.lock +++ b/yarn.lock @@ -530,8 +530,8 @@ aws-sign2@~0.7.0: resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" aws4@^1.2.1, aws4@^1.6.0: - version "1.7.0" - resolved "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" + version "1.8.0" + resolved "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" axios@^0.15.3: version "0.15.3" @@ -7144,7 +7144,7 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@^4.16.4: +webpack@^4.16.5: version "4.16.5" resolved "https://registry.npmjs.org/webpack/-/webpack-4.16.5.tgz#29fb39462823d7eb8aefcab8b45f7f241db0d092" dependencies: From 89291806b94bcad27550c8c8afa2321ace1186cf Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Tue, 7 Aug 2018 10:35:34 +0200 Subject: [PATCH 23/27] remove phaser import statements --- .../extensions/contextSceneManager/api/IContextSceneManager.ts | 2 -- .../extensions/contextSceneManager/impl/ContextSceneManager.ts | 2 -- .../bender/extensions/sceneManager/api/ISceneHandler.ts | 2 -- .../bender/extensions/sceneManager/api/ISceneManager.ts | 2 -- .../bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts | 2 -- .../bender/extensions/sceneManager/impl/SceneManager.ts | 2 -- .../bender/extensions/sceneManager/impl/SceneManagerBinding.ts | 2 -- .../bender/extensions/sceneManager/impl/SceneManagerEvent.ts | 2 -- .../bender/extensions/sceneManager/impl/SceneManagerObserver.ts | 2 -- .../bender/extensions/sceneManager/impl/SceneRegistry.ts | 2 -- .../bender/extensions/sceneManager/impl/SceneRegistryEvent.ts | 2 -- .../bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts | 2 -- .../bender/extensions/sceneMediatorMap/impl/SceneMediator.ts | 2 -- .../sceneMediatorMap/impl/SceneMediatorStateHandler.ts | 2 -- 14 files changed, 28 deletions(-) diff --git a/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts index f179a7ea..f9ac4672 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - export let IContextSceneManager = Symbol("IContextSceneManager"); export interface IContextSceneManager { sceneManager: Phaser.Scenes.SceneManager; diff --git a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts index 40b0da51..8e8d07e8 100755 --- a/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts +++ b/src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { IConfig } from "@robotlegsjs/core"; import { IContextSceneManager } from "../api/IContextSceneManager"; diff --git a/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts index 0a3748d8..7fbf5b33 100755 --- a/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { IClass } from "@robotlegsjs/core"; /** diff --git a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts index 59405adc..876f3e4c 100755 --- a/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts +++ b/src/robotlegs/bender/extensions/sceneManager/api/ISceneManager.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { IEventDispatcher } from "@robotlegsjs/core"; import { ISceneHandler } from "./ISceneHandler"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts index 1011e041..4a3b3845 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { Event } from "@robotlegsjs/core"; /** diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts index d8aab5bb..4e0e6dfd 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManager.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { injectable, EventDispatcher } from "@robotlegsjs/core"; import { ISceneHandler } from "../api/ISceneHandler"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts index 16b4e038..6333cac9 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBinding.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { IClass, EventDispatcher } from "@robotlegsjs/core"; import { ISceneHandler } from "../api/ISceneHandler"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts index 4bd1998e..1631c71b 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { Event } from "@robotlegsjs/core"; import { ISceneHandler } from "../api/ISceneHandler"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts index 04250346..40226e15 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerObserver.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { SceneManagerBinding } from "./SceneManagerBinding"; import { SceneRegistry } from "./SceneRegistry"; import { SceneRegistryEvent } from "./SceneRegistryEvent"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts index cc3e5dd8..02f42fc4 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { EventDispatcher } from "@robotlegsjs/core"; import { SceneManagerBinding } from "./SceneManagerBinding"; diff --git a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts index ed19dc8d..129568fc 100755 --- a/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts +++ b/src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistryEvent.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { Event } from "@robotlegsjs/core"; /** diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts index 25d367a9..28d7704d 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/api/ISceneMediatorMap.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { IClass, ITypeMatcher } from "@robotlegsjs/core"; import { ISceneMediatorMapper } from "../dsl/ISceneMediatorMapper"; diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts index 7a0c16ba..752c5e6b 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediator.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { injectable, inject, IEventMap, IEventDispatcher, Event } from "@robotlegsjs/core"; import { ISceneMediator } from "../api/ISceneMediator"; diff --git a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts index 6da668f2..221df4fa 100755 --- a/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts +++ b/src/robotlegs/bender/extensions/sceneMediatorMap/impl/SceneMediatorStateHandler.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { IClass } from "@robotlegsjs/core"; import { ISceneHandler } from "../../sceneManager/api/ISceneHandler"; From 15c2750e9fed78eed3dcd5e2f386770dc87a17ac Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Tue, 7 Aug 2018 10:35:52 +0200 Subject: [PATCH 24/27] rearrange import statements --- .../bender/bundles/phaser/phaserBundle.test.ts | 2 ++ .../contextStateManagerExtension.test.ts | 13 +++++++++---- .../impl/contextStateManager.test.ts | 8 +++++--- .../impl/contextStateManagerListenerConfig.test.ts | 10 +++++++--- .../support/CallbackLogTarget.ts | 1 + .../stateManager/impl/configureStateEvent.test.ts | 4 +++- .../stateManager/impl/stateBindingEvent.test.ts | 4 +++- .../stateManager/impl/stateManagerEvent.test.ts | 5 ++++- .../stateManager/support/CallbackSceneHandler.ts | 2 +- 9 files changed, 35 insertions(+), 14 deletions(-) diff --git a/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts b/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts index 0887b1d8..32be3c4b 100755 --- a/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts +++ b/test/robotlegs/bender/bundles/phaser/phaserBundle.test.ts @@ -6,7 +6,9 @@ // ------------------------------------------------------------------------------ import "../../../../entry"; + import { Context, IContext } from "@robotlegsjs/core"; + import { assert } from "chai"; describe("PhaserBundle", () => { diff --git a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts index 0ee14480..88a8c0c3 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/contextStateManagerExtension.test.ts @@ -5,11 +5,16 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; -import { Context, IContext, LogLevel } from "@robotlegsjs/core"; -import { assert } from "chai"; -import { ContextSceneManager, ContextSceneManagerExtension, IContextSceneManager } from "../../../../../src"; import "../../../../entry"; + +import { assert } from "chai"; + +import { Context, IContext, LogLevel } from "@robotlegsjs/core"; + +import { IContextSceneManager } from "../../../../../src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager"; +import { ContextSceneManager } from "../../../../../src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"; +import { ContextSceneManagerExtension } from "../../../../../src/robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension"; + import { CallbackLogTarget } from "./support/CallbackLogTarget"; import { LogParams } from "./support/LogParams"; diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts index e67b12d5..fb8491d9 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManager.test.ts @@ -5,11 +5,13 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; -import { assert } from "chai"; -import { ContextSceneManager, IContextSceneManager } from "../../../../../../src"; import "../../../../../entry"; +import { assert } from "chai"; + +import { IContextSceneManager } from "../../../../../../src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager"; +import { ContextSceneManager } from "../../../../../../src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"; + describe("ContextSceneManager", () => { let game: Phaser.Game; let contextSceneManager: IContextSceneManager; diff --git a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts index c7a76b1e..27c7da07 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/impl/contextStateManagerListenerConfig.test.ts @@ -5,12 +5,16 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; +import "../../../../../entry"; + import { assert } from "chai"; -import { ContextSceneManager, ContextSceneManagerListenerConfig, IContextSceneManager } from "../../../../../../src"; + +import { IContextSceneManager } from "../../../../../../src/robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager"; +import { ContextSceneManager } from "../../../../../../src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"; +import { ContextSceneManagerListenerConfig } from "../../../../../../src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig"; + import { SceneManager } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManager"; import { SceneRegistry } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneRegistry"; -import "../../../../../entry"; describe("ContextSceneManagerListenerConfig", () => { let game: Phaser.Game; diff --git a/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts b/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts index 83c81c85..fb3f6749 100755 --- a/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts +++ b/test/robotlegs/bender/extensions/contextStateManager/support/CallbackLogTarget.ts @@ -6,6 +6,7 @@ // ------------------------------------------------------------------------------ import { ILogTarget } from "@robotlegsjs/core"; + import { LogParams } from "./LogParams"; export class CallbackLogTarget implements ILogTarget { diff --git a/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts index 77a85b0a..2d499a54 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/configureStateEvent.test.ts @@ -5,9 +5,11 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import "../../../../../entry"; + import { assert } from "chai"; + import { ConfigureSceneEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/ConfigureSceneEvent"; -import "../../../../../entry"; describe("ConfigureSceneEvent", () => { let scene: Phaser.Scene = null; diff --git a/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts index 25cedd19..bb301027 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/stateBindingEvent.test.ts @@ -5,9 +5,11 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import "../../../../../entry"; + import { assert } from "chai"; + import { SceneManagerBindingEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerBindingEvent"; -import "../../../../../entry"; describe("SceneBindingEvent", () => { let event: SceneManagerBindingEvent = null; diff --git a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts b/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts index 5916eb82..b0da43f6 100755 --- a/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts +++ b/test/robotlegs/bender/extensions/stateManager/impl/stateManagerEvent.test.ts @@ -5,10 +5,13 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ +import "../../../../../entry"; + import { assert } from "chai"; + import { ISceneHandler } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; import { SceneManagerEvent } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/impl/SceneManagerEvent"; -import "../../../../../entry"; + import { CallbackSceneHandler } from "../support/CallbackSceneHandler"; describe("SceneManagerEvent", () => { diff --git a/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts b/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts index 1afd1d52..2eba344f 100755 --- a/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts +++ b/test/robotlegs/bender/extensions/stateManager/support/CallbackSceneHandler.ts @@ -5,8 +5,8 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; import { IClass } from "@robotlegsjs/core"; + import { ISceneHandler } from "../../../../../../src/robotlegs/bender/extensions/sceneManager/api/ISceneHandler"; /** From c3b377b3f1f7790fdfc96deaacccca54bb813dab Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Tue, 7 Aug 2018 10:55:26 +0200 Subject: [PATCH 25/27] remove phaser import statements --- example/Game.ts | 2 -- example/scenes/BaseScene.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/example/Game.ts b/example/Game.ts index 4cfcacc0..3c724ada 100755 --- a/example/Game.ts +++ b/example/Game.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - import { Context, IContext, MVCSBundle } from "@robotlegsjs/core"; import { ContextSceneManager } from "../src/robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"; diff --git a/example/scenes/BaseScene.ts b/example/scenes/BaseScene.ts index 9f5cca17..36efdf28 100755 --- a/example/scenes/BaseScene.ts +++ b/example/scenes/BaseScene.ts @@ -5,8 +5,6 @@ // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ -import * as Phaser from "phaser"; - export abstract class BaseScene extends Phaser.Scene { constructor(scene: string) { super({ key: scene }); From 98c6cdee3b3160f7149aec228efb407a35809fd7 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Tue, 7 Aug 2018 10:56:04 +0200 Subject: [PATCH 26/27] import phaser library into index.html --- static/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/static/index.html b/static/index.html index b68073d0..b046e3b9 100644 --- a/static/index.html +++ b/static/index.html @@ -19,6 +19,7 @@ } + From a0ca7101afd56acd68863f30d2c01142156072f7 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Tue, 7 Aug 2018 11:03:16 +0200 Subject: [PATCH 27/27] chore(package): update lockfile --- yarn.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5e49cc91..15a67863 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4936,10 +4936,10 @@ optionator@^0.8.1: wordwrap "~1.0.0" original@>=0.0.5: - version "1.0.1" - resolved "https://registry.npmjs.org/original/-/original-1.0.1.tgz#b0a53ff42ba997a8c9cd1fb5daaeb42b9d693190" + version "1.0.2" + resolved "https://registry.npmjs.org/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" dependencies: - url-parse "~1.4.0" + url-parse "^1.4.3" os-browserify@^0.3.0: version "0.3.0" @@ -5268,8 +5268,8 @@ pop-iterate@^1.0.1: resolved "https://registry.npmjs.org/pop-iterate/-/pop-iterate-1.0.1.tgz#ceacfdab4abf353d7a0f2aaa2c1fc7b3f9413ba3" portfinder@^1.0.9: - version "1.0.13" - resolved "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" + version "1.0.15" + resolved "https://registry.npmjs.org/portfinder/-/portfinder-1.0.15.tgz#28990f8a1d2794a5709010b25d9f6d90fcc2fa14" dependencies: async "^1.5.2" debug "^2.2.0" @@ -5923,8 +5923,8 @@ schema-utils@^0.3.0: ajv "^5.0.0" schema-utils@^0.4.4, schema-utils@^0.4.5: - version "0.4.5" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" + version "0.4.6" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.6.tgz#dab4516a656310a964ca772bd3771819ba2b5cec" dependencies: ajv "^6.1.0" ajv-keywords "^3.1.0" @@ -6918,7 +6918,7 @@ url-parse-lax@^1.0.0: dependencies: prepend-http "^1.0.1" -url-parse@^1.1.8, url-parse@~1.4.0: +url-parse@^1.1.8, url-parse@^1.4.3: version "1.4.3" resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz#bfaee455c889023219d757e045fa6a684ec36c15" dependencies: @@ -6987,8 +6987,8 @@ uws@~9.14.0: resolved "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz#fac8386befc33a7a3705cbd58dc47b430ca4dd95" v8-compile-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz#526492e35fc616864284700b7043e01baee09f0a" + version "2.0.2" + resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c" validate-npm-package-license@^3.0.1: version "3.0.4"