Skip to content

Support simple dynamic code for number and string props #254

@itsdouges

Description

@itsdouges

Common methods of declaring some props are to use simple math, for example rotation and using Math.PI. To make using these kinds of prop declarations easier Triplex needs to support:

  1. Updating props with "code"
  2. Declaring the code in the prop controls

For (1) currently you'll find Triplex only supports updating primitive values / arrays. It should also support arbitrarily setting "code". We may already be able to do this with no changes, need to explore.

For (2) declaring the code in prop controls will need a more advanced input to be built that can switch between "primitive" and "code" view. And ideally the code side also needs to "on-rails" so it can't be given invalid options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions