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 * textureWidth * 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;
}