Tresjs / tres

Declarative ThreeJS using Vue Components
https://tresjs.org
MIT License
1.93k stars 86 forks source link

fix: do not lowercase pierced props #608

Closed andretchen0 closed 3 months ago

andretchen0 commented 3 months ago

Closes #605 for v4.

Context

203 added support for pierced props like :position-x="10". It added this line:

https://github.com/Tresjs/tres/blob/98109af7d501da1ae5f817e7dc61c6d6ad902891/src/core/nodeOps.ts#L227

:position-x="10" works without lowercasing.

Solution

toLowerCase() was removed to keep prop casing intact.

Breaking change

Pushing to v4 as it's a breaking change: users who previously wrote e.g., :position-X="10" will find their code broken.

Test

Playground

A playground for pierced props was added at /basic/pierced-props