@lightningjs/blits 0.6.3 → 0.6.4

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ # v0.6.4
4
+
5
+ _15 jan 2024_
6
+
7
+ - Added fix for sprites not working on certain devices
8
+
3
9
  # v0.6.3
4
10
 
5
11
  _12 jan 2024_
@@ -31,6 +31,6 @@
31
31
  "vite": "^4.0.4"
32
32
  },
33
33
  "dependencies": {
34
- "@lightningjs/blits": "^0.6.3"
34
+ "@lightningjs/blits": "^0.6.4"
35
35
  }
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightningjs/blits",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Blits: The Lightning 3 App Development Framework",
5
5
  "bin": "bin/index.cjs",
6
6
  "exports": {
@@ -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" color="#fff" :texture="$texture" />
25
+ <Element w="$w" h="$h" :texture="$texture" />
26
26
  `,
27
27
  props: ['image', 'map', 'frame', 'w', 'h'],
28
28
  state() {
@@ -34,7 +34,7 @@ export default () =>
34
34
  texture() {
35
35
  const options =
36
36
  'frames' in this.map
37
- ? { ...(this.map.defaults || {}), ...this.map.frames[this.frame] }
37
+ ? Object.assign({}, this.map.defaults || {}, this.map.frames[this.frame])
38
38
  : this.map[this.frame]
39
39
 
40
40
  if (this.spriteTexture && options) {
package/src/element.js CHANGED
@@ -119,6 +119,9 @@ const Props = {
119
119
  },
120
120
  set texture(v) {
121
121
  this._props.texture = v
122
+ if (!this._set.has('color')) {
123
+ this._props.color = 0xffffffff
124
+ }
122
125
  this._set.add('texture')
123
126
  },
124
127
  set mount(v) {
@@ -263,6 +266,7 @@ const Element = {
263
266
  return this.animate(p, v, value.transition)
264
267
  } else {
265
268
  this.node[p] = v
269
+ console.log('set it', this.node[p], v)
266
270
  }
267
271
  }
268
272
  },