Releases: bhj/cdgraphics
Releases · bhj/cdgraphics
7.0.0
Breaking changes:
- The package is now in ECMAScript Module (ESM) format
- The
load()method has been removed in favor of simply passing your file's ArrayBuffer to the constructor
Improved:
- Moved to TypeScript
- Moved build system to Vite; to run the demo you can now
npm run dev
Fixed:
- Rendering issue with titles that finish scrolling at non-zero offsets (thanks hcs64)
6.0.1
6.0.0
v6 is a major change making the library significantly smaller and more flexible. Please see the README for updated example usage.
- Instead of drawing to a canvas,
render()now simply returns an ImageData object along with some metadata. This gives full control over your canvas (if a canvas is used at all!) - The
onBackgroundChangecallback is removed; instead, check thebackgroundRGBAmetadata provided with each rendered frame - The
setOptions()method is removed, as options are now arguments torender() - When loading a file, you now only need to pass the ArrayBuffer of the response (the creation of the
new Uint8Arrayis handled internally)
Improved:
- Instructions are now processed JIT, significantly reducing
load()time - Added
contentBoundsmetadata describing a bounding box that fits the rendered frame's non-transparent content
5.0.0
Breaking changes/migrating from 4.x:
v5 has a new, simple API. Instead of play(), pause() and syncTime(), you now control the requestAnimationFrame loop and render() a frame at the currentTime. This also enables full rewind/random seek support. See the README for more on using render().
4.0.0
Breaking changes/migrating from 3.x:
- The
forceTransparentoption has been renamedforceKey. Subsequently, theforceTransparent()method has been removed, andforceKeycan be set with the newsetOptions()method.
Improved:
- Added shadow effects support
- Significantly reduced CPU usage during idle frames
3.0.0
Breaking changes/migrating from 2.x:
- Internet Explorer, Chrome < v30, and Firefox < v51 are no longer officially supported (removed vendor prefixes for
imageSmoothingEnabled) - The
stop()method has been renamedpause() - The
sync()method has been replaced withsyncTime()and now expects a time in seconds (instead of ms)
Improved:
- Graphics now scale fluidly with the canvas instead of at fixed increments
- Canvas no longer temporarily appears blurry while resizing