toJson method
meta
-- object containing metadata such as textures or images in objects'
descendants.
Convert the camera to three.js
JSON Object/Scene format.
Implementation
@override
Map<String, dynamic> toJson({Object3dMeta? meta}) {
final data = super.toJson(meta: meta);
data["object"]["zoom"] = zoom;
data["object"]["left"] = left;
data["object"]["right"] = right;
data["object"]["top"] = top;
data["object"]["bottom"] = bottom;
data["object"]["near"] = near;
data["object"]["far"] = far;
if (view != null) {
data["object"]["view"] = json.decode(json.encode(view!.toMap));
}
return data;
}