5. CSS3 Selectors
-webkit-perspective
Used to give an illusion of depth; it
determines how things change size
based on their z-offset from the z=0
plane.
-webkit-transition
Specifies what property triggers an
animation.
9. CSS3 Selectors Cont...
rotateX(angle), rotateY(angle)
Simply rotate the element about the
horizontal and vertical axes.
Angle units can be:
degrees (deg)
radians (rad)
gradians (grad)
17. Canvas Cont...
• Remember to set width and height on
canvas
• width and height are dynamic
attributes
18. Canvas Cont...
• 2D Context
• canvas.getContext(‘2d’);
• returns the 2d context api
• 3D Context
• canvas.getContext(‘webgl’);
19. Paths
• A list of zero or more subpaths.
• Subpaths consists of a list of one or
more points, connected by straight or
curved lines, and a flag indicating
whether the subpath is closed or not.
• A closed subpath is one where the last
point is connected to the first point by
a straight line.
20. 2D Context Methods
• fillRect(x, y, width, height)
• clearRect(x, y, width, height)
• fillStyle(color)
• beginPath() - resets path
• closePath() - makes path closed
21. 2D Context Methods
• arc(x, y, radius, startAngle, endAngle
anticlockwise)
• fill() - fills the path with the fillStyle