@robotlegsjs/phaser
Advanced tools
Comparing version 3.0.0 to 4.0.0
302
CHANGELOG.md
@@ -1,289 +0,31 @@ | ||
# RobotlegsJS Phaser Changelog | ||
# Change Log - @robotlegsjs/phaser | ||
All notable changes to this project will be documented in this file. | ||
This log was last generated on Thu, 10 Jun 2021 22:11:54 GMT and should not be manually modified. | ||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
## 4.0.0 | ||
Thu, 10 Jun 2021 22:11:54 GMT | ||
## Suggestions or improvements for further versions | ||
### Breaking changes | ||
- [ ] Improve how mediators for `Phaser.Scene` and `Phaser.GameObjects.Container` are handled: | ||
- Update [@robotlegsjs/core](https://www.npmjs.com/package/@robotlegsjs/core) to version **3.0.0** (see [15](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/15)) | ||
- Update [inversify](https://www.npmjs.com/package/inversify) to version **5.1.1** (see [8](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/8)) | ||
- Update [tslib](https://www.npmjs.com/package/tslib) to version **2.2.0** and [typescript](https://www.npmjs.com/package/typescript) to version **4.2.4** (see [3](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/3)) | ||
- [ ] Improve how `SceneMediators` are created and destroyed based on how `Phaser.Scenes.SceneManager` is handling scenes. | ||
### Minor changes | ||
- [ ] Improve how `ViewMediators` are created and destroyed based on how `Phaser.Scene` and `Phaser.GameObjects.Container` are handled. | ||
- Update readmes and contributing guidelines, remove outdated references, fix broken links and update publish scripts (see [13](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/13)) | ||
- Setup `.github` community profile files for the **monorepo** structure and remove local `packages/**/.github` folders (see [9](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/9)) | ||
- Migrate from **TSLint** to **ESLint** version **7.28.0** (see [6](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/6)) | ||
- Use the **RobotlegsJS-Framework** name for the monorepo approach. (see [11](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/11)) | ||
- Setup [rush](https://rushjs.io/) to be used as monorepo manager (see [1](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/1)) | ||
- For the changelog of older versions, check the following [changelog](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/tree/master/CHANGELOG.md) | ||
- Enable **rush-prettier** git hook based on [Enabling Prettier](https://rushjs.io/pages/maintainer/enabling_prettier/) (see [5](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/5)) | ||
- Setup continuous integration (CI) workflow using [GitHub Actions](https://docs.github.com/en/actions) (see [12](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/12)) | ||
- [ ] Use [**Function Types**](https://www.typescriptlang.org/docs/handbook/functions.html) for handlers and callbacks instead of generic **Function** type. | ||
### Patches | ||
- [ ] Evaluate if **IMediator** interface should be mandatory. | ||
- Update [karma](https://www.npmjs.com/package/karma) to version **6.3.2** and [webpack](https://www.npmjs.com/package/webpack) to version **5.38.1** (see [2](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/2)) | ||
- Update [mocha](https://www.npmjs.com/package/mocha) to version **9.0.0** and [webpack-cli](https://www.npmjs.com/package/webpack-cli) to version **4.7.2** (see [10](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/10)) | ||
- Update [prettier](https://www.npmjs.com/package/prettier) to version **2.3.0**, move configuration files to the root of mono repo structure and apply prettier changes (see [4](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/4)) | ||
- Update [prettier](https://www.npmjs.com/package/prettier) to version **2.3.1**, update prettier badge and add project-specific files to global `.gitignore` and `.prettierignore` files (see [7](https://github.com/RobotlegsJS/RobotlegsJS-Framework/pull/7)) | ||
- [ ] Improve Code Coverage to reach 100%. | ||
- [ ] Migrate [original documentation](https://github.com/robotlegs/robotlegs-framework/blob/master/src/readme.md) and adapt it to TypeScript and Phaser. | ||
## [Unreleased] | ||
<!-- | ||
Types of changes: | ||
#### Added | ||
- for new features. | ||
#### Changed | ||
- for changes in existing functionality. | ||
#### Deprecated | ||
- for soon-to-be removed features. | ||
#### Removed | ||
- for now removed features. | ||
#### Fixed | ||
- for any bug fixes. | ||
#### Security | ||
- in case of vulnerabilities. | ||
--> | ||
## RobotlegsJS Phaser 3.0.0 | ||
### [v3.0.0](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/3.0.0) - 2020-03-14 | ||
#### Breaking Change | ||
- Update `phaser` to version `3.22.0` (see #112). | ||
- `@robotlegsjs/eventemitter3` package is not necessary anymore, you should remove this dependency from your `package.json` and use the extension `LocalEventEmitterMap` from `@robotlegsjs/phaser` package. | ||
- `eventemitter3` package is not necessary anymore, you should remove this dependency from your `package.json` and use the definitions from `Phaser.Events.EventEmitter` package instead. Notice that the type of your listeners must change from `EventEmitter.ListenerFn` to `Function`. | ||
- For compatibility with previous versions of `phaser`, use `@robotlegsjs/phaser` version 2. | ||
- Update [`@robotlegsjs/core`](https://github.com/RobotlegsJS/RobotlegsJS) to version `^2.0.0` (see #111 and #118). | ||
- Migrate array notation from `Array<SomeType>` to `SomeType[]`. | ||
- The rest of the `Public API` remains unchanged. | ||
#### Added | ||
- Add **Tidelift** as funding option (see #113). | ||
- Add **Enterprise Support** information (see #114). | ||
- Deploy example project (see #67). | ||
#### Changed | ||
- Update `tslib` to version `1.11.1` (see #116). | ||
- Update dev dependencies to latest version. | ||
#### Security | ||
- Migrate to [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) to solve security vulnerability (see #111). | ||
## RobotlegsJS Phaser 2.0.0 | ||
### [v2.0.0](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/2.0.0) - 2019-10-31 | ||
#### Breaking Change | ||
- Update `phaser` to version `3.20.1` (see #104). | ||
- `definitions` folder removed, since `phaser` package is now providing native type definitions. | ||
- Use the type definitions from `/node_modules/phaser/types/phaser.d.ts`. | ||
- Remember to add `"scripthost"` to `lib` array in `compilerOptions` on your `tsconfig.json` file. | ||
- Minimum version supported is `3.17.0`. Previous versions doens't have the `phaser/types` folder. | ||
#### Changed | ||
- Update `@robotlegsjs/core` to version `1.0.3` (see #105). | ||
- Update `@robotlegsjs/eventemitter3` to version `1.0.2` (see #107). | ||
- Improve `prettier` rules and `autoformat` script (see #85). | ||
- Enable `"editor.formatOnSave"` rule for `VS Code` (see #85). | ||
- Migrate project to `travis-ci.com`. | ||
- Update `codebeat` Project UUID. | ||
- Update dev dependencies to latest version. | ||
## RobotlegsJS Phaser 1.0.0 | ||
### [v1.0.1](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/1.0.1) - 2018-12-25 | ||
#### Changed | ||
- Add mediator when scene has been started after stop/shutdown (see #79). | ||
- Update dev dependencies to latest version. | ||
### [v1.0.0](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/1.0.0) - 2018-11-26 | ||
#### Changed | ||
- Update `@robotlegsjs/core` to version `1.0.0` (see #74). | ||
- Update `@robotlegsjs/eventemitter3` to version `1.0.0` (see #75). | ||
- Update `phaser` to version `3.15.1` (see #68). | ||
- Migrate to Headless Chrome and improve performance of Karma (see #69). | ||
- Prepare package for stable version (see #70). | ||
- Improve webpack configuration used to run example project. The `npm start` script will generate hashed files (to avoid browser cache) and open the broswer automatically (see #71). | ||
- Update GitHub Templates (see #73). | ||
- Update dev dependencies to latest version. | ||
## RobotlegsJS Phaser 0.4.0 | ||
### [v0.4.0](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.4.0) - 2018-09-14 | ||
#### Changed | ||
- Enable view listeners on `SceneMediator` and `ViewMediator` classes (see #56 and #59). | ||
- Methods `addViewListener` and `removeViewListener` were removed from scene and view mediators. | ||
- Added `on`, `once` and `off` methods to the scene and view mediators allowing the mediators to handle events dispatched by `EventEmitter` views. | ||
- Signature `addContextListener` and `removeContextListener` changed in order to fully support the `IEventDispatcher` interface. | ||
- New methods `addDomListener` and `removeDomListener` were added to add support to `DOM` events dispatched by an `EventTarget`. | ||
- Update dev dependencies to latest version. | ||
## RobotlegsJS Phaser 0.3.0 | ||
### [v0.3.0](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.3.0) - 2018-09-10 | ||
#### Changed | ||
- Add support for `Phaser.GameObject.Container`, allowing the creation of mediators for `Phaser.Scene` and `Phaser.GameObjects.Container` (see #54 and #55). | ||
- Package `sceneMediatorMap` renamed to `mediatorMap` | ||
- Interface `ISceneMediator` renamed to `IMediator` | ||
- Interface `ISceneMediatorMapping` renamed to `IMediatorMapping` | ||
- Interface `ISceneMediatorConfigurator` renamed to `IMediatorConfigurator` | ||
- Interface `ISceneMediatorMapper` renamed to `IMediatorMapper` | ||
- Interface `ISceneMediatorUnmapper` renamed to `IMediatorUnmapper` | ||
- Class `NullSceneMediatorUnmapper` renamed to `NullMediatorUnmapper` | ||
- Class `SceneMediatorMapper` renamed to `MediatorMapper` | ||
- Class `SceneMediatorMapping` renamed to `MediatorMapping` | ||
- Class `SceneMediatorStateHandler` renamed to `SceneMediatorHandler` | ||
- Package `sceneManager` renamed to `viewManager` | ||
- Update `karma` setup to generate code coverage report only for `src` folder (see #53). | ||
- Update dev dependencies to latest version. | ||
## RobotlegsJS Phaser 0.2.0 | ||
### [v0.2.0](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.2.0) - 2018-08-07 | ||
#### Added | ||
- Add changelog (see #35). | ||
- Add code of conduct (see #36). | ||
- Add issue template (see #38). | ||
- Add pull request template (see #39). | ||
#### Changed | ||
- 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). | ||
- 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). | ||
- Update codeclimate settings (see #40). | ||
- Update Prettier rules (see #41). | ||
- Use `rimraf` instead of `rm -rf` (see #42). | ||
- Update TypeScript Compiler Options (see #43, #49). | ||
- Use [tslib](https://github.com/Microsoft/tslib) library to avoid duplicated declarations (see #49). | ||
- Enforce TSLint rules (see #44). | ||
- Adopts year-agnostic copyright message (see #47). | ||
- Update dev dependencies to latest version. | ||
#### Removed | ||
- Remove `eventemitter3` dependency (see #45). | ||
## RobotlegsJS Phaser 0.0.1 | ||
### [v0.0.5](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.5) - 2017-09-26 | ||
#### Changed | ||
- Update `@robotlegsjs/core` to version `0.0.6` (see #9). | ||
- 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). | ||
- Update dev dependencies to latest version. | ||
### [v0.0.4](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.4) - 2017-09-15 | ||
#### Added | ||
- Add support to [Prettier](https://prettier.io) code formatter (see #6). | ||
- Add integration with [CodeBeat](https://codebeat.co) (see #6). | ||
#### Changed | ||
- Update `@robotlegsjs/core` to version `0.0.5` (see #5). | ||
- Update `phaser-ce` to version `2.8.7` (see #6). | ||
- Update TSLint rules (see #6). | ||
- Update dev dependencies to latest version. | ||
### [v0.0.3](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.3) - 2017-08-30 | ||
#### Changed | ||
- Update `@robotlegsjs/core` to version `0.0.4` (see #4). | ||
- Update `phaser-ce` to version `2.8.4`. | ||
- Enable GreenKeeper. | ||
- Update dev dependencies to latest version. | ||
### [v0.0.2](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.2) - 2017-08-12 | ||
#### Changed | ||
- Update `@robotlegsjs/core` to version `0.0.3`. | ||
- Update contributing guidelines. | ||
- Update dev dependencies to latest version. | ||
### [v0.0.1](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/releases/tag/0.0.1) - 2017-08-06 | ||
- The version **0.0.1** integrated version **2.8.3** of [**phaser-ce**](https://www.npmjs.com/package/phaser-ce) package. |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PhaserBundle = exports.LocalEventEmitterMapExtension = exports.EventEmitterMapConfig = exports.EventEmitterMap = exports.IEventEmitterMap = exports.SceneManagerObserverExtension = exports.SceneManagerExtension = exports.SceneRegistryEvent = exports.SceneRegistry = exports.SceneManagerObserver = exports.SceneManagerEvent = exports.SceneManagerBindingEvent = exports.SceneManagerBinding = exports.SceneManager = exports.ConfigureViewEvent = exports.ConfigureSceneEvent = exports.ISceneManager = exports.ViewMediatorMapExtension = exports.SceneMediatorMapExtension = exports.ViewMediatorMap = exports.ViewMediatorManager = exports.ViewMediatorHandler = exports.ViewMediatorFactory = exports.ViewMediator = exports.SceneMediatorMap = exports.SceneMediatorManager = exports.SceneMediatorHandler = exports.SceneMediatorFactory = exports.SceneMediator = exports.NullMediatorUnmapper = exports.MediatorMapping = exports.MediatorMapper = exports.AbstractMediatorHandler = exports.AbstractMediatorFactory = exports.AbstractMediator = exports.IViewMediatorMap = exports.ISceneMediatorMap = exports.IMediatorManager = exports.ContextSceneManagerExtension = exports.ContextSceneManagerListenerConfig = exports.ContextSceneManager = exports.IContextSceneManager = void 0; | ||
/** | ||
@@ -14,75 +15,75 @@ * ContextSceneManager extension | ||
var IContextSceneManager_1 = require("./robotlegs/bender/extensions/contextSceneManager/api/IContextSceneManager"); | ||
exports.IContextSceneManager = IContextSceneManager_1.IContextSceneManager; | ||
Object.defineProperty(exports, "IContextSceneManager", { enumerable: true, get: function () { return IContextSceneManager_1.IContextSceneManager; } }); | ||
var ContextSceneManager_1 = require("./robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManager"); | ||
exports.ContextSceneManager = ContextSceneManager_1.ContextSceneManager; | ||
Object.defineProperty(exports, "ContextSceneManager", { enumerable: true, get: function () { return ContextSceneManager_1.ContextSceneManager; } }); | ||
var ContextSceneManagerListenerConfig_1 = require("./robotlegs/bender/extensions/contextSceneManager/impl/ContextSceneManagerListenerConfig"); | ||
exports.ContextSceneManagerListenerConfig = ContextSceneManagerListenerConfig_1.ContextSceneManagerListenerConfig; | ||
Object.defineProperty(exports, "ContextSceneManagerListenerConfig", { enumerable: true, get: function () { return ContextSceneManagerListenerConfig_1.ContextSceneManagerListenerConfig; } }); | ||
var ContextSceneManagerExtension_1 = require("./robotlegs/bender/extensions/contextSceneManager/ContextSceneManagerExtension"); | ||
exports.ContextSceneManagerExtension = ContextSceneManagerExtension_1.ContextSceneManagerExtension; | ||
Object.defineProperty(exports, "ContextSceneManagerExtension", { enumerable: true, get: function () { return ContextSceneManagerExtension_1.ContextSceneManagerExtension; } }); | ||
var IMediatorManager_1 = require("./robotlegs/bender/extensions/mediatorMap/api/IMediatorManager"); | ||
exports.IMediatorManager = IMediatorManager_1.IMediatorManager; | ||
Object.defineProperty(exports, "IMediatorManager", { enumerable: true, get: function () { return IMediatorManager_1.IMediatorManager; } }); | ||
var ISceneMediatorMap_1 = require("./robotlegs/bender/extensions/mediatorMap/api/ISceneMediatorMap"); | ||
exports.ISceneMediatorMap = ISceneMediatorMap_1.ISceneMediatorMap; | ||
Object.defineProperty(exports, "ISceneMediatorMap", { enumerable: true, get: function () { return ISceneMediatorMap_1.ISceneMediatorMap; } }); | ||
var IViewMediatorMap_1 = require("./robotlegs/bender/extensions/mediatorMap/api/IViewMediatorMap"); | ||
exports.IViewMediatorMap = IViewMediatorMap_1.IViewMediatorMap; | ||
Object.defineProperty(exports, "IViewMediatorMap", { enumerable: true, get: function () { return IViewMediatorMap_1.IViewMediatorMap; } }); | ||
var AbstractMediator_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/AbstractMediator"); | ||
exports.AbstractMediator = AbstractMediator_1.AbstractMediator; | ||
Object.defineProperty(exports, "AbstractMediator", { enumerable: true, get: function () { return AbstractMediator_1.AbstractMediator; } }); | ||
var AbstractMediatorFactory_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/AbstractMediatorFactory"); | ||
exports.AbstractMediatorFactory = AbstractMediatorFactory_1.AbstractMediatorFactory; | ||
Object.defineProperty(exports, "AbstractMediatorFactory", { enumerable: true, get: function () { return AbstractMediatorFactory_1.AbstractMediatorFactory; } }); | ||
var AbstractMediatorHandler_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/AbstractMediatorHandler"); | ||
exports.AbstractMediatorHandler = AbstractMediatorHandler_1.AbstractMediatorHandler; | ||
Object.defineProperty(exports, "AbstractMediatorHandler", { enumerable: true, get: function () { return AbstractMediatorHandler_1.AbstractMediatorHandler; } }); | ||
var MediatorMapper_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/MediatorMapper"); | ||
exports.MediatorMapper = MediatorMapper_1.MediatorMapper; | ||
Object.defineProperty(exports, "MediatorMapper", { enumerable: true, get: function () { return MediatorMapper_1.MediatorMapper; } }); | ||
var MediatorMapping_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/MediatorMapping"); | ||
exports.MediatorMapping = MediatorMapping_1.MediatorMapping; | ||
Object.defineProperty(exports, "MediatorMapping", { enumerable: true, get: function () { return MediatorMapping_1.MediatorMapping; } }); | ||
var NullMediatorUnmapper_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/NullMediatorUnmapper"); | ||
exports.NullMediatorUnmapper = NullMediatorUnmapper_1.NullMediatorUnmapper; | ||
Object.defineProperty(exports, "NullMediatorUnmapper", { enumerable: true, get: function () { return NullMediatorUnmapper_1.NullMediatorUnmapper; } }); | ||
var SceneMediator_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/SceneMediator"); | ||
exports.SceneMediator = SceneMediator_1.SceneMediator; | ||
Object.defineProperty(exports, "SceneMediator", { enumerable: true, get: function () { return SceneMediator_1.SceneMediator; } }); | ||
var SceneMediatorFactory_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/SceneMediatorFactory"); | ||
exports.SceneMediatorFactory = SceneMediatorFactory_1.SceneMediatorFactory; | ||
Object.defineProperty(exports, "SceneMediatorFactory", { enumerable: true, get: function () { return SceneMediatorFactory_1.SceneMediatorFactory; } }); | ||
var SceneMediatorHandler_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/SceneMediatorHandler"); | ||
exports.SceneMediatorHandler = SceneMediatorHandler_1.SceneMediatorHandler; | ||
Object.defineProperty(exports, "SceneMediatorHandler", { enumerable: true, get: function () { return SceneMediatorHandler_1.SceneMediatorHandler; } }); | ||
var SceneMediatorManager_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/SceneMediatorManager"); | ||
exports.SceneMediatorManager = SceneMediatorManager_1.SceneMediatorManager; | ||
Object.defineProperty(exports, "SceneMediatorManager", { enumerable: true, get: function () { return SceneMediatorManager_1.SceneMediatorManager; } }); | ||
var SceneMediatorMap_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/SceneMediatorMap"); | ||
exports.SceneMediatorMap = SceneMediatorMap_1.SceneMediatorMap; | ||
Object.defineProperty(exports, "SceneMediatorMap", { enumerable: true, get: function () { return SceneMediatorMap_1.SceneMediatorMap; } }); | ||
var ViewMediator_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/ViewMediator"); | ||
exports.ViewMediator = ViewMediator_1.ViewMediator; | ||
Object.defineProperty(exports, "ViewMediator", { enumerable: true, get: function () { return ViewMediator_1.ViewMediator; } }); | ||
var ViewMediatorFactory_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/ViewMediatorFactory"); | ||
exports.ViewMediatorFactory = ViewMediatorFactory_1.ViewMediatorFactory; | ||
Object.defineProperty(exports, "ViewMediatorFactory", { enumerable: true, get: function () { return ViewMediatorFactory_1.ViewMediatorFactory; } }); | ||
var ViewMediatorHandler_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/ViewMediatorHandler"); | ||
exports.ViewMediatorHandler = ViewMediatorHandler_1.ViewMediatorHandler; | ||
Object.defineProperty(exports, "ViewMediatorHandler", { enumerable: true, get: function () { return ViewMediatorHandler_1.ViewMediatorHandler; } }); | ||
var ViewMediatorManager_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/ViewMediatorManager"); | ||
exports.ViewMediatorManager = ViewMediatorManager_1.ViewMediatorManager; | ||
Object.defineProperty(exports, "ViewMediatorManager", { enumerable: true, get: function () { return ViewMediatorManager_1.ViewMediatorManager; } }); | ||
var ViewMediatorMap_1 = require("./robotlegs/bender/extensions/mediatorMap/impl/ViewMediatorMap"); | ||
exports.ViewMediatorMap = ViewMediatorMap_1.ViewMediatorMap; | ||
Object.defineProperty(exports, "ViewMediatorMap", { enumerable: true, get: function () { return ViewMediatorMap_1.ViewMediatorMap; } }); | ||
var SceneMediatorMapExtension_1 = require("./robotlegs/bender/extensions/mediatorMap/SceneMediatorMapExtension"); | ||
exports.SceneMediatorMapExtension = SceneMediatorMapExtension_1.SceneMediatorMapExtension; | ||
Object.defineProperty(exports, "SceneMediatorMapExtension", { enumerable: true, get: function () { return SceneMediatorMapExtension_1.SceneMediatorMapExtension; } }); | ||
var ViewMediatorMapExtension_1 = require("./robotlegs/bender/extensions/mediatorMap/ViewMediatorMapExtension"); | ||
exports.ViewMediatorMapExtension = ViewMediatorMapExtension_1.ViewMediatorMapExtension; | ||
Object.defineProperty(exports, "ViewMediatorMapExtension", { enumerable: true, get: function () { return ViewMediatorMapExtension_1.ViewMediatorMapExtension; } }); | ||
var ISceneManager_1 = require("./robotlegs/bender/extensions/viewManager/api/ISceneManager"); | ||
exports.ISceneManager = ISceneManager_1.ISceneManager; | ||
Object.defineProperty(exports, "ISceneManager", { enumerable: true, get: function () { return ISceneManager_1.ISceneManager; } }); | ||
var ConfigureSceneEvent_1 = require("./robotlegs/bender/extensions/viewManager/impl/ConfigureSceneEvent"); | ||
exports.ConfigureSceneEvent = ConfigureSceneEvent_1.ConfigureSceneEvent; | ||
Object.defineProperty(exports, "ConfigureSceneEvent", { enumerable: true, get: function () { return ConfigureSceneEvent_1.ConfigureSceneEvent; } }); | ||
var ConfigureViewEvent_1 = require("./robotlegs/bender/extensions/viewManager/impl/ConfigureViewEvent"); | ||
exports.ConfigureViewEvent = ConfigureViewEvent_1.ConfigureViewEvent; | ||
Object.defineProperty(exports, "ConfigureViewEvent", { enumerable: true, get: function () { return ConfigureViewEvent_1.ConfigureViewEvent; } }); | ||
var SceneManager_1 = require("./robotlegs/bender/extensions/viewManager/impl/SceneManager"); | ||
exports.SceneManager = SceneManager_1.SceneManager; | ||
Object.defineProperty(exports, "SceneManager", { enumerable: true, get: function () { return SceneManager_1.SceneManager; } }); | ||
var SceneManagerBinding_1 = require("./robotlegs/bender/extensions/viewManager/impl/SceneManagerBinding"); | ||
exports.SceneManagerBinding = SceneManagerBinding_1.SceneManagerBinding; | ||
Object.defineProperty(exports, "SceneManagerBinding", { enumerable: true, get: function () { return SceneManagerBinding_1.SceneManagerBinding; } }); | ||
var SceneManagerBindingEvent_1 = require("./robotlegs/bender/extensions/viewManager/impl/SceneManagerBindingEvent"); | ||
exports.SceneManagerBindingEvent = SceneManagerBindingEvent_1.SceneManagerBindingEvent; | ||
Object.defineProperty(exports, "SceneManagerBindingEvent", { enumerable: true, get: function () { return SceneManagerBindingEvent_1.SceneManagerBindingEvent; } }); | ||
var SceneManagerEvent_1 = require("./robotlegs/bender/extensions/viewManager/impl/SceneManagerEvent"); | ||
exports.SceneManagerEvent = SceneManagerEvent_1.SceneManagerEvent; | ||
Object.defineProperty(exports, "SceneManagerEvent", { enumerable: true, get: function () { return SceneManagerEvent_1.SceneManagerEvent; } }); | ||
var SceneManagerObserver_1 = require("./robotlegs/bender/extensions/viewManager/impl/SceneManagerObserver"); | ||
exports.SceneManagerObserver = SceneManagerObserver_1.SceneManagerObserver; | ||
Object.defineProperty(exports, "SceneManagerObserver", { enumerable: true, get: function () { return SceneManagerObserver_1.SceneManagerObserver; } }); | ||
var SceneRegistry_1 = require("./robotlegs/bender/extensions/viewManager/impl/SceneRegistry"); | ||
exports.SceneRegistry = SceneRegistry_1.SceneRegistry; | ||
Object.defineProperty(exports, "SceneRegistry", { enumerable: true, get: function () { return SceneRegistry_1.SceneRegistry; } }); | ||
var SceneRegistryEvent_1 = require("./robotlegs/bender/extensions/viewManager/impl/SceneRegistryEvent"); | ||
exports.SceneRegistryEvent = SceneRegistryEvent_1.SceneRegistryEvent; | ||
Object.defineProperty(exports, "SceneRegistryEvent", { enumerable: true, get: function () { return SceneRegistryEvent_1.SceneRegistryEvent; } }); | ||
var SceneManagerExtension_1 = require("./robotlegs/bender/extensions/viewManager/SceneManagerExtension"); | ||
exports.SceneManagerExtension = SceneManagerExtension_1.SceneManagerExtension; | ||
Object.defineProperty(exports, "SceneManagerExtension", { enumerable: true, get: function () { return SceneManagerExtension_1.SceneManagerExtension; } }); | ||
var SceneManagerObserverExtension_1 = require("./robotlegs/bender/extensions/viewManager/SceneManagerObserverExtension"); | ||
exports.SceneManagerObserverExtension = SceneManagerObserverExtension_1.SceneManagerObserverExtension; | ||
Object.defineProperty(exports, "SceneManagerObserverExtension", { enumerable: true, get: function () { return SceneManagerObserverExtension_1.SceneManagerObserverExtension; } }); | ||
/** | ||
@@ -92,9 +93,9 @@ * LocalEventEmitterMap | ||
var IEventEmitterMap_1 = require("./robotlegs/bender/extensions/localEventEmitterMap/api/IEventEmitterMap"); | ||
exports.IEventEmitterMap = IEventEmitterMap_1.IEventEmitterMap; | ||
Object.defineProperty(exports, "IEventEmitterMap", { enumerable: true, get: function () { return IEventEmitterMap_1.IEventEmitterMap; } }); | ||
var EventEmitterMap_1 = require("./robotlegs/bender/extensions/localEventEmitterMap/impl/EventEmitterMap"); | ||
exports.EventEmitterMap = EventEmitterMap_1.EventEmitterMap; | ||
Object.defineProperty(exports, "EventEmitterMap", { enumerable: true, get: function () { return EventEmitterMap_1.EventEmitterMap; } }); | ||
var EventEmitterMapConfig_1 = require("./robotlegs/bender/extensions/localEventEmitterMap/impl/EventEmitterMapConfig"); | ||
exports.EventEmitterMapConfig = EventEmitterMapConfig_1.EventEmitterMapConfig; | ||
Object.defineProperty(exports, "EventEmitterMapConfig", { enumerable: true, get: function () { return EventEmitterMapConfig_1.EventEmitterMapConfig; } }); | ||
var LocalEventEmitterMapExtension_1 = require("./robotlegs/bender/extensions/localEventEmitterMap/LocalEventEmitterMapExtension"); | ||
exports.LocalEventEmitterMapExtension = LocalEventEmitterMapExtension_1.LocalEventEmitterMapExtension; | ||
Object.defineProperty(exports, "LocalEventEmitterMapExtension", { enumerable: true, get: function () { return LocalEventEmitterMapExtension_1.LocalEventEmitterMapExtension; } }); | ||
/** | ||
@@ -104,3 +105,3 @@ * Bundles | ||
var PhaserBundle_1 = require("./robotlegs/bender/bundles/phaser/PhaserBundle"); | ||
exports.PhaserBundle = PhaserBundle_1.PhaserBundle; | ||
Object.defineProperty(exports, "PhaserBundle", { enumerable: true, get: function () { return PhaserBundle_1.PhaserBundle; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -15,5 +15,5 @@ import { IBundle, IContext } from "@robotlegsjs/core"; | ||
extend(context: IContext): void; | ||
private handleContextSceneManager; | ||
private whenInitializing; | ||
private afterDestroying; | ||
private _handleContextSceneManager; | ||
private _whenInitializing; | ||
private _afterDestroying; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PhaserBundle = void 0; | ||
var core_1 = require("@robotlegsjs/core"); | ||
@@ -39,5 +40,5 @@ var IContextSceneManager_1 = require("../../extensions/contextSceneManager/api/IContextSceneManager"); | ||
this._context.install(ContextSceneManagerExtension_1.ContextSceneManagerExtension, LocalEventEmitterMapExtension_1.LocalEventEmitterMapExtension, SceneManagerExtension_1.SceneManagerExtension, SceneManagerObserverExtension_1.SceneManagerObserverExtension, SceneMediatorMapExtension_1.SceneMediatorMapExtension, ViewMediatorMapExtension_1.ViewMediatorMapExtension); | ||
this._context.addConfigHandler(core_1.instanceOfType(ContextSceneManager_1.ContextSceneManager), this.handleContextSceneManager.bind(this)); | ||
this._context.whenInitializing(this.whenInitializing.bind(this)); | ||
this._context.afterDestroying(this.afterDestroying.bind(this)); | ||
this._context.addConfigHandler(core_1.instanceOfType(ContextSceneManager_1.ContextSceneManager), this._handleContextSceneManager.bind(this)); | ||
this._context.whenInitializing(this._whenInitializing.bind(this)); | ||
this._context.afterDestroying(this._afterDestroying.bind(this)); | ||
}; | ||
@@ -47,6 +48,6 @@ /*============================================================================*/ | ||
/*============================================================================*/ | ||
PhaserBundle.prototype.handleContextSceneManager = function (contextSceneManager) { | ||
PhaserBundle.prototype._handleContextSceneManager = function (contextSceneManager) { | ||
this._context.configure(ContextSceneManagerListenerConfig_1.ContextSceneManagerListenerConfig); | ||
}; | ||
PhaserBundle.prototype.whenInitializing = function () { | ||
PhaserBundle.prototype._whenInitializing = function () { | ||
if (!this._context.injector.isBound(IContextSceneManager_1.IContextSceneManager)) { | ||
@@ -56,3 +57,3 @@ this._logger.error("PhaserBundle requires IContextSceneManager."); | ||
}; | ||
PhaserBundle.prototype.afterDestroying = function () { | ||
PhaserBundle.prototype._afterDestroying = function () { | ||
this._context = null; | ||
@@ -59,0 +60,0 @@ this._logger = null; |
@@ -9,3 +9,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.IContextSceneManager = void 0; | ||
// eslint-disable-next-line @rushstack/typedef-var | ||
exports.IContextSceneManager = Symbol("IContextSceneManager"); | ||
//# sourceMappingURL=IContextSceneManager.js.map |
@@ -15,4 +15,4 @@ import { IContext, IExtension } from "@robotlegsjs/core"; | ||
extend(context: IContext): void; | ||
private handleContextSceneManager; | ||
private beforeInitializing; | ||
private _handleContextSceneManager; | ||
private _beforeInitializing; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContextSceneManagerExtension = void 0; | ||
var core_1 = require("@robotlegsjs/core"); | ||
@@ -31,4 +32,4 @@ var IContextSceneManager_1 = require("./api/IContextSceneManager"); | ||
this._logger = context.getLogger(this); | ||
context.beforeInitializing(this.beforeInitializing.bind(this)); | ||
context.addConfigHandler(core_1.instanceOfType(ContextSceneManager_1.ContextSceneManager), this.handleContextSceneManager.bind(this)); | ||
context.beforeInitializing(this._beforeInitializing.bind(this)); | ||
context.addConfigHandler(core_1.instanceOfType(ContextSceneManager_1.ContextSceneManager), this._handleContextSceneManager.bind(this)); | ||
}; | ||
@@ -38,12 +39,16 @@ /*============================================================================*/ | ||
/*============================================================================*/ | ||
ContextSceneManagerExtension.prototype.handleContextSceneManager = function (contextSceneManager) { | ||
ContextSceneManagerExtension.prototype._handleContextSceneManager = function (contextSceneManager) { | ||
if (this._injector.isBound(IContextSceneManager_1.IContextSceneManager)) { | ||
this._logger.warn("A contextSceneManager has already been installed, ignoring {0}", [contextSceneManager.sceneManager]); | ||
this._logger.warn("A contextSceneManager has already been installed, ignoring {0}", [ | ||
contextSceneManager.sceneManager | ||
]); | ||
} | ||
else { | ||
this._logger.debug("Mapping {0} as contextSceneManager", [contextSceneManager.sceneManager]); | ||
this._logger.debug("Mapping {0} as contextSceneManager", [ | ||
contextSceneManager.sceneManager | ||
]); | ||
this._injector.bind(IContextSceneManager_1.IContextSceneManager).toConstantValue(contextSceneManager); | ||
} | ||
}; | ||
ContextSceneManagerExtension.prototype.beforeInitializing = function () { | ||
ContextSceneManagerExtension.prototype._beforeInitializing = function () { | ||
if (!this._injector.isBound(IContextSceneManager_1.IContextSceneManager)) { | ||
@@ -50,0 +55,0 @@ this._logger.error("A ContextSceneManager must be installed if you install the ContextSceneManagerExtension."); |
@@ -14,2 +14,3 @@ import { IConfig } from "@robotlegsjs/core"; | ||
* The SceneManager represents the root Phaser.Scenes.SceneManager for a Context | ||
* | ||
* @param sceneManager The root Scene Manager for this Context | ||
@@ -16,0 +17,0 @@ */ |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContextSceneManager = void 0; | ||
/** | ||
@@ -19,2 +20,3 @@ * The Context SceneManager represents the Phaser.Scenes.SceneManager for a Context | ||
* The SceneManager represents the root Phaser.Scenes.SceneManager for a Context | ||
* | ||
* @param sceneManager The root Scene Manager for this Context | ||
@@ -37,3 +39,3 @@ */ | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -40,0 +42,0 @@ }); |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContextSceneManagerListenerConfig = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -11,0 +12,0 @@ var core_1 = require("@robotlegsjs/core"); |
import { IEventMap } from "@robotlegsjs/core"; | ||
export declare const IEventEmitterMap: unique symbol; | ||
/** | ||
@@ -6,3 +7,2 @@ * The Event Emitter Map keeps track of listeners and provides the ability | ||
*/ | ||
export declare const IEventEmitterMap: unique symbol; | ||
export interface IEventEmitterMap extends IEventMap { | ||
@@ -9,0 +9,0 @@ /** |
@@ -9,7 +9,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* The Event Emitter Map keeps track of listeners and provides the ability | ||
* to unregister all Phaser.Events.EventEmitter listeners with a single method call. | ||
*/ | ||
exports.IEventEmitterMap = void 0; | ||
// eslint-disable-next-line @rushstack/typedef-var | ||
exports.IEventEmitterMap = Symbol("IEventEmitterMap"); | ||
//# sourceMappingURL=IEventEmitterMap.js.map |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EventEmitterMap = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -31,3 +32,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -62,3 +63,4 @@ }); | ||
while (this._currentEventEmitterListeners.length) { | ||
eventConfig = this._currentEventEmitterListeners[this._currentEventEmitterListeners.length - 1]; | ||
eventConfig = | ||
this._currentEventEmitterListeners[this._currentEventEmitterListeners.length - 1]; | ||
this._unregisterEventEmitterListener(eventConfig.emitter, eventConfig.event, eventConfig.listener, eventConfig.context); | ||
@@ -65,0 +67,0 @@ } |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EventEmitterMapConfig = void 0; | ||
/** | ||
@@ -34,3 +35,3 @@ * @private | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -45,3 +46,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -56,3 +57,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -67,3 +68,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -78,3 +79,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -95,7 +96,10 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
EventEmitterMapConfig.prototype.equalTo = function (emitter, event, listener, context) { | ||
return this._emitter === emitter && this._event === event && this._listener === listener && this._context === context; | ||
return (this._emitter === emitter && | ||
this._event === event && | ||
this._listener === listener && | ||
this._context === context); | ||
}; | ||
@@ -102,0 +106,0 @@ return EventEmitterMapConfig; |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LocalEventEmitterMapExtension = void 0; | ||
var IEventEmitterMap_1 = require("./api/IEventEmitterMap"); | ||
@@ -11,0 +12,0 @@ var EventEmitterMap_1 = require("./impl/EventEmitterMap"); |
@@ -9,3 +9,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.IMediatorManager = void 0; | ||
// eslint-disable-next-line @rushstack/typedef-var | ||
exports.IMediatorManager = Symbol("IMediatorManager"); | ||
//# sourceMappingURL=IMediatorManager.js.map |
import { IClass, ITypeMatcher } from "@robotlegsjs/core"; | ||
import { IMediatorMapper } from "../dsl/IMediatorMapper"; | ||
import { IMediatorUnmapper } from "../dsl/IMediatorUnmapper"; | ||
export declare const ISceneMediatorMap: unique symbol; | ||
/** | ||
* The SceneMediator Map allows you to bind Mediators to Phaser.Scene objects | ||
*/ | ||
export declare const ISceneMediatorMap: unique symbol; | ||
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. | ||
@@ -18,2 +19,3 @@ * @return the mapper so that you can continue the mapping. | ||
* Under the hood this will create a TypeMatcher for this scene. | ||
* | ||
* @param scene The class or interface to be matched against. | ||
@@ -26,2 +28,3 @@ * @return the mapper so that you can continue the mapping. | ||
* No error will be thrown if there isn't a mapping to remove. | ||
* | ||
* @param matcher The type or package matcher specifying the rules for matching. | ||
@@ -34,2 +37,3 @@ * @return the unmapper so that you can continue the unmapping. | ||
* No error will be thrown if there isn't a mapping to remove. | ||
* | ||
* @param scene The class or interface to be matched against. | ||
@@ -41,2 +45,3 @@ * @return the unmapper so that you can continue the unmapping. | ||
* 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. | ||
@@ -47,2 +52,3 @@ */ | ||
* Removes the mediators for an scene if there are any. | ||
* | ||
* @param scene The scene to remove mediators for. | ||
@@ -49,0 +55,0 @@ */ |
@@ -9,6 +9,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* The SceneMediator Map allows you to bind Mediators to Phaser.Scene objects | ||
*/ | ||
exports.ISceneMediatorMap = void 0; | ||
// eslint-disable-next-line @rushstack/typedef-var | ||
exports.ISceneMediatorMap = Symbol("ISceneMediatorMap"); | ||
//# sourceMappingURL=ISceneMediatorMap.js.map |
import { IClass, ITypeMatcher } from "@robotlegsjs/core"; | ||
import { IMediatorMapper } from "../dsl/IMediatorMapper"; | ||
import { IMediatorUnmapper } from "../dsl/IMediatorUnmapper"; | ||
export declare const IViewMediatorMap: unique symbol; | ||
/** | ||
* The IViewMediatorMap Map allows you to bind Mediators to Phaser.GameObjects.Container objects | ||
*/ | ||
export declare const IViewMediatorMap: unique symbol; | ||
export interface IViewMediatorMap { | ||
/** | ||
* 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. | ||
@@ -18,2 +19,3 @@ * @return the mapper so that you can continue the mapping. | ||
* Under the hood this will create a TypeMatcher for this view container. | ||
* | ||
* @param view The class or interface to be matched against. | ||
@@ -26,2 +28,3 @@ * @return the mapper so that you can continue the mapping. | ||
* No error will be thrown if there isn't a mapping to remove. | ||
* | ||
* @param matcher The type or package matcher specifying the rules for matching. | ||
@@ -34,2 +37,3 @@ * @return the unmapper so that you can continue the unmapping. | ||
* No error will be thrown if there isn't a mapping to remove. | ||
* | ||
* @param view The class or interface to be matched against. | ||
@@ -41,2 +45,3 @@ * @return the unmapper so that you can continue the unmapping. | ||
* Mediates an view directly. If the view matches any mapped matchers or types then it will be mediated according to those mappings. | ||
* | ||
* @param view The view to create mediators for. | ||
@@ -47,2 +52,3 @@ */ | ||
* Removes the mediators for an scene if there are any. | ||
* | ||
* @param view The view to remove mediators for. | ||
@@ -49,0 +55,0 @@ */ |
@@ -9,6 +9,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* The IViewMediatorMap Map allows you to bind Mediators to Phaser.GameObjects.Container objects | ||
*/ | ||
exports.IViewMediatorMap = void 0; | ||
// eslint-disable-next-line @rushstack/typedef-var | ||
exports.IViewMediatorMap = Symbol("IViewMediatorMap"); | ||
//# sourceMappingURL=IViewMediatorMap.js.map |
@@ -7,2 +7,3 @@ /** | ||
* Guards to check before allowing a mediator to be created | ||
* | ||
* @param guards Guards | ||
@@ -14,2 +15,3 @@ * @return Self | ||
* Hooks to run before a mediator is created | ||
* | ||
* @param hooks Hooks | ||
@@ -16,0 +18,0 @@ * @return Self |
@@ -9,2 +9,3 @@ import { IClass } from "@robotlegsjs/core"; | ||
* Maps a matcher to a concrete SceneMediator or ViewMediator class | ||
* | ||
* @param mediatorClass The concrete mediator class | ||
@@ -11,0 +12,0 @@ * @return Mapping configurator |
@@ -8,2 +8,3 @@ import { IClass } from "@robotlegsjs/core"; | ||
* Unmaps a mediator from this matcher | ||
* | ||
* @param mediatorClass SceneMediator to unmap | ||
@@ -10,0 +11,0 @@ */ |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AbstractMediator = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -11,0 +12,0 @@ var core_1 = require("@robotlegsjs/core"); |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AbstractMediatorFactory = void 0; | ||
var core_1 = require("@robotlegsjs/core"); | ||
@@ -11,0 +12,0 @@ /** |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AbstractMediatorHandler = void 0; | ||
/** | ||
@@ -11,0 +12,0 @@ * @private |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MediatorMapper = void 0; | ||
var MediatorMapping_1 = require("./MediatorMapping"); | ||
@@ -11,0 +12,0 @@ /** |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MediatorMapping = void 0; | ||
/** | ||
@@ -34,3 +35,3 @@ * @private | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -45,3 +46,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -56,3 +57,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -67,3 +68,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -78,3 +79,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -81,0 +82,0 @@ }); |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NullMediatorUnmapper = void 0; | ||
/** | ||
@@ -11,0 +12,0 @@ * @private |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneMediator = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -33,3 +34,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -36,0 +37,0 @@ }); |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneMediatorFactory = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -11,0 +12,0 @@ var AbstractMediatorFactory_1 = require("./AbstractMediatorFactory"); |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneMediatorHandler = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -11,0 +12,0 @@ var AbstractMediatorHandler_1 = require("./AbstractMediatorHandler"); |
@@ -22,5 +22,5 @@ import { IMediatorManager } from "../api/IMediatorManager"; | ||
removeMediator(mediator: any, item: any, mapping: IMediatorMapping): void; | ||
private onSceneDestroy; | ||
private initializeMediator; | ||
private destroyMediator; | ||
private _onSceneDestroy; | ||
private _initializeMediator; | ||
private _destroyMediator; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneMediatorManager = void 0; | ||
/** | ||
@@ -37,4 +38,4 @@ * @private | ||
} | ||
scene.sys.events.on("destroy", this.onSceneDestroy, this); | ||
scene.sys.events.on("shutdown", this.onSceneDestroy, this); | ||
scene.sys.events.on("destroy", this._onSceneDestroy, this); | ||
scene.sys.events.on("shutdown", this._onSceneDestroy, this); | ||
// scene.sys.events.on("sleep", this.onSceneDestroy, this); | ||
@@ -44,3 +45,3 @@ // scene.sys.events.on("pause", this.onSceneDestroy, this); | ||
// Synchronize with item life-cycle | ||
this.initializeMediator(mediator, item); | ||
this._initializeMediator(mediator, item); | ||
}; | ||
@@ -51,3 +52,3 @@ /** | ||
SceneMediatorManager.prototype.removeMediator = function (mediator, item, mapping) { | ||
this.destroyMediator(mediator); | ||
this._destroyMediator(mediator); | ||
}; | ||
@@ -57,3 +58,3 @@ /*============================================================================*/ | ||
/*============================================================================*/ | ||
SceneMediatorManager.prototype.onSceneDestroy = function (sys) { | ||
SceneMediatorManager.prototype._onSceneDestroy = function (sys) { | ||
if (this._autoRemoveMap.has(sys.settings.key)) { | ||
@@ -64,8 +65,8 @@ var scene = this._autoRemoveMap.get(sys.settings.key); | ||
if (this._autoRemoveMap.size === 0) { | ||
scene.sys.events.off("destroy", this.onSceneDestroy, this, false); | ||
scene.sys.events.off("shutdown", this.onSceneDestroy, this, false); | ||
scene.sys.events.off("destroy", this._onSceneDestroy, this, false); | ||
scene.sys.events.off("shutdown", this._onSceneDestroy, this, false); | ||
} | ||
} | ||
}; | ||
SceneMediatorManager.prototype.initializeMediator = function (mediator, mediatedItem) { | ||
SceneMediatorManager.prototype._initializeMediator = function (mediator, mediatedItem) { | ||
if ("preInitialize" in mediator) { | ||
@@ -84,3 +85,3 @@ mediator.preInitialize(); | ||
}; | ||
SceneMediatorManager.prototype.destroyMediator = function (mediator) { | ||
SceneMediatorManager.prototype._destroyMediator = function (mediator) { | ||
if ("preDestroy" in mediator) { | ||
@@ -87,0 +88,0 @@ mediator.preDestroy(); |
@@ -14,3 +14,3 @@ import { IClass, IContext, ITypeMatcher } from "@robotlegsjs/core"; | ||
private _sceneHandler; | ||
private NULL_UNMAPPER; | ||
private _NULL_UNMAPPER; | ||
/** | ||
@@ -52,3 +52,3 @@ * @private | ||
unmediateAll(): void; | ||
private createMapper; | ||
private _createMapper; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneMediatorMap = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -31,3 +32,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
this._mappers = new Map(); | ||
this.NULL_UNMAPPER = new NullMediatorUnmapper_1.NullMediatorUnmapper(); | ||
this._NULL_UNMAPPER = new NullMediatorUnmapper_1.NullMediatorUnmapper(); | ||
this._logger = context.getLogger(this); | ||
@@ -49,3 +50,3 @@ this._factory = new SceneMediatorFactory_1.SceneMediatorFactory(context.injector); | ||
} | ||
mapper = this.createMapper(matcher); | ||
mapper = this._createMapper(matcher); | ||
this._mappers.set(desc, mapper); | ||
@@ -64,3 +65,3 @@ return mapper; | ||
SceneMediatorMap.prototype.unmapMatcher = function (matcher) { | ||
return this._mappers.get(matcher.createTypeFilter().descriptor) || this.NULL_UNMAPPER; | ||
return this._mappers.get(matcher.createTypeFilter().descriptor) || this._NULL_UNMAPPER; | ||
}; | ||
@@ -100,3 +101,3 @@ /** | ||
/*============================================================================*/ | ||
SceneMediatorMap.prototype.createMapper = function (matcher) { | ||
SceneMediatorMap.prototype._createMapper = function (matcher) { | ||
return new MediatorMapper_1.MediatorMapper(matcher.createTypeFilter(), this._sceneHandler, this._logger); | ||
@@ -103,0 +104,0 @@ }; |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ViewMediator = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -33,3 +34,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -36,0 +37,0 @@ }); |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ViewMediatorFactory = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -11,0 +12,0 @@ var AbstractMediatorFactory_1 = require("./AbstractMediatorFactory"); |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ViewMediatorHandler = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -11,0 +12,0 @@ var AbstractMediatorHandler_1 = require("./AbstractMediatorHandler"); |
@@ -21,5 +21,5 @@ import { IMediatorManager } from "../api/IMediatorManager"; | ||
removeMediator(mediator: any, item: any, mapping: IMediatorMapping): void; | ||
private onViewDestroy; | ||
private initializeMediator; | ||
private destroyMediator; | ||
private _onViewDestroy; | ||
private _initializeMediator; | ||
private _destroyMediator; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ViewMediatorManager = void 0; | ||
/** | ||
@@ -33,6 +34,6 @@ * @private | ||
if (view && mapping.autoRemoveEnabled) { | ||
view.on("destroy", this.onViewDestroy, this); | ||
view.on("destroy", this._onViewDestroy, this); | ||
} | ||
// Synchronize with item life-cycle | ||
this.initializeMediator(mediator, item); | ||
this._initializeMediator(mediator, item); | ||
}; | ||
@@ -43,3 +44,3 @@ /** | ||
ViewMediatorManager.prototype.removeMediator = function (mediator, item, mapping) { | ||
this.destroyMediator(mediator); | ||
this._destroyMediator(mediator); | ||
}; | ||
@@ -49,6 +50,6 @@ /*============================================================================*/ | ||
/*============================================================================*/ | ||
ViewMediatorManager.prototype.onViewDestroy = function (view) { | ||
ViewMediatorManager.prototype._onViewDestroy = function (view) { | ||
this._factory.removeMediators(view); | ||
}; | ||
ViewMediatorManager.prototype.initializeMediator = function (mediator, mediatedItem) { | ||
ViewMediatorManager.prototype._initializeMediator = function (mediator, mediatedItem) { | ||
if ("preInitialize" in mediator) { | ||
@@ -67,3 +68,3 @@ mediator.preInitialize(); | ||
}; | ||
ViewMediatorManager.prototype.destroyMediator = function (mediator) { | ||
ViewMediatorManager.prototype._destroyMediator = function (mediator) { | ||
if ("preDestroy" in mediator) { | ||
@@ -70,0 +71,0 @@ mediator.preDestroy(); |
@@ -14,3 +14,3 @@ import { IClass, IContext, ITypeMatcher } from "@robotlegsjs/core"; | ||
private _viewHandler; | ||
private NULL_UNMAPPER; | ||
private _NULL_UNMAPPER; | ||
/** | ||
@@ -52,3 +52,3 @@ * @private | ||
unmediateAll(): void; | ||
private createMapper; | ||
private _createMapper; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ViewMediatorMap = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -31,3 +32,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
this._mappers = new Map(); | ||
this.NULL_UNMAPPER = new NullMediatorUnmapper_1.NullMediatorUnmapper(); | ||
this._NULL_UNMAPPER = new NullMediatorUnmapper_1.NullMediatorUnmapper(); | ||
this._logger = context.getLogger(this); | ||
@@ -49,3 +50,3 @@ this._factory = new ViewMediatorFactory_1.ViewMediatorFactory(context.injector); | ||
} | ||
mapper = this.createMapper(matcher); | ||
mapper = this._createMapper(matcher); | ||
this._mappers.set(desc, mapper); | ||
@@ -64,3 +65,3 @@ return mapper; | ||
ViewMediatorMap.prototype.unmapMatcher = function (matcher) { | ||
return this._mappers.get(matcher.createTypeFilter().descriptor) || this.NULL_UNMAPPER; | ||
return this._mappers.get(matcher.createTypeFilter().descriptor) || this._NULL_UNMAPPER; | ||
}; | ||
@@ -100,3 +101,3 @@ /** | ||
/*============================================================================*/ | ||
ViewMediatorMap.prototype.createMapper = function (matcher) { | ||
ViewMediatorMap.prototype._createMapper = function (matcher) { | ||
return new MediatorMapper_1.MediatorMapper(matcher.createTypeFilter(), this._viewHandler, this._logger); | ||
@@ -103,0 +104,0 @@ }; |
@@ -13,5 +13,5 @@ import { IContext, IExtension } from "@robotlegsjs/core"; | ||
extend(context: IContext): void; | ||
private beforeInitializing; | ||
private beforeDestroying; | ||
private whenDestroying; | ||
private _beforeInitializing; | ||
private _beforeDestroying; | ||
private _whenDestroying; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneMediatorMapExtension = void 0; | ||
var ISceneManager_1 = require("../viewManager/api/ISceneManager"); | ||
@@ -27,10 +28,7 @@ var ISceneMediatorMap_1 = require("./api/ISceneMediatorMap"); | ||
context | ||
.beforeInitializing(this.beforeInitializing.bind(this)) | ||
.beforeDestroying(this.beforeDestroying.bind(this)) | ||
.whenDestroying(this.whenDestroying.bind(this)); | ||
.beforeInitializing(this._beforeInitializing.bind(this)) | ||
.beforeDestroying(this._beforeDestroying.bind(this)) | ||
.whenDestroying(this._whenDestroying.bind(this)); | ||
this._injector = context.injector; | ||
this._injector | ||
.bind(ISceneMediatorMap_1.ISceneMediatorMap) | ||
.to(SceneMediatorMap_1.SceneMediatorMap) | ||
.inSingletonScope(); | ||
this._injector.bind(ISceneMediatorMap_1.ISceneMediatorMap).to(SceneMediatorMap_1.SceneMediatorMap).inSingletonScope(); | ||
}; | ||
@@ -40,3 +38,3 @@ /*============================================================================*/ | ||
/*============================================================================*/ | ||
SceneMediatorMapExtension.prototype.beforeInitializing = function () { | ||
SceneMediatorMapExtension.prototype._beforeInitializing = function () { | ||
this._mediatorMap = this._injector.get(ISceneMediatorMap_1.ISceneMediatorMap); | ||
@@ -48,3 +46,3 @@ if (this._injector.isBound(ISceneManager_1.ISceneManager)) { | ||
}; | ||
SceneMediatorMapExtension.prototype.beforeDestroying = function () { | ||
SceneMediatorMapExtension.prototype._beforeDestroying = function () { | ||
this._mediatorMap.unmediateAll(); | ||
@@ -56,3 +54,3 @@ if (this._injector.isBound(ISceneManager_1.ISceneManager)) { | ||
}; | ||
SceneMediatorMapExtension.prototype.whenDestroying = function () { | ||
SceneMediatorMapExtension.prototype._whenDestroying = function () { | ||
if (this._injector.isBound(ISceneMediatorMap_1.ISceneMediatorMap)) { | ||
@@ -59,0 +57,0 @@ this._injector.unbind(ISceneMediatorMap_1.ISceneMediatorMap); |
@@ -13,5 +13,5 @@ import { IContext, IExtension } from "@robotlegsjs/core"; | ||
extend(context: IContext): void; | ||
private beforeInitializing; | ||
private beforeDestroying; | ||
private whenDestroying; | ||
private _beforeInitializing; | ||
private _beforeDestroying; | ||
private _whenDestroying; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ViewMediatorMapExtension = void 0; | ||
var ISceneManager_1 = require("../viewManager/api/ISceneManager"); | ||
@@ -27,10 +28,7 @@ var IViewMediatorMap_1 = require("./api/IViewMediatorMap"); | ||
context | ||
.beforeInitializing(this.beforeInitializing.bind(this)) | ||
.beforeDestroying(this.beforeDestroying.bind(this)) | ||
.whenDestroying(this.whenDestroying.bind(this)); | ||
.beforeInitializing(this._beforeInitializing.bind(this)) | ||
.beforeDestroying(this._beforeDestroying.bind(this)) | ||
.whenDestroying(this._whenDestroying.bind(this)); | ||
this._injector = context.injector; | ||
this._injector | ||
.bind(IViewMediatorMap_1.IViewMediatorMap) | ||
.to(ViewMediatorMap_1.ViewMediatorMap) | ||
.inSingletonScope(); | ||
this._injector.bind(IViewMediatorMap_1.IViewMediatorMap).to(ViewMediatorMap_1.ViewMediatorMap).inSingletonScope(); | ||
}; | ||
@@ -40,3 +38,3 @@ /*============================================================================*/ | ||
/*============================================================================*/ | ||
ViewMediatorMapExtension.prototype.beforeInitializing = function () { | ||
ViewMediatorMapExtension.prototype._beforeInitializing = function () { | ||
this._mediatorMap = this._injector.get(IViewMediatorMap_1.IViewMediatorMap); | ||
@@ -48,3 +46,3 @@ if (this._injector.isBound(ISceneManager_1.ISceneManager)) { | ||
}; | ||
ViewMediatorMapExtension.prototype.beforeDestroying = function () { | ||
ViewMediatorMapExtension.prototype._beforeDestroying = function () { | ||
this._mediatorMap.unmediateAll(); | ||
@@ -56,3 +54,3 @@ if (this._injector.isBound(ISceneManager_1.ISceneManager)) { | ||
}; | ||
ViewMediatorMapExtension.prototype.whenDestroying = function () { | ||
ViewMediatorMapExtension.prototype._whenDestroying = function () { | ||
if (this._injector.isBound(IViewMediatorMap_1.IViewMediatorMap)) { | ||
@@ -59,0 +57,0 @@ this._injector.unbind(IViewMediatorMap_1.IViewMediatorMap); |
@@ -8,2 +8,3 @@ import { IClass } from "@robotlegsjs/core"; | ||
* View handler method | ||
* | ||
* @param scene The scene instance to handle | ||
@@ -10,0 +11,0 @@ * @param type The class of the scene instance |
import { IEventDispatcher } from "@robotlegsjs/core"; | ||
import { ISceneHandler } from "./ISceneHandler"; | ||
import { IViewHandler } from "./IViewHandler"; | ||
export declare const ISceneManager: unique symbol; | ||
/** | ||
* The Scene Manager allows you to add multiple "scene managers" to a context | ||
*/ | ||
export declare const ISceneManager: unique symbol; | ||
export interface ISceneManager extends IEventDispatcher { | ||
@@ -15,2 +15,3 @@ /** | ||
* Adds a SceneManager as a "scene root" into the context | ||
* | ||
* @param sceneManager | ||
@@ -21,2 +22,3 @@ */ | ||
* Removes a sceneManager from this context | ||
* | ||
* @param sceneManager | ||
@@ -27,2 +29,3 @@ */ | ||
* Registers a scene handler | ||
* | ||
* @param handler | ||
@@ -33,2 +36,3 @@ */ | ||
* Removes a scene handler | ||
* | ||
* @param handler | ||
@@ -39,2 +43,3 @@ */ | ||
* Registers a view handler | ||
* | ||
* @param handler | ||
@@ -45,2 +50,3 @@ */ | ||
* Removes a view handler | ||
* | ||
* @param handler | ||
@@ -47,0 +53,0 @@ */ |
@@ -9,6 +9,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* The Scene Manager allows you to add multiple "scene managers" to a context | ||
*/ | ||
exports.ISceneManager = void 0; | ||
// eslint-disable-next-line @rushstack/typedef-var | ||
exports.ISceneManager = Symbol("ISceneManager"); | ||
//# sourceMappingURL=ISceneManager.js.map |
@@ -8,2 +8,3 @@ import { IClass } from "@robotlegsjs/core"; | ||
* View handler method | ||
* | ||
* @param view The view (Phaser.GameObjects.Container) instance to handle | ||
@@ -10,0 +11,0 @@ * @param type The class of the view instance |
import { Event } from "@robotlegsjs/core"; | ||
/** | ||
* Scene Configuration Event | ||
* | ||
* @private | ||
@@ -15,2 +16,3 @@ */ | ||
* Creates a scene configuration event | ||
* | ||
* @param type The event type | ||
@@ -17,0 +19,0 @@ * @param scene The associated scene instance |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConfigureSceneEvent = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -14,2 +15,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
* Scene Configuration Event | ||
* | ||
* @private | ||
@@ -24,2 +26,3 @@ */ | ||
* Creates a scene configuration event | ||
* | ||
* @param type The event type | ||
@@ -40,3 +43,3 @@ * @param scene The associated scene instance | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -43,0 +46,0 @@ }); |
import { Event } from "@robotlegsjs/core"; | ||
/** | ||
* View Configuration Event | ||
* | ||
* @private | ||
@@ -15,2 +16,3 @@ */ | ||
* Creates a view configuration event | ||
* | ||
* @param type The event type | ||
@@ -17,0 +19,0 @@ * @param view The associated view instance |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConfigureViewEvent = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -14,2 +15,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
* View Configuration Event | ||
* | ||
* @private | ||
@@ -24,2 +26,3 @@ */ | ||
* Creates a view configuration event | ||
* | ||
* @param type The event type | ||
@@ -40,3 +43,3 @@ * @param view The associated view instance | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -43,0 +46,0 @@ }); |
@@ -50,3 +50,3 @@ import { EventDispatcher } from "@robotlegsjs/core"; | ||
removeAllHandlers(): void; | ||
private validSceneManager; | ||
private _validSceneManager; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneManager = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -46,3 +47,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -58,3 +59,3 @@ }); | ||
var _this = this; | ||
if (!this.validSceneManager(sceneManager)) { | ||
if (!this._validSceneManager(sceneManager)) { | ||
return; | ||
@@ -165,3 +166,3 @@ } | ||
/*============================================================================*/ | ||
SceneManager.prototype.validSceneManager = function (sceneManager) { | ||
SceneManager.prototype._validSceneManager = function (sceneManager) { | ||
var valid = true; | ||
@@ -168,0 +169,0 @@ this._sceneManagers.forEach(function (registeredSceneManager) { |
@@ -55,3 +55,3 @@ import { IClass, EventDispatcher } from "@robotlegsjs/core"; | ||
*/ | ||
private dispatchBindingEmpty; | ||
private _dispatchBindingEmpty; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneManagerBinding = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -47,3 +48,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -58,3 +59,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -81,3 +82,3 @@ }); | ||
this._sceneHandlers.splice(index, 1); | ||
this.dispatchBindingEmpty(); | ||
this._dispatchBindingEmpty(); | ||
} | ||
@@ -101,3 +102,3 @@ }; | ||
this._viewHandlers.splice(index, 1); | ||
this.dispatchBindingEmpty(); | ||
this._dispatchBindingEmpty(); | ||
} | ||
@@ -127,3 +128,3 @@ }; | ||
*/ | ||
SceneManagerBinding.prototype.dispatchBindingEmpty = function () { | ||
SceneManagerBinding.prototype._dispatchBindingEmpty = function () { | ||
if (this._sceneHandlers.length === 0 && this._viewHandlers.length === 0) { | ||
@@ -130,0 +131,0 @@ this.dispatchEvent(new SceneManagerBindingEvent_1.SceneManagerBindingEvent(SceneManagerBindingEvent_1.SceneManagerBindingEvent.BINDING_EMPTY)); |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneManagerBindingEvent = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -11,0 +12,0 @@ var core_1 = require("@robotlegsjs/core"); |
@@ -6,2 +6,3 @@ import { Event } from "@robotlegsjs/core"; | ||
* SceneManager existence event | ||
* | ||
* @private | ||
@@ -33,2 +34,3 @@ */ | ||
* Creates a scene manager event | ||
* | ||
* @param type The event type | ||
@@ -35,0 +37,0 @@ * @param sceneManager The Phaser.Scenes.SceneManager associated with this event |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneManagerEvent = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -14,2 +15,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
* SceneManager existence event | ||
* | ||
* @private | ||
@@ -24,2 +26,3 @@ */ | ||
* Creates a scene manager event | ||
* | ||
* @param type The event type | ||
@@ -44,3 +47,3 @@ * @param sceneManager The Phaser.Scenes.SceneManager associated with this event | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -55,3 +58,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -66,3 +69,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -69,0 +72,0 @@ }); |
@@ -15,12 +15,12 @@ import { SceneRegistry } from "./SceneRegistry"; | ||
destroy(): void; | ||
private onRootSceneManagerAdd; | ||
private onRootSceneManagerRemove; | ||
private addRootListener; | ||
private patchGameObjectFactoryAddExistingMethod; | ||
private patchCreateSceneMethod; | ||
private onSceneInit; | ||
private onSceneStart; | ||
private onSceneShutdown; | ||
private onSceneDestroy; | ||
private removeRootListener; | ||
private _onRootSceneManagerAdd; | ||
private _onRootSceneManagerRemove; | ||
private _addRootListener; | ||
private _patchGameObjectFactoryAddExistingMethod; | ||
private _patchCreateSceneMethod; | ||
private _onSceneInit; | ||
private _onSceneStart; | ||
private _onSceneShutdown; | ||
private _onSceneDestroy; | ||
private _removeRootListener; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneManagerObserver = void 0; | ||
var SceneRegistryEvent_1 = require("./SceneRegistryEvent"); | ||
@@ -25,7 +26,7 @@ /** | ||
// We only care about roots | ||
this._registry.addEventListener(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_ADD, this.onRootSceneManagerAdd, this); | ||
this._registry.addEventListener(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_REMOVE, this.onRootSceneManagerRemove, this); | ||
this._registry.addEventListener(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_ADD, this._onRootSceneManagerAdd, this); | ||
this._registry.addEventListener(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_REMOVE, this._onRootSceneManagerRemove, this); | ||
// We might have arrived late on the scene | ||
this._registry.rootBindings.forEach(function (binding) { | ||
_this.addRootListener(binding.sceneManager); | ||
_this._addRootListener(binding.sceneManager); | ||
}); | ||
@@ -41,6 +42,6 @@ } | ||
var _this = this; | ||
this._registry.removeEventListener(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_ADD, this.onRootSceneManagerAdd, this); | ||
this._registry.removeEventListener(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_REMOVE, this.onRootSceneManagerRemove, this); | ||
this._registry.removeEventListener(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_ADD, this._onRootSceneManagerAdd, this); | ||
this._registry.removeEventListener(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_REMOVE, this._onRootSceneManagerRemove, this); | ||
this._registry.rootBindings.forEach(function (binding) { | ||
_this.removeRootListener(binding.sceneManager); | ||
_this._removeRootListener(binding.sceneManager); | ||
}); | ||
@@ -51,19 +52,20 @@ }; | ||
/*============================================================================*/ | ||
SceneManagerObserver.prototype.onRootSceneManagerAdd = function (event) { | ||
this.addRootListener(event.sceneManager); | ||
SceneManagerObserver.prototype._onRootSceneManagerAdd = function (event) { | ||
this._addRootListener(event.sceneManager); | ||
}; | ||
SceneManagerObserver.prototype.onRootSceneManagerRemove = function (event) { | ||
this.removeRootListener(event.sceneManager); | ||
SceneManagerObserver.prototype._onRootSceneManagerRemove = function (event) { | ||
this._removeRootListener(event.sceneManager); | ||
}; | ||
SceneManagerObserver.prototype.addRootListener = function (sceneManager) { | ||
SceneManagerObserver.prototype._addRootListener = function (sceneManager) { | ||
if (sceneManager) { | ||
sceneManager.createSceneFromInstance = this.patchCreateSceneMethod(sceneManager, sceneManager.createSceneFromInstance); | ||
sceneManager.createSceneFromFunction = this.patchCreateSceneMethod(sceneManager, sceneManager.createSceneFromFunction); | ||
sceneManager.createSceneFromObject = this.patchCreateSceneMethod(sceneManager, sceneManager.createSceneFromObject); | ||
this.patchGameObjectFactoryAddExistingMethod(sceneManager); | ||
sceneManager.createSceneFromInstance = this._patchCreateSceneMethod(sceneManager, sceneManager.createSceneFromInstance); | ||
sceneManager.createSceneFromFunction = this._patchCreateSceneMethod(sceneManager, sceneManager.createSceneFromFunction); | ||
sceneManager.createSceneFromObject = this._patchCreateSceneMethod(sceneManager, sceneManager.createSceneFromObject); | ||
this._patchGameObjectFactoryAddExistingMethod(sceneManager); | ||
} | ||
}; | ||
SceneManagerObserver.prototype.patchGameObjectFactoryAddExistingMethod = function (sceneManager) { | ||
SceneManagerObserver.prototype._patchGameObjectFactoryAddExistingMethod = function (sceneManager) { | ||
var originalMethod = Phaser.GameObjects.GameObjectFactory.prototype.existing; | ||
var self = this; | ||
// eslint-disable-next-line @typescript-eslint/typedef | ||
Phaser.GameObjects.GameObjectFactory.prototype.existing = function (child) { | ||
@@ -79,3 +81,3 @@ if (child instanceof Phaser.GameObjects.Container) { | ||
}; | ||
SceneManagerObserver.prototype.patchCreateSceneMethod = function (sceneManager, originalMethod) { | ||
SceneManagerObserver.prototype._patchCreateSceneMethod = function (sceneManager, originalMethod) { | ||
var _this = this; | ||
@@ -88,7 +90,7 @@ return function () { | ||
var scene = originalMethod.apply(sceneManager, args); | ||
_this.onSceneInit(scene); | ||
_this._onSceneInit(scene); | ||
return scene; | ||
}; | ||
}; | ||
SceneManagerObserver.prototype.onSceneInit = function (scene) { | ||
SceneManagerObserver.prototype._onSceneInit = function (scene) { | ||
var rootBindings = this._registry.rootBindings; | ||
@@ -105,3 +107,3 @@ var sceneManager; | ||
// this.events.emit('start', this); | ||
scene.sys.events.once("start", this.onSceneStart, this); | ||
scene.sys.events.once("start", this._onSceneStart, this); | ||
} | ||
@@ -111,5 +113,5 @@ } | ||
}; | ||
SceneManagerObserver.prototype.onSceneStart = function (sys) { | ||
sys.events.once("shutdown", this.onSceneShutdown, this); | ||
sys.events.once("destroy", this.onSceneDestroy, this); | ||
SceneManagerObserver.prototype._onSceneStart = function (sys) { | ||
sys.events.once("shutdown", this._onSceneShutdown, this); | ||
sys.events.once("destroy", this._onSceneDestroy, this); | ||
var binding = this._registry.getBinding(sys.game.scene); | ||
@@ -120,10 +122,10 @@ if (binding) { | ||
}; | ||
SceneManagerObserver.prototype.onSceneShutdown = function (sys) { | ||
sys.events.once("start", this.onSceneStart, this); | ||
sys.events.off("destroy", this.onSceneDestroy, this, true); | ||
SceneManagerObserver.prototype._onSceneShutdown = function (sys) { | ||
sys.events.once("start", this._onSceneStart, this); | ||
sys.events.off("destroy", this._onSceneDestroy, this, true); | ||
}; | ||
SceneManagerObserver.prototype.onSceneDestroy = function (sys) { | ||
sys.events.off("shutdown", this.onSceneStart, this, true); | ||
SceneManagerObserver.prototype._onSceneDestroy = function (sys) { | ||
sys.events.off("shutdown", this._onSceneStart, this, true); | ||
}; | ||
SceneManagerObserver.prototype.removeRootListener = function (container) { }; | ||
SceneManagerObserver.prototype._removeRootListener = function (container) { }; | ||
return SceneManagerObserver; | ||
@@ -130,0 +132,0 @@ }()); |
@@ -36,7 +36,7 @@ import { EventDispatcher } from "@robotlegsjs/core"; | ||
getBinding(sceneManager: Phaser.Scenes.SceneManager): SceneManagerBinding; | ||
private createBinding; | ||
private removeBinding; | ||
private addRootBinding; | ||
private removeRootBinding; | ||
private onBindingEmpty; | ||
private _createBinding; | ||
private _removeBinding; | ||
private _addRootBinding; | ||
private _removeRootBinding; | ||
private _onBindingEmpty; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneRegistry = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -40,3 +41,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -51,3 +52,3 @@ }); | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -64,3 +65,3 @@ }); | ||
if (!binding) { | ||
binding = this.createBinding(sceneManager); | ||
binding = this._createBinding(sceneManager); | ||
this._bindingBySceneManager.set(sceneManager, binding); | ||
@@ -76,3 +77,3 @@ } | ||
if (binding) { | ||
this.removeBinding(binding); | ||
this._removeBinding(binding); | ||
} | ||
@@ -98,11 +99,11 @@ return binding; | ||
/*============================================================================*/ | ||
SceneRegistry.prototype.createBinding = function (sceneManager) { | ||
SceneRegistry.prototype._createBinding = function (sceneManager) { | ||
var binding = new SceneManagerBinding_1.SceneManagerBinding(sceneManager); | ||
this._bindings.push(binding); | ||
// Add a listener so that we can remove this binding when it has no handlers | ||
binding.addEventListener(SceneManagerBindingEvent_1.SceneManagerBindingEvent.BINDING_EMPTY, this.onBindingEmpty, this); | ||
binding.addEventListener(SceneManagerBindingEvent_1.SceneManagerBindingEvent.BINDING_EMPTY, this._onBindingEmpty, this); | ||
// If the new binding doesn't have a parent it is a Root | ||
binding.parent = this.findParentBinding(sceneManager); | ||
if (binding.parent == null) { | ||
this.addRootBinding(binding); | ||
this._addRootBinding(binding); | ||
} | ||
@@ -112,3 +113,3 @@ this.dispatchEvent(new SceneRegistryEvent_1.SceneRegistryEvent(SceneRegistryEvent_1.SceneRegistryEvent.SCENE_MANAGER_ADD, binding.sceneManager)); | ||
}; | ||
SceneRegistry.prototype.removeBinding = function (binding) { | ||
SceneRegistry.prototype._removeBinding = function (binding) { | ||
// Remove the binding itself | ||
@@ -119,14 +120,14 @@ this._bindingBySceneManager.delete(binding.sceneManager); | ||
// Drop the empty binding listener | ||
binding.removeEventListener(SceneManagerBindingEvent_1.SceneManagerBindingEvent.BINDING_EMPTY, this.onBindingEmpty, this); | ||
binding.removeEventListener(SceneManagerBindingEvent_1.SceneManagerBindingEvent.BINDING_EMPTY, this._onBindingEmpty, this); | ||
if (!binding.parent) { | ||
// This binding didn't have a parent, so it was a Root | ||
this.removeRootBinding(binding); | ||
this._removeRootBinding(binding); | ||
} | ||
this.dispatchEvent(new SceneRegistryEvent_1.SceneRegistryEvent(SceneRegistryEvent_1.SceneRegistryEvent.SCENE_MANAGER_REMOVE, binding.sceneManager)); | ||
}; | ||
SceneRegistry.prototype.addRootBinding = function (binding) { | ||
SceneRegistry.prototype._addRootBinding = function (binding) { | ||
this._rootBindings.push(binding); | ||
this.dispatchEvent(new SceneRegistryEvent_1.SceneRegistryEvent(SceneRegistryEvent_1.SceneRegistryEvent.ROOT_SCENE_MANAGER_ADD, binding.sceneManager)); | ||
}; | ||
SceneRegistry.prototype.removeRootBinding = function (binding) { | ||
SceneRegistry.prototype._removeRootBinding = function (binding) { | ||
var index = this._rootBindings.indexOf(binding); | ||
@@ -136,4 +137,4 @@ this._rootBindings.splice(index, 1); | ||
}; | ||
SceneRegistry.prototype.onBindingEmpty = function (event) { | ||
this.removeBinding(event.target); | ||
SceneRegistry.prototype._onBindingEmpty = function (event) { | ||
this._removeBinding(event.target); | ||
}; | ||
@@ -140,0 +141,0 @@ return SceneRegistry; |
import { Event } from "@robotlegsjs/core"; | ||
/** | ||
* SceneManager existence event | ||
* | ||
* @private | ||
@@ -18,2 +19,3 @@ */ | ||
* Creates a new sceneManager existence event | ||
* | ||
* @param type The event type | ||
@@ -20,0 +22,0 @@ * @param sceneManager The sceneManager associated with this event |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneRegistryEvent = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -14,2 +15,3 @@ var core_1 = require("@robotlegsjs/core"); | ||
* SceneManager existence event | ||
* | ||
* @private | ||
@@ -24,2 +26,3 @@ */ | ||
* Creates a new sceneManager existence event | ||
* | ||
* @param type The event type | ||
@@ -40,3 +43,3 @@ * @param sceneManager The sceneManager associated with this event | ||
}, | ||
enumerable: true, | ||
enumerable: false, | ||
configurable: true | ||
@@ -43,0 +46,0 @@ }); |
@@ -13,4 +13,4 @@ import { IContext, IExtension } from "@robotlegsjs/core"; | ||
extend(context: IContext): void; | ||
private whenInitializing; | ||
private whenDestroying; | ||
private _whenInitializing; | ||
private _whenDestroying; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneManagerExtension = void 0; | ||
var ISceneManager_1 = require("./api/ISceneManager"); | ||
@@ -26,13 +27,13 @@ var SceneManager_1 = require("./impl/SceneManager"); | ||
SceneManagerExtension.prototype.extend = function (context) { | ||
context.whenInitializing(this.whenInitializing.bind(this)); | ||
context.whenDestroying(this.whenDestroying.bind(this)); | ||
context.whenInitializing(this._whenInitializing.bind(this)); | ||
context.whenDestroying(this._whenDestroying.bind(this)); | ||
this._injector = context.injector; | ||
// Just one Container Registry | ||
SceneManagerExtension._containerRegistry = SceneManagerExtension._containerRegistry || new SceneRegistry_1.SceneRegistry(); | ||
this._injector.bind(SceneRegistry_1.SceneRegistry).toConstantValue(SceneManagerExtension._containerRegistry); | ||
SceneManagerExtension._containerRegistry = | ||
SceneManagerExtension._containerRegistry || new SceneRegistry_1.SceneRegistry(); | ||
this._injector | ||
.bind(SceneRegistry_1.SceneRegistry) | ||
.toConstantValue(SceneManagerExtension._containerRegistry); | ||
// But you get your own View Manager | ||
this._injector | ||
.bind(ISceneManager_1.ISceneManager) | ||
.to(SceneManager_1.SceneManager) | ||
.inSingletonScope(); | ||
this._injector.bind(ISceneManager_1.ISceneManager).to(SceneManager_1.SceneManager).inSingletonScope(); | ||
}; | ||
@@ -42,6 +43,6 @@ /*============================================================================*/ | ||
/*============================================================================*/ | ||
SceneManagerExtension.prototype.whenInitializing = function () { | ||
SceneManagerExtension.prototype._whenInitializing = function () { | ||
this._sceneManager = this._injector.get(ISceneManager_1.ISceneManager); | ||
}; | ||
SceneManagerExtension.prototype.whenDestroying = function () { | ||
SceneManagerExtension.prototype._whenDestroying = function () { | ||
this._sceneManager.removeAllHandlers(); | ||
@@ -48,0 +49,0 @@ this._injector.unbind(ISceneManager_1.ISceneManager); |
@@ -13,4 +13,4 @@ import { IContext, IExtension } from "@robotlegsjs/core"; | ||
extend(context: IContext): void; | ||
private whenInitializing; | ||
private whenDestroying; | ||
private _whenInitializing; | ||
private _whenDestroying; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SceneManagerObserverExtension = void 0; | ||
var SceneManagerObserver_1 = require("./impl/SceneManagerObserver"); | ||
@@ -26,4 +27,4 @@ var SceneRegistry_1 = require("./impl/SceneRegistry"); | ||
SceneManagerObserverExtension.prototype.extend = function (context) { | ||
context.whenInitializing(this.whenInitializing.bind(this)); | ||
context.whenDestroying(this.whenDestroying.bind(this)); | ||
context.whenInitializing(this._whenInitializing.bind(this)); | ||
context.whenDestroying(this._whenDestroying.bind(this)); | ||
installCount++; | ||
@@ -36,3 +37,3 @@ this._injector = context.injector; | ||
/*============================================================================*/ | ||
SceneManagerObserverExtension.prototype.whenInitializing = function () { | ||
SceneManagerObserverExtension.prototype._whenInitializing = function () { | ||
// Hark, an actual Singleton! | ||
@@ -45,3 +46,3 @@ if (!SceneManagerObserverExtension._sceneObserver) { | ||
}; | ||
SceneManagerObserverExtension.prototype.whenDestroying = function () { | ||
SceneManagerObserverExtension.prototype._whenDestroying = function () { | ||
installCount--; | ||
@@ -48,0 +49,0 @@ if (installCount === 0) { |
235
package.json
{ | ||
"name": "@robotlegsjs/phaser", | ||
"version": "3.0.0", | ||
"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 --list-different \"{src,static,test,example,definitions}{/**/,/}*.{html,css,js,json,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: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", | ||
"build:example": "webpack --config ./webpack.example.config.js --env.production", | ||
"deploy:example": "./deploy-example.sh", | ||
"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 <endel.dreyer@gmail.com>", | ||
"Gnun Ulikhanyan <gnun.ulikhanyan@gmail.com>", | ||
"Sargis Sargsyan <sargsyan.sargis.89@gmail.com>", | ||
"Tiago Schenkel <tiago.schenkel@gmail.com>" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser/issues" | ||
}, | ||
"homepage": "https://github.com/RobotlegsJS/RobotlegsJS-Phaser#readme", | ||
"files": [ | ||
"definitions", | ||
"lib" | ||
], | ||
"directories": { | ||
"lib": "./lib" | ||
}, | ||
"dependencies": { | ||
"@robotlegsjs/core": "^2.0.0", | ||
"tslib": "^1.11.1" | ||
}, | ||
"peerDependencies": { | ||
"phaser": "^3.22.0", | ||
"reflect-metadata": "^0.1.13" | ||
}, | ||
"devDependencies": { | ||
"@types/bluebird": "^3.5.30", | ||
"@types/chai": "^4.2.11", | ||
"@types/mocha": "^7.0.2", | ||
"@types/sinon": "^7.5.2", | ||
"@types/webpack-env": "^1.15.1", | ||
"bluebird": "^3.7.2", | ||
"browserify-versionify": "^1.0.6", | ||
"chai": "^4.2.0", | ||
"clean-webpack-plugin": "^3.0.0", | ||
"copy-webpack-plugin": "^5.1.1", | ||
"es6-map": "^0.1.5", | ||
"es6-symbol": "^3.1.3", | ||
"glslify": "^7.0.0", | ||
"html-webpack-plugin": "^3.2.0", | ||
"imports-loader": "^0.8.0", | ||
"istanbul-instrumenter-loader": "^3.0.1", | ||
"karma": "^4.4.1", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage-istanbul-reporter": "^2.1.1", | ||
"karma-es6-shim": "^1.0.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-sinon-chai": "^2.0.2", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-sourcemap-writer": "^0.1.2", | ||
"karma-webpack": "^4.0.2", | ||
"mocha": "^7.1.0", | ||
"phaser": "^3.22.0", | ||
"prettier": "^1.19.1", | ||
"publish-please": "^5.5.1", | ||
"puppeteer": "^2.1.1", | ||
"reflect-metadata": "^0.1.13", | ||
"rimraf": "^3.0.2", | ||
"sinon": "^9.0.1", | ||
"sinon-chai": "^3.5.0", | ||
"terser-webpack-plugin": "^2.3.5", | ||
"ts-loader": "^6.2.1", | ||
"ts-node": "^8.6.2", | ||
"tslint": "^6.1.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^3.8.3", | ||
"webpack": "^4.42.0", | ||
"webpack-cli": "^3.3.11", | ||
"webpack-concat-plugin": "^3.0.0", | ||
"webpack-dev-server": "^3.10.3", | ||
"webpack-simple-progress-plugin": "^0.0.4" | ||
} | ||
"name": "@robotlegsjs/phaser", | ||
"version": "4.0.0", | ||
"description": "RobotlegsJS integration with Phaser Scene Manager", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"repository": { | ||
"url": "https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/phaser" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org" | ||
}, | ||
"keywords": [ | ||
"TypeScript", | ||
"Robotlegs", | ||
"IoC", | ||
"Phaser" | ||
], | ||
"author": "RobotlegsJS", | ||
"contributors": [ | ||
"Endel Dreyer <endel.dreyer@gmail.com>", | ||
"Gnun Ulikhanyan <gnun.ulikhanyan@gmail.com>", | ||
"Sargis Sargsyan <sargsyan.sargis.89@gmail.com>", | ||
"Tiago Schenkel <tiago.schenkel@gmail.com>" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/RobotlegsJS/RobotlegsJS-Framework/issues" | ||
}, | ||
"homepage": "https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/phaser#readme", | ||
"files": [ | ||
"definitions", | ||
"lib" | ||
], | ||
"directories": { | ||
"lib": "./lib" | ||
}, | ||
"dependencies": { | ||
"@robotlegsjs/core": "^3.0.0", | ||
"tslib": "^2.2.0" | ||
}, | ||
"peerDependencies": { | ||
"phaser": "^3.22.0", | ||
"reflect-metadata": "^0.1.13" | ||
}, | ||
"devDependencies": { | ||
"@mcler/webpack-concat-plugin": "^4.1.3", | ||
"@rushstack/eslint-config": "^2.3.4", | ||
"@types/bluebird": "^3.5.35", | ||
"@types/chai": "^4.2.18", | ||
"@types/mocha": "^8.2.2", | ||
"@types/sinon": "^10.0.2", | ||
"@types/webpack-env": "^1.16.0", | ||
"bluebird": "^3.7.2", | ||
"browserify-versionify": "^1.0.6", | ||
"chai": "^4.3.4", | ||
"clean-webpack-plugin": "^3.0.0", | ||
"copy-webpack-plugin": "^9.0.0", | ||
"es6-map": "^0.1.5", | ||
"es6-symbol": "^3.1.3", | ||
"eslint": "^7.28.0", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-jsdoc": "^35.1.3", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"eslint-plugin-react": "^7.24.0", | ||
"eslint-plugin-unicorn": "^33.0.1", | ||
"glslify": "^7.1.1", | ||
"html-webpack-plugin": "^5.3.1", | ||
"imports-loader": "^3.0.0", | ||
"istanbul-instrumenter-loader": "^3.0.1", | ||
"karma": "^6.3.3", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage-istanbul-reporter": "^3.0.3", | ||
"karma-es6-shim": "^1.0.0", | ||
"karma-mocha": "^2.0.1", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-sinon-chai": "^2.0.2", | ||
"karma-sourcemap-loader": "^0.3.8", | ||
"karma-sourcemap-writer": "^0.1.2", | ||
"karma-webpack": "^5.0.0", | ||
"mocha": "^9.0.0", | ||
"phaser": "^3.22.0", | ||
"prettier": "^2.3.1", | ||
"puppeteer": "^10.0.0", | ||
"reflect-metadata": "^0.1.13", | ||
"rimraf": "^3.0.2", | ||
"sinon": "^11.1.1", | ||
"sinon-chai": "^3.7.0", | ||
"terser-webpack-plugin": "^5.1.3", | ||
"ts-loader": "^9.2.3", | ||
"ts-node": "^10.0.0", | ||
"typescript": "~4.2.4", | ||
"webpack": "^5.38.1", | ||
"webpack-cli": "^4.7.2", | ||
"webpack-dev-server": "^3.11.2" | ||
}, | ||
"scripts": { | ||
"start": "webpack serve --config ./webpack.example.config.js", | ||
"test": "karma start --single-run", | ||
"mocha": "mocha test/**/*.test.ts --require ts-node/register", | ||
"autoformat": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write --list-different .", | ||
"lint-fix:src": "eslint -c .eslintrc.js --ext .ts ./src --fix", | ||
"lint-fix:test": "eslint -c .eslintrc.js --ext .ts ./test --fix", | ||
"lint-fix:example": "eslint -c .eslintrc.js --ext .ts ./example --fix", | ||
"lint-fix": "npm run lint-fix:src && npm run lint-fix:test && npm run lint-fix:example", | ||
"lint:src": "eslint -c .eslintrc.js --ext .ts ./src", | ||
"lint:test": "eslint -c .eslintrc.js --ext .ts ./test", | ||
"lint:example": "eslint -c .eslintrc.js --ext .ts ./example", | ||
"lint": "npm run lint:src && npm run lint:test && npm run lint:example", | ||
"cleanup": "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", | ||
"dist:dev": "webpack", | ||
"dist:production": "webpack --env production", | ||
"build:example": "webpack --config ./webpack.example.config.js --env.production", | ||
"deploy:example": "./deploy-example.sh", | ||
"build": "npm run cleanup && npm run compile:src" | ||
} | ||
} |
# RobotlegsJS Phaser Extension | ||
[![GitHub license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobotlegsJS/RobotlegsJS-Phaser/blob/master/LICENSE) | ||
[![GitHub license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/phaser/blob/master/LICENSE) | ||
[![Gitter chat](https://badges.gitter.im/RobotlegsJS/RobotlegsJS.svg)](https://gitter.im/RobotlegsJS/RobotlegsJS) | ||
[![Build Status](https://travis-ci.com/RobotlegsJS/RobotlegsJS-Phaser.svg?branch=master)](https://travis-ci.com/RobotlegsJS/RobotlegsJS-Phaser) | ||
[![codebeat badge](https://codebeat.co/badges/d74d7d61-bd8a-4ddc-8555-c5c6c858a957)](https://codebeat.co/projects/github-com-robotlegsjs-robotlegsjs-phaser-master) | ||
[![Maintainability](https://api.codeclimate.com/v1/badges/3d3a971a95d7d97d6b32/maintainability)](https://codeclimate.com/github/RobotlegsJS/RobotlegsJS-Phaser/maintainability) | ||
[![Test Coverage](https://api.codeclimate.com/v1/badges/3d3a971a95d7d97d6b32/test_coverage)](https://codeclimate.com/github/RobotlegsJS/RobotlegsJS-Phaser/test_coverage) | ||
[![npm version](https://badge.fury.io/js/%40robotlegsjs%2Fphaser.svg)](https://badge.fury.io/js/%40robotlegsjs%2Fphaser) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/RobotlegsJS/RobotlegsJS-Phaser.svg)](https://greenkeeper.io/) | ||
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
Integrate [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS) | ||
Integrate [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/core) | ||
framework with [Phaser](https://github.com/photonstorm/phaser). | ||
@@ -47,7 +42,7 @@ | ||
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. | ||
Then follow the [installation instructions](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/core#installation) of **RobotlegsJS** library to complete the setup of your project. | ||
**Dependencies** | ||
+ [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS) | ||
+ [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/core) | ||
+ [tslib](https://github.com/Microsoft/tslib) | ||
@@ -127,6 +122,2 @@ | ||
## Checking the example | ||
You can check our example project [here](http://robotlegsjs.io/RobotlegsJS-Phaser). | ||
## RobotlegsJS integration with Phaser CE (Community Edition) | ||
@@ -136,3 +127,3 @@ | ||
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. | ||
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-Framework/tree/master/packages/phaser-ce) plugin. | ||
@@ -143,3 +134,3 @@ ## RobotlegsJS Phaser for enterprise | ||
The maintainers of [@robotlegsjs/phaser](https://github.com/RobotlegsJS/RobotlegsJS-Phaser) and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-robotlegsjs-phaser?utm_source=npm-robotlegsjs-phaser&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) | ||
The maintainers of [@robotlegsjs/phaser](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/phaser) and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-robotlegsjs-phaser?utm_source=npm-robotlegsjs-phaser&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) | ||
@@ -146,0 +137,0 @@ ## License |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
427977
155
4562
49
136
1
+ Added@robotlegsjs/core@3.1.0(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@robotlegsjs/core@2.0.0(transitive)
- Removedtslib@1.14.1(transitive)
Updated@robotlegsjs/core@^3.0.0
Updatedtslib@^2.2.0