HTML5 Canvas 3D WebGL (TM) js Library
 

rotationCenter Library Method

Signature: x.rotationCenter (x,y,z)
Class: transform_Controller Class
 

Sets the rotation center. Per default rotations done by dragging with the left mouse button rotate around (500,500,0).

Examples

var a=taccgl.actor("testimg").useTM().dur(30).start();
taccgl.useController(taccgl.transformController());
taccgl.controller.rotationCenter (a.x+a.w/2, a.y+a.h/2,0);
taccgl.start();
RUN
var a=taccgl.actor("testimg").useTM().dur(30).start();
taccgl.useController(taccgl.transformController());
taccgl.controller.rotationCenter (a.x, a.y,0);
taccgl.start();
RUN
var a=taccgl.actor("testimg",taccgl.dddBox).useTM().dur(30).start();
taccgl.useController(taccgl.transformController());
taccgl.controller.rotationCenter (a.x+a.w/2, a.y+a.h/2,0);
taccgl.start();
RUN
var a=taccgl.actor("testimg",taccgl.dddBox).useTM().dur(30).start();
taccgl.useController(taccgl.transformController());
taccgl.controller.rotationCenter (a.x+a.w/2, a.y+a.h/2,a.h/2);
taccgl.start();
RUN

WebGL™ is a trademark of the Khronos Group Inc.