import { Logger } from '../../../common/utils'; import { BaseComponent } from '../../base'; import { ComponentNames } from '../../types'; import { PresenceMouseProps, Transform } from '../types'; export declare class PointersCanvas extends BaseComponent { name: ComponentNames; protected logger: Logger; private canvas; private divWrapper; private presences; private animateFrame; private goToMouseCallback; private following; private isPrivate; private localParticipant; private camera; constructor(canvasId: string, options?: PresenceMouseProps); /** * @function start * @description start presence-mouse component * @returns {void} */ protected start(): void; /** * @function destroy * @description destroy presence-mouse component * @returns {void} */ protected destroy(): void; /** * @function subscribeToRealtimeEvents * @description subscribe to realtime events * @returns {void} */ private subscribeToRealtimeEvents; /** * @function unsubscribeFromRealtimeEvents * @description subscribe to realtime events * @returns {void} */ private unsubscribeFromRealtimeEvents; /** * @function setParticipantPrivate * @description perform animation in presence mouse * @returns {void} */ private setParticipantPrivate; /** * @function onPresenceJoinedRoom * @description handler for presence joined room event * @param {PresenceEvent} presence * @returns {void} */ private onPresenceJoinedRoom; /** * @function onPresenceLeftRoom * @description handler for presence left room event * @param {PresenceEvent} presence * @returns {void} */ private onPresenceLeftRoom; /** * @function onPresenceUpdate * @description handler for presence update event * @param {PresenceEvent} presence * @returns {void} */ private onPresenceUpdate; /** * @function animate * @description perform animation in presence mouse * @returns {void} */ private animate; /** * @function goToMouse * @description - translate the canvas to the participant position * @param id - participant id */ private goToMouse; /** Presence Mouse Events */ /** * @function onMyParticipantMouseMove * @description event to update my participant mouse position to others participants * @returns {void} */ private onMyParticipantMouseMove; private onMyParticipantMouseOut; /** * @function renderDivWrapper * @description Creates a div wrapper for the pins. * @returns {HTMLElement} The newly created div wrapper. * */ private renderDivWrapper; private updateParticipantsMouses; /** * @function getCamera * @description - retrieves the camera information from the canvas context's transform. * The camera information includes the current translation (x, y) and scale. */ private getCamera; /** * @function renderPresenceMouses * @description add presence mouses to screen * @param {ParticipantMouse} mouse - presence mouse change data * @returns {void} * */ private renderPresenceMouses; /** * @function removePresenceMouseParticipant * @description handler remove external participant mouse * @param {string} participantId - external participant id * @returns {void} * */ private removePresenceMouseParticipant; /** * @function createMouseElement * @param mouse - participant mouse * @returns {HTMLDivElement} */ private createMouseElement; private followMouse; /** * @function transform * @description stores that information about which transformations should the pointers go through * @param {Transform} transformation Which transformations to apply */ transform(transformation: Transform): void; }