Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SceneSerializer

Class used to serialize a scene into a string

Hierarchy

  • SceneSerializer

Index

Methods

Static ClearCacheSearch playground for ClearCache

  • ClearCache(): void
  • Clear cache used by a previous serialization

    Returns void

Static SerializeSearch playground for Serialize

  • Serialize(scene: Scene): any
  • 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

Static SerializeAsyncSearch playground for SerializeAsync

  • SerializeAsync(scene: Scene): Promise<any>
  • Serialize a scene into a JSON compatible object

    Parameters

    • scene: Scene

      defines the scene to serialize

    Returns Promise<any>

    a JSON promise compatible object

Static SerializeMeshSearch playground for SerializeMesh

  • SerializeMesh(toSerialize: any, withParents?: boolean, withChildren?: boolean): any
  • Serialize a mesh into a JSON compatible object

    Parameters

    • toSerialize: any

      defines the mesh to serialize

    • Optional withParents: boolean

      defines if parents must be serialized as well

    • Optional withChildren: boolean

      defines if children must be serialized as well

    Returns any

    a JSON compatible object

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method