toJson method

  1. @override
Map<String, dynamic> toJson({
  1. Object3dMeta? meta,
})
override

meta - object containing metadata such as textures or images for the scene.

Convert the scene to three.js JSON Object/Scene format.

Implementation

@override
Map<String, dynamic> toJson({Object3dMeta? meta}) {
  Map<String, dynamic> data = super.toJson(meta: meta);

  if (fog != null) data["object"]["fog"] = fog!.toJson();

  return data;
}