Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

Recommendations on project organization and references

$
0
0

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:

  1. Is there a recommended file / folder structure for Pixi projects?
  2. 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)

Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>