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

Material Array not updating #878

Closed
notchris opened this issue Apr 7, 2020 · 2 comments
Closed

Material Array not updating #878

notchris opened this issue Apr 7, 2020 · 2 comments
Labels

Comments

@notchris
Copy link

notchris commented Apr 7, 2020

Describe the bug
Had a mesh with multiple materials in array / names format. When changing a material by index, the mesh did not display the new materials when render updated. Tried setting .needsUpdate on each material inst in the array.

@h-ikeda
Copy link
Member

h-ikeda commented Apr 8, 2020

Like vm.materials[0] = newMaterial ?
There is a restriction caused by Vue.js.
https://vuejs.org/v2/guide/reactivity.html#For-Arrays

Please try to use vm.$set() method or Array.prototype.splice() method.

@notchris
Copy link
Author

@h-ikeda I will try this and report back, thank you.

@h-ikeda h-ikeda closed this as completed Mar 7, 2021
@h-ikeda h-ikeda added the wontfix label Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants