Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lightningtv/core

Package Overview
Dependencies
Maintainers
0
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningtv/core - npm Package Compare versions

Comparing version 2.2.7 to 2.2.8-beta.1

22

dist/src/elementNode.js

@@ -28,3 +28,8 @@ import { renderer, createShader } from './lightningInit.js';

}
const shaderCache = new Map();
function convertEffectsToShader(styleEffects) {
const cacheKey = JSON.stringify(styleEffects);
if (shaderCache.has(cacheKey)) {
return shaderCache.get(cacheKey);
}
const effects = [];

@@ -36,3 +41,5 @@ for (const [type, props] of Object.entries(styleEffects)) {

}
return createShader('DynamicShader', { effects });
const shader = createShader('DynamicShader', { effects });
shaderCache.set(cacheKey, shader);
return shader;
}

@@ -526,14 +533,3 @@ function borderAccessor(direction = '') {

if (node._effects) {
let shader;
// states can change effects so don't use cached shader
if (node.style?.effects && !this._states) {
const effects = node.style.effects;
effects._shader =
effects._shader || convertEffectsToShader(node._effects);
shader = effects._shader;
}
else {
shader = convertEffectsToShader(node._effects);
}
props.shader = shader;
props.shader = convertEffectsToShader(node._effects);
}

@@ -540,0 +536,0 @@ if (isElementText(node)) {

{
"name": "@lightningtv/core",
"version": "2.2.7",
"version": "2.2.8-beta.1",
"description": "Lightning TV Core for Universal Renderers",

@@ -5,0 +5,0 @@ "type": "module",

@@ -70,7 +70,12 @@ import { renderer, createShader } from './lightningInit.js';

const shaderCache = new Map();
function convertEffectsToShader(
styleEffects: StyleEffects,
): ShaderController<'DynamicShader'> {
const cacheKey = JSON.stringify(styleEffects);
if (shaderCache.has(cacheKey)) {
return shaderCache.get(cacheKey) as ShaderController<'DynamicShader'>;
}
const effects: EffectDescUnion[] = [];
for (const [type, props] of Object.entries(styleEffects)) {

@@ -81,3 +86,5 @@ if (type !== '_shader') {

}
return createShader('DynamicShader', { effects });
const shader = createShader('DynamicShader', { effects });
shaderCache.set(cacheKey, shader);
return shader;
}

@@ -758,13 +765,3 @@

if (node._effects) {
let shader;
// states can change effects so don't use cached shader
if (node.style?.effects && !this._states) {
const effects = node.style.effects;
effects._shader =
effects._shader || convertEffectsToShader(node._effects);
shader = effects._shader;
} else {
shader = convertEffectsToShader(node._effects);
}
props.shader = shader;
props.shader = convertEffectsToShader(node._effects);
}

@@ -771,0 +768,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc