flame icon indicating copy to clipboard operation
flame copied to clipboard

feat: Add basic infrastructure for a Context API [PROPOSAL][WIP]

Open luanpotter opened this issue 1 year ago • 0 comments

Description

The idea is to provide some sort of "context" API for components to share render-time information with indirect descendants.

Use cases can include:

  • the currentCamera value which is currently handled as a global list
  • shader rendering information (to replace the custom Canvas implementation from https://github.com/flame-engine/flame/pull/3404 - @renancaraujo lmk what you think!

Pending some benchmarking to confirm it does not increase latency but requesting for comments on the proposed API.

Checklist

  • [x] I have followed the Contributor Guide when preparing my PR.
  • [x] I have updated/added tests for ALL new/updated/fixed functionality.
  • [x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • [x] I have updated/added relevant examples in examples or docs.

Breaking Change?

  • [ ] Yes, this PR is a breaking change.
  • [x] No, this PR is not a breaking change.

luanpotter avatar Dec 14 '24 23:12 luanpotter