Class: Project
Represents a project.
Methods
GetProjectId()
static GetProjectId(): string;
Gets the current project ID assigned by the runtime.
This ID corresponds to the project identifier assigned after the project is uploaded to the cloud. If the project has not been uploaded, the runtime generates a local identifier instead.
Returns
string
The current project ID.
Throws
If the project ID has not been initialized by the runtime.
FromBundle()
static FromBundle(bundle): Project;
Creates a project from a project bundle.
Parameters
| Parameter | Type | Description |
|---|---|---|
bundle | ProjectBundle | The project bundle. |
Returns
Project
The created Project.
New()
static New(metadata): Project;
Creates a new project from project metadata. This is intended for projects distributed outside the platform.
Parameters
| Parameter | Type | Description |
|---|---|---|
metadata | ProjectMetadata | The project metadata, excluding the project identifier, which is generated at runtime. |
Returns
Project
The created Project.
ScheduleUpdate()
ScheduleUpdate(onUpdate): void;
Registers an update callback for runtime render-frame ticks.
The callback is invoked once per render-frame tick while no previous update is still running. If an earlier update has not completed, the current tick is skipped.
The timestep parameter is the elapsed time, in milliseconds, since the
previous update callback started.
Parameters
| Parameter | Type | Description |
|---|---|---|
onUpdate | (timestep, project) => void | Promise<void> | The callback invoked on each scheduled render-frame tick. |
Returns
void
Launch()
Launch(onSetup): Promise<void>;
Launches the project.
Adamas API calls are not available until internal initialization has
completed. The onSetup callback is invoked after initialization, and
application code may safely call Adamas APIs from within onSetup and any
functions executed after it.
Parameters
| Parameter | Type | Description |
|---|---|---|
onSetup | (sceneGraph, project) => Promise<void> | Called after project initialization to configure the scene and register project logic. |
Returns
Promise<void>
A promise that resolves when the project launch has completed.