MCPcopy Create free account
hub / github.com/esengine/esengine / serialize

Method serialize

packages/core/src/ECS/Scene.ts:1329–1331  ·  view source on GitHub ↗

* 序列化场景 * * 将场景及其所有实体、组件序列化为JSON字符串或二进制Uint8Array * * @param options 序列化选项 * @returns 序列化后的数据(JSON字符串或二进制Uint8Array) * * @example * ```typescript * // JSON格式 * const jsonData = scene.serialize({ * format: 'json', * pretty: true

(options?: SceneSerializationOptions)

Source from the content-addressed store, hash-verified

1327 * ```
1328 */
1329 public serialize(options?: SceneSerializationOptions): string | Uint8Array {
1330 return SceneSerializer.serialize(this, options);
1331 }
1332
1333 /**
1334 * 反序列化场景

Callers 1

createProjectMethod · 0.95

Calls 1

serializeMethod · 0.65

Tested by

no test coverage detected