@needle-tools/engine
Version:
Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.
16 lines (15 loc) • 549 B
TypeScript
import type { INetworkTransport } from './engine_networking_types.js';
/** Default transport that wraps the `websocket-ts` library */
export declare class WebsocketTransport implements INetworkTransport {
private _url;
private _ws;
onOpen: (() => void) | null;
onClose: (() => void) | null;
onError: ((err: any) => void) | null;
onMessage: ((data: string | Blob) => void) | null;
get url(): string;
constructor(url: string);
start(): Promise<void>;
send(data: string | Uint8Array): void;
close(): void;
}