Open NikitaDudin opened 3 months ago
It would be a good to have a possibility to create a textureSource directly from raw data, width and height.
const textureWidth = 1024; const textureHeight = 1024; const textureData = new Uint8Array(textureWidth * textureHeight * 4); for (let i = 0; i < textureWidth * textureHeight * 4; i += 4) { textureData[i] = 255; // r textureData[i+1] = 0; // g textureData[i+2] = 0; // b textureData[i+3] = 255; // a } ... const textureSource = createBufferFromRawData(textureData, textureWidth, textureHeight, ...otherOptions); ... <Model ...> <EntitySelector byName="Tip" textureMap={{ materialName, textureSource }} /> </Model>
It would be a good to have a possibility to create a textureSource directly from raw data, width and height.