@utsp/runtime-client 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 +69 -19
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,36 +1,86 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# @utsp/runtime-client
|
|
2
4
|
|
|
3
|
-
|
|
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.
|
|
5
|
+
[](https://www.npmjs.com/package/@utsp/runtime-client)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Visit [**UTSP.dev**](https://utsp.dev/) for more information.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
The **Client-side runtime** for the [Universal Text Stream Protocol](https://utsp.dev/) (UTSP). This package enables you to run UTSP applications locally (**standalone**) or connect to remote servers via **Socket.IO** or **WebRTC**.
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
> [!WARNING]
|
|
17
|
+
> **PROTOTYPE - NOT READY FOR PRODUCTION**
|
|
18
|
+
> This package is under active development. The API is unstable and subject to breaking changes.
|
|
13
19
|
|
|
14
|
-
|
|
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.
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
- ❌ No documentation available yet
|
|
18
|
-
- ❌ Breaking changes expected
|
|
19
|
-
- ❌ Not recommended for production use
|
|
24
|
+
## ✨ Features
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
- **🎮 Multi-mode Execution**: Choose between Standalone (local), Socket.IO, or WebRTC.
|
|
27
|
+
- **⌨️ Unified Input**: Out-of-the-box support for keyboard, mouse, touch, and gamepads.
|
|
28
|
+
- **🖼️ Rich Rendering**: Built-in WebGL (`TerminalGL`) and Canvas2D (`Terminal2D`) renderers.
|
|
29
|
+
- **🔊 Integrated Audio**: Full audio management and network synchronization.
|
|
30
|
+
- **🎨 Post-Processing**: Native support for scanlines and custom shader-like filters.
|
|
31
|
+
- **⏯️ Autoplay Support**: Built-in overlay to handle browser restrictions for audio and vibration.
|
|
22
32
|
|
|
23
|
-
## Installation
|
|
33
|
+
## 📦 Installation
|
|
24
34
|
|
|
25
35
|
```bash
|
|
26
36
|
npm install @utsp/runtime-client
|
|
27
37
|
```
|
|
28
38
|
|
|
29
|
-
##
|
|
39
|
+
## 🚀 Quick Start
|
|
40
|
+
|
|
41
|
+
### Standalone Mode (Local)
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { ClientRuntime } from '@utsp/runtime-client';
|
|
45
|
+
import { MyGame } from './MyGame';
|
|
46
|
+
|
|
47
|
+
const runtime = new ClientRuntime({
|
|
48
|
+
mode: 'standalone',
|
|
49
|
+
container: document.getElementById('game-container'),
|
|
50
|
+
standalone: {
|
|
51
|
+
application: new MyGame(),
|
|
52
|
+
username: 'Player1'
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
await runtime.start();
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Connected Mode (Networked)
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
const runtime = new ClientRuntime({
|
|
63
|
+
mode: 'socketio', // or 'webrtc'
|
|
64
|
+
container: document.getElementById('game-container'),
|
|
65
|
+
socketio: {
|
|
66
|
+
url: 'https://myserver.com',
|
|
67
|
+
username: 'Player1'
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
await runtime.start();
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 🔌 Execution Modes
|
|
75
|
+
|
|
76
|
+
- **Standalone**: Executes all application logic directly in the browser. Ideal for demos, single-player games, or offline tools.
|
|
77
|
+
- **Socket.IO**: Connects to an UTSP server for a classic multiplayer experience.
|
|
78
|
+
- **WebRTC**: Real-time P2P connection with **NAT traversal** (eliminates the need for manual router configuration in most network environments).
|
|
79
|
+
|
|
80
|
+
## 📖 Documentation
|
|
30
81
|
|
|
31
|
-
|
|
32
|
-
- [Issues](https://github.com/thp-software/utsp/issues)
|
|
82
|
+
For detailed guides on the protocol and application development, visit the official [**Documentation**](https://docs.utsp.dev/introduction).
|
|
33
83
|
|
|
34
|
-
## License
|
|
84
|
+
## 📄 License
|
|
35
85
|
|
|
36
|
-
MIT ©
|
|
86
|
+
MIT © 2026 [THP Software](https://github.com/thp-software)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utsp/runtime-client",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4",
|
|
4
4
|
"description": "UTSP Runtime Client - Local and multi-user client runtime",
|
|
5
5
|
"author": "THP Software",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@utsp/audio": "0.17.
|
|
52
|
-
"@utsp/core": "0.17.
|
|
53
|
-
"@utsp/
|
|
54
|
-
"@utsp/
|
|
55
|
-
"@utsp/
|
|
56
|
-
"@utsp/
|
|
51
|
+
"@utsp/audio": "0.17.4",
|
|
52
|
+
"@utsp/core": "0.17.4",
|
|
53
|
+
"@utsp/network-client": "0.17.4",
|
|
54
|
+
"@utsp/render": "0.17.4",
|
|
55
|
+
"@utsp/types": "0.17.4",
|
|
56
|
+
"@utsp/input": "0.17.4"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"typescript": "^5.6.3"
|