import { IFloorFurnitureConfiguration, IFloorPosition } from "../../interfaces/Furniture.interface"; import { Direction } from "../../enums/Direction"; import { FurnitureData } from "./FurnitureData"; import { RoomObject } from "../rooms/RoomObject"; import { InteractionManager } from "../interactions/InteractionManager"; import { IInteractionEvent } from "../../interfaces/Interaction.interface"; import { FurnitureView } from "./FurnitureView"; import { FurnitureVisualization } from "./visualizations/FurnitureVisualization"; /** * FloorFurniture class that aim to reproduce the floor furnitures on Habbo. * * @class * @memberof Scuti */ export declare class FloorFurniture extends RoomObject { /** * The furniture id that represent the one in furnidata. * * @member {number} * @private */ private readonly _id; /** * The furniture position in the room. * * @member {IFloorPosition} * @private */ private _position; /** * The furniture direction (0, 2, 4, 6). * * @member {Direction} * @private */ private _direction; /** * The furniture state that represent it's current playing animation. * * @member {number} * @private */ private _state; /** * A boolean indicating if we have to apply the wired selection filter to the furniture. * * @member {boolean} * @private */ private _selected; /** * The furniture data. * * @member {FurnitureData} * @private */ private _data; /** * The furniture view. * * @member {FurnitureView} * @private */ private _view; /** * The furniture interaction manager to handle all the clicks and taps. * * @member {InteractionManager} * @private */ private _interactionManager; /** * @param {IFloorFurnitureConfiguration} [configuration] - The furniture configuration. */ constructor(configuration: IFloorFurnitureConfiguration); /** * Update the furniture position in the canvas. * * @return {void} * @private */ private _updatePosition; /** * Add the furniture to the ticker to start the animation. * * @return {void} * @public */ start(): void; /** * Remove the furniture from the ticker to stop the animation. * * @return {void} * @public */ stop(): void; /** * Move the furniture at the given position and in time. * * @param {IFloorPosition} [position] - The position where we want to move the furniture. * @param {number} [duration] - The time to move the furniture to the given position. * @return {void} * @public */ move: (position: IFloorPosition, duration?: number) => void; /** * Rotate the furniture at the given direction and in time. * * @param {Direction} [direction] - The new direction of the furniture. * @param {number} [duration] - The time to rotate the furniture at the given direction. * @return {void} * @public */ rotate: (direction: Direction, duration?: number) => void; /** * Reference to the furniture id from the furni data. * * @member {number} * @readonly * @public */ get id(): number; /** * Reference to the furniture position in the room. * * @member {IFloorPosition} * @readonly * @public */ get roomPosition(): IFloorPosition; /** * Update the furniture position. * * @param {IFloorPosition} [position] - The new furniture position. * @public */ set roomPosition(position: IFloorPosition); /** * Reference to the furniture direction. * * @member {Direction} * @readonly * @public */ get direction(): Direction; /** * Update the furniture direction. * * @param {Direction} [direction] - The new furniture direction. * @public */ set direction(direction: Direction); /** * Reference to the furniture state. * * @member {number} * @readonly * @public */ get state(): number; /** * Update the furniture state (so the animation). * * @param {number} [state] - The new furniture state. * @public */ set state(state: number); /** * Reference to the furniture selection state. * * @member {boolean} * @readonly * @public */ get selected(): boolean; /** * Update the furniture selection state (add the wired selection filter to the furniture). * * @param {boolean} [selected] - The new furniture selection state. * @public */ set selected(selected: boolean); /** * Reference to the furniture data. * * @member {FurnitureData} * @readonly * @public */ get data(): FurnitureData; /** * Reference to the furniture view. * * @member {FurnitureView} * @readonly * @public */ get view(): FurnitureView; /** * Update the furniture view. * * @param {FurnitureView} [view] - The new furniture view. * @public */ set view(view: FurnitureView); /** * Reference to the furniture visualization. * * @member {FurnitureVisualization} * @readonly * @public */ get visualization(): FurnitureVisualization; /** * Reference to the furniture interaction manager. * * @member {InteractionManager} * @readonly * @public */ get interactionManager(): InteractionManager; /** * Reference to the pointer down event. * * @member {(event: IInteractionEvent) => void} * @readonly * @public */ get onPointerDown(): (event: IInteractionEvent) => void; /** * Update the event function that will be executed. * * @param {(event: IInteractionEvent) => void} [value] - The event function that will be executed. * @public */ set onPointerDown(value: (event: IInteractionEvent) => void); /** * Reference to the pointer up event. * * @member {(event: IInteractionEvent) => void} * @readonly * @public */ get onPointerUp(): (event: IInteractionEvent) => void; /** * Update the event function that will be executed. * * @param {(event: IInteractionEvent) => void} [value] - The event function that will be executed. * @public */ set onPointerUp(value: (event: IInteractionEvent) => void); /** * Reference to the pointer move event. * * @member {(event: IInteractionEvent) => void} * @readonly * @public */ get onPointerMove(): (event: IInteractionEvent) => void; /** * Update the event function that will be executed. * * @param {(event: IInteractionEvent) => void} [value] - The event function that will be executed. * @public */ set onPointerMove(value: (event: IInteractionEvent) => void); /** * Reference to the pointer out event. * * @member {(event: IInteractionEvent) => void} * @readonly * @public */ get onPointerOut(): (event: IInteractionEvent) => void; /** * Update the event function that will be executed. * * @param {(event: IInteractionEvent) => void} [value] - The event function that will be executed. * @public */ set onPointerOut(value: (event: IInteractionEvent) => void); /** * Reference to the pointer over event. * * @member {(event: IInteractionEvent) => void} * @readonly * @public */ get onPointerOver(): (event: IInteractionEvent) => void; /** * Update the event function that will be executed. * * @param {(event: IInteractionEvent) => void} [value] - The event function that will be executed. * @public */ set onPointerOver(value: (event: IInteractionEvent) => void); /** * Reference to the pointer double click event. * * @member {(event: IInteractionEvent) => void} * @readonly * @public */ get onDoubleClick(): (event: IInteractionEvent) => void; /** * Update the event function that will be executed. * * @param {(event: IInteractionEvent) => void} [value] - The event function that will be executed. * @public */ set onDoubleClick(value: (event: IInteractionEvent) => void); }