Skip to content

Commit

Permalink
Upgraded to latest version of Blits (0.9.0). Implemented example. Upd…
Browse files Browse the repository at this point in the history
…ated fontloading.
  • Loading branch information
michielvandergeest committed Mar 18, 2024
1 parent 72afe74 commit fb8dcd3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -38,6 +38,6 @@
"vite": "^4.0.4"
},
"dependencies": {
"@lightningjs/blits": "^0.8.0"
"@lightningjs/blits": "^0.9.0"
}
}
5 changes: 1 addition & 4 deletions src/components/PortalItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default Blits.Component('PortalItem', {
<Element
w="370"
h="320"
:scale.transition="$scale"
:scale.transition="$hasFocus ? 1.1 : 1"
:color="$backgroundColor"
:effects="[$shader('radius', {radius: 6})]"
>
Expand All @@ -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,
}
Expand All @@ -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
}
},
},
Expand Down
4 changes: 0 additions & 4 deletions src/fontLoader.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -27,7 +25,6 @@ Blits.Launch(App, 'app', {
h: 1080,
multithreaded: false,
debugLevel: 1,
fontLoader: fontLoader,
reactivityMode: 'Proxy',
keymap: keymapping(),
fonts: [
Expand Down

0 comments on commit fb8dcd3

Please sign in to comment.