Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion engraphis/classic_assets/dashboard.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion engraphis/classic_assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,6 @@
graph view. dashboard.js fetches both on demand from graphRender(); see loadForceGraph()
and loadGraphEngine(). scripts/externalize_dashboard_assets.py enforces both halves:
they stay out of this file, and the lazy references still have to resolve. -->
<script src="/classic-assets/dashboard.js?v=20260905-processing-review-1"></script>
<script src="/classic-assets/dashboard.js?v=20260906-galaxy-boundaries-1"></script>
</body>
</html>
46 changes: 23 additions & 23 deletions engraphis/dashboard_assets/engraphis-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@
const GALAXY_ORBITAL_SPEED_RESPONSE_GAIN = 0.5;
const GALAXY_ORBITAL_SPEED_MAXIMUM = 4.6;
const GALAXY_ORBITAL_RADIUS_MAXIMUM = 1.06;
const GALAXY_BASE_ORBITAL_SPEED_BOOST = 1.625;
function galaxyOrbitalSpeedMultiplier(setting) {
const raw = Number(setting);
const value = Number.isFinite(raw)
Expand Down Expand Up @@ -746,10 +745,9 @@
const circularSpeed = Math.sqrt(Math.max(0, acceleration * localRadius));
const multiplier = Math.max(0, Number(orbitalSpeed) || 0);
return kinematicCap
? Math.min(circularSpeed * GALAXY_BASE_ORBITAL_SPEED_BOOST * multiplier,
? Math.min(circularSpeed * multiplier,
GALAXY_LOCAL_RELATIVE_SPEED_LIMIT * multiplier)
: Math.min(GALAXY_LOCAL_RELATIVE_SPEED_LIMIT, circularSpeed)
* GALAXY_BASE_ORBITAL_SPEED_BOOST * multiplier;
: Math.min(GALAXY_LOCAL_RELATIVE_SPEED_LIMIT, circularSpeed) * multiplier;
}

/* The classic renderer's *dense* signal (`GPERF.dense`, `links>1500` in dashboard.js). Past
Expand Down Expand Up @@ -1230,7 +1228,7 @@
|| ((seededHash(opts.layoutSeed, 'system:' + String(parent.id)) & 1) ? 1 : -1);
const targetTangent = galaxyRelativeSpeedBudget(parent, absoluteSpeedLimit,
Math.min(GALAXY_LOCAL_RELATIVE_SPEED_LIMIT,
Math.sqrt(Math.max(0, acceleration * radius)) * GALAXY_BASE_ORBITAL_SPEED_BOOST * orbitalSpeed),
Math.sqrt(Math.max(0, acceleration * radius)) * orbitalSpeed),
tangentX * sign, tangentY * sign);
const parentId = String(parent.id);
const previousParent = typeof node.__galaxyOrbitAnchorId === 'string'
Expand Down Expand Up @@ -3428,12 +3426,13 @@
const globalSpeed = omega * orbit.radius;
const globalVx = -Math.sin(orbit.angle) * globalSpeed * direction;
const globalVy = Math.cos(orbit.angle) * globalSpeed * direction;
moveNode(star, targetX, targetY, globalVx, globalVy);
// Initialize local phases against the old parent frame before moving the carrier.
const localMotion = advanceGalaxyKinematicLocalMembers(members, star, {
x: targetX, y: targetY, vx: globalVx, vy: globalVy,
}, item.core ? Object.assign({}, opts, {
localOrbitCache: '__galaxyKinematicCoreLocalOrbit',
}) : opts);
moveNode(star, targetX, targetY, globalVx, globalVy);
satellites += localMotion.satellites;
speedCapped = speedCapped || localMotion.speedCapped;
const carrierContact = nodeRadius(anchor) + nodeRadius(star)
Expand Down Expand Up @@ -4551,8 +4550,20 @@
const maximumExtents = new Map(systems.map(system => [
system, galaxySystemMaximumEnvelopeRadius(system, opts),
]));
systems.sort((left, right) => maximumExtents.get(right) - maximumExtents.get(left)
/* Rigid translations and rotations introduce a few ulps in otherwise equal envelopes.
Use stable precision only for ordering, so numerical noise cannot move a system to a
different ring. Keep exact extents for every safety reservation below. */
const extentOrder = new Map(systems.map(system => [
system, Number(maximumExtents.get(system).toPrecision(12)),
]));
systems.sort((left, right) => extentOrder.get(right) - extentOrder.get(left)
|| String(left.id).localeCompare(String(right.id)));
const remainingExtents = new Array(systems.length);
let maximumRemainingExtent = 0;
for (let index = systems.length - 1; index >= 0; index--) {
maximumRemainingExtent = Math.max(maximumRemainingExtent, maximumExtents.get(systems[index]));
remainingExtents[index] = maximumRemainingExtent;
}
const blackHoleBodyRadius = finitePositive(anchor.radius,
evidenceNodeRadius(anchor, 3), 160);
/* Runtime horizon projection paints the explicit global anchor at twice its body radius.
Expand All @@ -4567,7 +4578,7 @@
/* Reserve the maximum nested local envelope, then keep a small independent lane margin.
This remains collision-free when the orbital-speed control reaches its maximum. */
const laneSlack = GALAXY_CARRIER_LANE_SLACK;
const laneExtent = maximumExtents.get(systems[cursor]) * laneSlack;
const laneExtent = remainingExtents[cursor] * laneSlack;
let laneRadius = Math.max(coreRadius + laneExtent + gap
+ GALAXY_BLACK_HOLE_EXCLUSION_PADDING,
previousLaneRadius + previousLaneExtent + laneExtent + gap);
Expand All @@ -4588,8 +4599,7 @@
'carrier-ring:' + String(laneIndex)) / 0x100000000 * Math.PI * 2;
for (let slot = 0; slot < count; slot++) {
const system = systems[cursor + slot];
/* Re-evaluate with the largest member of the next lane only; sorting makes every
remaining extent no larger than this ring's conservative laneExtent. */
// The exact remaining maximum also covers larger members within an ordering tie.
const angle = phaseOffset + slot * Math.PI * 2 / count;
const unitX = Math.cos(angle), unitY = Math.sin(angle);
const shiftX = anchor.x + unitX * laneRadius - system.x;
Expand Down Expand Up @@ -6475,19 +6485,9 @@
phase.angle += phase.direction * angularSpeed * timestep;
const unitX = Math.cos(phase.angle), unitY = Math.sin(phase.angle);
const tangentX = -unitY * phase.direction, tangentY = unitX * phase.direction;
let targetX = parent.x + unitX * targetRadius;
let targetY = parent.y + unitY * targetRadius;
if (globalAnchor && parent !== globalAnchor) {
const minBhDist = (finitePositive(globalAnchor.radius, evidenceNodeRadius(globalAnchor, 3), 160) * GALAXY_BLACK_HOLE_PAINT_SCALE)
+ nodeRadius + GALAXY_BLACK_HOLE_EXCLUSION_PADDING;
const bhDx = targetX - globalAnchor.x;
const bhDy = targetY - globalAnchor.y;
const bhDist = Math.hypot(bhDx, bhDy);
if (bhDist < minBhDist && bhDist > 1e-9) {
targetX = globalAnchor.x + (bhDx / bhDist) * minBhDist;
targetY = globalAnchor.y + (bhDy / bhDist) * minBhDist;
}
}
// The final black-hole exclusion pass translates the complete system together.
const targetX = parent.x + unitX * targetRadius;
const targetY = parent.y + unitY * targetRadius;
const targetVx = (Number.isFinite(parent.vx) ? parent.vx : 0)
+ tangentX * phaseSpeed;
const targetVy = (Number.isFinite(parent.vy) ? parent.vy : 0)
Expand Down
2 changes: 1 addition & 1 deletion engraphis/dashboard_assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,6 @@ <h2 id="graph-connections-title">Connected nodes</h2>
<script src="/v2-assets/memory-history.js?v=20260906-workflow-1"></script>
<script src="/v2-assets/ask-requests.js?v=20260906-ask-home-1"></script>
<script src="/v2-assets/graph-lifecycle.js?v=20260906-lifecycle-1"></script>
<script src="/v2-assets/ledger.js?v=20260906-lifecycle-1"></script>
<script src="/v2-assets/ledger.js?v=20260906-galaxy-boundaries-1"></script>
</body>
</html>
12 changes: 7 additions & 5 deletions engraphis/dashboard_assets/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
graphAssetSource('/v2-assets/vendor/force-graph.min.js?v=20260727-final'),
'ForceGraph', controller.signal,
)).then(() => loadScript(
graphAssetSource('/v2-assets/engraphis-graph.js?v=20260903-rotation-balance-1'),
graphAssetSource('/v2-assets/engraphis-graph.js?v=20260906-galaxy-boundaries-1'),
'EngraphisGraph', controller.signal,
)).then(() => loadScript(
graphAssetSource('/v2-assets/engraphis-spacetime.js?v=20260812-stable-orbit-lanes-7'),
Expand Down Expand Up @@ -3129,9 +3129,11 @@
const savedTuning = graphPreference('tuning', {});
const savedPhysicsVersion = Number(graphPreference('physicsVersion', 0));
const sourcePhysicsVersion = Number.isFinite(savedPhysicsVersion) ? savedPhysicsVersion : 0;
const legacyPhysics = hasSavedPreferences && sourcePhysicsVersion < GRAPH_PHYSICS_VERSION;
const needsPhysicsV3Migration = hasSavedPreferences && sourcePhysicsVersion < 3;
const needsPhysicsV4Migration = hasSavedPreferences && sourcePhysicsVersion < 4;
const needsPhysicsMigration = version => hasSavedPreferences
&& sourcePhysicsVersion < version;
const legacyPhysics = needsPhysicsMigration(GRAPH_PHYSICS_VERSION);
const needsPhysicsV3Migration = needsPhysicsMigration(3);
const needsPhysicsV4Migration = needsPhysicsMigration(4);
const effectiveTuning = savedTuning && typeof savedTuning === 'object'
? { ...savedTuning } : {};
const savedSpacetimeTuning = graphPreference('spacetimeTuning', {});
Expand Down Expand Up @@ -3159,7 +3161,7 @@
}
/* Physics v5 makes 120 the Galaxy gravity default. Migrate only the exact retired default;
a saved 96 in an already-versioned v5 snapshot remains an intentional user choice. */
if (legacyPhysics && preset === 'galaxy' && Number(effectiveTuning.gravity) === 96) {
if (needsPhysicsMigration(5) && preset === 'galaxy' && Number(effectiveTuning.gravity) === 96) {
effectiveTuning.gravity = 120;
}
syncGraphTuning({
Expand Down
2 changes: 1 addition & 1 deletion engraphis/static/dashboard.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion engraphis/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,6 @@
graph view. dashboard.js fetches both on demand from graphRender(); see loadForceGraph()
and loadGraphEngine(). scripts/externalize_dashboard_assets.py enforces both halves:
they stay out of this file, and the lazy references still have to resolve. -->
<script src="/static/dashboard.js?v=20260905-processing-review-1"></script>
<script src="/static/dashboard.js?v=20260906-galaxy-boundaries-1"></script>
</body>
</html>
Loading