toJSON method

Map<String, dynamic> toJSON()

Transforms this instance into a JSON object.

Implementation

Map<String,dynamic> toJSON() {
	final Map<String,dynamic> json = {
		'type': runtimeType.toString()
	};

	json['indices'] = {
		'type': indices.runtimeType.toString(),
		'data': indices
	};

	json['vertices'] = vertices;
	json['backfaceCulling'] = backfaceCulling;
	json['aabb'] = aabb.toJSON();
	json['boundingSphere'] = boundingSphere.toJSON();

	return json;
}