Releases: kaplayjs/kaplay
v3001.0.6
Hey! New release in these holiday dates 🎅🏻
This update comes with some update in texts and finally adding the global trigger! I left you the changelog. Thanks for staying up with KAPLAY! And merry xmas!
[3001.0.6] "Santa Events" - 2024-12-27
Added
-
Added
trigger(event, tag, ...args)
for global triggering events on a
specific tag (experimental) - @lajbeltrigger("shoot", "target", 140); on("shoot", "target", (obj, score) => { obj.destroy(); debug.log(140); // every bomb was 140 score points! });
-
Added
{ override?: true }
inCharTransform
for overridding text styles -
@dragoncoder047add([ pos(100, 150), text("With override: Hello [foo]styled[/foo] text", { transform: { color: BLACK, // Default text color for every character }, styles: { foo: { color: RED, // [foo] will be red override: true, // will override the black def color }, }, }), ]);
-
Added
{ indentAll?: boolean }
inTextCompOpt
to indent every new line -
@dragoncoder047 -
Added TypeScript definition for all App Events and missing Game Object
Events - @lajbel
Fixed
- Fixed an incorrect mention to the component in
TextInputComp
type -
@dragoncoder047
v3001.0.5
[3001.0.5] - 2024-12-18
Added
- Added tags and components separation in
KAPLAYOpt.tagsAsComponents
(experimental) - Added
.is()
,.tag()
and.untag()
toGameObjRaw
, check, add and remove
(experimental) - Added
.has()
toGameObjRaw
, to check if a game object has a component tags
(experimental) - Added events for listen to comps being removed or added
onUse()
and
onUnused()
(experimental) - Added
k.cancel()
to cancel the current event (experimental) -
onKeyPress("space", () => { // do something // cancel the event return cancel(); });
- Added
getDefaultLayer()
to get the default layer (experimental) - Added
getLayers()
to get the layers list (experimental) - Added many JSDoc specifiers on many functions (
@require, @deprecated, @since, @group
, etc)
Changed
- Added
.use()
,.unuse()
and.has()
toGameObjRaw
, to add, remove and
check components. This only works withKAPLAYOpt.tagsAsComponents
set to
true
(experimental)
Deprecated
- Deprecated camera methods
camScale()
,camPos()
andcamRot()
in favor of
setCamScale()
,getCamScale()
,setCamPos()
,getCamPos()
,setCamRot()
andgetCamRot
. - Deprecated
camTransform()
in favor ofgetCamTransform()
. - Deprecated
camFlash()
in favor offlash()
, for ashake()
-like name.
Fixed
- Fixed artifacts present in some TrueType fonts.
- Fixed
.use()
and.unuse()
with area components.
4000.0.0-alpha.15
What's Changed
- feat: Added clipLineToRect by @mflerackers in #480
- fix: randi now returns 0 or 1 instead of 0 when no args [cherry-pick] by @imaginarny in #483
- docs: revise isKey/isButton checks and add examples by @imaginarny in #484
- fix: change area effector to rectangular coordinates by @dragoncoder047 in #479
- docs: describe usage of CharTransform in jsDoc by @Erb3 in #486
- chore: replace burp sound [cherry-pick] by @imaginarny in #491
- docs: fix usage of incorrect JSDoc prefix by @Erb3 in #492
- chore: replace burp sound [cherry-pick] by @imaginarny in #494
- refactor: remove many .aseprite files, fakeMouse example by @lajbel in #495
- docs(example): update bench.js to have different rendering scenes by @lajbel in #497
- docs(example): update audio example making it funier by @lajbel in #496
- chore: update make example (cherry-pick) by @lajbel in #499
- fix: what happened by @amyspark-ng in #500
- refactor: context in 1 variable by @lajbel in #502
- fix: don't blow stack on recursive object by @dragoncoder047 in #504
- update on() example which was incorrect by @dragoncoder047 in #506
- feat: Fixes tiled pos by @mflerackers in #508
- Backslash text input by @dragoncoder047 in #507
- fix: null has no property "toString" by @dragoncoder047 in #505
- add onLoadError by @dragoncoder047 in #501
- fix: fast loop using update by @dragoncoder047 in #513
- feat: add better error message to say which components conflict by @dragoncoder047 in #511
- feat: Add emitter position to particles to place the emitter relative to the local origin by @mflerackers in #517
- fix:
get fb
by @dragoncoder047 in #514 - feat: Adds seek and paused to animate by @mflerackers in #516
- fix: no CI errors by @niceEli in #526
- chore: add Code Of Conduct (Rules) by @niceEli in #530
- doc: add requires, param, returns and order JSDoc of KAPLAY by @lajbel in #531
- feat: normalize get/set methods for camera, add getLayers and getDefaultLayer by @lajbel in #532
- feat: new tag methods by @lajbel in #521
- fix: sets loop using passed in AudioPlayOpt when playing music by @cobrajs in #528
- "better" docs on map and mapc functions by @amyspark-ng in #535
- docs: Added correct function call for loadShaderURL by @hiranyey in #541
- docs: Added many examples for on events by @tristanperrow in #534
- feat: New Testing UI in dev mode, separated examples and tests by @lajbel in #540
- fix: make offscreen() use global onUpdate(), when pause: true, so it can detect when it comes back onscreen by @dragoncoder047 in #537
- fix: Update level spatial map when tiles are moved by @mgmarlow in #539
- fix: text artifacts in TrueType fonts by @lajbel in #543
- fix: Fixes patrol by @mflerackers in #546
- feat: added events for adding/removing comps by @mflerackers in #544
- feat: add k.cancel() by @neverUsedGithub in #545
- fix: add return if static to physics apply force functions by @dragoncoder047 in #443
- fix: Fixes live query, using comp change events by @mflerackers in #547
- fix: Fixes removing and re-adding area by @mflerackers in #549
- chore: incorrect await example is removed from tween docs by @orkasi in #553
- chore: fixed a typo in sliceX option of LoadSprite by @orkasi in #552
- docs: added some missing docs for vectors by @amyspark-ng in #550
New Contributors
- @Erb3 made their first contribution in #486
- @cobrajs made their first contribution in #528
- @hiranyey made their first contribution in #541
- @mgmarlow made their first contribution in #539
- @orkasi made their first contribution in #553
Full Changelog: 4000.0.0-alpha.14...4000.0.0-alpha.15
3001.0.2
Full Changelog: 3001.0.1...3001.0.2
3001.0.1
3001.0.0
4000.0.0-alpha.14
Full Changelog: 4000.0.0-alpha.13...4000.0.0-alpha.14
3001.0.0-beta.8
Full Changelog: 3001.0.0-beta.7...3001.0.0-beta.8
4000.0.0-alpha.13
What's Changed
Full Changelog: 4000.0.0-alpha.12...4000.0.0-alpha.13
4000.0.0-alpha.12
What's Changed
- fix: brackets causing issues in debug.log + enhance logging of single object by @dragoncoder047 in #475
Full Changelog: 4000.0.0-alpha.11...4000.0.0-alpha.12