Streaming Point Cloud
Streaming Point Cloud
Explore a Lorenz attractor containing one million points streamed from SpatialDrive. Color shows the speed along the trajectory. Move closer to stream more detail.
Starting SpatialEngine...
export const pointCloudTarget = {
server: "https://api.spatialdrive.io",
project: "9b9acbe8-66eb-4975-bad8-c5604f4f2204",
};
export async function startDemo({
client,
root,
enabled,
report,
target = pointCloudTarget,
now = Date.now(),
}) {
await client.server.setUrl({ url: target.server });
await client.server.authenticate({ strategy: { kind: 1, key: "" } });
await client.project.remote.activate({ uuid: target.project });
await client.project.setTimestamp({
timestampNanos: BigInt(now) * 1_000_000n,
});
await client.project.waitForSceneSync();
await client.viewport.camera.zoomExtents({
viewport: "main",
durationSeconds: 0,
});
root.querySelector('[data-command="frame"]').addEventListener("click", async () => {
enabled(false);
try {
await client.viewport.camera.zoomExtents({
viewport: "main",
durationSeconds: 0.6,
});
report("Framed the dataset.");
} catch (error) {
report("Statement failed: " + error.message, { error: true });
} finally {
enabled(true);
}
});
}