You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@lightningjs/blits

Package Overview
Dependencies
Maintainers
7
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningjs/blits - npm Package Compare versions

Comparing version

to
0.3.10

2

boilerplate/package.json

@@ -34,4 +34,4 @@ {

"dependencies": {
"@lightningjs/blits": "^0.3.7"
"@lightningjs/blits": "^0.3.10"
}
}
{
"name": "@lightningjs/blits",
"version": "0.3.9",
"version": "0.3.10",
"description": "Blits: The Lightning 3 App Development Framework",

@@ -42,5 +42,5 @@ "bin": "bin/index.cjs",

"dependencies": {
"@lightningjs/renderer": "^0.3.3",
"@lightningjs/renderer": "^0.3.6",
"@lightningjs/vite-plugin-import-chunk-url": "^0.3.0"
}
}

@@ -39,3 +39,3 @@ /*

if (this.spriteTexture && options) {
return this.___renderer.makeTexture('SubTexture', {
return this.___renderer.createTexture('SubTexture', {
texture: this.spriteTexture,

@@ -52,3 +52,3 @@ x: options.x,

ready() {
this.spriteTexture = this.___renderer.makeTexture('ImageTexture', {
this.spriteTexture = this.___renderer.createTexture('ImageTexture', {
src: `${window.location.protocol}//${window.location.host}/${this.image}`,

@@ -55,0 +55,0 @@ })

@@ -35,2 +35,3 @@ /*

:w="$w"
:h="$h"
:textAlign="$align"

@@ -58,2 +59,3 @@ @loaded="$@loaded"

'w',
'h',
'contain',

@@ -68,5 +70,5 @@ '@loaded',

_contain() {
return this.contain || (this.align ? 'width' : null)
return this.contain || (this.w && this.h ? 'both' : this.w ? 'width' : 'none')
},
},
})

@@ -126,3 +126,3 @@ /*

effects(props) {
props.shader = renderer.makeShader('DynamicShader', {
props.shader = renderer.createShader('DynamicShader', {
effects: props.effects.map((eff) => {

@@ -129,0 +129,0 @@ if (eff.props && eff.props.color) {

@@ -31,3 +31,11 @@ /*

]
const proxyMap = new WeakMap()
const reactiveProxy = (target) => {
const isProxy = proxyMap.get(target)
if (isProxy) {
return isProxy
}
const handler = {

@@ -40,8 +48,3 @@ get(target, key, receiver) {

if (
(target[key] !== null &&
typeof target[key] === 'object' &&
Object.getPrototypeOf(target[key]) === Object.prototype) ||
Array.isArray(target[key])
) {
if (target[key] !== null && typeof target[key] === 'object') {
return reactiveProxy(target[key])

@@ -71,3 +74,6 @@ }

}
return new Proxy(target, handler)
const proxy = new Proxy(target, handler)
proxyMap.set(target, proxy)
return proxy
}

@@ -74,0 +80,0 @@