I've just started with Pixi and HTML5 in general. All the examples I've seen this far handle all the code in a single file, which seems unrealistic even for a small game (drawing analogy to Unity and other game engines).
With that in mind, I'd like to ask:
- Is there a recommended file / folder structure for Pixi projects?
- The HTML5 Canvas seems to be a black box of sorts. The sprites, shapes, meshes, etc are not added as children in the DOM, and therefore cannot be referenced in the same way as you'd get a regular DOM element. Is there a way (either through HTML/JS or Pixi) to access a portion of the canvas by name? (For instance ,load a Sprite named Box in loadImages.js and get a reference to Box in gameLoop.js)