I'll go ahead and throw in some info, even though it's all preliminary.
.bind w world
var o = w.create_instance("outerra/mig29/mig29", #(pos 10), #rot, false)
o.enter()
Spawns object 10 meters before the camera and enters it.
#pos, #rot, #dir are macros that provide current camera's positional data, otherwise the arguments expect a coordinates object like {x: ..., y: ..., z: ...} in ECEF for positions.
The console runs javascript, so you can run arbitrary JS code there. There are a few special commands starting with dot:
.bind <var> <interface> | Bind Javascript variable to an interface. |
.print <expr> | Print a JSON-formatted result of expression |
.load <script_path> | Load and execute script from given path. |
.runstable <stmt> | Run given statement each frame in which the terrain is fully refined. Used to capture videos without jitter and transient glitches etc. |
.stop | Stop invocation of .runstable |
Real console documentation will be mostly about the documentation of (usable) engine interfaces. Since out interfaces are generated, I'll be extending the generator to produce the docs automatically, probably directly in wiki format and publish it there.
Here's another example script we used to capture presentation videos from flight path recorder, to make them fluid and fully refined (since the normal video capture sometimes interferes with rendering). It uses console's own interface that provides functions like pause_time, step_time, capture_screen, capture_frame etc.
If you put it into scripts folder, you'd load and run the scripts as follows:
.load scripts/video.js
.runstable video("my_video", 60)