Skip to content

web capabilities

Choose a tag to compare

@dustmop dustmop released this 05 Aug 17:00
· 143 commits to main since this release

This release focuses on vastly improving capabilities on the web, by providing more useful events, better handling image loading, rendering individual components, and fixing lots of bugs. It contains a number of new features, major capability improvements, and API cleanups.

Features:

  • a grid can be easily added to the display using setGrid
  • jpg images can be loaded; their color gets downsampled
  • sprites component, with flags (flip, behind, etc) for sprites
  • dip switches allow easy run-time configuration
  • attributes component, controls palette per position
  • multiple scenes can run in the same web page

Improvements:

  • SDL display no longer blocks the node.js event loop
  • loadImage calls on the web fill the colorMap deterministically
  • fonts can be loaded from png files
  • tilesets can be constructed from the plane after it has been drawn to
  • ready & render events
  • fold method for chaining calls with similar parameters
  • colorMap uses a better cyan color
  • plane.resize method to downscale or upscale using nearest neighbor
  • components can be serialized to images
  • interrupts can use ranges of scanlines
  • palette.cycle convenience method
  • on web, can choose which html element to render to using useDisplay({displayElemID})

Bug fixes:

  • fillColor and drawImage work on selections
  • gif saving takes zoom into account
  • images on the web load using relative paths

API cleanups:

  • oscil uses better named parameters
  • component construction is more consistent
  • drawCircle can use centerX and centerY
  • ra has width and height fields
  • colorMap in use everywhere, instead of "colorSet"
  • image.look makes it easier to use images for palette cycling

Partially implemented:

  • multiple layers, only 2 allowed and only in SDL
  • ES6 features, not used everywhere yet
  • -v command-line flag for verbose logging, incomplete