mirror of
https://github.com/storytold/spark.git
synced 2026-10-13 23:52:44 +00:00
Implementation PC SOGS file format loading via meta.json root file. Added webp dependency for accurate decoding. Updated viewer and editor to accept new file type. (#73)
This commit is contained in:
committed by
GitHub
parent
eb1b5029ce
commit
36c3c61d0b
@@ -504,6 +504,23 @@ export function setPackedSplatQuat(
|
||||
packedSplats[i4 + 3] = (packedSplats[i4 + 3] & 0x00ffffff) | (uQuatZ << 24);
|
||||
}
|
||||
|
||||
// Encode the RGBA color in the packedSplats Uint32Array, leaving other fields alone.
|
||||
export function setPackedSplatRgba(
|
||||
packedSplats: Uint32Array,
|
||||
index: number,
|
||||
r: number,
|
||||
g: number,
|
||||
b: number,
|
||||
a: number,
|
||||
) {
|
||||
const uR = floatToUint8(r);
|
||||
const uG = floatToUint8(g);
|
||||
const uB = floatToUint8(b);
|
||||
const uA = floatToUint8(a);
|
||||
const i4 = index * 4;
|
||||
packedSplats[i4] = uR | (uG << 8) | (uB << 16) | (uA << 24);
|
||||
}
|
||||
|
||||
// Encode the RGB color in the packedSplats Uint32Array, leaving other fields alone.
|
||||
export function setPackedSplatRgb(
|
||||
packedSplats: Uint32Array,
|
||||
|
||||
Reference in New Issue
Block a user