toJson method

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

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

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

Implementation

@override
Map<String,dynamic> toJson({Object3dMeta? meta}){
  return {
    'fov': fov,
    'zoom': zoom,
    'near': near,
    'far': far,
    'focus': focus,
    'aspect': aspect,
    'filmGauge': filmGauge,
    'filmOffset': filmOffset,
    'left': left,
    'right': right,
    'top': top,
    'bottom': bottom,
    'view': view?.toMap,
    'coordinateSystem': coordinateSystem,
    'viewport': viewport?.toList(),
    'matrixWorldInverse': matrixWorldInverse.storage,
    'projectionMatrix': projectionMatrix.storage,
    'projectionMatrixInverse': projectionMatrixInverse.storage
  }..addAll(super.toJson(meta: meta));
}