Skip to content

improve beginShape() for feature parity with Processing/p5.js #9

@lee2sman

Description

@lee2sman

Describe the bug
beginShape() doesn't have feature parity with Processing/p5.js. Currently doesn't allow kind param and basic shape drawing should generally match basic examples from Processing/p5 beginShape() references but doesn't always.

To Reproduce
Translating the Processing beginShape() reference examples from to L5 does not always result in equivalent shape results.

Example:

Processing beginShape() example

Processing beginShape example

//Processing
beginShape();
vertex(120, 80);
vertex(230, 80);
vertex(230, 190);
vertex(340, 190);
vertex(340, 300);
vertex(120, 300);
endShape(CLOSE);

L5 beginShape equivalent

Image
  beginShape()
  vertex(120, 80)
  vertex(230, 80)
  vertex(230, 190)
  vertex(340, 190)
  vertex(340, 300)
  vertex(120, 300)
  endShape(CLOSE)

Expected behavior
beginShape() should work relatively equivalently.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
This is two issues in one! 1. Equivalency of same code 2. Adding kind param options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions