Built-In Namespace _global_
Method Attributes | Method Name and Description |
---|---|
dragInit()
Generic function used for draging ojects, see dragMove
|
|
dragMove(dx, dz)
Generic function used for draging ojects.
|
|
Generic function used for draging ojects, see dragMove
|
|
vecTrans(x, z, sin, cos)
Returns [x,z] components of transformated vector
|
Method Detail
dragInit()
dragMove(dx, dz)
Generic function used for draging ojects. For each dragable object should be defined function dragUpdate(dx,dz): e.g. moving only in x direction etc.
Defined in: raphaeltools.src.js.
Defined in: raphaeltools.src.js.
a = new Arrow(100,59,199,30) // equivalent to a = Arrow.create(100,59,199,30); a.dragUpdate = function(dx,dz) { a.translate(dx,dz); } a.drag(move,init,reset) // make an object draggable using a.dragUpdate() function when moving
- Parameters:
- {float} dx
- x increment of dragging
- {float} dz
- z increment of dragging
dragReset()
{[float|float]}
vecTrans(x, z, sin, cos)
Returns [x,z] components of transformated vector
Defined in: raphaeltools.src.js.
Defined in: raphaeltools.src.js.
- Parameters:
- {float} x
- x component of original vector
- {float} z
- z component of original vector
- {float} sin
- sin of angle of rotation
- {float} cos
- cos of angle of rotation
- Returns:
- {[float|float]} coordinates of transformated vector