Skip to content

Releases: makeabilitylab/js

v0.2.1 Adds IIFE build

20 May 17:24

Choose a tag to compare

This release adds IIFE (Immediately Invoked Function Expression) builds for all modules, enabling simple <script> tag usage without ES module imports. This is especially useful for p5.js sketches, classroom demos, and other educational contexts where import statements add unnecessary complexity.

New

  • IIFE builds for every module: makelab.math.iife.js, makelab.graphics.iife.js, makelab.serial.iife.js, makelab.logo.iife.js, and makelab.all.iife.js (plus minified .min.js variants of each)
  • Global scope hoisting: commonly used exports (Serial, SerialEvents, SerialState, Vector, lerp) are automatically available as global variables after loading an IIFE build
  • Multiple IIFE coexistence: IIFE builds use extend: true, so loading multiple modules (e.g., makelab.math.iife.js + makelab.serial.iife.js) merges into window.Makelab without conflicts

Usage

<script src="https://cdn.jsdelivr.net/gh/makeabilitylab/js@0.2.1/dist/makelab.serial.iife.min.js"></script>
<script>
  const serial = new Serial();
  serial.on(SerialEvents.DATA_RECEIVED, (sender, data) => console.log(data));
</script>

Build changes

  • Rollup config refactored with createModuleConfigs() helper to generate ESM + IIFE outputs per module
  • Removed rollup.config.simple.js (redundant — rollup.config.js now covers all use cases)
  • Removed webpack.config.js (superseded by Rollup)
  • README updated with IIFE quick start, CDN URLs, and "Which build format?" guide

Full output files

Each module now produces 4 files: .js, .min.js, .iife.js, .iife.min.js (20 files total across 5 modules).

v0.2.0 Add serial module and color utility exports

20 May 13:44

Choose a tag to compare

New serial module

  • Web Serial API wrapper for text-based communication with Arduino/ESP32
  • Event-driven API: on(), off(), fireEvent() with string-based event types
  • Connection state tracking (closed, opening, open, closing)
  • Robust line splitting (handles \r\n, \n, \r)
  • Write guards, improved error messages, browser support check

New color utilities

  • Added rgbToHex() to color-utils.js
  • Exported hsvToRgb, rgbToHsv, rgbToHex, hexStringToRgb, and other color functions from graphics index

Demo apps

  • apps/serial/SerialTest — basic connect/send/receive test
  • apps/serial/SerialColorTest — bidirectional HSV color picker for NeoPixel control

Updated README with serial module documentation.

0.1.2 Added triangle art

12 Feb 22:09

Choose a tag to compare

Added triangle art .json input parser functionality

v0.1.0 Add "Makeability Lab" label to logo

11 Feb 15:36

Choose a tag to compare

Added easing animation support
Added "Makeability Lab" logo text beneath logo
Added L outline support
Changed static methods on MakeabilityLabLogo from getHeight to getGridHeight, etc.