From b89b97c12a2e5864d46f31818e85edcc81b39175 Mon Sep 17 00:00:00 2001 From: lajbel Date: Thu, 5 Dec 2024 12:36:37 -0300 Subject: [PATCH] chore: version --- package.json | 2 +- src/kaplay.ts | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3f49d91c..9100208f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "kaplay", "description": "KAPLAY is a JavaScript & TypeScript game library that helps you make games fast and fun!", - "version": "4000.0.0-alpha.14", + "version": "4000.0.0-alpha.15", "license": "MIT", "homepage": "https://v4000.kaplayjs.com/", "repository": { diff --git a/src/kaplay.ts b/src/kaplay.ts index 78a3c3f9..d89fe674 100644 --- a/src/kaplay.ts +++ b/src/kaplay.ts @@ -1,4 +1,5 @@ -const VERSION = "3001.0.0"; +// the definitive version! :bean: +const VERSION = "4000.0.0"; import { type ButtonsDef, initApp } from "./app"; @@ -262,10 +263,6 @@ import { onCollideEnd, onCollideUpdate, onDestroy, - onUse, - onUnuse, - onTag, - onUntag, onDraw, onError, onFixedUpdate, @@ -277,7 +274,11 @@ import { onLoading, onResize, onSceneLeave, + onTag, + onUntag, + onUnuse, onUpdate, + onUse, scene, setCamPos, setCamRot, @@ -353,7 +354,8 @@ const kaplay = < >( gopt: KAPLAYOpt = {}, ): TPlugins extends [undefined] ? KAPLAYCtx - : KAPLAYCtx & MergePlugins => { + : KAPLAYCtx & MergePlugins => +{ if (_k.k) { console.warn( "KAPLAY already initialized, you are calling kaplay() multiple times, it may lead bugs!", @@ -985,7 +987,7 @@ const kaplay = < // TODO: this should only run once app.run( - () => { }, + () => {}, () => { frameStart(); @@ -1048,7 +1050,7 @@ const kaplay = < // clear canvas gl.clear( gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT - | gl.STENCIL_BUFFER_BIT, + | gl.STENCIL_BUFFER_BIT, ); // unbind everything @@ -1484,7 +1486,7 @@ const kaplay = < KEvent, KEventHandler, KEventController, - cancel: () => EVENT_CANCEL_SYMBOL + cancel: () => EVENT_CANCEL_SYMBOL, }; _k.k = ctx; @@ -1498,7 +1500,7 @@ const kaplay = < // export everything to window if global is set if (gopt.global !== false) { for (const key in ctx) { - (window[key]) = ctx[key as keyof KAPLAYCtx]; + ( window[ key]) = ctx[key as keyof KAPLAYCtx]; } }