UNPKG

@gwigz/homunculus-core

Version:

A third-party framework for interacting with Linden Lab's virtual world "Second Life"

50 lines (49 loc) 1.35 kB
import type { Client } from "../client"; import { type Vector3 } from "../network"; import { Agents, Entities } from "../structures"; export declare class Region { private readonly client; handle: bigint; name?: string; agents: Agents; objects: Entities; /** * Creates a new region instance. * * @param client Client instance. * @param data Region data. * @param skipInitialUpdate Used for initial login, may be removed in the future. * @internal */ constructor(client: Client, data: { handle: bigint; }, skipInitialUpdate?: boolean); /** * Attempts to fetch map details from cache, or server. * * @internal */ init(): Promise<void>; /** * Attempts to update avatar details (such as name, etc.) cache. * * @todo Rename this * @internal */ update(data: Partial<{ name: string; }>): Promise<void>; /** * Handles coarse location updates for agents in the region. * * @param agents Map of agent keys and their coarse locations. * @internal */ handleCoarseLocationUpdates(agents: Map<string, Vector3>): void; /** * Sends an estate message to the region. * * @param message Message to send. */ sendEstateMessage(message: string): Promise<void>; }