redka
February 19, 2015, 3:28pm
#1
Can we have it?
http://stemkoski.github.io/Three.js/Texture-Animation.html
Seems like a great feature for all kinds of games. Thing like special effects, blood splatters, advanced particles would benefit a lot from being able to have an animated texture.
dave
February 19, 2015, 3:48pm
#2
You can have this
Use the offset properties in the material. e.g.
material.diffuseMapOffset = new pc.Vec2(0.5, 0.5);
material.update();
1 Like
Mr_F
February 19, 2015, 6:29pm
#3
redka is talking about animated textures with multiple frames, not scrolling.
You can simply switch textures in a script to achieve this.
will
February 19, 2015, 6:45pm
#4
Actually, the texture animation in the linked demo is using sprite sheets. So you can just do this with the pc.PhongMaterial#diffuseMapOffset property .
1 Like
Mr_F
February 19, 2015, 7:20pm
#5
Hmm, actually you’re right.
redka
February 24, 2015, 9:17pm
#6
Works like a charm with basic materials. But what about particle color maps? Is it feasible to have animated particles with maybe the same technique?
dave
February 25, 2015, 11:31am
#7
Particles use a different material than regular models, and currently we don’t support UV offsets in the particle material.
Something to look into though for sure.