xeolabs/scenejs — Issue #143: reset texture scale transform during a set texture Translate 
Author: hwilliam
Created: 2011-10-31 13:39:35+00:00
State: open

Hello,

I just observe an issue during a move from 0.8 to 2.0. ( present in 2.0 and not in 0.8)
The issue occurs when I modify the layer texture transformation dynamically. When we update only the translate component dynamically, and if the scale if defined statically in the scene ( not x:1, y:1 ) . during the call to Texture.prototype._setLayerTransform the scale component is reseted to x:1 y:1

example:

this.sjsScene.findNode("space_text").set("layers",
{
"0":{
translate: {
x: scrolling_uv
},

}
..
}

The workaround is to force all texture transformations for each call to setLayerTransform. In my case I need to force only scale compo for each update of the translate compo

this.sjsScene.findNode("space_text").set("layers",
{
"0":{
translate: {
x: scrolling_uv
},
// mandatory in 2.0
scale: {
x: 6,
y: 6
},

}
..
}