@antha/multiplayer-core 0.1.0 → 0.1.2
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 +21 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
# @antha/multiplayer-core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides the room, signaling, WebRTC, and identifier utilities behind the [Antha game engine](https://www.npmjs.com/package/@antha/engine)'s peer-to-peer multiplayer features. Use it directly to build a custom multiplayer strategy, or use one of the strategy packages for a ready-made approach.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm i @antha/multiplayer-core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
<!-- example-link: src/readme-examples/creating-multiplayer-client.example.ts -->
|
|
14
|
+
|
|
15
|
+
```TypeScript
|
|
16
|
+
import {createMultiplayerApiClient, createMultiplayerId} from '@antha/multiplayer-core';
|
|
17
|
+
|
|
18
|
+
const roomId = createMultiplayerId.room();
|
|
19
|
+
const multiplayerApiClient = await createMultiplayerApiClient({
|
|
20
|
+
backendOrigin: 'http://localhost:9348',
|
|
21
|
+
portScanOptions: false,
|
|
22
|
+
});
|
|
23
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antha/multiplayer-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Core functionalities for Antha multiplayer mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vir",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@augment-vir/common": "^32.2.2",
|
|
41
41
|
"@rest-vir/api": "^2.3.1",
|
|
42
42
|
"@sinclair/typebox": "^0.34.52",
|
|
43
|
-
"date-vir": "^9.
|
|
44
|
-
"object-shape-tester": "^6.
|
|
43
|
+
"date-vir": "^9.1.0",
|
|
44
|
+
"object-shape-tester": "^6.15.0",
|
|
45
45
|
"typed-event-target": "^4.3.3",
|
|
46
46
|
"url-vir": "^2.2.1"
|
|
47
47
|
},
|