@lightningjs/blits 0.7.1 → 0.7.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/.eslintrc.cjs CHANGED
@@ -46,6 +46,7 @@ module.exports = {
46
46
  tabWidth: 2,
47
47
  semi: false,
48
48
  printWidth: 100,
49
+ endOfLine: 'auto',
49
50
  },
50
51
  ],
51
52
  },
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ # v0.7.2
4
+
5
+ _23 feb 2024_
6
+
7
+ - Added small fix to support for (re)assigning an array used in a for-loop
8
+ - Added option to enable the Lightning inspector in launch setting (`inspector: true/false`)
9
+
3
10
  # v0.7.1
4
11
 
5
12
  _22 feb 2024_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightningjs/blits",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Blits: The Lightning 3 App Development Framework",
5
5
  "bin": "bin/index.js",
6
6
  "exports": {
package/src/launch.d.ts CHANGED
@@ -172,6 +172,15 @@ export interface Settings {
172
172
  *
173
173
  */
174
174
  canvasColor?: string,
175
+ /**
176
+ * Enable inspector
177
+ *
178
+ * Enables the inspector tool for debugging and inspecting the application, the node tree
179
+ * will be replicated in the DOM and can be inspected using the browser's developer tools
180
+ *
181
+ * Defaults to `false`
182
+ */
183
+ inspector?: boolean
175
184
  }
176
185
 
177
186
  /**
package/src/launch.js CHANGED
@@ -52,6 +52,7 @@ export default (App, target, settings) => {
52
52
  ? settings.webWorkersLimit
53
53
  : window.navigator.hardwareConcurrency || 2,
54
54
  clearColor: (settings.canvasColor && colors.normalize(settings.canvasColor)) || 0x00000000,
55
+ enableInspector: settings.inspector || false,
55
56
  },
56
57
  target,
57
58
  driver
@@ -59,7 +59,11 @@ const reactiveProxy = (target) => {
59
59
 
60
60
  let result
61
61
  if (typeof value === 'object' && Array.isArray(value) && proxyMap.get(target[key])) {
62
- result = target[key].splice(0, target[key].length, ...value)
62
+ if (oldValue !== value) {
63
+ result = oldValue.splice(0, target[key].length, ...value)
64
+ } else {
65
+ result = true
66
+ }
63
67
  } else {
64
68
  result = Reflect.set(target, key, value, receiver)
65
69
  }