Browse Source
Except for the actual data access, that'll be done next. Also updated the mesh test file with more useful contents.next
11 changed files with 575 additions and 54 deletions
@ -0,0 +1,8 @@
|
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
# in -> bin |
||||
for i in *.bin.in; do |
||||
../../../../../magnum-plugins/src/MagnumPlugins/GltfImporter/Test/in2bin.py $i |
||||
done |
||||
Binary file not shown.
@ -0,0 +1,19 @@
|
||||
type = '<xx3H 3f2f4BI 3f2f4BI 3f2f4BI' |
||||
input = [ |
||||
# 16-bit indices, with a two-byte padding before (thus 8 bytes in total) |
||||
0, 2, 1, |
||||
|
||||
# interleaved: |
||||
# - positions as 32-bit floats, aliased together with first texture coord |
||||
# with joint weights, |
||||
# - texture coords as floats, |
||||
# - normalized three-component 8-bit colors aliased with four-component |
||||
# joint IDs, |
||||
# - one byte padding for alignment, |
||||
# - 32-bit integer object IDs |
||||
-1.0, -1.0, 0.25, 0.1, 0.2, 255, 51, 102, 3, 216, |
||||
0.0, 1.0, 0.50, 0.3, 0.4, 51, 102, 255, 0, 16777235, |
||||
1.0, -1.0, 0.25, 0.5, 0.6, 103, 255, 51, 7, 2872872013 |
||||
] |
||||
|
||||
# kate: hl python |
||||
Binary file not shown.
@ -0,0 +1,113 @@
|
||||
{ |
||||
"asset": { |
||||
"version": "2.0" |
||||
}, |
||||
"meshes": [ |
||||
{ |
||||
"name": "Indexed mesh", |
||||
"primitives": [ |
||||
{ |
||||
"attributes": { |
||||
"POSITION": 1, |
||||
"TEXCOORD_0": 2, |
||||
"COLOR": 3, |
||||
"_OBJECT_ID": 4, |
||||
"TEXCOORD_1": 2, |
||||
"JOINTS_0": 5, |
||||
"WEIGHTS_0": 6, |
||||
"_CUSTOM_ATTRIBUTE": 7 |
||||
}, |
||||
"indices": 0 |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"name": "Non-indexed mesh", |
||||
"primitives": [ |
||||
{ |
||||
"attributes": { |
||||
"POSITION": 1 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
], |
||||
"accessors": [ |
||||
{ |
||||
"bufferView": 0, |
||||
"byteOffset": 2, |
||||
"componentType": 5123, |
||||
"count": 3, |
||||
"type": "SCALAR" |
||||
}, |
||||
{ |
||||
"bufferView": 1, |
||||
"componentType": 5126, |
||||
"count": 3, |
||||
"type": "VEC3" |
||||
}, |
||||
{ |
||||
"bufferView": 1, |
||||
"byteOffset": 12, |
||||
"componentType": 5126, |
||||
"count": 3, |
||||
"type": "VEC2" |
||||
}, |
||||
{ |
||||
"bufferView": 1, |
||||
"byteOffset": 20, |
||||
"componentType": 5121, |
||||
"normalized": true, |
||||
"count": 3, |
||||
"type": "VEC3" |
||||
}, |
||||
{ |
||||
"bufferView": 1, |
||||
"byteOffset": 24, |
||||
"componentType": 5125, |
||||
"count": 3, |
||||
"type": "SCALAR" |
||||
}, |
||||
{ |
||||
"bufferView": 1, |
||||
"byteOffset": 20, |
||||
"componentType": 5121, |
||||
"count": 3, |
||||
"type": "VEC4" |
||||
}, |
||||
{ |
||||
"bufferView": 1, |
||||
"byteOffset": 0, |
||||
"componentType": 5126, |
||||
"count": 3, |
||||
"type": "VEC4" |
||||
}, |
||||
{ |
||||
"bufferView": 1, |
||||
"byteOffset": 0, |
||||
"componentType": 5126, |
||||
"count": 3, |
||||
"type": "MAT2" |
||||
} |
||||
], |
||||
"bufferViews": [ |
||||
{ |
||||
"buffer": 0, |
||||
"byteOffset": 0, |
||||
"byteLength": 8 |
||||
}, |
||||
{ |
||||
"buffer": 0, |
||||
"byteOffset": 8, |
||||
"byteLength": 84, |
||||
"byteStride": 28 |
||||
} |
||||
], |
||||
"buffers": [ |
||||
{ |
||||
"byteLength": 92, |
||||
"uri": "mesh.bin" |
||||
} |
||||
] |
||||
} |
||||
|
||||
Loading…
Reference in new issue