@lightningjs/blits 1.21.0 → 1.22.0
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/CHANGELOG.md +13 -0
- package/docs/transitions_animations/transitions.md +1 -1
- package/index.d.ts +15 -8
- package/package.json +1 -1
- package/src/engines/L3/launch.js +26 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.22.0
|
|
4
|
+
|
|
5
|
+
_3 mar 2025_
|
|
6
|
+
|
|
7
|
+
- Added default value for `createImageBitmapSupport` to `auto`
|
|
8
|
+
- Added advanced launch settings
|
|
9
|
+
|
|
10
|
+
## v1.21.1
|
|
11
|
+
|
|
12
|
+
_28 feb 2025_
|
|
13
|
+
|
|
14
|
+
- Changed gpuMemory launch settings to be optional in type definitions
|
|
15
|
+
|
|
3
16
|
## v1.21.0
|
|
4
17
|
|
|
5
18
|
_27 feb 2025_
|
|
@@ -128,7 +128,7 @@ export default Blits.Component('Gold', {
|
|
|
128
128
|
}
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
It is also possible to keep track of the entire progress of a transition. Every frametick during a transition (ideally once every
|
|
131
|
+
It is also possible to keep track of the entire progress of a transition. Every frametick during a transition (ideally once every 16ms), the renderer reports the progress of the transition. You can hook into this event by specifying a `progress` key on the transition configuration object, with a function to excute.
|
|
132
132
|
|
|
133
133
|
This function is executed _every_ frametick, and receives the current progress and the previous progress as its arguments. The progress is indicated as a value between `0` and `1`, where 0 means start and 1 means finished.
|
|
134
134
|
|
package/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// blits file type reference
|
|
19
19
|
/// <reference path="./blits.d.ts" />
|
|
20
20
|
|
|
21
|
-
import {type ShaderEffect as RendererShaderEffect, type WebGlCoreShader} from '@lightningjs/renderer'
|
|
21
|
+
import {type ShaderEffect as RendererShaderEffect, type WebGlCoreShader, type RendererMainSettings} from '@lightningjs/renderer'
|
|
22
22
|
|
|
23
23
|
declare module '@lightningjs/blits' {
|
|
24
24
|
|
|
@@ -806,7 +806,7 @@ declare module '@lightningjs/blits' {
|
|
|
806
806
|
/**
|
|
807
807
|
* Configures the gpu memory settings used by the renderer
|
|
808
808
|
*/
|
|
809
|
-
gpuMemory
|
|
809
|
+
gpuMemory?: {
|
|
810
810
|
/**
|
|
811
811
|
* Maximum GPU memory threshold (in `mb`) after which
|
|
812
812
|
* the renderer will immediately start cleaning up textures to free
|
|
@@ -816,7 +816,7 @@ declare module '@lightningjs/blits' {
|
|
|
816
816
|
*
|
|
817
817
|
* @default `200`
|
|
818
818
|
*/
|
|
819
|
-
max
|
|
819
|
+
max?: number,
|
|
820
820
|
/**
|
|
821
821
|
* Target threshold of GPU memory usage, defined as a fraction of
|
|
822
822
|
* the max threshold. The renderer will attempt to keep memory
|
|
@@ -824,13 +824,13 @@ declare module '@lightningjs/blits' {
|
|
|
824
824
|
*
|
|
825
825
|
* @default `0.8`
|
|
826
826
|
*/
|
|
827
|
-
target
|
|
827
|
+
target?: number,
|
|
828
828
|
/**
|
|
829
829
|
* Interval at which regular texture cleanups occur (in `ms`)
|
|
830
830
|
*
|
|
831
831
|
* @default `5000`
|
|
832
832
|
*/
|
|
833
|
-
cleanupInterval
|
|
833
|
+
cleanupInterval?: number,
|
|
834
834
|
/**
|
|
835
835
|
* Baseline GPU memory usage of the App (in `mb`), without rendering any
|
|
836
836
|
* textures. This value will be used as a basis when calculating
|
|
@@ -839,7 +839,7 @@ declare module '@lightningjs/blits' {
|
|
|
839
839
|
*
|
|
840
840
|
* @default `25`
|
|
841
841
|
*/
|
|
842
|
-
baseline
|
|
842
|
+
baseline?: number,
|
|
843
843
|
/**
|
|
844
844
|
* Whether or not the max threshold should be considered
|
|
845
845
|
* as a strict number that can not be exceeded in any way
|
|
@@ -850,7 +850,7 @@ declare module '@lightningjs/blits' {
|
|
|
850
850
|
*
|
|
851
851
|
* @default false
|
|
852
852
|
*/
|
|
853
|
-
strict
|
|
853
|
+
strict?: boolean,
|
|
854
854
|
},
|
|
855
855
|
/**
|
|
856
856
|
* Defines which mode the renderer should operate in: `webgl` or `canvas`
|
|
@@ -886,7 +886,14 @@ declare module '@lightningjs/blits' {
|
|
|
886
886
|
*
|
|
887
887
|
* Defaults to `10`
|
|
888
888
|
*/
|
|
889
|
-
textureProcessingTimeLimit?: number
|
|
889
|
+
textureProcessingTimeLimit?: number,
|
|
890
|
+
/**
|
|
891
|
+
* Advanced renderer settings to override Blits launch settings, or configure
|
|
892
|
+
* settings that are not officially exposed in Blits yet
|
|
893
|
+
*
|
|
894
|
+
* @important if you dont know what you're doing here, you probably shouldn't be doing it!
|
|
895
|
+
*/
|
|
896
|
+
advanced?: Partial<RendererMainSettings>
|
|
890
897
|
}
|
|
891
898
|
|
|
892
899
|
interface State {
|
package/package.json
CHANGED
package/src/engines/L3/launch.js
CHANGED
|
@@ -66,28 +66,32 @@ const textureMemorySettings = (settings) => {
|
|
|
66
66
|
export default (App, target, settings = {}) => {
|
|
67
67
|
renderer = new RendererMain(
|
|
68
68
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
69
|
+
...{
|
|
70
|
+
appWidth: settings.w || 1920,
|
|
71
|
+
appHeight: settings.h || 1080,
|
|
72
|
+
fpsUpdateInterval: settings.fpsInterval || 1000,
|
|
73
|
+
devicePhysicalPixelRatio:
|
|
74
|
+
RENDER_QUALITIES[settings.renderQuality] || settings.renderQuality || 1,
|
|
75
|
+
deviceLogicalPixelRatio:
|
|
76
|
+
settings.pixelRatio ||
|
|
77
|
+
SCREEN_RESOLUTIONS[settings.screenResolution] ||
|
|
78
|
+
SCREEN_RESOLUTIONS[window.innerHeight] ||
|
|
79
|
+
1,
|
|
80
|
+
numImageWorkers:
|
|
81
|
+
'webWorkersLimit' in settings
|
|
82
|
+
? settings.webWorkersLimit
|
|
83
|
+
: window.navigator.hardwareConcurrency || 2,
|
|
84
|
+
clearColor: (settings.canvasColor && colors.normalize(settings.canvasColor)) || 0x00000000,
|
|
85
|
+
inspector: settings.inspector === true ? Inspector : undefined,
|
|
86
|
+
boundsMargin: settings.viewportMargin || 0,
|
|
87
|
+
renderEngine: renderEngine(settings),
|
|
88
|
+
fontEngines: textRenderEngines(settings),
|
|
89
|
+
canvas: settings.canvas,
|
|
90
|
+
textureProcessingTimeLimit: settings.textureProcessingTimeLimit,
|
|
91
|
+
textureMemory: textureMemorySettings(settings),
|
|
92
|
+
createImageBitmapSupport: 'auto',
|
|
93
|
+
},
|
|
94
|
+
...(settings.advanced || {}),
|
|
91
95
|
},
|
|
92
96
|
target
|
|
93
97
|
)
|