Ask Your Question
0

Why does using ref on ShaderMaterial result in a Typescript error stating that "The expected type comes from property 'ref' which is declared here on type 'PolygonMat'"?

asked 2022-11-08 11:00:00 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-10-18 13:00:00 +0000

lalupa gravatar image

This error occurs because the ref property is not included in the type definition for ShaderMaterial. When trying to use ref on a ShaderMaterial, Typescript cannot confirm that it is a valid property and throws an error. To resolve this, you can create a custom type definition for your ShaderMaterial that includes the ref property.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-08 11:00:00 +0000

Seen: 19 times

Last updated: Oct 18 '21