npm.nicfv.com
    Preparing search index...

    Changelog

    • Compatibility update for Typescript v6+
    • Overhaul saving, loading, and clearing local browser data
      • Should run much faster now (e.g. O(1) instead of O(n))
      • Now accepts generic data types, it doesn't have to extend StoreData
    • Minor updates in the example showing that loading data may return undefined
    • Remove unnecessary StoreData object
    • Add functions to save, load, and clear data (local browser storage)
    • Add new example showing how to save, load, and clear data
    • Set boxSizing to content-box to fix canvas sizing in common CSS overrides
    • Add keepFocused option to refocus the canvas when it loses focus
    • Add the ability to play audio!
      • Audio is initialized in multiple "tracks", like canvas "layers" for graphics
      • Audio can be played and stopped in a specific track
      • All audio can be muted/unmuted
      • Audio can only be started after the canvas has been interacted with
    • Screen recordings can only be started after the canvas has been interacted with
    • Add new audio example
    • Major updates to main readme file
    • All layers are drawn onto a single canvas element
    • Support simple screen recording (no audio)
    • Updates to paint example
    • Add main README file
    • Remove get/setPixel() functions
      • Remove hardware/software acceleration type (only used for pixel manipulation)
    • Remove shorthand in loop() function from returning an array of Drawable, to make behavior consistent for single and multi-layered canvases
    • Minor updates to animation example
    • Add instructions to both examples
    • Support canvas layers
      • Defaults:
        • One layer (zero-indexed, so layer ID is 0)
        • Drawables are drawn onto layer 0 (including returned from loop() callback)
        • Canvas.clear() clears all layers unless a layer is specified
        • Get/set pixel functions default to layer 0
    • Accept hardware/software acceleration toggle configuration parameter
    • Canvas.screenshot() function now accepts a name for the screenshot (optionally)
    • Update simple paint example so that it accepts user keyboard input to change brush size and color
    • Add animation example
    • Expose Canvas.width and Canvas.height
    • Change setInterval to requestAnimationFrame
    • Create and expose several new functions in the Canvas class:
      • getMousePosition
      • getPixel
      • setPixel
      • screenshot
    • Main animation loop() function can return an array of Drawable to automatically render
    • Add first iteration of Canvas class
      • Support several callback functions (keydown/up, mousedown/up, mousemove)
    • Create a basic painting example
    • Add details in package.json
    • Initialize empty package on npm