Skip to content

Releases: dustmop/rasterjs

multi-layer rendering, time control, and component base type

07 Apr 22:30
Compare
Choose a tag to compare

The release adds methods for controlling time, improvements to multi-layer rendering, fixes for a number of core methods, and in addition cleans up the base class hierarchy.

Components renamed:

  • Field is now the name for what used to be Plane, the basic unit of drawing, a 2d structure of 8-bit values
  • Scroll is now used instead of Camera

Time control:

  • ra.pause to pause the flow of time
  • framerate is automatically limited to 60fps on high refresh monitors
  • --tick flag for command-line allows rendering at a specific ra.tick value

Layering:

  • any layer can be scrolled or use tilesets
  • rendering semantics cleaned up for multi-layer scenes
  • --save flag supports multiple layers
  • setComponent can be used on any layer to bank switch components

Add-on features:

  • TilesetBuilder is a display that saves rendered frames to a tileset
  • inspector can be used to capture rendering data (web only)
  • dipchange event
  • contrib tool for importing "Tiled" projects

Various methods added:

  • Tile.xform which is the same as Field.xform
  • Polygon.resize will scale up or down polygon objects
  • Field.toArrays instead of Field.pack, mainly used for tests

hot fixes and Tileset convenience methods

16 Dec 17:58
Compare
Choose a tag to compare

This release is a minor correction to the v0.7.5 release. It fixes a bug in the dependencies, fixes a mistake in the native add-on, and adds a few small convenience methods to the Tileset object.

components & core API upgrades

28 Nov 18:02
Compare
Choose a tag to compare

This release aims to solidify the Core API of raster.js, by better defining semantics of how rendering works, and rewriting many of the Components used by the renderer. In addition there are bug fixes for specific runtime environments and a couple of new features.

Features:

  • Multiple layers work on webgl display
  • ImageLoader can load images using an alias
  • Events: click with region, and sendMessage
  • Polygon objects can be constructed with a center point

Core API improvements:

  • run method only, no more show. If the drawFunc given to run is null, the display will render once, then stop the main loop
    • runFrame can be called to re-render. This is an efficient way to only render when changes occur.
  • paste method, renamed from drawImage. This method can accept selections, tiles, or any Plane, not just Images
  • xform method
    • can flip a Plane horizontally or vertically
  • fillFrame: traverse and buffer options
  • setColor and fillColor must get numbers
  • selections can have names

Environments:

  • Node.js
    • SDL is optional, the default http display works without it, as does --save
    • optional instrumentation of SDL loop
    • --time-tick command-line option
    • --save on command-line will composite layers
  • Web
    • inspector will keep re-rendering components
    • fix race condition caused by document.readyState bug

Components:

  • Palette
    • removed the colorMap component, just use the palette's rgbmap
    • added the concept of entries, which mirror how the old palette used to work
    • easier cycling using palette.cycle and look and upon
  • Tileset
    • addFrom method, returns PatternTable
    • fill, put, serialize, fillPattern methods
    • serialize & deserialize
  • Sprites
    • render sprites with a lower index on top
  • Display
    • better API for custom displays
  • Colorspace
    • renamed from attributes
    • fill, put, fillPattern methods

web capabilities

05 Aug 17:00
Compare
Choose a tag to compare

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

browserify support

31 Jan 21:12
Compare
Choose a tag to compare

This preview release adds some new features, fixes missing pieces of recent features, and most of all, makes it possible to include raster.js in another web project using browserify.

Features:

  • Browserify support, raster.js can be included in other projects
  • Tilesets can be animated, and saving a gif works
  • Interrupts allow for rasterization effects
  • Preliminary implementation for attributes
  • Zoom affects saved pngs
  • ra.then waits for content to load on the web

preview release 3

28 Nov 21:16
Compare
Choose a tag to compare

This incremental update adds to v0.6.0 by including additional error messages, and an example app that is easy to start working with. A number of important refactoring have been put in place to support future features.

preview release 2

13 Nov 18:48
Compare
Choose a tag to compare

The feature set is now more filled out, and is getting closer to the final intended product. This release includes support for Windows, text handling, color cycling, tile sets, scrolling, and lots of refactoring and cleanup.

preview release

22 Jul 02:27
Compare
Choose a tag to compare
preview release Pre-release
Pre-release

This is a preview release of raster.js intended for testers. The API and set of defaults are likely to change in the future. Some features are incomplete or missing, despite being described in documentation.