Make machine configuration authoritative and restore native checkpoints exactly

This commit is contained in:
2026-09-18 09:09:41 +08:00
parent 6a69511276
commit 4a568f1f4c
94 changed files with 10882 additions and 301 deletions

View File

@@ -1,10 +1,12 @@
import { fnv1a64 } from "./replay.mjs";
import { WEB_SETTINGS } from "../workspace/web-settings.mjs";
const CONFIG = WEB_SETTINGS.runtime.compatibility;
export const MOTION_SCHEMA = "sim_motion.v1";
const AXES = Object.freeze(["x", "y", "z"]);
const MAX_POSITION = 1e9;
const MAX_SPEED = 1e6;
const CYCLE_DISTANCE = 0.001;
const MAX_POSITION = CONFIG.max_position;
const MAX_SPEED = CONFIG.max_speed;
const CYCLE_DISTANCE = CONFIG.cycle_time;
function clone(value) { return structuredClone(value); }
function finite(value) { return typeof value === "number" && Number.isFinite(value); }