From fb8dcd377a8ad248d244b40fca0185bca20bd47f Mon Sep 17 00:00:00 2001 From: Michiel van der Geest Date: Mon, 18 Mar 2024 21:30:03 +0100 Subject: [PATCH] Upgraded to latest version of Blits (0.9.0). Implemented example. Updated fontloading. --- package-lock.json | 14 +++++++------- package.json | 4 ++-- src/components/PortalItem.js | 5 +---- src/fontLoader.js | 4 ---- src/index.js | 3 --- 5 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 src/fontLoader.js diff --git a/package-lock.json b/package-lock.json index 4f9afc5..b27a90b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@lightningjs/blits-example-app", - "version": "0.8.1", + "version": "0.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@lightningjs/blits-example-app", - "version": "0.8.1", + "version": "0.9.0", "license": "Apache-2", "dependencies": { - "@lightningjs/blits": "^0.8.0" + "@lightningjs/blits": "^0.9.0" }, "devDependencies": { "backstopjs": "^6.3.22", @@ -707,11 +707,11 @@ } }, "node_modules/@lightningjs/blits": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@lightningjs/blits/-/blits-0.8.0.tgz", - "integrity": "sha512-qXSvLekyImXX+y/7KPz2yZGyqUUe9BlZ8UtPXmqRjr1iYClgpGcyQyw/wIUmwXG7cBMZnekAaUCjAxWJ2UwQPg==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@lightningjs/blits/-/blits-0.9.0.tgz", + "integrity": "sha512-SY6+NziiUcw3PxgCTUUEXTcCrNyyce05C7LYk2UUaztqPBKC2eqRgs0Wmy4ioScmfihg4evvPek8upcIydaXHg==", "dependencies": { - "@lightningjs/renderer": "^0.7.4", + "@lightningjs/renderer": "^0.7.5", "@lightningjs/vite-plugin-import-chunk-url": "^0.3.0", "execa": "^8.0.1", "kolorist": "^1.8.0", diff --git a/package.json b/package.json index 67e3b82..5a84ca3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lightningjs/blits-example-app", - "version": "0.8.1", + "version": "0.9.0", "description": "Lightning 3 Blits Example App", "main": "index.js", "type": "module", @@ -38,6 +38,6 @@ "vite": "^4.0.4" }, "dependencies": { - "@lightningjs/blits": "^0.8.0" + "@lightningjs/blits": "^0.9.0" } } diff --git a/src/components/PortalItem.js b/src/components/PortalItem.js index 9320d11..a6a3ccc 100644 --- a/src/components/PortalItem.js +++ b/src/components/PortalItem.js @@ -22,7 +22,7 @@ export default Blits.Component('PortalItem', { @@ -35,7 +35,6 @@ export default Blits.Component('PortalItem', { state() { return { backgroundColor: '#44037a', - scale: 1, fontColor: '#e8d7f9', number: this.index < 9 ? `0${this.index + 1}` : this.index + 1, } @@ -44,13 +43,11 @@ export default Blits.Component('PortalItem', { focus() { this.backgroundColor = '#fafafa' this.fontColor = '#000' - this.scale = 1.1 }, unfocus() { if (!this.$router.navigating) { this.backgroundColor = '#44037a' this.fontColor = '#e8d7f9' - this.scale = 1 } }, }, diff --git a/src/fontLoader.js b/src/fontLoader.js deleted file mode 100644 index 9017b63..0000000 --- a/src/fontLoader.js +++ /dev/null @@ -1,4 +0,0 @@ -// temporary workaround for Vite importChunkUrl plugin -// @ts-ignore -import FontLoader from '@lightningjs/blits/fontloader' -export default FontLoader diff --git a/src/index.js b/src/index.js index 78b529f..3aab271 100644 --- a/src/index.js +++ b/src/index.js @@ -16,8 +16,6 @@ */ import Blits from '@lightningjs/blits' -// @ts-ignore -import fontLoader from './fontLoader.js?importChunkUrl' import keymapping from './keymapping.js' import App from './App.js' @@ -27,7 +25,6 @@ Blits.Launch(App, 'app', { h: 1080, multithreaded: false, debugLevel: 1, - fontLoader: fontLoader, reactivityMode: 'Proxy', keymap: keymapping(), fonts: [