@lightningjs/blits 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/boilerplate/package.json +1 -1
- package/package.json +1 -1
- package/src/components/Sprite.js +3 -1
package/CHANGELOG.md
CHANGED
package/boilerplate/package.json
CHANGED
package/package.json
CHANGED
package/src/components/Sprite.js
CHANGED
|
@@ -22,7 +22,7 @@ import symbols from '../lib/symbols.js'
|
|
|
22
22
|
export default () =>
|
|
23
23
|
Component('Sprite', {
|
|
24
24
|
template: `
|
|
25
|
-
<Element w="$w" h="$h" :texture="$texture" />
|
|
25
|
+
<Element w="$w" h="$h" color="#fff" :texture="$texture" />
|
|
26
26
|
`,
|
|
27
27
|
props: ['image', 'map', 'frame', 'w', 'h'],
|
|
28
28
|
state() {
|
|
@@ -32,6 +32,7 @@ export default () =>
|
|
|
32
32
|
},
|
|
33
33
|
computed: {
|
|
34
34
|
texture() {
|
|
35
|
+
console.log('texture')
|
|
35
36
|
const options =
|
|
36
37
|
'frames' in this.map
|
|
37
38
|
? { ...(this.map.defaults || {}), ...this.map.frames[this.frame] }
|
|
@@ -50,6 +51,7 @@ export default () =>
|
|
|
50
51
|
},
|
|
51
52
|
hooks: {
|
|
52
53
|
ready() {
|
|
54
|
+
console.log('sprite!')
|
|
53
55
|
this.spriteTexture = this[symbols.renderer].createTexture('ImageTexture', {
|
|
54
56
|
src: `${window.location.protocol}//${window.location.host}/${this.image}`,
|
|
55
57
|
})
|