Class CAAT.Module.CircleManager.PackedCircleManager
Defined in: PackedCircleManager.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<private> |
__init()
|
addCircle(aCircle)
Adds a circle to the simulation
|
|
circlesCanCollide(circleA, circleB)
|
|
Forces all circles to move to where their delegate position is
Assumes all targets have a 'position' property!
|
|
getCircleAt(xpos, ypos, buffer)
Given an x,y position finds circle underneath and sets it to the currently grabbed circle
|
|
handleBoundaryForCircle(aCircle, boundsRule)
|
|
Packs the circles towards the center of the bounds.
|
|
initialize(overrides)
|
|
pushAllCirclesTowardTarget(aTarget)
|
|
removeCircle(aCircle)
Removes a circle from the simulations
|
|
Memory Management
|
|
setBounds(x, y, w, h)
Accessors
|
|
setNumberOfCollisionPasses(value)
|
|
setNumberOfTargetingPasses(value)
|
|
sortOnDistanceToTarget(circleA, circleB)
Helpers
|
Field Detail
allCircles
bounds
numberOfCollisionPasses
numberOfTargetingPasses
Method Detail
<private>
__init()
addCircle(aCircle)
Adds a circle to the simulation
- Parameters:
- aCircle
circlesCanCollide(circleA, circleB)
- Parameters:
- circleA
- circleB
forceCirclesToMatchDelegatePositions()
Forces all circles to move to where their delegate position is
Assumes all targets have a 'position' property!
getCircleAt(xpos, ypos, buffer)
Given an x,y position finds circle underneath and sets it to the currently grabbed circle
- Parameters:
- {Number} xpos
- An x position
- {Number} ypos
- A y position
- {Number} buffer
- A radiusSquared around the point in question where something is considered to match
handleBoundaryForCircle(aCircle, boundsRule)
- Parameters:
- aCircle
- boundsRule
handleCollisions()
Packs the circles towards the center of the bounds.
Each circle will have it's own 'targetPosition' later on
initialize(overrides)
- Parameters:
- overrides
pushAllCirclesTowardTarget(aTarget)
- Parameters:
- aTarget
removeCircle(aCircle)
Removes a circle from the simulations
- Parameters:
- aCircle
- Circle to remove
removeExpiredElements()
Memory Management
setBounds(x, y, w, h)
Accessors
- Parameters:
- x
- y
- w
- h
setNumberOfCollisionPasses(value)
- Parameters:
- value
setNumberOfTargetingPasses(value)
- Parameters:
- value
sortOnDistanceToTarget(circleA, circleB)
Helpers
- Parameters:
- circleA
- circleB