import { GLTF_APPEARANCE_JPEG } from "../test-fixtures/gltf-appearance-fixtures"; const encoder = new TextEncoder(); function base64(bytes: Uint8Array): string { let binary = ""; for (const byte of bytes) binary += String.fromCharCode(byte); return btoa(binary); } export const ASCII_FBX_APPEARANCE_FIXTURE = encoder.encode(`; FBX 7.4.0 project file FBXHeaderExtension: { FBXHeaderVersion: 1003 FBXVersion: 7400 } GlobalSettings: { Version: 1000 Properties70: { P: "UpAxis", "int", "Integer", "",1 P: "UnitScaleFactor", "double", "Number", "",1 } } Objects: { Geometry: 1, "Geometry::Painted", "Mesh" { Vertices: *9 { a: 0,0,0,1,0,0,0,1,0 } PolygonVertexIndex: *3 { a: 0,1,-3 } LayerElementUV: 0 { Version: 101 Name: "UVChannel_1" MappingInformationType: "ByPolygonVertex" ReferenceInformationType: "IndexToDirect" UV: *6 { a: 0,0,1,0,0,1 } UVIndex: *3 { a: 0,1,2 } } LayerElementColor: 0 { Version: 101 Name: "Color" MappingInformationType: "ByPolygonVertex" ReferenceInformationType: "IndexToDirect" Colors: *12 { a: 1,0,0,1,0,1,0,1,0,0,1,1 } ColorIndex: *3 { a: 0,1,2 } } } Model: 2, "Model::Painted", "Mesh" { Version: 232 Properties70: { P: "Lcl Translation", "Lcl Translation", "", "A",0,0,0 P: "Lcl Rotation", "Lcl Rotation", "", "A",0,0,0 P: "Lcl Scaling", "Lcl Scaling", "", "A",1,1,1 } Shading: T Culling: "CullingOff" } Material: 3, "Material::Paint", "" { Version: 102 ShadingModel: "Phong" MultiLayer: 0 Properties70: { P: "DiffuseColor", "Color", "", "A",0.2,0.3,0.4 P: "EmissiveColor", "Color", "", "A",0.1,0.2,0.3 P: "TransparencyFactor", "Number", "", "A",0.25 P: "Shininess", "Number", "", "A",198 } } Texture: 4, "Texture::Diffuse", "" { Type: "TextureVideoClip" Version: 202 TextureName: "Texture::Diffuse" Media: "Video::Diffuse" FileName: "textures/diffuse.png" RelativeFilename: "textures/diffuse.png" ModelUVTranslation: 0,0 ModelUVScaling: 1,1 Texture_Alpha_Source: "None" Cropping: 0,0,0,0 } Video: 5, "Video::Diffuse", "Clip" { Type: "Clip" Filename: "textures/diffuse.png" RelativeFilename: "textures/diffuse.png" } Texture: 6, "Texture::Emissive", "" { Type: "TextureVideoClip" Version: 202 TextureName: "Texture::Emissive" Media: "Video::Emissive" FileName: "embedded.jpg" RelativeFilename: "embedded.jpg" ModelUVTranslation: 0,0 ModelUVScaling: 1,1 Texture_Alpha_Source: "None" Cropping: 0,0,0,0 } Video: 7, "Video::Emissive", "Clip" { Type: "Clip" Filename: "embedded.jpg" RelativeFilename: "embedded.jpg" Content: , "${base64(GLTF_APPEARANCE_JPEG)}" } } Connections: { C: "OO",1,2 C: "OO",3,2 C: "OP",4,3,"DiffuseColor" C: "OO",5,4 C: "OP",6,3,"EmissiveColor" C: "OO",7,6 C: "OO",2,0 } `);