in app/src/main/java/com/facebook/sample/rendering/SampleGLTFReader.java [164:181]
private static void parseScenes(GLTFScene output, JSONArray scenes) {
for (int i = 0; i < scenes.length(); ++i) {
try {
JSONObject jsonObject = scenes.getJSONObject(i);
GLTFScene.Scene scene = new GLTFScene.Scene();
if (jsonObject.has("name")) {
scene.name = jsonObject.getString("name");
}
JSONArray nodes = jsonObject.getJSONArray("nodes");
for (int j = 0; j < nodes.length(); ++j) {
scene.nodes.add((Integer)nodes.get(j));
}
output.scenes.add(scene);
} catch (JSONException e) {
Log.e(TAG, e.getMessage());
}
}
}