API

Class SceneSerializer

Class used to serialize a scene into a string

Index
  • Serialize a scene into a JSON compatible object Note that if the current engine does not support synchronous texture reading (like WebGPU), you should use SerializeAsync instead as else you may not retrieve the proper base64 encoded texture data (when using the Texture.ForceSerializeBuffers flag)

    Parameters

    • scene: Scene

      defines the scene to serialize

    Returns any

    a JSON compatible object

  • Serialize a mesh into a JSON compatible object

    Parameters

    • toSerialize: any

      defines the mesh to serialize

    • withParents: boolean = false

      defines if parents must be serialized as well

    • withChildren: boolean = false

      defines if children must be serialized as well

    Returns any

    a JSON compatible object