Skip to content

Commit 4cf0231

Browse files
committed
Merge pull request godotengine#101136 from JulianHeuser/master
Add test for GLTFDocument
2 parents bd56e81 + 5727eda commit 4cf0231

File tree

5 files changed

+563
-0
lines changed

5 files changed

+563
-0
lines changed

tests/data/models/cube.bin

1.2 KB
Binary file not shown.

tests/data/models/cube.gltf

Lines changed: 312 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,312 @@
1+
{
2+
"asset":{
3+
"generator":"Khronos glTF Blender I/O v4.3.47",
4+
"version":"2.0"
5+
},
6+
"scene":0,
7+
"scenes":[
8+
{
9+
"name":"Scene",
10+
"nodes":[
11+
0
12+
]
13+
}
14+
],
15+
"nodes":[
16+
{
17+
"mesh":0,
18+
"name":"Cube"
19+
}
20+
],
21+
"animations":[
22+
{
23+
"channels":[
24+
{
25+
"sampler":0,
26+
"target":{
27+
"node":0,
28+
"path":"translation"
29+
}
30+
},
31+
{
32+
"sampler":1,
33+
"target":{
34+
"node":0,
35+
"path":"rotation"
36+
}
37+
},
38+
{
39+
"sampler":2,
40+
"target":{
41+
"node":0,
42+
"path":"scale"
43+
}
44+
}
45+
],
46+
"name":"CubeAction",
47+
"samplers":[
48+
{
49+
"input":8,
50+
"interpolation":"LINEAR",
51+
"output":9
52+
},
53+
{
54+
"input":10,
55+
"interpolation":"STEP",
56+
"output":11
57+
},
58+
{
59+
"input":10,
60+
"interpolation":"STEP",
61+
"output":12
62+
}
63+
]
64+
}
65+
],
66+
"materials":[
67+
{
68+
"doubleSided":true,
69+
"name":"Material1",
70+
"pbrMetallicRoughness":{
71+
"baseColorFactor":[
72+
1.9073486328125e-06,
73+
0,
74+
1,
75+
1
76+
],
77+
"metallicFactor":0
78+
}
79+
},
80+
{
81+
"doubleSided":true,
82+
"name":"Material2",
83+
"pbrMetallicRoughness":{
84+
"baseColorFactor":[
85+
0,
86+
1,
87+
0,
88+
1
89+
],
90+
"roughnessFactor":0
91+
}
92+
}
93+
],
94+
"meshes":[
95+
{
96+
"name":"Cube.001",
97+
"primitives":[
98+
{
99+
"attributes":{
100+
"POSITION":0,
101+
"NORMAL":1,
102+
"TEXCOORD_0":2
103+
},
104+
"indices":3,
105+
"material":0
106+
},
107+
{
108+
"attributes":{
109+
"POSITION":4,
110+
"NORMAL":5,
111+
"TEXCOORD_0":6
112+
},
113+
"indices":7,
114+
"material":1
115+
}
116+
]
117+
}
118+
],
119+
"accessors":[
120+
{
121+
"bufferView":0,
122+
"componentType":5126,
123+
"count":4,
124+
"max":[
125+
1,
126+
1,
127+
1
128+
],
129+
"min":[
130+
-1,
131+
1,
132+
-1
133+
],
134+
"type":"VEC3"
135+
},
136+
{
137+
"bufferView":1,
138+
"componentType":5126,
139+
"count":4,
140+
"type":"VEC3"
141+
},
142+
{
143+
"bufferView":2,
144+
"componentType":5126,
145+
"count":4,
146+
"type":"VEC2"
147+
},
148+
{
149+
"bufferView":3,
150+
"componentType":5123,
151+
"count":6,
152+
"type":"SCALAR"
153+
},
154+
{
155+
"bufferView":4,
156+
"componentType":5126,
157+
"count":20,
158+
"max":[
159+
1,
160+
1,
161+
1
162+
],
163+
"min":[
164+
-1,
165+
-1,
166+
-1
167+
],
168+
"type":"VEC3"
169+
},
170+
{
171+
"bufferView":5,
172+
"componentType":5126,
173+
"count":20,
174+
"type":"VEC3"
175+
},
176+
{
177+
"bufferView":6,
178+
"componentType":5126,
179+
"count":20,
180+
"type":"VEC2"
181+
},
182+
{
183+
"bufferView":7,
184+
"componentType":5123,
185+
"count":30,
186+
"type":"SCALAR"
187+
},
188+
{
189+
"bufferView":8,
190+
"componentType":5126,
191+
"count":20,
192+
"max":[
193+
0.8333333333333334
194+
],
195+
"min":[
196+
0.041666666666666664
197+
],
198+
"type":"SCALAR"
199+
},
200+
{
201+
"bufferView":9,
202+
"componentType":5126,
203+
"count":20,
204+
"type":"VEC3"
205+
},
206+
{
207+
"bufferView":10,
208+
"componentType":5126,
209+
"count":2,
210+
"max":[
211+
0.8333333333333334
212+
],
213+
"min":[
214+
0.041666666666666664
215+
],
216+
"type":"SCALAR"
217+
},
218+
{
219+
"bufferView":11,
220+
"componentType":5126,
221+
"count":2,
222+
"type":"VEC4"
223+
},
224+
{
225+
"bufferView":12,
226+
"componentType":5126,
227+
"count":2,
228+
"type":"VEC3"
229+
}
230+
],
231+
"bufferViews":[
232+
{
233+
"buffer":0,
234+
"byteLength":48,
235+
"byteOffset":0,
236+
"target":34962
237+
},
238+
{
239+
"buffer":0,
240+
"byteLength":48,
241+
"byteOffset":48,
242+
"target":34962
243+
},
244+
{
245+
"buffer":0,
246+
"byteLength":32,
247+
"byteOffset":96,
248+
"target":34962
249+
},
250+
{
251+
"buffer":0,
252+
"byteLength":12,
253+
"byteOffset":128,
254+
"target":34963
255+
},
256+
{
257+
"buffer":0,
258+
"byteLength":240,
259+
"byteOffset":140,
260+
"target":34962
261+
},
262+
{
263+
"buffer":0,
264+
"byteLength":240,
265+
"byteOffset":380,
266+
"target":34962
267+
},
268+
{
269+
"buffer":0,
270+
"byteLength":160,
271+
"byteOffset":620,
272+
"target":34962
273+
},
274+
{
275+
"buffer":0,
276+
"byteLength":60,
277+
"byteOffset":780,
278+
"target":34963
279+
},
280+
{
281+
"buffer":0,
282+
"byteLength":80,
283+
"byteOffset":840
284+
},
285+
{
286+
"buffer":0,
287+
"byteLength":240,
288+
"byteOffset":920
289+
},
290+
{
291+
"buffer":0,
292+
"byteLength":8,
293+
"byteOffset":1160
294+
},
295+
{
296+
"buffer":0,
297+
"byteLength":32,
298+
"byteOffset":1168
299+
},
300+
{
301+
"buffer":0,
302+
"byteLength":24,
303+
"byteOffset":1200
304+
}
305+
],
306+
"buffers":[
307+
{
308+
"byteLength":1224,
309+
"uri":"cube.bin"
310+
}
311+
]
312+
}

tests/data/models/suzanne.glb

69 KB
Binary file not shown.

0 commit comments

Comments
 (0)