Skip to content

Releases: kaplayjs/kaplay

v3001.0.6

27 Dec 04:12
Compare
Choose a tag to compare

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) - @lajbel

    trigger("shoot", "target", 140);
    
    on("shoot", "target", (obj, score) => {
        obj.destroy();
        debug.log(140); // every bomb was 140 score points!
    });
  • Added { override?: true } in CharTransform for overridding text styles -
    @dragoncoder047

    add([
        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 } in TextCompOpt 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

18 Dec 16:58
Compare
Choose a tag to compare

[3001.0.5] - 2024-12-18

Added

  • Added tags and components separation in KAPLAYOpt.tagsAsComponents
    (experimental)
  • Added .is(), .tag() and .untag() to GameObjRaw, check, add and remove
    (experimental)
  • Added .has() to GameObjRaw, 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() to GameObjRaw, to add, remove and
    check components. This only works with KAPLAYOpt.tagsAsComponents set to
    true (experimental)

Deprecated

  • Deprecated camera methods camScale(), camPos() and camRot() in favor of
    setCamScale(), getCamScale(), setCamPos(), getCamPos(), setCamRot()
    and getCamRot.
  • Deprecated camTransform() in favor of getCamTransform().
  • Deprecated camFlash() in favor of flash(), for a shake()-like name.

Fixed

  • Fixed artifacts present in some TrueType fonts.
  • Fixed .use() and .unuse() with area components.

4000.0.0-alpha.15

05 Dec 15:37
Compare
Choose a tag to compare
4000.0.0-alpha.15 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 4000.0.0-alpha.14...4000.0.0-alpha.15

3001.0.2

01 Nov 00:51
Compare
Choose a tag to compare

Full Changelog: 3001.0.1...3001.0.2

3001.0.1

31 Oct 15:56
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3001.0.0...3001.0.1

3001.0.0

31 Oct 15:41
f41e7d0
Compare
Choose a tag to compare

The latest release. Check CHANGELOG.md for all changes introduced.

4000.0.0-alpha.14

24 Oct 12:51
Compare
Choose a tag to compare

3001.0.0-beta.8

24 Oct 12:51
Compare
Choose a tag to compare

4000.0.0-alpha.13

23 Oct 22:25
Compare
Choose a tag to compare
4000.0.0-alpha.13 Pre-release
Pre-release

What's Changed

  • feat: virtual press and release virtual buttons by @lajbel in #476

Full Changelog: 4000.0.0-alpha.12...4000.0.0-alpha.13

4000.0.0-alpha.12

23 Oct 16:19
Compare
Choose a tag to compare
4000.0.0-alpha.12 Pre-release
Pre-release

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