Skip to content

Commit

Permalink
update pixijs example project
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoschenkel committed May 8, 2022
1 parent 0e857d7 commit 67d09cc
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 16 deletions.
11 changes: 5 additions & 6 deletions packages/pixi/example/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

import PIXI = require("pixi.js");

import { Context, MVCSBundle } from "@robotlegsjs/core";
import { AbstractRenderer, autoDetectRenderer, Container } from "pixi.js";
import { PixiBundle } from "../src/robotlegs/bender/bundles/pixi/PixiBundle";
import { ContextView } from "../src/robotlegs/bender/extensions/contextView/impl/ContextView";
import { MyConfig } from "./config/MyConfig";
import { RobotlegsView } from "./view/RobotlegsView";

export class Game {
private _canvas: HTMLCanvasElement;
private _stage: PIXI.Container;
private _renderer: PIXI.Renderer;
private _stage: Container;
private _renderer: AbstractRenderer;
private _context: Context;

public constructor() {
this._canvas = <HTMLCanvasElement>document.getElementById("canvas");
this._renderer = PIXI.autoDetectRenderer({
this._renderer = autoDetectRenderer({
width: 960,
height: 400,
view: this._canvas,
backgroundColor: 0xffffff
});
this._stage = new PIXI.Container();
this._stage = new Container();

this._context = new Context();
this._context
Expand Down
2 changes: 0 additions & 2 deletions packages/pixi/example/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

/// <reference path="../definitions/pixi.d.ts" />

import "reflect-metadata";
import { Game } from "./Game";

Expand Down
6 changes: 3 additions & 3 deletions packages/pixi/example/mediator/RobotlegsMediator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { SmileyView } from "../view/SmileyView";

export class RobotlegsMediator extends Mediator<RobotlegsView> {
public initialize(): void {
console.log("CircleMediator initialized!");
this.view.interactive = true;
console.log("RobotlegsMediator initialized!");

this.addViewListener("click", this.onClick, this);
}

Expand All @@ -22,6 +22,6 @@ export class RobotlegsMediator extends Mediator<RobotlegsView> {
}

public destroy(): void {
console.log("CircleMediator destroyed!");
console.log("RobotlegsMediator destroyed!");
}
}
6 changes: 3 additions & 3 deletions packages/pixi/example/mediator/SmileyMediator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { SmileyView } from "../view/SmileyView";

export class SmileyMediator extends Mediator<SmileyView> {
public initialize(): void {
console.log("ChildMediator initialized!");
this.view.interactive = true;
console.log("SmileyMediator initialized!");

this.addViewListener("click", this.onClick, this);
}

Expand All @@ -20,6 +20,6 @@ export class SmileyMediator extends Mediator<SmileyView> {
}

public destroy(): void {
console.log("ChildMediator destroyed!");
console.log("SmileyMediator destroyed!");
}
}
Binary file removed packages/pixi/static/images/pixijs-v5-logo.png
Binary file not shown.
Binary file added packages/pixi/static/images/pixijs-v6-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/pixi/static/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ h2 {
h1::after {
display: block;
content: "";
background: url("../images/pixijs-v5-logo.png") no-repeat;
background: url("../images/pixijs-v6-logo.png") no-repeat;
height: 33px;
width: 110px;
width: 96px;
margin-top: -0.3em;
float: right;
}
Expand Down

0 comments on commit 67d09cc

Please sign in to comment.