MCPcopy
hub / github.com/CesiumGS/obj2gltf / writeChannel

Function writeChannel

lib/loadMtl.js:469–475  ·  view source on GitHub ↗
(pixels, channel, index)

Source from the content-addressed store, hash-verified

467}
468
469function writeChannel(pixels, channel, index) {
470 const pixelsLength = pixels.length / 4;
471 for (let i = 0; i < pixelsLength; ++i) {
472 const value = channel.readUInt8(i);
473 pixels.writeUInt8(value, i * 4 + index);
474 }
475}
476
477function getMinimumDimensions(textures, options) {
478 let width = Number.POSITIVE_INFINITY;

Calls

no outgoing calls

Tested by

no test coverage detected