Skip to content

Commit

Permalink
upgrade pixi.js to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoschenkel committed May 13, 2022
1 parent 1cc9711 commit 532d5db
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
5 changes: 3 additions & 2 deletions packages/pixi-signalmediator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@
"tslib": "^2.3.0"
},
"peerDependencies": {
"pixi.js": "^5.0.0",
"pixi.js": "^6.0.0",
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
"@robotlegsjs/eventemitter3": "^3.0.0",
"@rushstack/eslint-config": "^2.3.4",
"@types/bluebird": "^3.5.36",
"@types/chai": "^4.2.21",
Expand All @@ -89,7 +90,7 @@
"karma-sourcemap-writer": "^0.1.2",
"karma-webpack": "^5.0.0",
"mocha": "^9.0.2",
"pixi.js": "^5.2.1",
"pixi.js": "^6.3.2",
"prettier": "^2.6.2",
"puppeteer": "^10.1.0",
"reflect-metadata": "^0.1.13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

import { IEventDispatcher, injectable } from "@robotlegsjs/core";
import { injectable } from "@robotlegsjs/core";
import { Mediator } from "@robotlegsjs/pixi";
import { ISignal } from "@robotlegsjs/signals";
import { DisplayObject } from "pixi.js";
import { ISignalMap } from "../api/ISignalMap";
import { SignalMap } from "./SignalMap";

Expand All @@ -18,7 +19,7 @@ import { SignalMap } from "./SignalMap";
* <p>Override initialize and destroy to hook into the mediator lifecycle.</p>
*/
@injectable()
export abstract class SignalMediator<T extends IEventDispatcher> extends Mediator<T> {
export abstract class SignalMediator<T extends DisplayObject> extends Mediator<T> {
/*============================================================================*/
/* Protected Properties */
/*============================================================================*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

import { EventDispatcher, EventMap } from "@robotlegsjs/core";
import { EventEmitterMap } from "@robotlegsjs/eventemitter3";
import { ISignal } from "@robotlegsjs/signals";
import { DisplayObject } from "pixi.js";
import { SignalMediator } from "../../../../../../src/robotlegs/bender/extensions/signalMediator/impl/SignalMediator";

export class TestMediator extends SignalMediator<EventDispatcher> {
export class TestMediator extends SignalMediator<DisplayObject> {
public constructor() {
super();

this.eventMap = new EventMap();
this.eventMap = new EventEmitterMap();
}

public addToSignalRouter(signal: ISignal, handler: Function): void {
Expand Down
10 changes: 7 additions & 3 deletions packages/pixi-signalmediator/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
/* Module Resolution Options */
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"types": ["reflect-metadata"] /* Type declaration files to be included in compilation. */,
"allowSyntheticDefaultImports": false /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
"esModuleInterop": false /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
/* Basic Config Options */
"allowJs": false /* Allow javascript files to be compiled. */,
"checkJs": false /* Report errors in .js files. */,
Expand Down Expand Up @@ -38,5 +38,9 @@
"emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */
},
"include": ["./src/**/*.ts"],
"files": ["./node_modules/@robotlegsjs/pixi/definitions/pixi.d.ts"]
"paths": {
"mini-signals": [
"node_modules/resource-loader/typings/mini-signals.d.ts" /* Loaders needs this to use the more strict mini-signal types */
]
}
}

0 comments on commit 532d5db

Please sign in to comment.