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 readablethrunium.js. Both start with a version banner. - Internet Explorer is no longer supported (the bundle targets ES2017).
- Building requires Node 24.
Storage.setnow escapes the characters that break a cookie value:%,;, line breaks and other control characters, and leading/trailing spaces (each as its%XXcode). 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,SpriteandElem.Elemare now ES classes. They must be called withnew, and their methods live on the prototype instead of on each instance, which affectshasOwnProperty,Object.keys, object spread andTHRUNIUM.Game.call(this, …)-style inheritance. No known game is affected.Game.drawLine(…, width)now setsctx.lineWidth, which (like all canvas state) persists for later strokes until changed.
Fixed
Game.getMouseCordsno longer depends on a global variable namedgame.Elem.resizeno 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.Inputnow creates an<input>instead of a<button>.SpritecomputesfullHeightandspriteHeightfrom the image height, not its width.Sprite.setAnimTimenow sets the animation duration instead of overwriting itself.Sprite.drawAnimnow honorssetLoop.Vector.normalizenow returns a real unit vector (the zero vector stays zero).Game.drawLinenow respects itswidthargument.getRandom(min, max, true)no longer returns floats abovemax; the result is in[min, max).- Values containing
;now surviveStorage.set/Storage.get; 1.0.0 cut them off at the;. - The
devicemotionhandler is now actually attached. THRUNIUM.ready(fn)called after the page has loaded now runs; 1.0.0 silently ignored anyready()call after the first.Storage.getno longer throws when another cookie contains a malformed%escape.getMouseCordsno longer throws on a touch-end event without atouchesarray.
WIP
- The
Storageuser-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.
v1.0.1no docs
- thrunium.js
v1.0.0no docs
- thrunium.js