@crowdedkingdomstudios/crowdyjs 1.0.2 → 1.0.3
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 +84 -85
- package/dist/client.js +27 -27
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/subscriptions.d.ts.map +1 -1
- package/dist/subscriptions.js +23 -94
- package/dist/types.d.ts +38 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,98 +29,85 @@ const client = new CrowdyClient({
|
|
|
29
29
|
### Authentication
|
|
30
30
|
|
|
31
31
|
```javascript
|
|
32
|
-
// Login
|
|
33
32
|
const authResponse = await client.login(email, password);
|
|
34
33
|
console.log('Logged in as:', authResponse.user.email);
|
|
35
34
|
|
|
36
|
-
//
|
|
35
|
+
// Or register a new account
|
|
37
36
|
const authResponse = await client.register(email, password, gamertag);
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
###
|
|
39
|
+
### Subscribe to Notifications
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const status = await client.connectUdpProxy();
|
|
45
|
-
console.log('Connected to server:', status.serverIp6);
|
|
41
|
+
Subscribing to any notification type automatically opens a UDP proxy session
|
|
42
|
+
to the game server -- no explicit `connectUdpProxy()` call is needed.
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
const
|
|
44
|
+
```javascript
|
|
45
|
+
const unsubActorUpdate = client.onActorUpdate((notification) => {
|
|
46
|
+
console.log('Actor update from:', notification.uuid);
|
|
47
|
+
console.log(' state:', notification.state);
|
|
48
|
+
console.log(' sequenceNumber:', notification.sequenceNumber);
|
|
49
|
+
console.log(' epochMillis:', notification.epochMillis);
|
|
50
|
+
});
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
const unsubError = client.onGenericError((error) => {
|
|
53
|
+
console.error('Error:', error.errorCode);
|
|
54
|
+
});
|
|
52
55
|
```
|
|
53
56
|
|
|
54
|
-
###
|
|
57
|
+
### Register in a Chunk
|
|
58
|
+
|
|
59
|
+
Before other clients can receive your updates, you must send at least one
|
|
60
|
+
actor update so the game server knows your chunk position. Use a minimal
|
|
61
|
+
base64 payload (the server requires a non-empty `state`):
|
|
55
62
|
|
|
56
63
|
```javascript
|
|
57
|
-
|
|
58
|
-
const stateBuffer = new ArrayBuffer(96);
|
|
59
|
-
const view = new DataView(stateBuffer);
|
|
60
|
-
view.setFloat32(0, x, true); // position x
|
|
61
|
-
view.setFloat32(4, y, true); // position y
|
|
62
|
-
// ... populate rest of state
|
|
63
|
-
|
|
64
|
-
// Convert to base64
|
|
65
|
-
const base64State = btoa(String.fromCharCode(...new Uint8Array(stateBuffer)));
|
|
64
|
+
const MY_UUID = 'aaaaaaaabbbbccccddddeeeeeeeeeeee'; // 32 bytes UTF-8
|
|
66
65
|
|
|
67
|
-
// Send update
|
|
68
66
|
await client.sendActorUpdate({
|
|
69
|
-
mapId:
|
|
70
|
-
chunk: { x:
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
mapId: 0,
|
|
68
|
+
chunk: { x: 0, y: 0, z: 0 },
|
|
69
|
+
distance: 8,
|
|
70
|
+
uuid: MY_UUID,
|
|
71
|
+
state: 'AA==', // minimal base64 payload for registration
|
|
72
|
+
sequenceNumber: 1,
|
|
73
73
|
});
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
###
|
|
77
|
-
|
|
78
|
-
The SDK provides type-specific handlers so you don't need to switch on `__typename`:
|
|
76
|
+
### Send Actor Updates
|
|
79
77
|
|
|
80
78
|
```javascript
|
|
81
|
-
|
|
82
|
-
const unsubscribe1 = client.onActorUpdate((notification) => {
|
|
83
|
-
// notification is typed as ActorUpdateNotification
|
|
84
|
-
console.log('Actor updated:', notification.uuid);
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
// Actor update responses (from your own requests)
|
|
88
|
-
const unsubscribe2 = client.onActorUpdateResponse((response) => {
|
|
89
|
-
// response is typed as ActorUpdateResponse
|
|
90
|
-
if (response.errorCode === 'NO_ERROR') {
|
|
91
|
-
console.log('Update successful');
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// Voxel updates
|
|
96
|
-
const unsubscribe3 = client.onVoxelUpdate((notification) => {
|
|
97
|
-
// notification is typed as VoxelUpdateNotification
|
|
98
|
-
});
|
|
79
|
+
const base64State = btoa(String.fromCharCode(...new Uint8Array(stateBuffer)));
|
|
99
80
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
81
|
+
await client.sendActorUpdate({
|
|
82
|
+
mapId: 0,
|
|
83
|
+
chunk: { x: 0, y: 0, z: 0 },
|
|
84
|
+
distance: 8,
|
|
85
|
+
decayRate: 0,
|
|
86
|
+
uuid: MY_UUID,
|
|
87
|
+
state: base64State,
|
|
88
|
+
sequenceNumber: 2,
|
|
103
89
|
});
|
|
90
|
+
```
|
|
104
91
|
|
|
105
|
-
|
|
106
|
-
const unsubscribe5 = client.onClientText((notification) => {
|
|
107
|
-
// notification is typed as ClientTextNotification
|
|
108
|
-
});
|
|
92
|
+
### Type-Specific Subscription Handlers
|
|
109
93
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
94
|
+
The SDK provides type-specific handlers so you don't need to switch on `__typename`.
|
|
95
|
+
All spatial notifications include the uniform header fields: `mapId`, `chunkX`,
|
|
96
|
+
`chunkY`, `chunkZ`, `distance`, `decayRate`, `uuid`, `sequenceNumber`, `epochMillis`.
|
|
114
97
|
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
});
|
|
98
|
+
```javascript
|
|
99
|
+
const unsub1 = client.onActorUpdate((n) => { /* ActorUpdateNotification */ });
|
|
100
|
+
const unsub2 = client.onActorUpdateResponse((n) => { /* ActorUpdateResponse */ });
|
|
101
|
+
const unsub3 = client.onVoxelUpdate((n) => { /* VoxelUpdateNotification */ });
|
|
102
|
+
const unsub4 = client.onVoxelUpdateResponse((n) => { /* VoxelUpdateResponse */ });
|
|
103
|
+
const unsub5 = client.onClientAudio((n) => { /* ClientAudioNotification */ });
|
|
104
|
+
const unsub6 = client.onClientText((n) => { /* ClientTextNotification */ });
|
|
105
|
+
const unsub7 = client.onClientEvent((n) => { /* ClientEventNotification */ });
|
|
106
|
+
const unsub8 = client.onServerEvent((n) => { /* ServerEventNotification */ });
|
|
107
|
+
const unsub9 = client.onGenericError((e) => { /* GenericErrorResponse */ });
|
|
119
108
|
|
|
120
109
|
// Unsubscribe when done
|
|
121
|
-
|
|
122
|
-
unsubscribe2();
|
|
123
|
-
// ... etc
|
|
110
|
+
unsub1();
|
|
124
111
|
```
|
|
125
112
|
|
|
126
113
|
### Complete Example
|
|
@@ -133,25 +120,36 @@ const client = new CrowdyClient({
|
|
|
133
120
|
wsEndpoint: 'ws://localhost:3000/graphql',
|
|
134
121
|
});
|
|
135
122
|
|
|
136
|
-
|
|
137
|
-
await client.login('user@example.com', 'password');
|
|
123
|
+
const MY_UUID = 'aaaaaaaabbbbccccddddeeeeeeeeeeee';
|
|
138
124
|
|
|
139
|
-
//
|
|
140
|
-
await client.
|
|
125
|
+
// 1. Login
|
|
126
|
+
await client.login('user@example.com', 'password');
|
|
141
127
|
|
|
142
|
-
// Subscribe
|
|
128
|
+
// 2. Subscribe (auto-opens UDP proxy session)
|
|
143
129
|
const unsubscribe = client.onActorUpdate((notification) => {
|
|
144
|
-
console.log('Actor update:', notification.uuid);
|
|
145
|
-
|
|
130
|
+
console.log('Actor update:', notification.uuid, notification.epochMillis);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// 3. Register in chunk
|
|
134
|
+
await client.sendActorUpdate({
|
|
135
|
+
mapId: 0,
|
|
136
|
+
chunk: { x: 0, y: 0, z: 0 },
|
|
137
|
+
distance: 8,
|
|
138
|
+
uuid: MY_UUID,
|
|
139
|
+
state: 'AA==',
|
|
140
|
+
sequenceNumber: 1,
|
|
146
141
|
});
|
|
147
142
|
|
|
148
|
-
// Send
|
|
143
|
+
// 4. Send updates
|
|
144
|
+
let seq = 2;
|
|
149
145
|
setInterval(async () => {
|
|
150
146
|
await client.sendActorUpdate({
|
|
151
|
-
mapId:
|
|
152
|
-
chunk: { x:
|
|
153
|
-
|
|
147
|
+
mapId: 0,
|
|
148
|
+
chunk: { x: 0, y: 0, z: 0 },
|
|
149
|
+
distance: 8,
|
|
150
|
+
uuid: MY_UUID,
|
|
154
151
|
state: 'base64-state-data',
|
|
152
|
+
sequenceNumber: seq++ % 256,
|
|
155
153
|
});
|
|
156
154
|
}, 100);
|
|
157
155
|
|
|
@@ -186,7 +184,7 @@ new CrowdyClient(config?: CrowdyClientConfig)
|
|
|
186
184
|
- `getAuthToken(): string | null`
|
|
187
185
|
|
|
188
186
|
**UDP Proxy:**
|
|
189
|
-
- `connectUdpProxy(): Promise<UdpProxyConnectionStatus>`
|
|
187
|
+
- `connectUdpProxy(): Promise<UdpProxyConnectionStatus>` -- optional; subscriptions and mutations auto-open the session
|
|
190
188
|
- `disconnectUdpProxy(): Promise<boolean>`
|
|
191
189
|
- `getConnectionStatus(): Promise<UdpProxyConnectionStatus>`
|
|
192
190
|
|
|
@@ -198,14 +196,15 @@ new CrowdyClient(config?: CrowdyClientConfig)
|
|
|
198
196
|
- `sendClientEvent(input: ClientEventNotificationInput): Promise<boolean>`
|
|
199
197
|
|
|
200
198
|
**Subscriptions:**
|
|
201
|
-
- `onActorUpdate(handler
|
|
202
|
-
- `onActorUpdateResponse(handler
|
|
203
|
-
- `onVoxelUpdate(handler
|
|
204
|
-
- `onVoxelUpdateResponse(handler
|
|
205
|
-
- `onClientAudio(handler
|
|
206
|
-
- `onClientText(handler
|
|
207
|
-
- `onClientEvent(handler
|
|
208
|
-
- `onServerEvent(handler
|
|
199
|
+
- `onActorUpdate(handler): UnsubscribeFn`
|
|
200
|
+
- `onActorUpdateResponse(handler): UnsubscribeFn`
|
|
201
|
+
- `onVoxelUpdate(handler): UnsubscribeFn`
|
|
202
|
+
- `onVoxelUpdateResponse(handler): UnsubscribeFn`
|
|
203
|
+
- `onClientAudio(handler): UnsubscribeFn`
|
|
204
|
+
- `onClientText(handler): UnsubscribeFn`
|
|
205
|
+
- `onClientEvent(handler): UnsubscribeFn`
|
|
206
|
+
- `onServerEvent(handler): UnsubscribeFn`
|
|
207
|
+
- `onGenericError(handler): UnsubscribeFn`
|
|
209
208
|
|
|
210
209
|
**Cleanup:**
|
|
211
210
|
- `close(): void` - Closes all subscriptions and cleans up
|
package/dist/client.js
CHANGED
|
@@ -101,7 +101,7 @@ export class GraphQLClient {
|
|
|
101
101
|
async connectUdpProxy() {
|
|
102
102
|
const data = await this.query(`
|
|
103
103
|
mutation ConnectUdpProxy {
|
|
104
|
-
connectUdpProxy
|
|
104
|
+
connectUdpProxy {
|
|
105
105
|
connected
|
|
106
106
|
serverIp6
|
|
107
107
|
serverClientPort
|
|
@@ -134,17 +134,17 @@ export class GraphQLClient {
|
|
|
134
134
|
}
|
|
135
135
|
async sendActorUpdate(input) {
|
|
136
136
|
const normalizedInput = {
|
|
137
|
-
mapId: String(
|
|
137
|
+
mapId: String(input.mapId),
|
|
138
138
|
chunk: {
|
|
139
|
-
x: String(
|
|
140
|
-
y: String(
|
|
141
|
-
z: String(
|
|
139
|
+
x: String(input.chunk.x),
|
|
140
|
+
y: String(input.chunk.y),
|
|
141
|
+
z: String(input.chunk.z),
|
|
142
142
|
},
|
|
143
143
|
uuid: String(input.uuid),
|
|
144
144
|
state: String(input.state),
|
|
145
145
|
distance: input.distance ?? 8,
|
|
146
|
-
decayRate: input.decayRate ??
|
|
147
|
-
|
|
146
|
+
decayRate: input.decayRate ?? 0,
|
|
147
|
+
sequenceNumber: input.sequenceNumber ?? 0,
|
|
148
148
|
};
|
|
149
149
|
const data = await this.query(`
|
|
150
150
|
mutation SendActorUpdate($input: ActorUpdateRequestInput!) {
|
|
@@ -155,11 +155,11 @@ export class GraphQLClient {
|
|
|
155
155
|
}
|
|
156
156
|
async sendVoxelUpdate(input) {
|
|
157
157
|
const normalizedInput = {
|
|
158
|
-
mapId: String(
|
|
158
|
+
mapId: String(input.mapId),
|
|
159
159
|
chunk: {
|
|
160
|
-
x: String(
|
|
161
|
-
y: String(
|
|
162
|
-
z: String(
|
|
160
|
+
x: String(input.chunk.x),
|
|
161
|
+
y: String(input.chunk.y),
|
|
162
|
+
z: String(input.chunk.z),
|
|
163
163
|
},
|
|
164
164
|
uuid: String(input.uuid),
|
|
165
165
|
voxel: input.voxel,
|
|
@@ -167,7 +167,7 @@ export class GraphQLClient {
|
|
|
167
167
|
voxelState: String(input.voxelState),
|
|
168
168
|
distance: input.distance ?? 8,
|
|
169
169
|
decayRate: input.decayRate ?? 0,
|
|
170
|
-
|
|
170
|
+
sequenceNumber: input.sequenceNumber ?? 0,
|
|
171
171
|
};
|
|
172
172
|
const data = await this.query(`
|
|
173
173
|
mutation SendVoxelUpdate($input: VoxelUpdateRequestInput!) {
|
|
@@ -178,17 +178,17 @@ export class GraphQLClient {
|
|
|
178
178
|
}
|
|
179
179
|
async sendAudioPacket(input) {
|
|
180
180
|
const normalizedInput = {
|
|
181
|
-
mapId: String(
|
|
181
|
+
mapId: String(input.mapId),
|
|
182
182
|
chunk: {
|
|
183
|
-
x: String(
|
|
184
|
-
y: String(
|
|
185
|
-
z: String(
|
|
183
|
+
x: String(input.chunk.x),
|
|
184
|
+
y: String(input.chunk.y),
|
|
185
|
+
z: String(input.chunk.z),
|
|
186
186
|
},
|
|
187
187
|
uuid: String(input.uuid),
|
|
188
188
|
audioData: String(input.audioData),
|
|
189
189
|
distance: input.distance ?? 1,
|
|
190
190
|
decayRate: input.decayRate ?? 0,
|
|
191
|
-
|
|
191
|
+
sequenceNumber: input.sequenceNumber ?? 0,
|
|
192
192
|
};
|
|
193
193
|
const data = await this.query(`
|
|
194
194
|
mutation SendAudioPacket($input: ClientAudioPacketInput!) {
|
|
@@ -199,17 +199,17 @@ export class GraphQLClient {
|
|
|
199
199
|
}
|
|
200
200
|
async sendTextPacket(input) {
|
|
201
201
|
const normalizedInput = {
|
|
202
|
-
mapId: String(
|
|
202
|
+
mapId: String(input.mapId),
|
|
203
203
|
chunk: {
|
|
204
|
-
x: String(
|
|
205
|
-
y: String(
|
|
206
|
-
z: String(
|
|
204
|
+
x: String(input.chunk.x),
|
|
205
|
+
y: String(input.chunk.y),
|
|
206
|
+
z: String(input.chunk.z),
|
|
207
207
|
},
|
|
208
208
|
uuid: String(input.uuid),
|
|
209
209
|
text: String(input.text),
|
|
210
210
|
distance: input.distance ?? 1,
|
|
211
211
|
decayRate: input.decayRate ?? 0,
|
|
212
|
-
|
|
212
|
+
sequenceNumber: input.sequenceNumber ?? 0,
|
|
213
213
|
};
|
|
214
214
|
const data = await this.query(`
|
|
215
215
|
mutation SendTextPacket($input: ClientTextPacketInput!) {
|
|
@@ -220,18 +220,18 @@ export class GraphQLClient {
|
|
|
220
220
|
}
|
|
221
221
|
async sendClientEvent(input) {
|
|
222
222
|
const normalizedInput = {
|
|
223
|
-
mapId: String(
|
|
223
|
+
mapId: String(input.mapId),
|
|
224
224
|
chunk: {
|
|
225
|
-
x: String(
|
|
226
|
-
y: String(
|
|
227
|
-
z: String(
|
|
225
|
+
x: String(input.chunk.x),
|
|
226
|
+
y: String(input.chunk.y),
|
|
227
|
+
z: String(input.chunk.z),
|
|
228
228
|
},
|
|
229
229
|
uuid: String(input.uuid),
|
|
230
230
|
eventType: input.eventType,
|
|
231
231
|
state: String(input.state),
|
|
232
232
|
distance: input.distance ?? 8,
|
|
233
233
|
decayRate: input.decayRate ?? 0,
|
|
234
|
-
|
|
234
|
+
sequenceNumber: input.sequenceNumber ?? 0,
|
|
235
235
|
};
|
|
236
236
|
const data = await this.query(`
|
|
237
237
|
mutation SendClientEvent($input: ClientEventNotificationInput!) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CrowdyJS SDK - Client SDK for Crowded Kingdoms GraphQL API
|
|
3
3
|
*/
|
|
4
|
+
export declare const VERSION = "1.0.3";
|
|
4
5
|
export { CrowdyClient } from './crowdy-client.js';
|
|
5
6
|
export type { CrowdyClientConfig, BigInt, ChunkCoordinates, ChunkCoordinatesInput, VoxelCoordinates, VoxelCoordinatesInput, UdpErrorCode, User, AuthResponse, UdpProxyConnectionStatus, ActorUpdateRequestInput, VoxelUpdateRequestInput, ClientAudioPacketInput, ClientTextPacketInput, ClientEventNotificationInput, ActorUpdateNotification, ActorUpdateResponse, VoxelUpdateNotification, VoxelUpdateResponse, ClientAudioNotification, ClientTextNotification, ClientEventNotification, ServerEventNotification, GenericErrorResponse, UdpNotification, ActorUpdateHandler, ActorUpdateResponseHandler, VoxelUpdateHandler, VoxelUpdateResponseHandler, ClientAudioHandler, ClientTextHandler, ClientEventHandler, ServerEventHandler, GenericErrorHandler, UnsubscribeFn, } from './types.js';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAEV,kBAAkB,EAElB,MAAM,EACN,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,wBAAwB,EAExB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAE5B,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EAEf,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAEV,kBAAkB,EAElB,MAAM,EACN,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,wBAAwB,EAExB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAE5B,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EAEf,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../src/subscriptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAEV,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACd,MAAM,YAAY,CAAC;AAcpB,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAUd;IAEF,OAAO,CAAC,QAAQ,CAA0B;IAC1C,OAAO,CAAC,aAAa,CA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B,GAAG,aAAa;IAYzD,YAAY,CAAC,OAAO,EAAE,iBAAiB,GAAG,aAAa;IAYvD,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,aAAa;IAYzD,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,aAAa;IAYzD,cAAc,CAAC,OAAO,EAAE,mBAAmB,GAAG,aAAa;IAY3D,OAAO,CAAC,wBAAwB;IAShC,KAAK,IAAI,IAAI;CAWd"}
|
package/dist/subscriptions.js
CHANGED
|
@@ -41,114 +41,43 @@ export class SubscriptionManager {
|
|
|
41
41
|
}
|
|
42
42
|
const wsUrl = this.wsEndpoint;
|
|
43
43
|
this.subscriptionId = 'udp-notifications-' + Date.now();
|
|
44
|
-
const ws = new WebSocket(wsUrl, 'graphql-ws');
|
|
44
|
+
const ws = new WebSocket(wsUrl, 'graphql-transport-ws');
|
|
45
45
|
this.wsClient = ws;
|
|
46
46
|
ws.onopen = () => {
|
|
47
47
|
ws.send(JSON.stringify({
|
|
48
48
|
type: 'connection_init',
|
|
49
49
|
payload: {
|
|
50
|
-
authorization: `Bearer ${this.token}`,
|
|
51
50
|
Authorization: `Bearer ${this.token}`,
|
|
52
51
|
},
|
|
53
52
|
}));
|
|
54
53
|
};
|
|
55
54
|
ws.onmessage = (event) => {
|
|
56
55
|
try {
|
|
57
|
-
const message = JSON.parse(event.data);
|
|
56
|
+
const message = JSON.parse(typeof event.data === 'string' ? event.data : '');
|
|
58
57
|
if (message.type === 'connection_ack') {
|
|
59
|
-
const
|
|
58
|
+
const subscribeMessage = {
|
|
60
59
|
id: this.subscriptionId,
|
|
61
|
-
type: '
|
|
60
|
+
type: 'subscribe',
|
|
62
61
|
payload: {
|
|
63
62
|
query: `subscription {
|
|
64
63
|
udpNotifications {
|
|
65
64
|
__typename
|
|
66
|
-
... on ActorUpdateNotification {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
... on
|
|
75
|
-
mapId
|
|
76
|
-
chunkX
|
|
77
|
-
chunkY
|
|
78
|
-
chunkZ
|
|
79
|
-
uuid
|
|
80
|
-
sequenceNumber
|
|
81
|
-
}
|
|
82
|
-
... on VoxelUpdateNotification {
|
|
83
|
-
mapId
|
|
84
|
-
chunkX
|
|
85
|
-
chunkY
|
|
86
|
-
chunkZ
|
|
87
|
-
uuid
|
|
88
|
-
voxelX
|
|
89
|
-
voxelY
|
|
90
|
-
voxelZ
|
|
91
|
-
voxelType
|
|
92
|
-
voxelState
|
|
93
|
-
}
|
|
94
|
-
... on VoxelUpdateResponse {
|
|
95
|
-
mapId
|
|
96
|
-
chunkX
|
|
97
|
-
chunkY
|
|
98
|
-
chunkZ
|
|
99
|
-
uuid
|
|
100
|
-
sequenceNumber
|
|
101
|
-
}
|
|
102
|
-
... on ClientAudioNotification {
|
|
103
|
-
mapId
|
|
104
|
-
chunkX
|
|
105
|
-
chunkY
|
|
106
|
-
chunkZ
|
|
107
|
-
uuid
|
|
108
|
-
audioData
|
|
109
|
-
}
|
|
110
|
-
... on ClientTextNotification {
|
|
111
|
-
mapId
|
|
112
|
-
chunkX
|
|
113
|
-
chunkY
|
|
114
|
-
chunkZ
|
|
115
|
-
uuid
|
|
116
|
-
text
|
|
117
|
-
}
|
|
118
|
-
... on ClientEventNotification {
|
|
119
|
-
mapId
|
|
120
|
-
chunkX
|
|
121
|
-
chunkY
|
|
122
|
-
chunkZ
|
|
123
|
-
uuid
|
|
124
|
-
eventType
|
|
125
|
-
state
|
|
126
|
-
}
|
|
127
|
-
... on ServerEventNotification {
|
|
128
|
-
mapId
|
|
129
|
-
chunkX
|
|
130
|
-
chunkY
|
|
131
|
-
chunkZ
|
|
132
|
-
uuid
|
|
133
|
-
eventType
|
|
134
|
-
state
|
|
135
|
-
}
|
|
136
|
-
... on GenericErrorResponse {
|
|
137
|
-
sequenceNumber
|
|
138
|
-
errorCode
|
|
139
|
-
}
|
|
65
|
+
... on ActorUpdateNotification { mapId chunkX chunkY chunkZ distance decayRate uuid state sequenceNumber epochMillis }
|
|
66
|
+
... on VoxelUpdateNotification { mapId chunkX chunkY chunkZ distance decayRate uuid voxelX voxelY voxelZ voxelType voxelState sequenceNumber epochMillis }
|
|
67
|
+
... on GenericErrorResponse { sequenceNumber errorCode }
|
|
68
|
+
... on ActorUpdateResponse { mapId chunkX chunkY chunkZ distance decayRate uuid sequenceNumber epochMillis }
|
|
69
|
+
... on VoxelUpdateResponse { mapId chunkX chunkY chunkZ distance decayRate uuid sequenceNumber epochMillis }
|
|
70
|
+
... on ClientAudioNotification { mapId chunkX chunkY chunkZ distance decayRate uuid audioData sequenceNumber epochMillis }
|
|
71
|
+
... on ClientTextNotification { mapId chunkX chunkY chunkZ distance decayRate uuid text sequenceNumber epochMillis }
|
|
72
|
+
... on ClientEventNotification { mapId chunkX chunkY chunkZ distance decayRate uuid eventType state sequenceNumber epochMillis }
|
|
73
|
+
... on ServerEventNotification { mapId chunkX chunkY chunkZ distance decayRate uuid eventType state sequenceNumber epochMillis }
|
|
140
74
|
}
|
|
141
75
|
}`,
|
|
142
76
|
},
|
|
143
77
|
};
|
|
144
|
-
ws.send(JSON.stringify(
|
|
78
|
+
ws.send(JSON.stringify(subscribeMessage));
|
|
145
79
|
}
|
|
146
|
-
else if (message.type === '
|
|
147
|
-
console.error('Connection error:', message.payload);
|
|
148
|
-
const errorMsg = message.payload?.message || 'Connection rejected - check authorization token';
|
|
149
|
-
console.error('WebSocket connection error:', errorMsg);
|
|
150
|
-
}
|
|
151
|
-
else if (message.type === 'data') {
|
|
80
|
+
else if (message.type === 'next') {
|
|
152
81
|
if (message.payload?.data?.udpNotifications === null) {
|
|
153
82
|
return;
|
|
154
83
|
}
|
|
@@ -168,13 +97,13 @@ export class SubscriptionManager {
|
|
|
168
97
|
}
|
|
169
98
|
}
|
|
170
99
|
else if (message.type === 'error') {
|
|
171
|
-
console.error('
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
100
|
+
console.error('Subscription error:', message.payload);
|
|
101
|
+
}
|
|
102
|
+
else if (message.type === 'complete') {
|
|
103
|
+
// Server ended the subscription
|
|
104
|
+
if (this.wsClient === ws) {
|
|
105
|
+
this.wsClient = null;
|
|
106
|
+
}
|
|
178
107
|
}
|
|
179
108
|
else if (message.type === 'ping') {
|
|
180
109
|
ws.send(JSON.stringify({ type: 'pong' }));
|
|
@@ -200,7 +129,7 @@ export class SubscriptionManager {
|
|
|
200
129
|
if (this.subscriptionId) {
|
|
201
130
|
ws.send(JSON.stringify({
|
|
202
131
|
id: this.subscriptionId,
|
|
203
|
-
type: '
|
|
132
|
+
type: 'complete',
|
|
204
133
|
}));
|
|
205
134
|
}
|
|
206
135
|
ws.close();
|
package/dist/types.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export interface ChunkCoordinates {
|
|
|
8
8
|
z: BigInt;
|
|
9
9
|
}
|
|
10
10
|
export interface ChunkCoordinatesInput {
|
|
11
|
-
x:
|
|
12
|
-
y:
|
|
13
|
-
z:
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
14
|
}
|
|
15
15
|
export interface VoxelCoordinates {
|
|
16
16
|
x: number;
|
|
@@ -76,7 +76,7 @@ export interface UdpProxyConnectionStatus {
|
|
|
76
76
|
lastMessageTime?: string;
|
|
77
77
|
}
|
|
78
78
|
export interface ActorUpdateRequestInput {
|
|
79
|
-
mapId:
|
|
79
|
+
mapId: number;
|
|
80
80
|
chunk: ChunkCoordinatesInput;
|
|
81
81
|
uuid: string;
|
|
82
82
|
state: string;
|
|
@@ -85,7 +85,7 @@ export interface ActorUpdateRequestInput {
|
|
|
85
85
|
sequenceNumber?: number;
|
|
86
86
|
}
|
|
87
87
|
export interface VoxelUpdateRequestInput {
|
|
88
|
-
mapId:
|
|
88
|
+
mapId: number;
|
|
89
89
|
chunk: ChunkCoordinatesInput;
|
|
90
90
|
uuid: string;
|
|
91
91
|
voxel: VoxelCoordinatesInput;
|
|
@@ -96,7 +96,7 @@ export interface VoxelUpdateRequestInput {
|
|
|
96
96
|
sequenceNumber?: number;
|
|
97
97
|
}
|
|
98
98
|
export interface ClientAudioPacketInput {
|
|
99
|
-
mapId:
|
|
99
|
+
mapId: number;
|
|
100
100
|
chunk: ChunkCoordinatesInput;
|
|
101
101
|
uuid: string;
|
|
102
102
|
audioData: string;
|
|
@@ -105,7 +105,7 @@ export interface ClientAudioPacketInput {
|
|
|
105
105
|
sequenceNumber?: number;
|
|
106
106
|
}
|
|
107
107
|
export interface ClientTextPacketInput {
|
|
108
|
-
mapId:
|
|
108
|
+
mapId: number;
|
|
109
109
|
chunk: ChunkCoordinatesInput;
|
|
110
110
|
uuid: string;
|
|
111
111
|
text: string;
|
|
@@ -114,7 +114,7 @@ export interface ClientTextPacketInput {
|
|
|
114
114
|
sequenceNumber?: number;
|
|
115
115
|
}
|
|
116
116
|
export interface ClientEventNotificationInput {
|
|
117
|
-
mapId:
|
|
117
|
+
mapId: number;
|
|
118
118
|
chunk: ChunkCoordinatesInput;
|
|
119
119
|
uuid: string;
|
|
120
120
|
eventType: number;
|
|
@@ -129,8 +129,12 @@ export interface ActorUpdateNotification {
|
|
|
129
129
|
chunkX: BigInt;
|
|
130
130
|
chunkY: BigInt;
|
|
131
131
|
chunkZ: BigInt;
|
|
132
|
+
distance: number;
|
|
133
|
+
decayRate: number;
|
|
132
134
|
uuid: string;
|
|
133
135
|
state: string;
|
|
136
|
+
sequenceNumber: number;
|
|
137
|
+
epochMillis: BigInt;
|
|
134
138
|
}
|
|
135
139
|
export interface ActorUpdateResponse {
|
|
136
140
|
__typename: 'ActorUpdateResponse';
|
|
@@ -138,8 +142,11 @@ export interface ActorUpdateResponse {
|
|
|
138
142
|
chunkX: BigInt;
|
|
139
143
|
chunkY: BigInt;
|
|
140
144
|
chunkZ: BigInt;
|
|
145
|
+
distance: number;
|
|
146
|
+
decayRate: number;
|
|
141
147
|
uuid: string;
|
|
142
148
|
sequenceNumber: number;
|
|
149
|
+
epochMillis: BigInt;
|
|
143
150
|
}
|
|
144
151
|
export interface VoxelUpdateNotification {
|
|
145
152
|
__typename: 'VoxelUpdateNotification';
|
|
@@ -147,12 +154,16 @@ export interface VoxelUpdateNotification {
|
|
|
147
154
|
chunkX: BigInt;
|
|
148
155
|
chunkY: BigInt;
|
|
149
156
|
chunkZ: BigInt;
|
|
157
|
+
distance: number;
|
|
158
|
+
decayRate: number;
|
|
150
159
|
uuid: string;
|
|
151
160
|
voxelX: number;
|
|
152
161
|
voxelY: number;
|
|
153
162
|
voxelZ: number;
|
|
154
163
|
voxelType: number;
|
|
155
164
|
voxelState: string;
|
|
165
|
+
sequenceNumber: number;
|
|
166
|
+
epochMillis: BigInt;
|
|
156
167
|
}
|
|
157
168
|
export interface VoxelUpdateResponse {
|
|
158
169
|
__typename: 'VoxelUpdateResponse';
|
|
@@ -160,8 +171,11 @@ export interface VoxelUpdateResponse {
|
|
|
160
171
|
chunkX: BigInt;
|
|
161
172
|
chunkY: BigInt;
|
|
162
173
|
chunkZ: BigInt;
|
|
174
|
+
distance: number;
|
|
175
|
+
decayRate: number;
|
|
163
176
|
uuid: string;
|
|
164
177
|
sequenceNumber: number;
|
|
178
|
+
epochMillis: BigInt;
|
|
165
179
|
}
|
|
166
180
|
export interface ClientAudioNotification {
|
|
167
181
|
__typename: 'ClientAudioNotification';
|
|
@@ -169,8 +183,12 @@ export interface ClientAudioNotification {
|
|
|
169
183
|
chunkX: BigInt;
|
|
170
184
|
chunkY: BigInt;
|
|
171
185
|
chunkZ: BigInt;
|
|
186
|
+
distance: number;
|
|
187
|
+
decayRate: number;
|
|
172
188
|
uuid: string;
|
|
173
189
|
audioData: string;
|
|
190
|
+
sequenceNumber: number;
|
|
191
|
+
epochMillis: BigInt;
|
|
174
192
|
}
|
|
175
193
|
export interface ClientTextNotification {
|
|
176
194
|
__typename: 'ClientTextNotification';
|
|
@@ -178,8 +196,12 @@ export interface ClientTextNotification {
|
|
|
178
196
|
chunkX: BigInt;
|
|
179
197
|
chunkY: BigInt;
|
|
180
198
|
chunkZ: BigInt;
|
|
199
|
+
distance: number;
|
|
200
|
+
decayRate: number;
|
|
181
201
|
uuid: string;
|
|
182
202
|
text: string;
|
|
203
|
+
sequenceNumber: number;
|
|
204
|
+
epochMillis: BigInt;
|
|
183
205
|
}
|
|
184
206
|
export interface ClientEventNotification {
|
|
185
207
|
__typename: 'ClientEventNotification';
|
|
@@ -187,9 +209,13 @@ export interface ClientEventNotification {
|
|
|
187
209
|
chunkX: BigInt;
|
|
188
210
|
chunkY: BigInt;
|
|
189
211
|
chunkZ: BigInt;
|
|
212
|
+
distance: number;
|
|
213
|
+
decayRate: number;
|
|
190
214
|
uuid: string;
|
|
191
215
|
eventType: number;
|
|
192
216
|
state: string;
|
|
217
|
+
sequenceNumber: number;
|
|
218
|
+
epochMillis: BigInt;
|
|
193
219
|
}
|
|
194
220
|
export interface ServerEventNotification {
|
|
195
221
|
__typename: 'ServerEventNotification';
|
|
@@ -197,9 +223,13 @@ export interface ServerEventNotification {
|
|
|
197
223
|
chunkX: BigInt;
|
|
198
224
|
chunkY: BigInt;
|
|
199
225
|
chunkZ: BigInt;
|
|
226
|
+
distance: number;
|
|
227
|
+
decayRate: number;
|
|
200
228
|
uuid: string;
|
|
201
229
|
eventType: number;
|
|
202
230
|
state: string;
|
|
231
|
+
sequenceNumber: number;
|
|
232
|
+
epochMillis: BigInt;
|
|
203
233
|
}
|
|
204
234
|
export interface GenericErrorResponse {
|
|
205
235
|
__typename: 'GenericErrorResponse';
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAG5B,MAAM,WAAW,gBAAgB;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,M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