DoubleClick

Entityceramic.DoubleClick (Class)
Implements: Component

Component that detects double-click/double-tap events on visuals.

This component tracks consecutive clicks and emits a doubleClick event when two clicks occur within the specified time and movement thresholds.

Instance Members

threshold: Float

Maximum pointer movement allowed between clicks. If the pointer moves more than this distance, the double-click is canceled.


maxDelay: Float

Maximum time delay between clicks in seconds. Clicks must occur within this time to count as a double-click.


entity: Visual

The visual entity this component is attached to.


initializerName: String

cancel(): Void

Cancel the current double-click detection. Resets the state and stops tracking clicks.


new(): Void

Private Members

pressed: Bool

firstClickTime: Float

pointerStartX: Float

pointerStartY: Float

emitDoubleClick(): Void

Event fired when the visual is double-clicked/double-tapped.


bindAsComponent(): Void

handlePointerDown(info: TouchInfo): Void
Name Type
info TouchInfo

handlePointerUp(info: TouchInfo): Void
Name Type
info TouchInfo

handlePointerMove(info: TouchInfo): Void
Name Type
info TouchInfo

handleBlur(): Void

setEntity(entity: Entity): Void
Name Type
entity Entity

getEntity(): Entity
Returns
Entity

Metadata

Name Parameters
:build ceramic.macros.ComponentMacro.build()
:autoBuild ceramic.macros.ComponentMacro.build()
:build ceramic.macros.EntityMacro.buildForCompletion()
:autoBuild ceramic.macros.EntityMacro.buildForCompletion()
:build tracker.macros.EventsMacro.build()
:autoBuild tracker.macros.EventsMacro.build()