Draggable |
Hierarchy (View Summary)
- Renderable
- Draggable
Index
Properties
alpha
alpha: number
alwaysUpdate
alwaysUpdate: boolean
ancestor
anchorPoint
autoTransform
autoTransform: boolean
blendMode
blendMode: string
body
currentTransform
dragging
dragging: boolean
dragId
dragId: any
edges
floating
floating: boolean
grabOffset
GUID
GUID: string
handleDragEnd
handleDragEnd: ((e: any, draggable: any) => void) | undefined
handleDragStart
handleDragStart: ((e: any, draggable: any) => void) | undefined
handlePointerMove
handlePointerMove: ((e: any) => void) | undefined
indices
indices: number[]
isDirty
isDirty: boolean
isKinematic
isKinematic: boolean
isPersistent
isPersistent: boolean
mask
name
name: string
onVisibilityChange
onVisibilityChange: Function
points
pos
shader
shader: any
type
type: string = "Rectangle"
updateWhenPaused
updateWhenPaused: boolean
Accessors
bottom
get bottom(): number
Returns number
centerX
get centerX(): number
Returns number
set centerX(value: number): void
Returns void
centerY
get centerY(): number
Returns number
set centerY(value: number): void
Returns void
depth
get depth(): number
Returns number
set depth(value: number): void
Returns void
height
get height(): number
Returns number
set height(value: number): void
Returns void
inViewport
get inViewport(): boolean
Returns boolean
set inViewport(value: boolean): void
Returns void
isFlippedX
get isFlippedX(): boolean
Returns boolean
isFlippedY
get isFlippedY(): boolean
Returns boolean
isFloating
get isFloating(): boolean
Returns boolean
left
get left(): number
Returns number
parentApp
Returns Application
the parent application or undefined if not attached to any container/app
right
get right(): number
Returns number
tint
set tint(value: Color): void
Returns void
top
get top(): number
Returns number
width
get width(): number
Returns number
set width(value: number): void
Returns void
Methods
angleTo
Returns number
angle in radians
centerOn
clone
Returns Rect
new rectangle
contains
Parameters
- x: number
- y: number
Returns boolean
True if the polygon contain the point, otherwise false
Returns boolean
True if the polygon contain the point, otherwise false
containsRectangle
copy
distanceTo
dragEnd
Returns boolean
false if the object stopped being dragged
dragMove
Returns void
dragStart
Returns boolean
false if the object is being dragged
draw
Returns void
equals
equals(rect: Rect): boolean
Returns boolean
true if equals
flipX
Parameters
Optionalflip: boolean = true
Returns Renderable
Reference to this object for method chaining
flipY
Parameters
Optionalflip: boolean = true
Returns Renderable
Reference to this object for method chaining
getAbsolutePosition
Returns Vector2d
getBounds
Returns Bounds
bounding box Rectangle object
getIndices
Returns number[]
an array of vertex indices for all triangles forming this polygon.
getOpacity
Returns number
current opacity value between 0 and 1
isConvex
Returns boolean | null
true if the vertices are convex, false if not, null if not computable
isFinite
Returns boolean
false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
lookAt
Returns Renderable
Reference to this object for method chaining
onCollision
Returns boolean
true if the object should respond to the collision (its position and velocity will be corrected)
onDestroyEvent
Returns void
overlaps
overlaps(rect: Rect): boolean
Returns boolean
true if overlaps
postDraw
postDraw(renderer: CanvasRenderer | WebGLRenderer): void
Returns void
preDraw
Returns void
recalc
Returns Draggable
Reference to this object for method chaining
resize
rotate
scale
Parameters
- x: number
Optionaly: number = x
Returns Renderable
Reference to this object for method chaining
scaleV
Returns Renderable
Reference to this object for method chaining
setOpacity
Returns void
setShape
Returns Draggable
this instance for objecf chaining
setSize
setVertices
Returns Draggable
this instance for objecf chaining
shift
Parameters
- x: number
Optionaly: number
Returns void
Returns void
to2d
Returns Draggable
Reference to this object for method chaining
toIso
Returns Draggable
Reference to this object for method chaining
toPolygon
Returns Polygon
a new Polygon that represents this rectangle.
transform
Returns Renderable
Reference to this object for method chaining
translate
union
update
Returns boolean
true if the renderable is dirty
updateBounds
updateBounds(absolute?: boolean): Bounds