@utsp/render 0.17.3 → 0.17.4
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/README.md +25 -112
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,130 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> ⚠️ **PROTOTYPE - NOT READY FOR PRODUCTION**
|
|
4
|
-
>
|
|
5
|
-
> This package is currently in early development and should **NOT** be used in production.
|
|
6
|
-
> The API is unstable and subject to breaking changes without notice.
|
|
1
|
+
<div align="center">
|
|
7
2
|
|
|
8
|
-
|
|
3
|
+
# @utsp/render
|
|
9
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/@utsp/render)
|
|
10
6
|
[](https://opensource.org/licenses/MIT)
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **TerminalGL** - High-performance WebGL 1.0 renderer with GPU palette
|
|
15
|
-
- **Terminal2D** - CPU-based Canvas 2D fallback renderer
|
|
16
|
-
- **TerminalANSI** - ANSI escape sequence renderer for native terminals (cmd, PowerShell, bash)
|
|
17
|
-
- **Tree-shakeable** - Import only what you need for smaller bundles
|
|
18
|
-
- **Overlays** - AutoplayOverlay, PostProcessOverlay, GridOverlay
|
|
19
|
-
|
|
20
|
-
## Installation
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm install @utsp/render
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Entry Points
|
|
27
|
-
|
|
28
|
-
The package provides multiple entry points for optimal bundle size:
|
|
29
|
-
|
|
30
|
-
### Full Bundle (default)
|
|
31
|
-
```typescript
|
|
32
|
-
import { TerminalGL, Terminal2D, AutoplayOverlay } from '@utsp/render';
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### WebGL Only (~43 KB)
|
|
36
|
-
```typescript
|
|
37
|
-
import { TerminalGL, ScalingMode } from '@utsp/render/gl';
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Canvas 2D Only (~27 KB)
|
|
41
|
-
```typescript
|
|
42
|
-
import { Terminal2D, BitmapFontAtlas } from '@utsp/render/2d';
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Common Utilities Only (~11 KB)
|
|
46
|
-
```typescript
|
|
47
|
-
import { AutoplayOverlay, PostProcessOverlay, GridOverlay } from '@utsp/render/common';
|
|
48
|
-
```
|
|
8
|
+
Visit [**UTSP.dev**](https://utsp.dev/) for more information.
|
|
49
9
|
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
import { TerminalANSI } from '@utsp/render/ansi';
|
|
53
|
-
```
|
|
10
|
+
</div>
|
|
54
11
|
|
|
55
|
-
|
|
12
|
+
---
|
|
56
13
|
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
import { TerminalGL, ScalingMode } from '@utsp/render/gl';
|
|
14
|
+
The **Rendering Engine** for UTSP. It provides multiple backends to transform UTSP display data into visual pixels, with high performance and retro-inspired aesthetics.
|
|
60
15
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
scalingMode: ScalingMode.Integer
|
|
65
|
-
});
|
|
16
|
+
> [!WARNING]
|
|
17
|
+
> **PROTOTYPE - NOT READY FOR PRODUCTION**
|
|
18
|
+
> This package is under active development. The API is unstable and subject to breaking changes.
|
|
66
19
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
// Update cells from Core
|
|
71
|
-
terminal.render(core.getDisplayBuffer());
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Canvas 2D Renderer (fallback)
|
|
75
|
-
```typescript
|
|
76
|
-
import { Terminal2D } from '@utsp/render/2d';
|
|
77
|
-
|
|
78
|
-
const terminal = new Terminal2D(container, {
|
|
79
|
-
fixedCols: 80,
|
|
80
|
-
fixedRows: 24
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
// Render from Core
|
|
84
|
-
terminal.render(core.getDisplayBuffer());
|
|
85
|
-
```
|
|
20
|
+
> [!NOTE]
|
|
21
|
+
> **Source Code Availability**
|
|
22
|
+
> While this package is licensed under MIT, the source code is currently being finalized for public release. It will be available on GitHub in the coming months.
|
|
86
23
|
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
import { TerminalANSI } from '@utsp/render/ansi';
|
|
24
|
+
## ✨ Features
|
|
90
25
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
26
|
+
- **🚀 Multi-backend**: WebGL & Canvas2D support.
|
|
27
|
+
- **🎨 Post-Processing**: Built-in scanlines and other effects.
|
|
28
|
+
- **🔡 Font Atlas**: Efficient bitmap font management.
|
|
29
|
+
- **🖥️ Responsive Scaling**: Flexible viewport management.
|
|
95
30
|
|
|
96
|
-
|
|
97
|
-
const output = renderer.render(renderState);
|
|
98
|
-
process.stdout.write(output);
|
|
31
|
+
## 📦 Installation
|
|
99
32
|
|
|
100
|
-
|
|
101
|
-
|
|
33
|
+
```bash
|
|
34
|
+
npm install @utsp/render
|
|
102
35
|
```
|
|
103
36
|
|
|
104
|
-
##
|
|
105
|
-
|
|
106
|
-
| Entry Point | ESM (minified) | ESM (gzip) |
|
|
107
|
-
|-------------|----------------|------------|
|
|
108
|
-
| `@utsp/render` | 74.43 KB | 18.40 KB |
|
|
109
|
-
| `@utsp/render/gl` | 43.49 KB | 11.03 KB |
|
|
110
|
-
| `@utsp/render/2d` | 27.24 KB | 7.83 KB |
|
|
111
|
-
| `@utsp/render/common` | 11.19 KB | 3.46 KB |
|
|
112
|
-
|
|
113
|
-
## ⚠️ Development Status
|
|
114
|
-
|
|
115
|
-
**This is a prototype package under active development.**
|
|
116
|
-
|
|
117
|
-
- ❌ No stable API
|
|
118
|
-
- ❌ Breaking changes expected
|
|
119
|
-
- ❌ Not recommended for production use
|
|
120
|
-
|
|
121
|
-
**Please check back later for updates or watch the repository for release announcements.**
|
|
122
|
-
|
|
123
|
-
## Repository
|
|
37
|
+
## 📖 Documentation
|
|
124
38
|
|
|
125
|
-
|
|
126
|
-
- [Issues](https://github.com/thp-software/utsp/issues)
|
|
39
|
+
For detailed guides on the protocol and application development, visit the official [**Documentation**](https://docs.utsp.dev/introduction).
|
|
127
40
|
|
|
128
|
-
## License
|
|
41
|
+
## 📄 License
|
|
129
42
|
|
|
130
|
-
MIT ©
|
|
43
|
+
MIT © 2026 [THP Software](https://github.com/thp-software)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utsp/render",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4",
|
|
4
4
|
"description": "UTSP Render - Rendering engine for terminal graphics with WebGL, Canvas 2D, and ANSI terminal support",
|
|
5
5
|
"author": "THP Software",
|
|
6
6
|
"license": "MIT",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@utsp/types": "0.17.
|
|
89
|
+
"@utsp/types": "0.17.4"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"typescript": "^5.6.3"
|