modd-network 1.0.5 → 1.0.6
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/dist/modd-engine.d.ts +1 -1
- package/dist/modd-engine.js +1 -1
- package/package.json +1 -1
package/dist/modd-engine.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ export interface Game {
|
|
|
97
97
|
processInput(input: any): void;
|
|
98
98
|
}
|
|
99
99
|
declare function createStateSync(options?: StateSyncConfig): GameInternal;
|
|
100
|
-
export declare function connect(
|
|
100
|
+
export declare function connect(room: string, options?: GameConnectOptions): Promise<Game>;
|
|
101
101
|
export declare function rapierAdapter(body: any): PhysicsAdapter;
|
|
102
102
|
export declare function generic2DAdapter(getBody: () => any, setBody: (state: any) => void): PhysicsAdapter;
|
|
103
103
|
interface InitOptions {
|
package/dist/modd-engine.js
CHANGED
|
@@ -489,7 +489,7 @@ function createStateSync(options = {}) {
|
|
|
489
489
|
// ============================================
|
|
490
490
|
// Main Connect Function
|
|
491
491
|
// ============================================
|
|
492
|
-
async function connect(
|
|
492
|
+
async function connect(room, options = {}) {
|
|
493
493
|
// Create the game/state sync object
|
|
494
494
|
const game = createStateSync(options.stateSync);
|
|
495
495
|
// Set up onTick to process inputs
|