KAPLAY v4000 Alpha 27
lajbel, 05/15/2026, in Mark’s house
Hey! lajbel here. It was a huge time off without new alphas! And also without new blogs. So, before going with the changelog let’s see how to install the new version:
npm i kaplay@next
# If you want to use specifically this alpha
# npm i kaplay@4000.0.0-alpha.27.1
Please note that this blog covers 2 versions, alpha 27 and alpha 27.1 with some fixes and changes related to the changes in alpha 27.
[4000.0.0-alpha.27] - 2026-03-19
Added
- Added
debug.warn()to log warning messages (#1028) - @lajbel - Added
debug.logMessage()to log a messagesa array with a wrapping style (warn, error, info) (#1028) - @lajbel - Added
KAPLAYOpt.topMostOnlyActivateoption. When true, only the topmost object will receive clicks. This avoids problems in a UI where elements overlap - @mflerackers - Added
KAPLAYOpt.fontFilterto separate rasterization filter applied to fonts of the filter applied to sprites (#1050) - @dragoncoder047 - Added
LoadFontOpt.filterandLoadSpriteOpt.filterto override the global filter for fonts/sprites (#1050) - @dragoncoder047 - Added
tileModeoption to 9-slice sprites with four tiling strategies:'none'(stretch all),'edges'(tile edges only),'center'(tile center only), and'all'(tile both edges and center) (#996) - @JustKira - Added a
calculate()method to the internal FPS counters, so advanced users can access them to create their own FPS monitor (#1010) - @dragoncoder047 - Added Intl.Segmenter-based grapheme splitting for proper Indic language
support, via the
localeoption inDrawTextOpt(#1013) - @shajidhasan - Added a
fill()component - @mflerackers - Added
lerpAngle()helper function to interpolate between clamped angles, preventing 360° spins during transitions from 180 to -180 (#1054) - @imaginarny - Added
piecewiseBezier()andpiecewiseCatmullRom()to evaluate curves with multiple points - @mflerackers
Removed
- (!) The texture uv coordinates for primitives (solid- or gradient-filled circles, rectangles, lines, and polygons) have now been changed to (1, 1) instead of (0, 0), so shaders written for primitives will need to be updated. (#1021) - @dragoncoder047
Changed
- (!) The global
onDraw()handler’s no-tag form now always draws before all game objects are drawn, regardless of whether it was attached after game objects were added (#977) - @lajbel - (!) The sprite data format has been changed to allow individual frames to
be on different GPU textures. Now
SpriteData.texdoesn’t exist, andSpriteData.framesis a list ofFrames instead of a list ofQuads. AFramecontainstexandq(quad) properties that contain that data. (#1021) - @dragoncoder047 - Updated the texture packer to use a new packing algorithm which may get more sprites onto the same texture, improving graphics batching performance (#1011) - @dragoncoder047
- Updated all sprite and font loading to pack everything in the same texture to allow it to all batch together, for speed and efficiency (#1021) - @dragoncoder047
- Added spritesheet repacking, so spritesheet images that contain lots of blank space don’t waste texture memory (#1021) - @dragoncoder047
Fixed
- Fixed vertical alignment of text within a now-consistent bounding box across browsers (#1053) - @imaginarny
- Fixed tiled mode drawing of sprites ignoring opacity when it was 0 (#1020) - @dragoncoder047
- Now, all global events handlers are available in scopes,
app.onXXXXandscene.onXXXX()(#977) - @lajbel - Fixed input events attached to paused ancestors not being paused (#1009) - @amyspark-ng, @dragoncoder047
- Fixed type
UniformValueunion not includingTexture, a valid option (#1018) - @dragoncoder047 - Text component no longer hangs if the requested width is too narrow for a single character - @dragoncoder047
- Fixed input events attached to paused ancestors not being paused (#1009) - @amyspark-ng, @dragoncoder047
- Fixed type
UniformValueunion not includingTexture, a valid option (#1018) - @dragoncoder047 - Fixed event crash when using
onLoador other events that doesn’t return an EventController, and then usinggo()(#1024) - @lajbel, credits to @dragoncoder047 - Fixed the unexpected behavior of not preserving the aspect ratio in
drawSprite(#1026) - @benhuangbmj - Fixed
onClick()andonCollide()tag variants no longer working - @mflerackers - Fixed
destroy()messing up enumeration duringupdate()andfixedUpdate(), thanks to @imaginarny for helping to find the cause - @mflerackers - Fixed canvas not resizing to fullscreen on
setFullscreen()(#1055) - @imaginarny
[4000.0.0-alpha.27.1] - 2026-05-12
Added
- Added a
repack: falseoption toloadSpite()and a repack parameter toloadSpriteAtlas(), for faster loading if you’re packing stuff at build-time (#1063) - @dragoncoder047
Changed
- (!) Updated “explicit
LoadSpriteOpt.frames” method of loading a sprite with animations (via eitherloadSprite()orloadSpriteAtlas()) to use pixel values for the coordinate space, which is more intuitive (#1061) - @dragoncoder047 - Added padding around edges of spritesheet to prevent stretch if uv ends up out of bounds (#1076) - @dragoncoder047
Fixed
- Updated texture packer refreshing to only refresh when a sprite is actually requested to be drawn, to reduce the number of times the texture is synced to the GPU, which is slow (#1058) - @dragoncoder047
- Fixed
loadBitmapFontFromSprite()so that the font drawn using it is drawn with the correct scale, as one would expect (#1063) - @dragoncoder047 - Added
exists()which also checks whether the object is not undefined. This should temporarily fix the problem with undefined objects during collision due to iterators being invalidated by destroy. - @mflerackers - Fixed broadphase event duplication on scene switch, causing repeated broadphase object registrations, which resulted in a performance drop (#1074) - @imaginarny, @mflerackers
- Fixed broadphase objects cleared on scene switch including those with
stay()(#1077) - @imaginarny, @mflerackers
What’s Changed
- fix: only sync texture when needed by @dragoncoder047 in #1058
- feat: give sprite frame explicitly in pixels by @dragoncoder047 in #1061
- chore(deps-dev): bump vite from 7.1.12 to 7.3.2 by @dependabot[bot] in #1065
- examples: update flappy and pause menu by @imaginarny in #1073
- fix: broadphase event duplication on scene switch by @imaginarny in #1074
- fix: broadphase objects with stay cleared on scene switch by @imaginarny in #1077
- feat: add back no repack option, also minor speedup of repacker by @dragoncoder047 in #1062
- fix: add padding around edges of spritesheet to prevent stretch if uv ends up out of bounds by @dragoncoder047 in #1076
- fix: changed font scaling to fix loadSpriteAsFont by @dragoncoder047 in #1063
- fix: refresh packer for direct referenced sprites resolving by @dragoncoder047 in #1089
New Contributors
- @JustKira made their first contribution in #996
- @shajidhasan made their first contribution in #1013
- @ProxyLoader made their first contribution in #1045
Thank to all contributors, donors and mantainers who contributed in this release!