Skip to content

Defaults for buildGeometry #6722

Open
Open
@wagedu

Description

Increasing Access

More intuitive use of the command.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

Feature enhancement details

Currently buildGeometry creates models affected by the context's open settings (fill, rectMode etc).
ie if I have fill('blue') declared before I start a buildGeometry, the model will have the setting "fill = blue".
Also, by default, buildGeometry forces a call to model.disableColor() if one wants to use fill on the model.

I feel like the default for buildGeometry should be vanilla.
A vanilla geom that I can affect with fill is (probably) more frequent than a custom colored one where I want to disableColor before using fill on it (or rectMode, etc) - Specially because buildGeometry doesn't accept all params (no stroke, for instance), so it gets difficult to track what is being affected and what is not.
Then, only in cases where I want a non-vanilla model, it's up to me/user to pass "extra parameters" as modifiers when starting buildGeometry()

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions