excaliburjs / Excalibur

🎮 Your friendly TypeScript 2D game engine for the web 🗡️

Home Page:https://excaliburjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScreenAppender logger appears to be broken

eonarheim opened this issue · comments

Steps to Reproduce

var game = new ex.Engine({
  width: 1000,
  height: 1000
});

const player1 = new ex.Actor({
  name: "player",
  width: 25,
  height: 25,
  color: ex.Color.Red,
  pos: new ex.Vector(15, 15),
});

let screenLog = new ex.ScreenAppender(300, 400);

ex.Logger.getInstance().addAppender(screenLog);

//player1.enableCapturePointer = true;
console.log(player1);

let subscr = player1.on("pointerdown", pe => {
  ex.Logger.getInstance().info("pointer event: ", pe);
  console.log("pointer event: ", pe);

  if (player1.hasTag("bound")) player1.removeTag("bound");
  else player1.addTag("bound");
});
console.log(subscr);

game.input.pointers.on("move", pe => {
  //Logger.getInstance().info("pointer event: ", pe);

  if (player1.hasTag("bound")) {
    console.log("bound actor");
  }
});

game.add(player1);

game.start();

Expected Result

Should log to the screen

Actual Result

Nothing logged

Environment

  • browsers and versions: Latest chrome
  • operating system: Windows
  • Excalibur versions: v0.28.6

Current Workaround

None :(

image

i was able to move the screenappender canvas 'manually' to top left

and get it to show data sent to it

issue is position absolute and lack of top/left css properties