Rich-Harris / svelte-cubed

Svelte ❤️ Three
svelte-cubed.vercel.app
MIT License
1.19k stars 76 forks source link

Add `Material | Material[]` type to `Mesh` #56

Closed Joxtacy closed 1 year ago

Joxtacy commented 2 years ago

Submitting as a solution to Issue #34.

This adds Material | Material[] as the type for the material property to be able to input an array of materials and not get type errors. Passing in an array of Material is allowed in Threejs so svelte-cubed should allow it as well.

Thanks to @Myrmod for the suggested solution.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
svelte-cubed ❌ Failed (Inspect) Apr 30, 2022 at 3:13PM (UTC)