Forum

Update node value in node material

01 November 2017 04:59
Is there a way to update node value in node material by js?
I have a material by 2 textures, and using a mapping to change its location.
Now I want to change location with js, but can not find a related API…
Anybody can help?
Thanks.
01 November 2017 17:28
Is there a way to update node value in node material by js?
I have a material by 2 textures, and using a mapping to change its location.
Now I want to change location with js, but can not find a related API…
Anybody can help?
Thanks.
Hello!

You can update Value and RGB nodes via JS. Please take a look at this code snippet
Blend4Web Team - developer
02 November 2017 05:39
Reply to post of user Konstantin Khomyakov
Hello!

You can update Value and RGB nodes via JS. Please take a look at this code snippet

Thank you.
I know that, but my target is change location property in mapping node…
02 November 2017 16:35
Thank you.
I know that, but my target is change location property in mapping node…
You can try to use Vector Math -> Add instead of Mapping -> Location if you use Mapping for Point and Vector (not Texture and Normal)
Blend4Web Team - developer
03 November 2017 09:09
Reply to post of user Konstantin Khomyakov
You can try to use Vector Math -> Add instead of Mapping -> Location if you use Mapping for Point and Vector (not Texture and Normal)

It works, thanks.
 
Please register or log in to leave a reply.