import { Actionable } from "../../action/actionable"; import { Transform } from "../../elements/transform/transform"; import { Chained, Proxied } from "../../action/chain"; import { LogicAction } from "../../action/logicAction"; import { EventfulDisplayable } from "../../../player/elements/displayable/type"; import type { TransformDefinitions } from "../../elements/transform/type"; export declare abstract class Displayable, Self extends Displayable, TransformType extends TransformDefinitions.Types = TransformDefinitions.Types> extends Actionable implements EventfulDisplayable { /** * Set Image Position * * @param position - The position of the image, expected {@link RawPosition} or {@link IPosition} * @param duration - The duration of the position animation * @param easing - The easing of the position animation * @chainable * @example * ```ts * element.pos({ xalign: 0.3 }, 1000, "linear"); * ``` */ pos(position: TransformDefinitions.ImageTransformProps["position"], duration?: number, easing?: TransformDefinitions.EasingDefinition): Proxied>; /** * Set the zoom of the current staging sequence. * @param zoom - The zoom of the transform. use `1` to keep the original size * @param duration - Optional duration of the zoom. * @param easing - Optional easing function. * @example * ```ts * element.zoom(2, 1000, "linear"); * ``` */ zoom(zoom: number, duration?: number, easing?: TransformDefinitions.EasingDefinition): Proxied>; /** * Set the scale of the current staging sequence on x axis. * @param scaleX - The scale of the transform on x axis. * @example * ```ts * element.scaleX(1.5, 1000, "easeInOut"); * ``` */ scaleX(scaleX: number, duration?: number, easing?: TransformDefinitions.EasingDefinition): Proxied>; /** * Set the scale of the current staging sequence on y axis. * @param scaleY - The scale of the transform on y axis. * @example * ```ts * element.scaleY(0.8, 1000, "easeInOut"); * ``` */ scaleY(scaleY: number, duration?: number, easing?: TransformDefinitions.EasingDefinition): Proxied>; /** * Set the scale of the current staging sequence. * @param scaleX - The scale of the transform on x axis. use negative value to invert the scale * @param scaleY - The scale of the transform on y axis. use negative value to invert the scale * @example * ```ts * element.scale(1.2, 0.9, 1000, "easeInOut"); * ``` */ scale(scaleX: number, scaleY: number, duration?: number, easing?: TransformDefinitions.EasingDefinition): Proxied>; /** * Set the scale of the current staging sequence on x and y axis. * @param scaleX - The scale of the transform on x axis. use negative value to invert the scale * @param scaleY - The scale of the transform on y axis. use negative value to invert the scale * @alias {@link Displayable.scale} * @example * ```ts * element.scaleXY(1.2, 0.9, 1000, "easeInOut"); * ``` */ scaleXY(scaleX: number, scaleY: number, duration?: number, easing?: TransformDefinitions.EasingDefinition): Proxied>; /** * Set Image Rotation * @param rotation - The rotation of the image, in degrees * @param duration - The duration of the rotation animation * @param easing - The easing of the rotation animation * @chainable * @example * ```ts * element.rotate(90, 1000, "easeInOut"); * ``` */ rotate(rotation: number, duration?: number, easing?: TransformDefinitions.EasingDefinition): Proxied>; /** * Set Image Opacity * @param opacity - The opacity of the image, between 0 and 1 * @param duration - The duration of the opacity animation * @param easing - The easing of the opacity animation * @chainable * @example * ```ts * element.opacity(0.5, 1000, "easeInOut"); * ``` */ opacity(opacity: number, duration?: number, easing?: TransformDefinitions.EasingDefinition): Proxied>; /** * Apply a transform to the Displayable * @chainable * @example * ```ts * element.transform(new Transform(\/* Transform Definitions *\/)); * ``` */ transform(transform: Transform): Proxied>; /** * Show the Displayable * * if options are provided, the displayable will show with the provided transform options * @example * ```ts * text.show({ * duration: 1000, * }); * ``` * @chainable */ show(): Proxied>; show(options: Transform): Proxied>; show(options: Partial): Proxied>; /** * Hide the Displayable * * if options are provided, the displayable will hide with the provided transform options * @example * ```ts * text.hide({ * duration: 1000, * }); * ``` * @chainable */ hide(): Proxied>; hide(options: Transform): Proxied>; hide(options: Partial): Proxied>; }