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

@lightningjs/renderer

Package Overview
Dependencies
Maintainers
0
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningjs/renderer - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

17

dist/src/core/CoreNode.d.ts

@@ -593,2 +593,17 @@ import type { TextureOptions } from './CoreTextureManager.js';

srcY?: number;
/**
* By enabling Strict bounds the renderer will not process & render child nodes of a node that is out of the visible area
*
* @remarks
* When enabled out of bound nodes, i.e. nodes that are out of the visible area, will
* **NOT** have their children processed and renderer anymore. This means the children of a out of bound
* node will not receive update processing such as positioning updates and will not be drawn on screen.
* As such the rest of the branch of the update tree that sits below this node will not be processed anymore
*
* This is a big performance gain but may be disabled in cases where the width of the parent node is
* unknown and the render must process the child nodes regardless of the viewport status of the parent node
*
* @default false
*/
strictBounds: boolean;
}

@@ -792,2 +807,4 @@ /**

get textureOptions(): TextureOptions;
get strictBounds(): boolean;
set strictBounds(v: boolean);
setRTTUpdates(type: number): void;

@@ -794,0 +811,0 @@ animate(props: Partial<CoreNodeAnimateProps>, settings: Partial<AnimationSettings>): IAnimationController;

14

dist/src/core/CoreNode.js

@@ -478,3 +478,4 @@ /*

}
if (this.renderState === CoreNodeRenderState.OutOfBounds) {
if (this.props.strictBounds === true &&
this.renderState === CoreNodeRenderState.OutOfBounds) {
return;

@@ -1283,2 +1284,13 @@ }

}
get strictBounds() {
return this.props.strictBounds;
}
set strictBounds(v) {
if (v === this.props.strictBounds) {
return;
}
this.props.strictBounds = v;
this.setUpdateType(UpdateType.RenderBounds | UpdateType.Children);
this.childUpdateType |= UpdateType.RenderBounds | UpdateType.Children;
}
setRTTUpdates(type) {

@@ -1285,0 +1297,0 @@ this.hasRTTupdates = true;

8

dist/src/core/Stage.js

@@ -22,3 +22,3 @@ /*

import { AnimationManager } from './animations/AnimationManager.js';
import { CoreNode } from './CoreNode.js';
import { CoreNode, CoreNodeRenderState, } from './CoreNode.js';
import { CoreTextureManager } from './CoreTextureManager.js';

@@ -166,2 +166,3 @@ import { TrFontManager } from './text-rendering/TrFontManager.js';

preventCleanup: false,
strictBounds: false,
});

@@ -299,3 +300,5 @@ this.root = rootNode;

}
if (child.worldAlpha === 0) {
if (child.worldAlpha === 0 ||
(child.strictBounds === true &&
child.renderState === CoreNodeRenderState.OutOfBounds)) {
continue;

@@ -482,2 +485,3 @@ }

imageType: props.imageType,
strictBounds: props.strictBounds ?? false,
};

@@ -484,0 +488,0 @@ }

{
"name": "@lightningjs/renderer",
"version": "2.3.0",
"version": "2.3.1",
"description": "Lightning 3 Renderer",

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

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

preventCleanup: false,
strictBounds: false,
};

@@ -66,0 +67,0 @@

@@ -668,2 +668,17 @@ /*

srcY?: number;
/**
* By enabling Strict bounds the renderer will not process & render child nodes of a node that is out of the visible area
*
* @remarks
* When enabled out of bound nodes, i.e. nodes that are out of the visible area, will
* **NOT** have their children processed and renderer anymore. This means the children of a out of bound
* node will not receive update processing such as positioning updates and will not be drawn on screen.
* As such the rest of the branch of the update tree that sits below this node will not be processed anymore
*
* This is a big performance gain but may be disabled in cases where the width of the parent node is
* unknown and the render must process the child nodes regardless of the viewport status of the parent node
*
* @default false
*/
strictBounds: boolean;
}

@@ -1105,3 +1120,6 @@

if (this.renderState === CoreNodeRenderState.OutOfBounds) {
if (
this.props.strictBounds === true &&
this.renderState === CoreNodeRenderState.OutOfBounds
) {
return;

@@ -2139,2 +2157,16 @@ }

get strictBounds(): boolean {
return this.props.strictBounds;
}
set strictBounds(v) {
if (v === this.props.strictBounds) {
return;
}
this.props.strictBounds = v;
this.setUpdateType(UpdateType.RenderBounds | UpdateType.Children);
this.childUpdateType |= UpdateType.RenderBounds | UpdateType.Children;
}
setRTTUpdates(type: number) {

@@ -2141,0 +2173,0 @@ this.hasRTTupdates = true;

@@ -22,3 +22,7 @@ /*

import { AnimationManager } from './animations/AnimationManager.js';
import { CoreNode, type CoreNodeProps } from './CoreNode.js';
import {
CoreNode,
CoreNodeRenderState,
type CoreNodeProps,
} from './CoreNode.js';
import { CoreTextureManager } from './CoreTextureManager.js';

@@ -244,2 +248,3 @@ import { TrFontManager } from './text-rendering/TrFontManager.js';

preventCleanup: false,
strictBounds: false,
});

@@ -402,3 +407,7 @@

if (child.worldAlpha === 0) {
if (
child.worldAlpha === 0 ||
(child.strictBounds === true &&
child.renderState === CoreNodeRenderState.OutOfBounds)
) {
continue;

@@ -623,4 +632,5 @@ }

imageType: props.imageType,
strictBounds: props.strictBounds ?? false,
};
}
}

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