Class cc.DrawNodeWebGL
- Defined in: CCDrawNode.js
- Extends cc.Node
Constructor Attributes | Constructor Name and Description |
---|---|
CCDrawNode for WebGL |
Method Summary
Class Detail
cc.DrawNodeWebGL()
CCDrawNode for WebGL
Node that draws dots, segments and polygons.
Faster than the "drawing primitives" since they it draws everything in one single batch.
Method Detail
-
clear()Clear the geometry in the node's buffer.
-
drawDot(pos, radius, color)draw a dot at a position, with a given radius and color
- Parameters:
- {cc.Point} pos
- {Number} radius
- {cc.Color4F} color
-
drawPoly(verts, fillColor, borderWidth, borderColor)draw a polygon with a fill color and line color
- Parameters:
- {Array} verts
- {cc.Color4F} fillColor
- {Number} borderWidth
- {cc.Color4F} borderColor
-
drawSegment(from, to, radius, color)draw a segment with a radius and color
- Parameters:
- {cc.Point} from
- {cc.Point} to
- {Number} radius
- {cc.Color4F} color