All Versions
25
Latest Version
Avg Release Cycle
-
Latest Release
-
Changelog History
Page 1
Changelog History
Page 1
-
v3000.0.0 Changes
Game Objects
- โ added scene graph, game objects are now stored in a tree-like structure and can have children with
obj.add()
const bean = add([ sprite("bean"), pos(160, 120), ]) const sword = bean.add([ sprite("sword"), // transforms will be relative to parent bean object pos(20, 20), rotate(20), ]) const hat = bean.add([ sprite("hat"), // transforms will be relative to parent bean object pos(0, -10), ]) // children will be moved alongside the parent bean.moveBy(100, 200) // children will be destroyed alongside the parent bean.destroy()
- โ added
GameObj#getAll()
for recursively getting children game objects (get()
only gets from direct children) - โก๏ธ changed object update order from reversed to not reversed
- (BREAK) removed
GameObj#every()
andGameObj#revery()
in favor ofobj.get().forEach()
- (BREAK) renamed
GameObj#_id
toGameObj#id
- (BREAK)
addLevel()
now returns aGameObj
which has all individual grid objects as its children game objects, withLevelComp
containing its previous methods
Components
- โ added collision support for rotate shapes and polygons
- โ added
Area#onCollideUpdate()
andArea#onCollideEnd()
events - โ added
Area#onHover()
andonHover()
to register an event that runs once when an object(s) is hovered - โ added
Area#onHoverEnd()
andonHoverEnd()
to register an event that runs once when an object(s) stopped being hovered - (BREAK) renamed
onHover()
toonHoverUpdate()
(it registers an event that runs every frame when an object is hovered) - โ added
Body#onFall()
which fires when object starts falling - โ added
Body#onPhysicsResolve()
andBody#onBeforePhysicsResolve()
to register events relating to collision resolution - โ added
body({ stickToPlatform: false })
option to turn off object moving with platform - โ added
doubleJump()
component to enable double jump - (BREAK) removed
Body#doubleJump()
in favor ofdoubleJump()
component - (BREAK) renamed
Body#weight
toBody#gravityScale
- (BREAK) renamed
Body#onFall()
toBody#onFallOff()
which triggers when object fall off a platform - (BREAK) removed
solid()
in favor ofbody({ isStatic: true })
- (BREAK) defining
gravity()
is now required for enabling gravity,body()
by default will only prevent objects from going through each other - (BREAK) renamed
origin()
toanchor()
, so it won't mess up typescript in global context - (BREAK)
anchor
(previouslyorigin
) no longer controls text alignment, usealign
option instead - (BREAK) changed
outview()
tooffscreen()
, and uses a much more performant check for if object is offscreen- removed
offset
option in favor of a simplerdistance
option - renamed
onExitView()
andonEnterView()
toonExitScreen()
andonEnterScreen()
- removed
- (BREAK) removed
cleanup()
component in favor ofoffscreen({ destroy: true })
- โ added
OpacityComp#fadeOut()
- โ added
fadeIn()
component stay()
now accepts a list of scenes to stay for, likestay(["gameover", "menu"])
๐ฑ Assets
- โ added
loadProgress()
that returns a0.0 - 1.0
that indicates current asset loading progress - โ added
onLoadUpdate()
to register a custom loading screen (see "loader" example)
Font
- โ added
loadFont()
to load.ttf
,.otf
,.woff2
or any font supported by browserFontFace
- (BREAK) renamed previous
loadFont()
toloadBitmapFont()
- (BREAK) removed built-in
apl386
,apl386o
,sink
,sinko
(still available underexamples/fonts
) - โ added default font
happy
- ๐ changed default font size to
36
Drawing
- ๐ fixed visual artifacts on text rendering
- โ added
colors
option todrawPolygon()
that controls the color of each corner - โ added
gradient
option todrawRect()
that specifies the start and end color - โ added option
loadingScreen
tokaboom()
where you can turn off the default loading screen - โ added
drawMasked()
anddrawSubtracted()
- โ added
pushRotateX()
,pushRotateY()
andpushRotateZ()
- โ added
pixelDensity
option tokaboom()
- ๐ shader error logs now yields the correct line number
Input
- โ added virtual controls for mobile, enabled with
virtualControls: true
inkaboom()
- โ added
isVirtualButtonPressed()
,isVirtualButtonDown()
,isVirtualButtonReleased()
- โ added
onVirtualButtonPress()
,onVirtualButtonDown()
,onVirtualButtonRelease()
- ๐ fixed touches not treated as mouse
- (BREAK) changed
onTouchStart()
,onTouchMove()
andonTouchEnd()
callback signature to(pos: Vec2, touch: Touch) => void
(exposes the nativeTouch
object)
Misc
- (BREAK) removed all deprecated functions in v2000.2
- (BREAK) raised esbuild target to
esnext
- ๐ moved type defs for global functions to
import "kaboom/global"
// if use global functions import "kaboom" import "kaboom/global" // required to load global types kaboom() // will have definition add() // if don't use global function import "kaboom" kaboom({ global: false }) // type error, won't pollute global namespace if not manually import "kaboom/global" add()
- โ added
tween()
for tweening, and a set of built-in easing functions ineasings
onMousePress(() => { tween(bean.pos.x, mousePos().x, 1, (val) => bean.pos.x = val, easings.easeOutBounce) tween(bean.pos.y, mousePos().y, 1, (val) => bean.pos.y = val, easings.easeOutBounce) })
- (BREAK) changed all event handlers to return a
EventController
object instead of a function to cancel event - โ added
Event
andEventHandler
// previous const cancel = onUpdate(() => { /* ... */ }) cancel() // now, can do more stuff const ev = onUpdate(() => { /* ... */ }) ev.paused = true ev.cancel()
- timers can now be paused
const timer = wait(4, () => { /* ... */ }) timer.paused = true timer.resume() const timer = loop(1, () => { /* ... */ }) timer.paused = true timer.resume()
kaboom()
now automatically focuses the canvas- โ added
quit()
to end everything - โ added
download()
,downloadText()
,downloadJSON()
,downloadBlob()
- โ added
Recording#stop()
to stop the recording and returns the video data as mp4 Blob - โ added
debug.numFrames()
to get the total number of frames elapsed - โ added
onError()
to handle error or even custom error screen - โ added
onResize()
to register an event that runs when canvas resizes - (BREAK) renamed
cursor()
tosetCursor()
- (BREAK) renamed
fullscreen()
tosetFullscreen()
- (BREAK) renamed
isTouch()
toisTouchScreen()
- (BREAK) removed
layers()
in favor of parent game objects (see "layers" example) - (BREAK) removed
load()
event for components, useonLoad()
inadd()
event - (BREAK) removed
debug.objCount()
in favor ofgetAll().length
- โ added
debug.numFrames()
to get the current frame count
- โ added scene graph, game objects are now stored in a tree-like structure and can have children with
-
v2001.0.0 Changes
- brought back
loadMark()
- (BREAK) removed all deprecated functions in v2000.2
- game objects can have children with
obj.add()
now which share the parent transform - (BREAK) raised esbuild target to
esnext
- โ added
make()
to make a game object without adding to the scene - โ added support for
add()
to add unattached game objects to the sceneadd(make([...comps]))
- โ added
colors
option todrawPolygon()
that controls the color of each corner - โ added
gradient
option todrawRect()
that specifies the start and end color - โ added
loadProgress()
that returns a0.0 - 1.0
that indicates current asset loading progress - โ added
kaboom()
optionloadingScreen
where you can turn off the default loading screen - โ added
drawMasked()
anddrawSubtracted()
- (BREAK) removed
layers()
in favor of parent game objects (see "layers" demo) - โ added
pushRotateX()
,pushRotateY()
andpushRotateZ()
- โ added
pixelDensity
option tokaboom()
- โ added support for non bitmap fonts
- (BREAK) rename
loadFont()
toloadBitmapFont()
- โ added
loadFont()
to load.ttf
,.otf
,.woff2
or any font supported by browserFontFace
- (BREAK)
origin
no longer controls text alignment, usealign
option instead - โ added
quit()
to end everything - ๐ shader error logs now yields the correct line number
- โก๏ธ changed object update order from reversed to not reversed
- โ added
download()
,downloadText()
,downloadJSON()
,downloadBlob()
- โ added
Recording#stop()
to stop the recording and returns the video data as mp4 Blob - โ added
debug.numFrames()
to get the total number of frames elapsed - ๐ fixed visual artifacts on text
- โ added
onError()
to handle error or even custom error screen - โ added
onLoading()
to register a custom loading screen (see "loader" example) - ๐ fixed touches not treated as mouse
- (BREAK) changed
onTouchStart()
,onTouchMove()
andonTouchEnd()
callback signature to(pos: Vec2, touch: Touch) => void
(exposes the nativeTouch
object) - โ added
onResize()
to register an event that runs when canvas resizes - (BREAK)
GameObj#_id
has been renamed toGameObj#id
- (BREAK) removed
load()
event for components, useonLoad()
inadd()
event - (BREAK) renamed
Body#onFall()
toBody#onFallOff()
which triggers when object fall off a platform, addedBody#onFall()
which fires when object starts falling - (BREAK)
addLevel()
now returns aGameObj
which has all individual grid objects as its children game objects, withLevelComp
containing its previous methods - (BREAK) defining
gravity()
is now required for enabling gravity,body()
by default will only prevent objects from going through each other, removedsolid()
in favor ofbody({ isStatic: true })
- (BREAK) renamed
Body#weight
toBody#gravityScale
- (BREAK) removed
GameObj#every()
andGameObj#revery()
in favor ofobj.get().forEach()
- โ added
GameObj#getAll()
for recursively getting children game objects (get()
only gets from direct children) - โ added
Area#onCollisionActive()
andArea#onCollisionEnd()
events - โ removed
debug.objCount()
in favor ofgetAll().length
- โ added
debug.numFrames()
to get the current frame count - (BREAK) renamed
cursor()
tosetCursor()
- (BREAK) renamed
fullscreen()
tosetFullscreen()
- ๐ moved type defs for global functions to
import "kaboom/global"
- (BREAK) removed
apl386
andapl386o
as default fonts, default font changed tosink
,, and added a default font size of16
- brought back
-
v2000.2.6 Changes
- ๐ fixed text always being wrapped if updated
- ๐ fixed text comp properties
letterSpacing
,charSpacing
,transform
,styles
not being exposed
-
v2000.2.5 Changes
- ๐ fixed updating
font
property on gameobj not updating the text font
- ๐ fixed updating
-
v2000.2.4 Changes
- ๐ fixed
focus()
not properly exported - ๐ deprecated
focus()
in favor ofcanvas.focus()
due to name collision
- ๐ fixed
-
v2000.2.3 Changes
- ๐ fixed
kaboom.d.ts
completely messed up
- ๐ fixed
-
v2000.2.2 Changes
- ๐ fixed doc for
TextCompOpt#styles
andDrawTextOpt#styles
- ๐ fixed doc for
-
v2000.2.1 Changes
- ๐ fixed updates not running at all when
kaboom({ debug: false })
- ๐ fixed updates not running at all when
-
v2000.2.0 Changes
- โ added
formatText()
anddrawFormattedText()
- โ added
charSpacing
andlineSpacing
inTextCompOpt
andDrawTextOpt
- โ added optional
transitions
argument instate()
to define allowed transitions - โ added
StateComp#onStateTransition
to register event for specific transitions - โ added syntax to style a piece of text
"this is a [styled].wavy text"
andstyle
option inTextCompOpt
andDrawTextOpt
to define the styles withCharTransformFunc
- ๐ deprecated
dir()
in favor ofVec2.fromAngle()
- ๐ fixed
onTouchEnd()
fired ontouchmove
- โ added
outview()
component to control behavior when object leaves visible area - ๐ deprecated
cleanup(delay?: number)
in favor ofcleanup(opt?: CleanupOpt)
- ๐ deprecated
mouseWorldPos()
in favor oftoWorld(mousePos())
- ๐ deprecated
rng()
in favor ofnew RNG()
- โ added classes
Vec2
,Color
,Mat4
,Timer
,Quad
,RNG
,Line
,Rect
,Circle
- โ added deprecation warning
- ๐ fixed letterbox view mode
- ๐ allow non-stretch letterbox
- ๐ fixed mouse position malfunction in fullscreen, stretch and letterbox mode
- โ added
-
v2000.1.8 Changes
- ๐ fixed
Color#eq()
not giving correct result
- ๐ fixed