Skip to content

Thrunium

Versions & changelog

Every Thrunium release, newest first.

v1.1.0latest

  • thrunium.js
  • thrunium.min.js
  • thrunium.min.js.map

Changed

  • The engine is now written in TypeScript. The public API is unchanged, including existing misspelled names (rezise, contruct, getMouseCords, succes).
  • A minified build (thrunium.min.js) and its source map (thrunium.min.js.map) are published next to the readable thrunium.js. Both start with a version banner.
  • Internet Explorer is no longer supported (the bundle targets ES2017).
  • Building requires Node 24.
  • Storage.set now escapes the characters that break a cookie value: %, ;, line breaks and other control characters, and leading/trailing spaces (each as its %XX code). Everything else, including JSON saves, is stored as-is like in 1.0.0, so large saves still fit the browser's 4 KB cookie limit.
  • Game, Vector, Sprite and Elem.Elem are now ES classes. They must be called with new, and their methods live on the prototype instead of on each instance, which affects hasOwnProperty, Object.keys, object spread and THRUNIUM.Game.call(this, …)-style inheritance. No known game is affected.
  • Game.drawLine(…, width) now sets ctx.lineWidth, which (like all canvas state) persists for later strokes until changed.

Fixed

  • Game.getMouseCords no longer depends on a global variable named game.
  • Elem.resize no longer leaks a global or throws in strict mode.
  • Element hover styling was reversed: entering applied the normal style and leaving applied the hover style. Enter now applies the hover style and leave restores the normal one. Elements that never set a hover style look as before.
  • Elem.Input now creates an <input> instead of a <button>.
  • Sprite computes fullHeight and spriteHeight from the image height, not its width.
  • Sprite.setAnimTime now sets the animation duration instead of overwriting itself.
  • Sprite.drawAnim now honors setLoop.
  • Vector.normalize now returns a real unit vector (the zero vector stays zero).
  • Game.drawLine now respects its width argument.
  • getRandom(min, max, true) no longer returns floats above max; the result is in [min, max).
  • Values containing ; now survive Storage.set/Storage.get; 1.0.0 cut them off at the ;.
  • The devicemotion handler is now actually attached.
  • THRUNIUM.ready(fn) called after the page has loaded now runs; 1.0.0 silently ignored any ready() call after the first.
  • Storage.get no longer throws when another cookie contains a malformed % escape.
  • getMouseCords no longer throws on a touch-end event without a touches array.

WIP

  • The Storage user-token flow (reqToken, userToken, timeout, loginPopup, accessRequested, _options, setReqToken, reqUserToken, _receiveMessage, request) is kept for API compatibility only. It targets endpoints that no longer exist and will change when authentication is added.
Read the v1.1.0 docs →

v1.0.1no docs

  • thrunium.js

v1.0.0no docs

  • thrunium.js