Skip to content

Attempt even more hands-off reflection to set effect properties #2

@MondayHopscotch

Description

@MondayHopscotch

We currently specify a field name and a property setter function for fields we want to expose to the user.

It may be possible to abstract this slightly further and just use reflection to determine which fields are on a given Effect object (already can do this with something like Reflect.fields()). The hard part is determining the Type of the field so we can automagically associate the right PropSetterFunc with it.

Pros: Even less for the user to mess up
Cons: Would still need a way to let users provide their own setters if they want to do something with the values (.... this may not be true as the user can just do the transformation at apply() time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions