Releases: dustmop/rasterjs
multi-layer rendering, time control, and component base type
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 bePlane
, the basic unit of drawing, a 2d structure of 8-bit valuesScroll
is now used instead ofCamera
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 specificra.tick
value
Layering:
- any layer can be scrolled or use tilesets
- rendering semantics cleaned up for multi-layer scenes
--save
flag supports multiple layerssetComponent
can be used on any layer to bank switch components
Add-on features:
TilesetBuilder
is a display that saves rendered frames to a tilesetinspector
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 asField.xform
Polygon.resize
will scale up or down polygon objectsField.toArrays
instead ofField.pack
, mainly used for tests
hot fixes and Tileset convenience methods
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
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 moreshow
. If thedrawFunc
given torun
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 fromdrawImage
. This method can accept selections, tiles, or any Plane, not just Imagesxform
method- can flip a Plane horizontally or vertically
fillFrame
:traverse
andbuffer
optionssetColor
andfillColor
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
- SDL is optional, the default
- 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
andlook
andupon
- Tileset
addFrom
method, returns PatternTablefill
,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
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 thecolorMap
deterministically- fonts can be loaded from png files
tilesets
can be constructed from the plane after it has been drawn toready
&render
eventsfold
method for chaining calls with similar parameterscolorMap
uses a better cyan colorplane.resize
method to downscale or upscale using nearest neighbor- components can be serialized to images
interrupts
can use ranges of scanlinespalette.cycle
convenience method- on web, can choose which html element to render to using
useDisplay({displayElemID})
Bug fixes:
fillColor
anddrawImage
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 usecenterX
andcenterY
ra
haswidth
andheight
fieldscolorMap
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
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
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
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
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.