Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
Atsuya Sato edited this page Nov 30, 2018 · 2 revisions

Vertex


beginShape(_ kind: BeginShapeKind = .none)

Available

iOS, OSX

Examples

beginShape(.triangles)
vertex(30, 75)
vertex(40, 20)
vertex(50, 75)
vertex(60, 20)
vertex(70, 75)
vertex(80, 20)
endShape()

Description

Using the beginShape() and endShape() functions allow creating more complex forms.


endShape(_ mode: EndShapeMode = .none)

Available

iOS, OSX

Examples

beginShape()
vertex(20, 20)
vertex(45, 20)
vertex(45, 80)
endShape(.close)

beginShape()
vertex(50, 20)
vertex(75, 20)
vertex(75, 80)
endShape()

Description

Using the beginShape() and endShape() functions allow creating more complex forms.


vertex(_ x: CGFloat, _ y: CGFloat)

Available

iOS, OSX

Examples

vertex(30, 20)

Description

vertex() is used to specify the vertex coordinates for points, lines, triangles, quads, and polygons.


Clone this wiki locally