Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is PointMaterial fully supported? #184

Open
GustavoGomez092 opened this issue Feb 21, 2023 · 2 comments
Open

Is PointMaterial fully supported? #184

GustavoGomez092 opened this issue Feb 21, 2023 · 2 comments

Comments

@GustavoGomez092
Copy link

GustavoGomez092 commented Feb 21, 2023

Hi! first of all, I want to congratulate everyone involved in the creation and maintenance of this library, it is simply awesome!
I'm curious whether the PointsMaterial is supported since it is not under the documentation. Whenever I import the PointsMaterial and try to use it I get the following error:

Extraneous non-props attributes (size) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. 
  at <PointsMaterial size="0.02" color="#059E44" > 

Maybe I'm doing something wrong?

@bennyzen
Copy link

Tried this too in the past and failed. It seems unsupported.

@GustavoGomez092
Copy link
Author

After reading the trois.js file a little bit I found what I think feels like a workaround:

<PointsMaterial :props="{ size: 2, sizeAttenuation: false }" color="#059E44" />

Passing the data as an object works fine since the base material component declaration allows it:
image

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

No branches or pull requests

2 participants