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

@lightningtv/core

Package Overview
Dependencies
Maintainers
0
Versions
174
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

to
2.2.3

25

dist/src/utils.js

@@ -75,3 +75,14 @@ import { Config, isDev } from './config.js';

tree.reverse();
let output = '';
let output = `
function convertEffectsToShader(styleEffects) {
const effects = [];
let index = 0;
for (const [type, props] of Object.entries(styleEffects)) {
effects.push({ type, props });
index++;
}
return createShader('DynamicShader', { effects });
}
`;
tree.forEach((node, i) => {

@@ -85,11 +96,11 @@ if (!node._rendererProps) {

const effects = node._effects
? `props${i}.shader = convertEffectsToShader(${JSON.stringify(node._effects, null, 2)})`
? `props${i}.shader = convertEffectsToShader(${JSON.stringify(node._effects, null, 2)});`
: '';
const parent = i === 0 ? 'rootNode' : `node${i - 1}`;
output += `
const props${i} = ${props};
props${i}.parent = ${parent};
${effects}
const node${i} = renderer.createNode(props${i});
`;
const props${i} = ${props};
props${i}.parent = ${parent};
${effects}
const node${i} = renderer.createNode(props${i});
`;
});

@@ -96,0 +107,0 @@ return output;

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

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

@@ -110,3 +110,14 @@ import { INode } from '@lightningjs/renderer';

let output = '';
let output = `
function convertEffectsToShader(styleEffects) {
const effects = [];
let index = 0;
for (const [type, props] of Object.entries(styleEffects)) {
effects.push({ type, props });
index++;
}
return createShader('DynamicShader', { effects });
}
`;
tree.forEach((node, i) => {

@@ -120,11 +131,11 @@ if (!node._rendererProps) {

const effects = node._effects
? `props${i}.shader = convertEffectsToShader(${JSON.stringify(node._effects, null, 2)})`
? `props${i}.shader = convertEffectsToShader(${JSON.stringify(node._effects, null, 2)});`
: '';
const parent = i === 0 ? 'rootNode' : `node${i - 1}`;
output += `
const props${i} = ${props};
props${i}.parent = ${parent};
${effects}
const node${i} = renderer.createNode(props${i});
`;
const props${i} = ${props};
props${i}.parent = ${parent};
${effects}
const node${i} = renderer.createNode(props${i});
`;
});

@@ -131,0 +142,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