Teskooano
Play

Script the simulator

The simulator at /teskooano/ can be driven from JavaScript in the page: from the browser console, a Playwright or Puppeteer script, or an AI agent controlling a browser. This page covers what works today and how to use it. The MCP server is the other way in: it builds and analyses systems on teskooano.space without a browser.

Open a system by URL

The simplest script is a link. Every view below can be opened, reloaded and shared:

URL Opens
/teskooano/ The library, or the last system if Settings › Start says so; Sol on the very first visit
/teskooano/c/{slug} A catalogue system, such as /teskooano/c/trappist-1
/teskooano/seed/{seed} A generated system; the same seed gives the same system
/teskooano/s/{id} A saved system: yours, or anyone’s if it is public

Once the app has started, these hand over to its own hash routes: /teskooano/c/sol?focus=earth becomes /teskooano/?focus=earth#/c/sol. The hash routes work as links too, and moving between them needs no page load:

Hash Opens
#/library The Systems library over the open system
#/library/{section} The library at catalogue, yours, seed or recent
#/c/{slug} A catalogue system
#/s/{id} A saved system
#/s/{id}/edit Reserved for the editor; opens the saved system for now
#/seed/{seed} A generated system

Opening a system any way, from the library or a script, adds a history entry, so the browser’s back and forward move between the systems and the library. A system that can’t open, such as one that needs a plan, opens the library with the reason and leaves the address on the open system.

Add any of these parameters:

Parameter Does
focus={body} Puts the camera on a body, by id or name (any case), with no flight
distance={radii} How far out, in the body’s radii (default 3); controls orbit and terrain regimes
side=day day (the default, 30° off the star), terminator (half lit, 90°) or night (rim-lit, 150°, star behind)
lat={deg}&lon={deg} Looks at a surface location (latitude -90° to 90° north, longitude east) and turns with the body; ignores side
cam={x,y,z} Direct camera position vector in scene units relative to the focused body’s centre (or in the scene)
look={x,y,z} Point the camera looks at, in the same coordinate frame
fov={deg} Vertical field of view in degrees (default 50)
ui=off Opens in photo mode: only the scene shows

For example, /teskooano/c/sol?focus=saturn&distance=4&side=terminator&ui=off opens Saturn half lit, with nothing but the scene. A bad value is ignored rather than refused.

Longitude 0° is where the globe faced at simulation time zero, not a real map’s prime meridian: surfaces are procedural. Latitude +90° is the north pole along the body’s spin axis.

Distance and altitude regimes

distance sets where the camera sits in relation to the world’s surface:

  • Orbit regime (distance > 2): The full planetary sphere is drawn from the baked global texture. Simulation time runs at whatever speed you choose.
  • Terrain handover (distance <= 2): Close-up quadtree terrain tiles activate, rendering procedural relief, coastlines, and liquid surface optics. To keep surface features and coordinates stable beneath the camera, simulation time locks to 1× while in this regime.
  • Cloud deck and troposphere (distance ~ 1.002 to 1.01): High-altitude atmospheric cruise (~12 km to 60 km altitude on an Earth-sized world), skimming above the procedural cloud layer.
  • Low altitude and sea-skimming (distance ~ 1.00005 to 1.0003): Skimming roughly 300 m to 2 km above terrain or sea level, revealing Cox-Munk sun glint, water transparency over shallow bottoms, and breaking whitecaps.
  • Surface clearance: The camera enforces an automatic clearance floor of 2 m above local ground or liquid level, preventing terrain clipping. When pointing down during descent, the camera automatically eases its pitch upward towards the horizon with a 20° margin so the terrain ahead stays in frame.

Wait for the app, then for the scene

The app sets window.teskooano once it has started. Nothing announces it, so wait for it to appear:

while (!window.teskooano) await new Promise((r) => setTimeout(r, 200));

Then wait for the scene before you trust what’s on screen. While a system loads, the loading screen shows photos of planets: they are pictures, not the live engine.

await window.teskooano.whenReady();

whenReady() resolves once a system has loaded and every world is drawn in full: surfaces baked, close-up detail built, nothing streaming in, and quiet for half a second. The <html> element has a data-engine-ready attribute while that holds, and loses it as soon as new work starts, such as after a camera move. In Playwright:

await page.waitForSelector("html[data-engine-ready]");

Follow the load as it happens

Loading can take a while: a system to fetch, every world’s surface to build, then close-up detail. The <html> element’s data-engine-state attribute names what the engine is doing, from the moment the page starts, before window.teskooano exists:

data-engine-state What is happening
waiting No system has loaded yet
loading A system is loading
baking Worlds’ surfaces are being built
detail Close-up detail is being built or streamed in
settling The work is done; it counts as ready in half a second
ready Every world is drawn in full

Once the app has started, window.teskooano.loadState gives the state now, and window.teskooano.loadState$ streams it as it changes, the current state first. Each state has the phase, the load’s stage (such as “Generating system”), and how far through the surface bakes (bake) and the detail (detail) are, as completed of total with the current world’s name:

const subscription = window.teskooano.loadState$.subscribe((state) => {
  console.log(state.phase, `${state.bake.completed} of ${state.bake.total}`);
});
// Later
subscription.unsubscribe();

GPU, views and what you can call

window.teskooano.engine is the one place to start. It joins the graphics device, the loaded system and the open views:

const engine = window.teskooano.engine;
await engine.when("gpuReady"); // the graphics device is up; safe for devtools
await engine.when("ready"); // the device is up and a system is drawn in full
engine.lifecycle$.subscribe((state) => console.log(state.stage));
engine.views.list(); // each view's id, dock panel id, focus and GPU state
engine.capabilities({ area: "camera" }); // functions, views and readiness

stage runs booting (no view yet), gpu (view open, device starting), then the load phases above. when("gpuReady") and when("ready") reject if the device fails to start, so a script doesn’t wait forever. Every function in capabilities() has a tier: read returns data, command changes the view or simulation, and consequential replaces or saves your work, so ask the user first. The same answers are available as the engine:* functions below.

How long each step took

window.teskooano.timings keeps how long the load and build work took, step by step: the system load’s stages, each engine phase and the whole load to ready, each world’s surface bakes (time in the queue, shader compiles, each pass and readback), the height map a world’s ground is built from, and the ground’s tiles. summary() totals each step, slowest first; entries() lists every span; clear() starts again, to time one action on its own:

window.teskooano.timings.clear();
await window.teskooano.pluginManager.execute("camera:view", {
  body: "mars",
  distanceRadii: 1.2,
});
await window.teskooano.whenReady();
console.table(window.teskooano.timings.summary());

Each span is also a performance.measure named teskooano:<kind>:<step>, so it shows in the browser’s performance panel.

Functions

The app’s actions are functions you call by name:

const result = await window.teskooano.pluginManager.execute("camera:view", {
  body: "mars",
  distanceRadii: 2,
  side: "day",
});
// { success: true, message: "Viewing Mars." }
Function Arguments Does
camera:view { body, distanceRadii?, altitudeM?, side?, lat?, lon?, fov? } Puts the active view’s camera on a body, as the URL parameters do; altitudeM is metres over the radius, in place of distanceRadii
camera:fly { on? } Hands the camera to you to fly, anywhere (F), or back to the orbit camera
camera:transition { move, body, durationS?, easing?, ... } Flies a named camera move round a body, such as a limb sunrise or a ring crossing; resolves when it ends
camera:transitions none Lists the named camera moves, how long each takes and what it reads
camera:saveView { name } Saves the active view’s camera as a named view of this system (Teskooano Full)
camera:listViews none Lists this system’s saved views
camera:goToView { id, jumpTime? } Returns to a saved view
camera:renameView { id, name } Renames a saved view
camera:deleteView { id } Deletes a saved view
simulation:startRecording { interval_s? } Records the running simulation, a frame every interval_s of simulation time (an hour by default)
simulation:stopRecording none Stops recording and keeps the run: its frames, bodies and time span
simulation:getRecording none The last recording’s data, to save
simulation:playRecording { recording? } or { stop: true } Plays a recorded run (the last, or one saved) in place of the physics, so it can be paused and sought
camera:viewLink { id } A link that opens this system on that view
system:loadCatalogue { slug } Opens a catalogue system
system:loadSaved { id } Opens a saved system: yours, or anyone’s if it is public
system:generateRandom { seed? } Generates a system from a seed, or a random one
system:loadFile { file } Opens a system file you pass in, after checking it
system:getOpen none Names the open system, where it came from and its hash route
system:listRecent none Lists the systems opened on this device, newest first
library:open { section? } Opens the Systems library, at a section such as recent
view:addCompositeEnginePanel none Opens another engine view, up to your plan’s limit; see Your plan’s limits
engine:capabilities { area?, tier?, schemas?, includeUnregistered? } Lists the functions this page can run, with views and readiness; the place to start
engine:getLifecycle none GPU and simulation readiness (stage, gpu, ready)
engine:listViews none Lists every engine view with its dock panel id, focus and GPU state; prefer over querySelector("canvas")
engine:resolveView { selector? } Finds one view: focused (default), primary, a view id or a dock panel id
account:getLimits none Your plan and its limits; see Your plan’s limits
view:togglePhotoMode { on?, keep? } Turns photo mode on, off or over; keep names overlays it leaves drawn (zones, orbitLines, labels, grid, auRings, predictions)
view:getOverlays none Reads which overlays are drawn, and photo mode’s keep list
view:setOverlays { labels?, orbitLines?, moonOrbits?, predictions?, grid?, auRings?, auLabels?, sweep?, zones?, zoneStars? } Sets overlays by name; zoneStars draws the habitable zones for chosen stars
time:get none Reads the clock: paused, speed multiplier, elapsed seconds and the date
time:setSpeed { multiplier?, paused? } Sets the exact speed multiplier (negative runs backwards) and plays or pauses
time:setDate { date } or { epochMs } Sets the date and time; the planets, seasons and weather follow
weather:get { body? } Reads the weather a script set on each body, and the presets
weather:set { body, preset?, cover?, storms?, lightningScale?, falling?, temperatureK?, windMs?, aurora?, ... } Sets a body’s weather: a preset (clear, overcast, rain, storm, dust-storm) or the parts
weather:clear { body } Gives a body its own weather back
lighting:get none Reads each star’s light and the look (exposure, bias, grade)
lighting:setStar { star, light?, visible?, only?, except?, reset? } Dims, hides or limits one star’s light, or gives it back
lighting:setLook { exposure?, exposureBiasStops?, grade? } Holds the exposure or biases it in stops, and sets how much of the cinema grade shows
view:capture { width?, height?, longEdge?, hideInterface? } Saves a PNG of the active view; see Screenshots
view:startRecording { width?, height?, longEdge?, fps? } Starts recording the active view as video
view:stopRecording none Stops the recording and returns the video
tour:list none Lists the guided tours with their step counts and whether you have seen each
tour:start { tourId, from? } Starts a guided tour of one area of the interface (main, time, view, bodies, …), not the Grand Tour
tour:stop none Ends the running guided tour and puts the interface back
grandTour:start none Starts the Grand Tour on the active engine view (Celestial Hierarchy Tour button)
grandTour:stop none Ends the Grand Tour
grandTour:getState none Reads tour progress (data.state: status, index, stops, current body)
help:openFeedback none Opens the feedback form

The system, library and camera functions answer { success, message }, and the system ones add a symbol for the toast they show. system:getOpen and system:listRecent put what they read in data:

const { data } = await window.teskooano.pluginManager.execute("system:getOpen");
// { name: "Sol", source: { kind: "catalogue", slug: "sol" }, route: "#/c/sol", ... }

Systems opened recently are kept on the device, so system:loadCatalogue and system:loadSaved open them offline too. They report a body or system they can’t find as success: false rather than throwing. Calling a name that doesn’t exist returns undefined and logs an error.

To list every function the running app has registered:

window.teskooano.pluginManager
  .getPlugins()
  .flatMap((plugin) => (plugin.functions ?? []).map((f) => f.id));

Names ending in :initialize set the app up at start-up; don’t call them.

Landing, the ground and driving

Function Input Does
camera:land { body?, lat?, lon?, descentS? } Flies down to a place on a solid body, or straight down from where the camera is
camera:zoom { steps? } Zooms the orbit camera as the wheel does; with no input, reports { zooming, heightM }
camera:pilot { throttle?, boost?, toward? } Drives the flight camera’s throttle and heading
vehicle:enter { on? } Gets into the surface buggy near the ground, or out of it with { on: false }
vehicle:camera { view } While driving, "seat" puts the camera in the driver’s seat and "orbit" back on the orbit about the car
surface:probe { body, lat, lon } What is at a place on a world with a sea: height, water depth, temperature, rain and biome
surface:findHighland, surface:findShallows { body, near?, lit?, radiusKm?, depthM? } Finds high ground or shallow water near a place
weather:aurora { body, hemisphere?, points?, lon? } Where a body’s auroras are, and which part is dark
weather:here none The weather at the camera
sky:sun { body, lat, lon } The Sun’s height over a place on the ground
simulation:setPhysics { mode, step_s? } Sets N-body or ideal physics and pins the N-body step
scene:url, scene:restore { url } Reads the address that reproduces the view, and opens one

camera:view also takes lat and lon to look straight down on a place, and altitudeM for a descent. The buggy’s keys, and the keys for flight, are in Flying, landing and driving.

Cinema Mode is not part of this release. Its cinema:* functions come back with it in a later one.

Scene script tools (script:*) load, inspect, export, schema-validate, apply, seek, mutate / undo, scene captureFromLive, and satellite get/set/capture for a teskooano-scene-script document in memory (repo docs/api/scene-script-tools.md). They mirror on window.teskooano.engine.script. Load does not apply to the world; script:apply puts prepare/steps on the live view (default freezeClocks: true, stores a prepare scene:snapshot before any cue fires). It refuses a plan with a call that needs consent or isn’t registered, and a script whose system isn’t the open one; script:applyAll, which asks the person first, runs those and opens the system. script:seekFrame restores that snapshot and fires cues with frame ≤ target (film time = frame × stepMs, no wall-clock drift while frozen). script:previewRehearse walks an applied shot once, unrecorded, a frame at a time, drawing again where tiles or bakes are on their way, so a take that follows draws complete frames; it answers waitedPending and seconds. script:frameReport samples sky:bodies at film times — mid-shot cues after frame 0 are not applied in those samples (same as CLI framing); use seekFrame to scrub them. The simulator reads and runs scripts; the functions that change one are the editor’s. In the editor, mutate with script:set / patchInput / insert-remove step&cue (undo stack); pull live lighting, weather, view, lens, local hour, clock date or satellite with script:captureFromLive (stated fields only — never render:isolate). Pilot the shot’s satellite with script:satelliteSet (wraps camera:satellite; write: false for live-only) and script:satelliteCapture into the place step or a cue frame. A fly-through path is a camera:transition cue with move: "path": script:dollySample reads its poses (from the driver camera:trace uses) and its waypoints’ times, script:dollySetWaypoint / script:dollyMoveWaypoint edit one waypoint, and script:dollyCapturePose writes the view’s camera into one, in the waypoint’s own terms (camera:waypointAt reads that without writing). Pass pasted JSON (and optional path for meta.sourcePath); the browser cannot read a workspace path alone.

const pm = window.teskooano.pluginManager;
const json = /* paste or fetch host-provided contents */;
await pm.execute("script:load", {
  json,
  path: "tools/scene-scripts/imagined/the-long-dusk.scene.json",
});
await pm.execute("script:listShots");
const { state } = await pm.execute("script:export", { pretty: true });
await pm.execute("script:validate");
// Apply Long Dusk the-line: cities + satellite (steps[1]), clocks frozen.
await pm.execute("script:apply", { shot: "the-line" });
// Scrub to the mid-shot look/FOV cues (both frame 720).
await pm.execute("script:seekFrame", { shot: "the-line", frame: 720 });
await pm.execute("script:satelliteSet", {
  look: { attitude: "prograde", pitchDeg: -20, yawDeg: 0 },
  fov: 36,
  write: false,
});
await pm.execute("script:satelliteCapture", {
  shot: "the-line",
  into: { cueFrame: 720 },
});
await pm.execute("script:diff", { against: "loaded" });
// Export deep-equals parseSceneScript(file) after Zod default-fill; key order
// in `text` may differ from the on-disk file.

The live n-body simulation can’t jump to a time, but a recording of it can. Record a run, then play it back and seek it like the Ideal Orrery:

await pm.execute("simulation:startRecording", { interval_s: 3600 });
// ... let it run ...
await pm.execute("simulation:stopRecording");
await pm.execute("simulation:playRecording");
const { data } = await pm.execute("simulation:getRecording"); // to save

Camera moves

camera:transition flies a named move round a body and resolves when it ends, so you can record it with view:startRecording and stop the recording after. A new move, or taking the camera by hand, stops the one flying.

const pm = window.teskooano.pluginManager;
await pm.execute("view:startRecording");
await pm.execute("camera:transition", { move: "limb-sunrise", body: "earth" });
await pm.execute("view:stopRecording");

await pm.execute("camera:transition", {
  move: "ring-crossing",
  body: "saturn",
  durationS: 20,
  easing: "ease-out",
});
Move What it does
limb-sunrise Arcs low over the night side so the Sun rises behind the limb and the air glows
cloud-dive Dives through the cloud tops at a place, into a storm, and looks out under them
hall-dive From orbit through a giant’s cloud tops into the hall beneath, under a storm
ring-crossing Rises through the ring plane, the rings opening from a line to their full width
ring-skim Skims low along the rings and sinks in among the rocks
ring-dive Comes straight down into the rings, facing the planet
ring-backlight Drifts round to the night side, the rings across the dark disc, the Sun behind
orbit-reveal Slides sideways so a moon comes out from behind its planet (or behind)
orbit Circles a body from a side; sweepDeg, elevationDeg, elevationFrom, toDistanceRadii
flyby A curved pass close by a body, which swings through the frame
land Descends from orbit to flat ground and stands there
climb-out Rises off the ground into orbit
sky-view Hovers low over the ground with another body (behind) above the horizon
glide Flies level over the ground from where the camera stands, travelKm on, to eyeM, at least clearM (30 m) over what stands below
pan Turns where the camera stands to bearingDeg, pitchDeg and fov, eased; nothing moves

Every move takes durationS and easing (linear, smooth, ease-in, ease-out, hold or whip-pan). limb-sunrise also takes beforeDeg and afterDeg, how far round from the moment of sunrise it starts and ends; a large afterDeg carries it on over the day side, looking into the star. Moves round a body ease in from where the camera is over blendS seconds when it already follows that body. lat and lon choose a place, side (day, terminator, night) the light, distanceRadii how far out (or distanceAU, in AU from the centre), and fov the field of view. camera:transitions lists what each move reads.

A move can circle a star, a black hole or a barycentre as well as a planet. A barycentre has no size, so its distanceRadii counts the reach of the stars round it; distanceAU is plainer:

await pm.execute("camera:transition", {
  move: "orbit",
  body: "Trisolaris barycenter",
  distanceAU: 50,
  elevationDeg: 55,
  sweepDeg: 120,
  durationS: 30,
});

An orbit’s elevationDeg is measured from the camera’s level unless you pass elevationFrom: "equator": then it circles in the body’s equator, the height is above the equator and its rings, and the rings run level across the frame. On a tilted world such as Saturn, { elevationDeg: 15, elevationFrom: "equator" } is 15 degrees above the rings whatever the date.

camera:look turns the camera where it stands and sets its lens: { bearingDeg, pitchDeg, fov }, any of them alone (a pitch alone keeps the bearing), or { at: "sun" }. durationS eases the turn over that many seconds instead of snapping round at once. camera:view takes fov too.

Flying the camera

camera:fly hands the camera over to manual flight, letting you fly anywhere in the system. Pressing F or clicking the rocket icon on the toolbar does the same:

await window.teskooano.pluginManager.execute("camera:fly"); // toggles flight
await window.teskooano.pluginManager.execute("camera:fly", { on: true }); // starts flying
await window.teskooano.pluginManager.execute("camera:fly", { on: false }); // returns to orbit

While flying:

  • Throttle: W and S increase and decrease throttle smoothly; X cuts throttle to zero; the mouse scroll wheel steps throttle in 5% increments.
  • Boost: Hold Shift to boost speed 4×.
  • Steer: Drag the mouse to pitch and yaw the camera nose. You can also use the Arrow keys to pitch up/down and steer left/right.
  • Yaw and Roll: A and D apply yaw (rudder); Q and E roll the camera. When flying within 0.05 radii of a planet (~320 km altitude on Earth), the wings automatically level with the local horizon when roll keys are released.
  • Speed scaling: Forward velocity dynamically scales with altitude above the surface (altitude × 0.8), ranging smoothly from interplanetary cruise (up to 3,000 km/s in deep space) down to light aircraft speeds (30 m/s near ground level).
  • Flight HUD: A real-time readout in the bottom corner shows your current altitude above ground or sea level, airspeed, throttle percentage, and boost state.

Your plan’s limits

account:getLimits reports the plan the app is running under and what it allows, so a script or agent can check before it asks for more:

const { data } =
  await window.teskooano.pluginManager.execute("account:getLimits");
// {
//   tier: "full",              // public signed out, free or full
//   account: "signed-in",      // or "signed-out", or "none" in the standalone app
//   source: "server",          // "server": the site's figures; "tier": the plan's defaults
//   limits: {
//     engineViews: null, bodyCap: null, savedSystems: 2500,
//     storageBytes: 2147483648, documentBytes: 1048576, versions: 250,
//     savedViews: 500, bookmarks: 500, photoLongEdge: 7680,
//     videoLongEdge: 7680,
//     sourcesPerDay: 200, apiUnitsPerMonth: 30000, apiUnitsPerDay: 3000,
//   },
//   entitlements: [{ plan: "full", source: "subscription", expiresAt: null }],
// }

A limit of null means none beyond what the device can do, except photoLongEdge, where null is screen-size photos only, and videoLongEdge, where it is no video. Sizes are in pixels along the longest edge, and storage in bytes. The figures come from the site when it sends them, and otherwise from the plan as the plans page lists it.

The app holds to these limits itself. view:addCompositeEnginePanel past engineViews opens no view: it answers { success: false, reason: "engine_view_limit", message } and shows the upgrade dialog. Signed out, Teskooano is a viewer: the editor, saved views, your systems and new systems from a seed are hidden.

Editing a system

The editor’s functions build and change the open system, with the same operations as the MCP system_edit tool: add_star, add_body, update_body, set_orbit, remove_body and rename, in the same units.

const { pluginManager } = window.teskooano;
await pluginManager.execute("editor:enter");
const star = (await pluginManager.execute("editor:getSession")).data.session
  .file.objects[0].id;
await pluginManager.execute("editor:apply", {
  ops: [
    {
      op: "add_body",
      name: "Aster",
      type: "PLANET",
      parentId: star,
      mass: { earth: 1 },
      radius: { earth: 1 },
      orbit: { semiMajorAxis_au: 1.2 },
    },
  ],
});
await pluginManager.execute("editor:undo");
Function Arguments Does
editor:enter none Switches to Edit and pauses the simulation, if your plan allows it
editor:exit none Done: back to View, with the simulation running. The edits stay
editor:apply { ops } Applies builder operations as one change and redraws; all apply or none do
editor:undo none Undoes the last change
editor:redo none Redoes the change undone last
editor:play { running? } Runs the edited system without leaving Edit, or pauses it with false
editor:setNote { note } Sets the note kept with the version when the edits are saved
editor:discard none Throws the edits away and shows the system as it was opened
editor:getSession none The mode, whether the editor opens and why not, and the session

Each answers { success, message, reason?, data? }. data is the edit session: the system as opened (base), the operations since (ops), the result (file), the note, whether there is anything to save (dirty), the body count and your plan’s cap. A refusal says why in reason:

  • sign-in: the editor needs an account.
  • upgrade: the system has more bodies than your plan edits; it opens in View.
  • body_limit, kind_limit: the change would pass your plan’s body cap, or add a black hole, neutron star, giant star or iron world on a free plan.
  • invalid: an operation didn’t apply; message says which and why.
  • not-editing: call editor:enter first.

Free accounts edit up to 15 bodies; Teskooano Full has no cap. The edits are kept on this device until they’re saved or discarded, so they survive signing in or upgrading.

Screenshots

Photo mode hides the header, the tool groups, the side panel, notifications, labels, AU rings, orbit lines and the grid, leaving only the scene. It doesn’t change any view’s saved settings, and ends with Esc (H toggles it). Open the page with ui=off, or call view:togglePhotoMode; the <html> element has a data-photo-mode attribute while it is on.

To keep an overlay in the shot, name it: ui=off&keep=zones,orbitLines in the URL, or view:togglePhotoMode with { on: true, keep: ["zones", "orbitLines"] }. You can keep labels, grid, auRings, zones, orbitLines and predictions. Keeping the zones doesn’t turn them on: call view:setOverlays with { zones: true } as well.

view:capture saves a picture of the active view. It waits for the view’s next frame, then draws that frame again at the size you ask for, with the same colours and glow as the screen, so you get the scene as it is now rather than the frame before your last change:

const { success, message, data } = await window.teskooano.pluginManager.execute(
  "view:capture",
  { width: 3840, height: 2160, hideInterface: true },
);
// data: { blob, width, height, mimeType: "image/png" }
  • With no size, the picture is the view’s own size in device pixels.
  • Give width and height, one of them (the other follows the view’s shape), or longEdge for the view’s shape at that length: { longEdge: 3840 } is 3840 × 2160 from a 16:9 view.
  • hideInterface: true hides orbit lines, the grid and markers for the picture, as photo mode does, and brings them back afterwards. Labels are never in the picture.
  • A size larger than your plan allows is made smaller, keeping its shape, and message says so.
Plan Photos Video
Signed out and Free The view’s size None
Full Up to 8K (7680 px) Up to 8K

Sizes are the longest edge, and Full always gets at least the view’s own size for photos. Your graphics card can set a lower limit; most draw up to 8192 pixels.

To record video, start and stop it:

const pm = window.teskooano.pluginManager;
await pm.execute("view:startRecording", { longEdge: 2560, fps: 30 });
// ...move the camera, run the simulation...
const { data } = await pm.execute("view:stopRecording");
// data: { blob, width, height, mimeType: "video/webm" }

While it records, the view draws at the recording’s size and shows it scaled to fit, so a recording in a different shape from the view shows bars at the sides. Recording is WebM, at up to 60 frames a second, and needs a browser that can record a canvas. The photo and video button in the tool groups does the same and downloads the file.

For a clean, repeatable shot:

  1. Open the system with focus, distance and side (or lat and lon) and ui=off.
  2. Wait for window.teskooano and then whenReady().
  3. Call view:capture, or take the screenshot with your browser tooling.

Sol, a catalogue system or a fixed seed gives the same scene every time. The simulation keeps running, so for a still frame of a fast moon, capture as soon as the scene is ready.

Settings

Settings the player picks, such as the sky, lens flare and trail length, are saved in the browser and, when signed in, to their profile. A script that changes them through the Settings panel changes them for that player, so reset what you change.

Original