Pixi won't render the container from makeTiledWorld. I know that I am properly loading the json and tileset image. I do not know if I am properly telling pixi to show me the map. I'm not totally sure I'm doing it correctly.
It only renders a white screen. The message appears correctly but nothing else.
let camera = {}
let world = {}
let g = {}
let objectsLayer = {}
function setup() {
document
.getElementById('HexiCanvas')
.appendChild(document.getElementsByTagName('canvas')[0])
g.fps = 1;
console.log(PIXI.loader.resources)
world = g
.tileUtilities
.makeTiledWorld(NewWorld, Tileset)
camera = g.worldCamera(world, world.worldWidth, world.worldHeight, g.canvas)
objectsLayer = world.getObject("Elf");
let message = g.text("No items found", "12px puzzler", "black");
message.setPosition(10, 10);
g.state = play;
}
function load() {}
function play() {
console.log("Tick Tock!")
camera.follow(objectsLayer)
}
let filesToLoad = [NewWorld, Tileset]
g = hexi(400, 250, setup, filesToLoad, load);
g.start()
Hi all,
Pixi won't render the container from makeTiledWorld. I know that I am properly loading the json and tileset image. I do not know if I am properly telling pixi to show me the map. I'm not totally sure I'm doing it correctly.
It only renders a white screen. The message appears correctly but nothing else.
let camera = {} let world = {} let g = {} let objectsLayer = {} function setup() { document .getElementById('HexiCanvas') .appendChild(document.getElementsByTagName('canvas')[0]) g.fps = 1; console.log(PIXI.loader.resources) world = g .tileUtilities .makeTiledWorld(NewWorld, Tileset) camera = g.worldCamera(world, world.worldWidth, world.worldHeight, g.canvas) objectsLayer = world.getObject("Elf"); let message = g.text("No items found", "12px puzzler", "black"); message.setPosition(10, 10); g.state = play;
} function load() {} function play() { console.log("Tick Tock!") camera.follow(objectsLayer) } let filesToLoad = [NewWorld, Tileset] g = hexi(400, 250, setup, filesToLoad, load); g.start()