HTML5 Canvas 3D WebGL (TM) javaScript Library

map Library Method

Short Description: Map rectangular portion of texture canvas

Signature: (s,t,w,h)
Group: Texture
Class: transition Class

Maps a rectangular portion of the Texture Canvas as texture on to the animated object. (s,t) specify the coordinates of the top left point of the portion. w is the with and h the height. Default is the position, width, and height of the HTML element associated with the transition. Using paint an image of the HTML element is painted on the texture canvas at exactly this position.

One use of map is to select a portion of the image of the HTML element.You can however also paint other HTML elements on the texture canvas or even use canvas functions to draw whatever you like on the canvas and then select the approriate portion using this map method.


var"testimg");,a.y,a.w,a.h/2); a.start(); RUN
var a=taccgl.a("testimg").paint();"pgMiddleColumnTable").map(a.x,a.y,a.w,a.h).start(); RUN

WebGL™ is a trademark of the Khronos Group Inc.

Next Page:transition.map1 - Animate mapped rectangular portion of texture canvas
Previous Page: transition.mapElement - Map other HTML element
Please Add a Comment or Question, click here!