demo:
https://dl.dropboxusercontent.com/u/123374/so-pages/20160601/index.html
the alphaTexture
is having it's offset altered during each render. as a "map" property it changes, but as an "alphaMap" it does not change. the 2nd mesh's alphaMap
relevant code from demo link:
var colorTexture = new THREE.TextureLoader().load('blue.png')
, alphaTexture = new THREE.TextureLoader().load('alpha.png')
, offset = 0
, colorFill = new THREE.Mesh(
new THREE.Geometry(),
new THREE.MeshPhongMaterial({
map: colorTexture,
alphaMap: alphaTexture,
side: THREE.DoubleSide,
shading: THREE.FlatShading
})
)
function render() {
requestAnimationFrame(render)
offset += .01
alphaTexture.offset.x = Math.sin(offset)
renderer.render(scene, camera)
}
render()
expected:
the transparent part of the object would shift as the offset of the alphaTexture changes.
actual:
transparent part stays fixed on the material. However, if I edit the offset of the texture set to the map
property (instead of alphaMap
) it * is * able to shift, which seems like inconsistent behavior to me.