All products

Build a 2D scene with AI in PixiJS

Plan and implement an interactive browser scene with separate artwork, controls and labels, using the current PixiJS v8 conventions.

You can build a 2D scene with AI in PixiJS by describing what should move, what stays put and what someone can select. The pixijs skill guides the agent through the drawing library’s scene graph, assets and input handling. For a museum floor plan, for instance, room labels can move with the map while the legend stays in its corner.

Start with just one room. A selectable outline and a short label are enough to test whether the selection area matches the drawing. At that point it is inexpensive to change a pivot or the order of two layers. The same project can later load the full illustration and show a highlighted room when a visitor selects it.

What it does

  • Draw a first layout using simple coloured shapes.
  • Group elements that move together under one parent.
  • Place labels above artwork without disturbing pointer input.
  • Choose a sensible loading sequence for image bundles.
  • Adapt animation timing to the elapsed time between frames.

Install and use

  1. Use a local JavaScript or TypeScript project with PixiJS v8. A new project can use the maker’s official Node-based generator.
  2. Ask, “Show two selectable rooms, keep the legend fixed and reveal the selected room’s label.”
  3. Open the result in a browser and check the selection area and text at two window sizes.

FAQ

Source

Made by PixiJS. Original skill: pixijs, published on GitHub under the MIT licence.

View on GitHub