Skip to content

Fix PlayCanvas React docs#915

Merged
abstrakt8 merged 1 commit intomainfrom
codex/fix-react-docs
Mar 13, 2026
Merged

Fix PlayCanvas React docs#915
abstrakt8 merged 1 commit intomainfrom
codex/fix-react-docs

Conversation

@abstrakt8
Copy link
Contributor

Fixes:

Had to add a color field to the vignette due to the recent engine change: playcanvas/engine#8318

I confirm I have read the contributing guidelines.

@abstrakt8 abstrakt8 self-assigned this Mar 12, 2026
Comment on lines +59 to +64
"color": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't a sensible default get used if a value is left unspecified? Without that, I think the system's going to be very brittle!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sensible defaults are defined in the script itself, but we override the whole top-level vignette property when we pass a partial object. That replaces the default Vignette instance, so nested defaults like vignette.color are lost. @playcanvas/react currently only does top-level script prop assignment; it doesn’t do nested merging for script config objects.

@abstrakt8 abstrakt8 marked this pull request as ready for review March 12, 2026 14:47
@abstrakt8 abstrakt8 merged commit 85f51c0 into main Mar 13, 2026
3 checks passed
@abstrakt8 abstrakt8 deleted the codex/fix-react-docs branch March 13, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants