Create an instance of Scene class with a given scene id and optional attributes and session credentials.
import { Scene } from "utils/topiaInit.ts";const scene = await Scene.get(exampleSceneId, { attributes: { name: "My Scene" }, credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", visitorId: 1, urlSlug: "exampleUrlSlug" }}); Copy
import { Scene } from "utils/topiaInit.ts";const scene = await Scene.get(exampleSceneId, { attributes: { name: "My Scene" }, credentials: { interactivePublicKey: "examplePublicKey", interactiveNonce: "exampleNonce", assetId: "exampleDroppedAssetId", visitorId: 1, urlSlug: "exampleUrlSlug" }});
Readonly
Optional
Retrieves scene details and assigns response data to the instance.
get, fetch, retrieve, load, details, info, information, scene
await scene.fetchSceneById();const { name } = scene; Copy
await scene.fetchSceneById();const { name } = scene;
Create an instance of Scene class with a given scene id and optional attributes and session credentials.
Example