@dcl-regenesislabs/bevy-explorer-web 0.1.0-18292430673.commit-e417a13 → 0.1.0-18309830955.commit-236d8ba

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/.env CHANGED
@@ -1 +1 @@
1
- PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18292430673.commit-e417a13"
1
+ PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18309830955.commit-236d8ba"
package/index.html CHANGED
@@ -129,6 +129,6 @@
129
129
  </div>
130
130
  <script src="https://cdn.jsdelivr.net/npm/livekit-client/dist/livekit-client.umd.min.js"></script>
131
131
  <script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
132
- <script type="module" src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18292430673.commit-e417a13/main.js"></script>
132
+ <script type="module" src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18309830955.commit-236d8ba/main.js"></script>
133
133
  </body>
134
134
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl-regenesislabs/bevy-explorer-web",
3
- "version": "0.1.0-18292430673.commit-e417a13",
3
+ "version": "0.1.0-18309830955.commit-236d8ba",
4
4
  "scripts": {
5
5
  "postinstall": "node ./scripts/prebuild.js"
6
6
  },
@@ -8,6 +8,6 @@
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/decentraland/bevy-explorer.git"
10
10
  },
11
- "homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18292430673.commit-e417a13",
12
- "commit": "e417a13a3f400f2500a7ad42506101b00696fe20"
11
+ "homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-18309830955.commit-236d8ba",
12
+ "commit": "236d8ba1971d3d6f756b681da590504e32d56124"
13
13
  }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "decentra-bevy",
3
+ "type": "module",
4
+ "version": "0.1.0",
5
+ "files": [
6
+ "webgpu_build_bg.wasm",
7
+ "webgpu_build.js",
8
+ "webgpu_build.d.ts"
9
+ ],
10
+ "main": "webgpu_build.js",
11
+ "types": "webgpu_build.d.ts",
12
+ "sideEffects": [
13
+ "./snippets/*"
14
+ ]
15
+ }
@@ -0,0 +1,270 @@
1
+ let currentMicTrack = null;
2
+ const activeRooms = new Set();
3
+
4
+ // Store audio elements and panner nodes for spatial audio
5
+ const participantAudioNodes = new Map();
6
+
7
+ export async function connect_room(url, token) {
8
+ const room = new LivekitClient.Room({
9
+ autoSubscribe: true,
10
+ adaptiveStream: false,
11
+ dynacast: false,
12
+ });
13
+
14
+ await room.connect(url, token);
15
+
16
+ // Add to active rooms set
17
+ activeRooms.add(room);
18
+
19
+ // Don't automatically set up microphone - let it be controlled by the mic state
20
+
21
+ return room;
22
+ }
23
+
24
+ export function set_microphone_enabled(enabled) {
25
+ if (activeRooms.size === 0) {
26
+ console.warn('No rooms available for microphone control');
27
+ return;
28
+ }
29
+
30
+ if (enabled) {
31
+ // Enable microphone
32
+ if (!currentMicTrack) {
33
+ LivekitClient.createLocalAudioTrack({
34
+ echoCancellation: true,
35
+ noiseSuppression: true,
36
+ autoGainControl: true,
37
+ }).then(audioTrack => {
38
+ currentMicTrack = audioTrack;
39
+
40
+ // Publish to all active rooms
41
+ const publishPromises = Array.from(activeRooms).map(room =>
42
+ room.localParticipant.publishTrack(audioTrack, {
43
+ source: LivekitClient.Track.Source.Microphone,
44
+ }).catch(error => {
45
+ console.error(`Failed to publish to room: ${error}`);
46
+ })
47
+ );
48
+
49
+ return Promise.all(publishPromises);
50
+ }).then(() => {
51
+ console.log('Microphone enabled successfully for all rooms');
52
+ }).catch(error => {
53
+ console.error('Failed to enable microphone:', error);
54
+ currentMicTrack = null;
55
+ });
56
+ }
57
+ } else {
58
+ // Disable microphone
59
+ if (currentMicTrack) {
60
+ // Unpublish from all active rooms
61
+ const unpublishPromises = Array.from(activeRooms).map(room =>
62
+ room.localParticipant.unpublishTrack(currentMicTrack).catch(error => {
63
+ console.error(`Failed to unpublish from room: ${error}`);
64
+ })
65
+ );
66
+
67
+ Promise.all(unpublishPromises).then(() => {
68
+ currentMicTrack.stop();
69
+ currentMicTrack = null;
70
+ console.log('Microphone disabled successfully for all rooms');
71
+ }).catch(error => {
72
+ console.error('Failed to disable microphone:', error);
73
+ });
74
+ }
75
+ }
76
+ }
77
+
78
+ export function is_microphone_available() {
79
+ // Check if getUserMedia is available
80
+ const res = !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia)
81
+ return res;
82
+ }
83
+
84
+ export async function publish_data(room, data, reliable, destinations) {
85
+ const options = {
86
+ reliable: reliable,
87
+ destination: destinations.length > 0 ? destinations : undefined,
88
+ };
89
+
90
+ await room.localParticipant.publishData(data, options);
91
+ }
92
+
93
+ export async function publish_audio_track(room, track) {
94
+ const publication = await room.localParticipant.publishTrack(track, {
95
+ source: LivekitClient.Track.Source.Microphone,
96
+ });
97
+ return publication.trackSid;
98
+ }
99
+
100
+ export async function unpublish_track(room, sid) {
101
+ const publication = room.localParticipant.trackPublications.get(sid);
102
+ if (publication) {
103
+ await room.localParticipant.unpublishTrack(publication.track);
104
+ }
105
+ }
106
+
107
+ export async function close_room(room) {
108
+ // Remove from active rooms set
109
+ activeRooms.delete(room);
110
+
111
+ // If this was the last room and mic is active, clean up
112
+ if (activeRooms.size === 0 && currentMicTrack) {
113
+ currentMicTrack.stop();
114
+ currentMicTrack = null;
115
+ }
116
+
117
+ await room.disconnect();
118
+ }
119
+
120
+ export function set_room_event_handler(room, handler) {
121
+ room.on(LivekitClient.RoomEvent.DataReceived, (payload, participant) => {
122
+ handler({
123
+ type: 'dataReceived',
124
+ payload,
125
+ participant: {
126
+ identity: participant.identity,
127
+ metadata: participant.metadata || ''
128
+ }
129
+ });
130
+ });
131
+
132
+ room.on(LivekitClient.RoomEvent.TrackSubscribed, (track, publication, participant) => {
133
+ // For audio tracks, set up spatial audio
134
+ if (track.kind === 'audio') {
135
+ const audioElement = track.attach();
136
+
137
+ // Create Web Audio API nodes for spatial audio
138
+ const audioContext = new (window.AudioContext || window.webkitAudioContext)();
139
+ const source = audioContext.createMediaElementSource(audioElement);
140
+ const pannerNode = audioContext.createStereoPanner();
141
+ const gainNode = audioContext.createGain();
142
+
143
+ // Connect the audio graph: source -> panner -> gain -> destination
144
+ source.connect(pannerNode);
145
+ pannerNode.connect(gainNode);
146
+ gainNode.connect(audioContext.destination);
147
+
148
+ // Store the nodes for later control
149
+ participantAudioNodes.set(participant.identity, {
150
+ audioElement,
151
+ audioContext,
152
+ source,
153
+ pannerNode,
154
+ gainNode,
155
+ track
156
+ });
157
+
158
+ // Start playing
159
+ audioElement.play().catch(e => console.warn('Failed to play audio:', e));
160
+ }
161
+
162
+ handler({
163
+ type: 'trackSubscribed',
164
+ participant: {
165
+ identity: participant.identity,
166
+ metadata: participant.metadata || ''
167
+ }
168
+ });
169
+ });
170
+
171
+ room.on(LivekitClient.RoomEvent.TrackUnsubscribed, (track, publication, participant) => {
172
+ // Clean up spatial audio nodes
173
+ if (track.kind === 'audio') {
174
+ const nodes = participantAudioNodes.get(participant.identity);
175
+ if (nodes) {
176
+ nodes.source.disconnect();
177
+ nodes.pannerNode.disconnect();
178
+ nodes.gainNode.disconnect();
179
+ nodes.audioContext.close();
180
+ track.detach(nodes.audioElement);
181
+ participantAudioNodes.delete(participant.identity);
182
+ }
183
+ }
184
+
185
+ handler({
186
+ type: 'trackUnsubscribed',
187
+ participant: {
188
+ identity: participant.identity,
189
+ metadata: participant.metadata || ''
190
+ }
191
+ });
192
+ });
193
+
194
+ room.on(LivekitClient.RoomEvent.ParticipantConnected, (participant) => {
195
+ handler({
196
+ type: 'participantConnected',
197
+ participant: {
198
+ identity: participant.identity,
199
+ metadata: participant.metadata || ''
200
+ }
201
+ });
202
+ });
203
+
204
+ room.on(LivekitClient.RoomEvent.ParticipantDisconnected, (participant) => {
205
+ // Clean up any audio nodes when participant disconnects
206
+ const nodes = participantAudioNodes.get(participant.identity);
207
+ if (nodes) {
208
+ nodes.source.disconnect();
209
+ nodes.pannerNode.disconnect();
210
+ nodes.gainNode.disconnect();
211
+ nodes.audioContext.close();
212
+ participantAudioNodes.delete(participant.identity);
213
+ }
214
+
215
+ handler({
216
+ type: 'participantDisconnected',
217
+ participant: {
218
+ identity: participant.identity,
219
+ metadata: participant.metadata || ''
220
+ }
221
+ });
222
+ });
223
+ }
224
+
225
+ // Spatial audio control functions
226
+ export function set_participant_spatial_audio(participantIdentity, pan, volume) {
227
+ const nodes = participantAudioNodes.get(participantIdentity);
228
+ if (nodes) {
229
+ // Pan value should be between -1 (left) and 1 (right)
230
+ nodes.pannerNode.pan.value = Math.max(-1, Math.min(1, pan));
231
+ // Volume should be between 0 and 1 (or higher for boost)
232
+ nodes.gainNode.gain.value = Math.max(0, volume);
233
+
234
+ console.log(`Set spatial audio for ${participantIdentity}: pan=${pan}, volume=${volume}`);
235
+ }
236
+ }
237
+
238
+ // Set pan value only (-1 to 1, where -1 is left, 0 is center, 1 is right)
239
+ export function set_participant_pan(participantIdentity, pan) {
240
+ const nodes = participantAudioNodes.get(participantIdentity);
241
+ if (nodes) {
242
+ nodes.pannerNode.pan.value = Math.max(-1, Math.min(1, pan));
243
+ }
244
+ }
245
+
246
+ // Set volume only (0 to 1, or higher for boost)
247
+ export function set_participant_volume(participantIdentity, volume) {
248
+ const nodes = participantAudioNodes.get(participantIdentity);
249
+ if (nodes) {
250
+ nodes.gainNode.gain.value = Math.max(0, volume);
251
+ }
252
+ }
253
+
254
+ // Get all active participant identities with audio
255
+ export function get_audio_participants() {
256
+ return Array.from(participantAudioNodes.keys());
257
+ }
258
+
259
+ // Helper function to clean up audio resources
260
+ export function cleanup_audio_track(track) {
261
+ if (track._audioContext) {
262
+ track._audioContext.close();
263
+ }
264
+ if (track._scriptNode) {
265
+ track._scriptNode.disconnect();
266
+ }
267
+ if (track._audioElement) {
268
+ track.detach(track._audioElement);
269
+ }
270
+ }
@@ -0,0 +1,237 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * call from a separate worker to initialize a channel for asset load processing
5
+ */
6
+ export function init_asset_load_thread(): void;
7
+ export function engine_init(): Promise<any>;
8
+ export function engine_run(platform: string, realm: string, location: string, system_scene: string, with_thread_loader: boolean, rabpf: number): void;
9
+ export function op_webstorage_length(state: WorkerContext): number;
10
+ export function op_webstorage_key(state: WorkerContext, index: number): string | undefined;
11
+ export function op_webstorage_set(state: WorkerContext, key_name: string, value: string): void;
12
+ export function op_webstorage_get(state: WorkerContext, key_name: string): string | undefined;
13
+ export function op_webstorage_remove(state: WorkerContext, key_name: string): void;
14
+ export function op_webstorage_clear(state: WorkerContext): void;
15
+ export function op_webstorage_iterate_keys(state: WorkerContext): string[];
16
+ export function op_webstorage_has(state: WorkerContext, key_name: string): boolean;
17
+ export function op_get_texture_size(state: WorkerContext, src: string): Promise<any>;
18
+ export function op_comms_send_string(state: WorkerContext, message: string): Promise<void>;
19
+ export function op_comms_send_binary_single(state: WorkerContext, message: ArrayBuffer, recipient?: string | null): Promise<void>;
20
+ export function op_comms_recv_binary(state: WorkerContext): Promise<Array<any>>;
21
+ export function op_crdt_send_to_renderer(op_state: WorkerContext, messages: ArrayBuffer): void;
22
+ export function op_crdt_recv_from_renderer(op_state: WorkerContext): Promise<Array<any>>;
23
+ export function op_send_async(state: WorkerContext, method: string, params: string): Promise<any>;
24
+ export function op_subscribe(state: WorkerContext, id: string): void;
25
+ export function op_unsubscribe(state: WorkerContext, id: string): void;
26
+ export function op_send_batch(state: WorkerContext): Array<any>;
27
+ export function op_signed_fetch_headers(state: WorkerContext, uri: string, method?: string | null): Promise<any>;
28
+ export function op_get_connected_players(state: WorkerContext): Promise<string[]>;
29
+ export function op_get_players_in_scene(state: WorkerContext): Promise<string[]>;
30
+ export function op_portable_spawn(state: WorkerContext, pid?: string | null, ens?: string | null): Promise<any>;
31
+ export function op_portable_kill(state: WorkerContext, pid: string): Promise<boolean>;
32
+ export function op_portable_list(state: WorkerContext): Promise<any[]>;
33
+ export function op_move_player_to(op_state: WorkerContext, position_x: number, position_y: number, position_z: number, camera: boolean, maybe_camera_x: number, maybe_camera_y: number, maybe_camera_z: number, looking_at: boolean, maybe_looking_at_x: number, maybe_looking_at_y: number, maybe_looking_at_z: number): void;
34
+ export function op_teleport_to(state: WorkerContext, position_x: number, position_y: number): Promise<boolean>;
35
+ export function op_change_realm(state: WorkerContext, realm: string, message?: string | null): Promise<boolean>;
36
+ export function op_external_url(state: WorkerContext, url: string): Promise<boolean>;
37
+ export function op_emote(op_state: WorkerContext, emote: string): void;
38
+ export function op_scene_emote(op_state: WorkerContext, emote: string, looping: boolean): Promise<void>;
39
+ export function op_open_nft_dialog(op_state: WorkerContext, urn: string): Promise<void>;
40
+ export function op_set_ui_focus(op_state: WorkerContext, element_id: string): Promise<void>;
41
+ export function op_copy_to_clipboard(op_state: WorkerContext, text: string): Promise<void>;
42
+ export function op_read_file(op_state: WorkerContext, filename: string): Promise<any>;
43
+ export function op_scene_information(op_state: WorkerContext): Promise<any>;
44
+ export function op_realm_information(op_state: WorkerContext): Promise<any>;
45
+ export function op_check_for_update(state: WorkerContext): Promise<any>;
46
+ export function op_motd(state: WorkerContext): Promise<string>;
47
+ export function op_get_current_login(state: WorkerContext): string | undefined;
48
+ export function op_get_previous_login(state: WorkerContext): Promise<string | undefined>;
49
+ export function op_login_previous(state: WorkerContext): Promise<void>;
50
+ export function op_login_new_code(state: WorkerContext): Promise<string | undefined>;
51
+ export function op_login_new_success(state: WorkerContext): Promise<void>;
52
+ export function op_login_guest(state: WorkerContext): void;
53
+ export function op_login_cancel(state: WorkerContext): void;
54
+ export function op_logout(state: WorkerContext): void;
55
+ export function op_settings(state: WorkerContext): Promise<Array<any>>;
56
+ export function op_set_setting(state: WorkerContext, name: string, val: number): Promise<void>;
57
+ export function op_kernel_fetch_headers(state: WorkerContext, uri: string, method?: string | null, meta?: string | null): Promise<Array<any>>;
58
+ export function op_set_avatar(state: WorkerContext, base: any, equip: any, has_claimed_name: boolean | null | undefined, profile_extras: any): Promise<number>;
59
+ export function op_native_input(state: WorkerContext): Promise<string>;
60
+ export function op_get_bindings(state: WorkerContext): Promise<any>;
61
+ export function op_set_bindings(state: WorkerContext, bindings: any): Promise<void>;
62
+ export function op_console_command(state: WorkerContext, cmd: string, args: string[]): Promise<string>;
63
+ export function op_live_scene_info(state: WorkerContext): Promise<Array<any>>;
64
+ export function op_get_home_scene(state: WorkerContext): Promise<any>;
65
+ export function op_set_home_scene(state: WorkerContext, realm: string, parcel: any): void;
66
+ export function op_get_system_action_stream(state: WorkerContext): Promise<number>;
67
+ export function op_read_system_action_stream(state: WorkerContext, rid: number): Promise<any>;
68
+ export function op_get_chat_stream(state: WorkerContext): Promise<number>;
69
+ export function op_read_chat_stream(state: WorkerContext, rid: number): Promise<any>;
70
+ export function op_send_chat(state: WorkerContext, message: string, channel: string): void;
71
+ export function op_get_profile_extras(state: WorkerContext): Promise<any>;
72
+ export function op_quit(state: WorkerContext): void;
73
+ export function op_get_permission_request_stream(state: WorkerContext): Promise<number>;
74
+ export function op_read_permission_request_stream(state: WorkerContext, rid: number): Promise<any>;
75
+ export function op_get_permission_used_stream(state: WorkerContext): Promise<number>;
76
+ export function op_read_permission_used_stream(state: WorkerContext, rid: number): Promise<any>;
77
+ export function op_set_single_permission(state: WorkerContext, id: number, allow: boolean): void;
78
+ export function op_set_permanent_permission(state: WorkerContext, level: string, value: string | null | undefined, permission_type: any, allow: any): void;
79
+ export function op_get_permanent_permissions(state: WorkerContext, level: string, value?: string | null): Promise<Array<any>>;
80
+ export function op_get_permission_types(arg0: WorkerContext): Array<any>;
81
+ export function op_testing_enabled(op_state: WorkerContext): boolean;
82
+ export function op_log_test_plan(state: WorkerContext, body: any): void;
83
+ export function op_log_test_result(state: WorkerContext, body: any): void;
84
+ export function op_take_and_compare_snapshot(state: WorkerContext, name: string, camera_position: any, camera_target: any, snapshot_size: any, method: any): any;
85
+ export function op_get_user_data(state: WorkerContext): Promise<any>;
86
+ export function op_get_player_data(state: WorkerContext, id: string): Promise<any>;
87
+ export function wasm_init_scene(): Promise<WorkerContext>;
88
+ export function op_continue_running(state: WorkerContext): boolean;
89
+ export function drop_context(state: WorkerContext): void;
90
+ export function builtin_module(state: WorkerContext, path: string): string;
91
+ export function is_super(state: WorkerContext): boolean;
92
+ export class WorkerContext {
93
+ private constructor();
94
+ free(): void;
95
+ get_source(): any;
96
+ }
97
+
98
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
99
+
100
+ export interface InitOutput {
101
+ readonly engine_init: () => any;
102
+ readonly engine_run: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
103
+ readonly init_asset_load_thread: () => void;
104
+ readonly op_webstorage_length: (a: number) => number;
105
+ readonly op_webstorage_key: (a: number, b: number) => [number, number];
106
+ readonly op_webstorage_set: (a: number, b: number, c: number, d: number, e: number) => void;
107
+ readonly op_webstorage_get: (a: number, b: number, c: number) => [number, number];
108
+ readonly op_webstorage_remove: (a: number, b: number, c: number) => void;
109
+ readonly op_webstorage_clear: (a: number) => void;
110
+ readonly op_webstorage_iterate_keys: (a: number) => [number, number];
111
+ readonly op_webstorage_has: (a: number, b: number, c: number) => number;
112
+ readonly op_get_texture_size: (a: number, b: number, c: number) => any;
113
+ readonly op_comms_send_string: (a: number, b: number, c: number) => any;
114
+ readonly op_comms_send_binary_single: (a: number, b: any, c: number, d: number) => any;
115
+ readonly op_comms_recv_binary: (a: number) => any;
116
+ readonly op_crdt_send_to_renderer: (a: number, b: any) => void;
117
+ readonly op_crdt_recv_from_renderer: (a: number) => any;
118
+ readonly op_send_async: (a: number, b: number, c: number, d: number, e: number) => any;
119
+ readonly op_subscribe: (a: number, b: number, c: number) => void;
120
+ readonly op_unsubscribe: (a: number, b: number, c: number) => void;
121
+ readonly op_send_batch: (a: number) => any;
122
+ readonly op_signed_fetch_headers: (a: number, b: number, c: number, d: number, e: number) => any;
123
+ readonly op_get_connected_players: (a: number) => any;
124
+ readonly op_get_players_in_scene: (a: number) => any;
125
+ readonly op_portable_spawn: (a: number, b: number, c: number, d: number, e: number) => any;
126
+ readonly op_portable_kill: (a: number, b: number, c: number) => any;
127
+ readonly op_portable_list: (a: number) => any;
128
+ readonly op_move_player_to: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
129
+ readonly op_teleport_to: (a: number, b: number, c: number) => any;
130
+ readonly op_change_realm: (a: number, b: number, c: number, d: number, e: number) => any;
131
+ readonly op_external_url: (a: number, b: number, c: number) => any;
132
+ readonly op_emote: (a: number, b: number, c: number) => void;
133
+ readonly op_scene_emote: (a: number, b: number, c: number, d: number) => any;
134
+ readonly op_open_nft_dialog: (a: number, b: number, c: number) => any;
135
+ readonly op_set_ui_focus: (a: number, b: number, c: number) => any;
136
+ readonly op_copy_to_clipboard: (a: number, b: number, c: number) => any;
137
+ readonly op_read_file: (a: number, b: number, c: number) => any;
138
+ readonly op_scene_information: (a: number) => any;
139
+ readonly op_realm_information: (a: number) => any;
140
+ readonly op_check_for_update: (a: number) => any;
141
+ readonly op_motd: (a: number) => any;
142
+ readonly op_get_current_login: (a: number) => [number, number];
143
+ readonly op_get_previous_login: (a: number) => any;
144
+ readonly op_login_previous: (a: number) => any;
145
+ readonly op_login_new_code: (a: number) => any;
146
+ readonly op_login_new_success: (a: number) => any;
147
+ readonly op_login_guest: (a: number) => void;
148
+ readonly op_login_cancel: (a: number) => void;
149
+ readonly op_logout: (a: number) => void;
150
+ readonly op_settings: (a: number) => any;
151
+ readonly op_set_setting: (a: number, b: number, c: number, d: number) => any;
152
+ readonly op_kernel_fetch_headers: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
153
+ readonly op_set_avatar: (a: number, b: any, c: any, d: number, e: any) => any;
154
+ readonly op_native_input: (a: number) => any;
155
+ readonly op_get_bindings: (a: number) => any;
156
+ readonly op_set_bindings: (a: number, b: any) => any;
157
+ readonly op_console_command: (a: number, b: number, c: number, d: number, e: number) => any;
158
+ readonly op_live_scene_info: (a: number) => any;
159
+ readonly op_get_home_scene: (a: number) => any;
160
+ readonly op_set_home_scene: (a: number, b: number, c: number, d: any) => void;
161
+ readonly op_get_system_action_stream: (a: number) => any;
162
+ readonly op_read_system_action_stream: (a: number, b: number) => any;
163
+ readonly op_get_chat_stream: (a: number) => any;
164
+ readonly op_read_chat_stream: (a: number, b: number) => any;
165
+ readonly op_send_chat: (a: number, b: number, c: number, d: number, e: number) => void;
166
+ readonly op_get_profile_extras: (a: number) => any;
167
+ readonly op_quit: (a: number) => void;
168
+ readonly op_get_permission_request_stream: (a: number) => any;
169
+ readonly op_read_permission_request_stream: (a: number, b: number) => any;
170
+ readonly op_get_permission_used_stream: (a: number) => any;
171
+ readonly op_read_permission_used_stream: (a: number, b: number) => any;
172
+ readonly op_set_single_permission: (a: number, b: number, c: number) => void;
173
+ readonly op_set_permanent_permission: (a: number, b: number, c: number, d: number, e: number, f: any, g: any) => [number, number];
174
+ readonly op_get_permanent_permissions: (a: number, b: number, c: number, d: number, e: number) => any;
175
+ readonly op_get_permission_types: (a: number) => any;
176
+ readonly op_testing_enabled: (a: number) => number;
177
+ readonly op_log_test_plan: (a: number, b: any) => void;
178
+ readonly op_log_test_result: (a: number, b: any) => void;
179
+ readonly op_take_and_compare_snapshot: (a: number, b: number, c: number, d: any, e: any, f: any, g: any) => [number, number, number];
180
+ readonly op_get_user_data: (a: number) => any;
181
+ readonly op_get_player_data: (a: number, b: number, c: number) => any;
182
+ readonly wasm_init_scene: () => any;
183
+ readonly __wbg_workercontext_free: (a: number, b: number) => void;
184
+ readonly workercontext_get_source: (a: number) => any;
185
+ readonly op_continue_running: (a: number) => number;
186
+ readonly drop_context: (a: number) => void;
187
+ readonly builtin_module: (a: number, b: number, c: number) => [number, number, number, number];
188
+ readonly is_super: (a: number) => number;
189
+ readonly __externref_table_alloc: () => number;
190
+ readonly __wbindgen_export_1: WebAssembly.Table;
191
+ readonly memory: WebAssembly.Memory;
192
+ readonly __wbindgen_exn_store: (a: number) => void;
193
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
194
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
195
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
196
+ readonly __wbindgen_export_7: WebAssembly.Table;
197
+ readonly __externref_drop_slice: (a: number, b: number) => void;
198
+ readonly __externref_table_dealloc: (a: number) => void;
199
+ readonly closure15202_externref_shim: (a: number, b: number, c: number, d: any) => void;
200
+ readonly closure47507_externref_shim: (a: number, b: number, c: any) => void;
201
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__haf6d1d6eca19ebd1: (a: number, b: number) => void;
202
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h88ef16e697def3fb: (a: number, b: number) => void;
203
+ readonly closure51410_externref_shim: (a: number, b: number, c: any) => void;
204
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heedd0a6395901798: (a: number, b: number) => void;
205
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9bfa50ac2770910f: (a: number, b: number) => void;
206
+ readonly closure56371_externref_shim: (a: number, b: number, c: any, d: any) => void;
207
+ readonly closure56375_externref_shim: (a: number, b: number, c: any) => void;
208
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h704fbbb35af0f5c1: (a: number, b: number) => void;
209
+ readonly closure116419_externref_shim: (a: number, b: number, c: any) => void;
210
+ readonly closure131351_externref_shim: (a: number, b: number, c: any) => void;
211
+ readonly closure134255_externref_shim: (a: number, b: number, c: any, d: any) => void;
212
+ readonly __wbindgen_thread_destroy: (a?: number, b?: number, c?: number) => void;
213
+ readonly __wbindgen_start: (a: number) => void;
214
+ }
215
+
216
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
217
+ /**
218
+ * Instantiates the given `module`, which can either be bytes or
219
+ * a precompiled `WebAssembly.Module`.
220
+ *
221
+ * @param {{ module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number }} module - Passing `SyncInitInput` directly is deprecated.
222
+ * @param {WebAssembly.Memory} memory - Deprecated.
223
+ *
224
+ * @returns {InitOutput}
225
+ */
226
+ export function initSync(module: { module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number } | SyncInitInput, memory?: WebAssembly.Memory): InitOutput;
227
+
228
+ /**
229
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
230
+ * for everything else, calls `WebAssembly.instantiate` directly.
231
+ *
232
+ * @param {{ module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number }} module_or_path - Passing `InitInput` directly is deprecated.
233
+ * @param {WebAssembly.Memory} memory - Deprecated.
234
+ *
235
+ * @returns {Promise<InitOutput>}
236
+ */
237
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number } | InitInput | Promise<InitInput>, memory?: WebAssembly.Memory): Promise<InitOutput>;