setTextureValue function
dynamic
setTextureValue(
- dynamic texture,
- dynamic index,
- dynamic x,
- dynamic y,
- dynamic z,
- dynamic o,
Implementation
setTextureValue(texture, index, x, y, z, o) {
var image = texture.image;
var data = image.data;
var i = CHANNELS * TEXTURE_WIDTH * o; // Row Offset
data[index * CHANNELS + i + 0] = x;
data[index * CHANNELS + i + 1] = y;
data[index * CHANNELS + i + 2] = z;
data[index * CHANNELS + i + 3] = 1;
}