1 thought on “Animation property binding for shader uniforms

  1. You can do this with a bit of hackery:

    mesh = new THREE.Mesh( geometry, material );
    mesh.materialDotUniformsDotFoo = material.uniforms.foo;
    var track = new THREE.NumberKeyframeTrack( '.materialDotUniformsDotFoo[value]', [ 0, 1, 2 ], [ 1, 0, 1 ] );

    Here’s a JSFiddle.

    If you see a way to support object.material.uniforms.foo.value directly that would be great, but I’m worried it may not be easy to do cleanly.

Comments are closed.