@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 +1 -0
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/launch.d.ts +9 -0
- package/src/launch.js +1 -0
- package/src/lib/reactivity/reactive.js +5 -1
package/.eslintrc.cjs
CHANGED
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
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
|
-
|
|
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
|
}
|