Skip to content

[Parity] Complete declarative prop coverage for Two.js objects #30

Description

@jonobr1

Summary

Audit every public writable Two.js property and expose the scene-relevant properties through the corresponding React component types and update path.

The current prop unions are manually curated and have fallen behind the Two.js API.

Known omissions

  • Path and path-derived shapes: mask, clip, strokeAttenuation
  • Text: mask, clip, strokeAttenuation
  • Points: strokeAttenuation
  • Group and SVG: mask, beginning, ending, strokeAttenuation
  • Rectangle and rectangle-derived effects: origin
  • Sprite.src: Two.js accepts a URL string or Two.Texture; the React prop currently accepts only a string

Read-only/internal properties such as renderer state should not be exposed merely because they exist on the instance.

Related work

Acceptance criteria

  • Add a checked property matrix for every exported component against the supported Two.js version.
  • Expose all scene-relevant writable properties with their upstream Two.js types.
  • Add direct declarative support for mask / clip where supported.
  • Add strokeAttenuation across Path, Text, Points, Group, and derived components.
  • Add Rectangle origin support across Rectangle, Image, Sprite, and ImageSequence.
  • Accept Two.Texture as Sprite.src.
  • Add compile-time and runtime tests for the property matrix.
  • Document intentional omissions and their imperative escape hatch.
  • Prefer deriving types/property lists from Two.js declarations or static property lists where this can be done safely.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions