Using FileInput to load glft+bin files

Am trying to alter my glb setup to now take local files, currently i was using a blob but now I have two files am not 100% sure on


Takes in the two files and are referencing the .bin blob within the glft blob.

Is there prefinned solutions using BABYLON.FIleInput instead of creating custom ones simliar to the sandbox fileinput?

Many Thanks

Can you elaborate a bit more or provide a repro int pg? I’m not sure what the question is

am trying to do this Load dropped files into AssetContainer but without the assetContainer.

So far I want to add each of my files (glft + bin) to the BABYLON.FilesInput.FilesToLoad but am unsure that format to save them as, just the event or using the FileReader() api and send them over as text or blob.

Then am hoping I can create the scene using BABYLON.FilesInput so I can render my model. instead of how I do it now

ok unfortunately this is not the intent of the filesInput :frowning:

Ok fair enough, I cannot see anything in the docs to help me load glft & bin file from the browser tho… could you point me in the right direction please?

Am trying to access the animations that are on the mesh, linked to weights. Could you look at below at my file format and maybe give me a pointer on how I can play the aniimations pls?

{
“asset”: {
“generator”: “Miles Thornton”,
“version”: “2.0”
},
“scene”: 0,
“scenes”: [
{
“nodes”: [
0
]
}
],
“nodes”: [
{
“mesh”: 0
}
],
“meshes”: [
{
“primitives”: [
{
“attributes”: {
“POSITION”: 0,
“c0”: 0,
“c1”: 1,
“c2”: 2,
“c3”: 3,
“c4”: 4,
“c5”: 5,
“c6”: 6,
“c7”: 7,
“c8”: 8,
“c9”: 9,
“c10”: 10,
“c11”: 11
},
“indices”: 12,
“mode”: 4,
“material”: 0
}
],
“weights”: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
],
“accessors”: [
{
“name”: “Accessor 0: Node Coords (State 0)”,
“bufferView”: 0,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 1: Node Coords (State 1)”,
“bufferView”: 1,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 2: Node Coords (State 2)”,
“bufferView”: 2,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 3: Node Coords (State 3)”,
“bufferView”: 3,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 4: Node Coords (State 4)”,
“bufferView”: 4,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 5: Node Coords (State 5)”,
“bufferView”: 5,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 6: Node Coords (State 6)”,
“bufferView”: 6,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 7: Node Coords (State 7)”,
“bufferView”: 7,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 8: Node Coords (State 8)”,
“bufferView”: 8,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 9: Node Coords (State 9)”,
“bufferView”: 9,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 10: Node Coords (State 10)”,
“bufferView”: 10,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 11: Node Coords (State 11)”,
“bufferView”: 11,
“componentType”: 5126,
“count”: 15054,
“type”: “VEC3”
},
{
“name”: “Accessor 12: Topology”,
“bufferView”: 12,
“byteOffset”: 0,
“componentType”: 5123,
“count”: 88743,
“max”: [
15053
],
“min”: [
0
],
“type”: “SCALAR”
}
],
“materials”: [
{
“pbrMetallicRoughness”: {
“baseColorFactor”: [
0.8,
0,
0,
1
],
“metallicFactor”: 0,
“roughnessFactor”: 0
}
}
],
“bufferViews”: [
{
“name”: “BufferView 0: Node Coords (State 0)”,
“buffer”: 0,
“byteLength”: 180648,
“target”: 34962,
“byteOffset”: 0
},
{
“name”: “BufferView 1: Node Coords (State 1)”,
“buffer”: 0,
“byteOffset”: 180648,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 2: Node Coords (State 2)”,
“buffer”: 0,
“byteOffset”: 361296,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 3: Node Coords (State 3)”,
“buffer”: 0,
“byteOffset”: 541944,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 4: Node Coords (State 4)”,
“buffer”: 0,
“byteOffset”: 722592,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 5: Node Coords (State 5)”,
“buffer”: 0,
“byteOffset”: 903240,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 6: Node Coords (State 6)”,
“buffer”: 0,
“byteOffset”: 1083888,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 7: Node Coords (State 7)”,
“buffer”: 0,
“byteOffset”: 1264536,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 8: Node Coords (State 8)”,
“buffer”: 0,
“byteOffset”: 1445184,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 9: Node Coords (State 9)”,
“buffer”: 0,
“byteOffset”: 1625832,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 10: Node Coords (State 10)”,
“buffer”: 0,
“byteOffset”: 1806480,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 11: Node Coords (State 11)”,
“buffer”: 0,
“byteOffset”: 1987128,
“byteLength”: 180648,
“target”: 34962
},
{
“name”: “BufferView 12: Topology”,
“buffer”: 0,
“byteOffset”: 2167776,
“byteLength”: 177488,
“target”: 34963
}
],
“buffers”: [
{
“uri”: “sAnim02_data.bin”,
“byteLength”: 2345264
}
]
}

Thanks