Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Commit 4a6f0ac

Browse files
committed
add docs for solidtv renderer
1 parent 0aa9803 commit 4a6f0ac

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

docs/_sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
- [Boosting LightningJS Performance by 50%](/articles/boostingperf.md)
5252
- [Solid / Blits Framework Comparison](/articles/solidvsblits.md)
5353
- [DOM Renderer](/articles/domrenderer.md)
54+
- [SolidTV Renderer](/articles/solidtv_renderer.md)
5455
- Build & Deploy
5556
- [RDK Firebolt Integration](/deploy/firebolt.md)
5657
- [Tizen/Samsung](/deploy/tizen.md)

docs/articles/solidtv_renderer.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SolidTV Renderer
2+
3+
The SolidTV Renderer is a fork of the official Lightning Renderer optimized to be 50% faster during render loop. It is designed to be easily swapped with the standard LightningJS version to provide an immediate performance boost for your applications.
4+
5+
## Installation
6+
7+
The renderer is available on NPM under the `@lightningtv/renderer` package. You can install it via your package manager:
8+
9+
```bash
10+
npm install @lightningtv/renderer
11+
```
12+
13+
Or edit your package.json with:
14+
15+
```json
16+
"@lightningjs/renderer": "npm:@lightningtv/renderer@3.2.5",
17+
```
18+
19+
## Configuration (Vite Defines)
20+
21+
The SolidTV Renderer exposes several flags that can be configured via Vite defines in your `vite.config.ts`. These allow you to fine-tune the renderer's behavior for development, debugging, and production environments.
22+
23+
```js
24+
define: {
25+
__DEV__: mode !== 'production',
26+
__RTT__: true,
27+
__renderTextBatching__: true,
28+
__enableAutosize__: false,
29+
__enableCompressedTextures__: false,
30+
__calculateFps__: mode !== 'production',
31+
__dirtyQuadBuffer__: true,
32+
__emitBoundsEvents__: false,
33+
},
34+
```
35+
36+
### `__DEV__`
37+
38+
**Type:** `boolean` | **Default:** `undefined` (resolves `isProductionEnvironment` to `true`)
39+
40+
Toggles development mode. When set to `true`, it enables development-specific features, warnings, and unoptimized paths useful for debugging. In production, this should be `false` or left undefined.
41+
42+
### `__RTT__`
43+
44+
**Type:** `boolean` | **Default:** `true`
45+
46+
Enables or disables Render To Texture (RTT). This allows offscreen rendering of complex component trees into a static texture, which can significantly improve rendering performance for static content.
47+
48+
### `__renderTextBatching__`
49+
50+
**Type:** `boolean` | **Default:** `true`
51+
52+
Enables batching for text rendering. When enabled, the renderer batches text draw calls together, reducing overall overhead and improving text-heavy application performance. This will place Text on top of other elements. If you find Text over an element that should be on top of Text, add a zIndex to create a new layer for text.
53+
54+
### `__enableAutosize__`
55+
56+
**Type:** `boolean` | **Default:** `false`
57+
58+
Enables automatic size calculations for elements based on their content. Turning this on can have a performance cost, so it defaults to `false`. Images will still work with autosize. This shouldn't be needed as Solid has flex which can calculate sizes.
59+
60+
### `__enableCompressedTextures__`
61+
62+
**Type:** `boolean` | **Default:** `false`
63+
64+
Enables support for compressed texture formats. Using compressed textures can significantly reduce memory usage and improve loading times, especially on constrained devices. However most folks are not using compressed textures, so this is disabled by default. ktx, pvr are the two supported formats for compressed textures.
65+
66+
### `__calculateFps__`
67+
68+
**Type:** `boolean` | **Default:** `!isProductionEnvironment`
69+
70+
Calculates and exposes frames per second (FPS) metrics. By default, it is active in development mode (`__DEV__ = true`) but disabled in production to avoid unnecessary overhead.
71+
72+
### `__dirtyQuadBuffer__`
73+
74+
**Type:** `boolean` | **Default:** `true`
75+
76+
An optimization technique that maintains a dirty quad buffer to reduce unnecessary recalculations during rendering updates.
77+
78+
### `__emitBoundsEvents__`
79+
80+
**Type:** `boolean` | **Default:** `false`
81+
82+
When enabled, the renderer will emit events whenever an element's bounding box recalculates or changes. This can be useful for advanced layout tracking or debugging but may add overhead if heavily utilized.

0 commit comments

Comments
 (0)