OrbinexSimulation is a scientific 3D universe sandbox for the web. The project provides a real-time desktop simulation and a marker-based AR viewer, while keeping the physics layer reproducible through published npm modules.
This repository delivers the following capabilities:
- Real-time 3D simulation of planets, moons, dwarf planets, asteroids, Kuiper objects, comets, meteors, galaxies, clusters, and black-hole candidates.
- Event-aware simulation loop with forecasting, close-pass alerts, and recommendation output.
- Desktop and AR runtimes with shared model metadata.
- npm-consumable wrapper package in orbinexsim-npm for external integration.
| Resource | Link | Purpose |
|---|---|---|
| Desktop demo | https://galihru.github.io/OrbinexSimulation/ | Primary scientific 3D interface |
| AR viewer demo | https://galihru.github.io/OrbinexSimulation/ar-view.html | Marker-based AR exploration |
| Wrapper package | @galihru/orbinexsim | High-level integration API |
| Physics core package | @galihru/orbinex | Orbital constants and sampling |
The image evidence is organized as journal-style tables. In each table, Column 1 defines the analytical focus, and Column 2 presents the observed runtime artifact.
Interpretation for Table 1:
- Table 1, Column 2, Row 1 shows the pre-render phase where engine, catalog, and synthetic object sets are merged before interactive simulation begins.
- Table 1, Column 2, Row 2 shows the high-density orbital regime, demonstrating concurrent rendering of major and minor bodies.
- Table 1, Column 2, Row 3 shows the focused or sparse regime, where distant trajectories remain detectable without visual collapse.
Interpretation for Table 2:
- Table 2, Column 2, Row 1 shows per-object measurable attributes, including mass, radius, distance, velocity, and rotation.
- Table 2, Column 2, Row 2 shows deterministic retrieval of indexed bodies for fast navigation across simulation entities.
- Table 2, Column 2, Row 3 shows event ingestion with confidence metadata, supporting temporal anomaly review.
- Table 2, Column 2, Row 4 shows hierarchy gating for level-bounded visualization and complexity reduction.
| Column 1: Analytical focus | Column 2: Visual evidence |
|---|---|
| Mobile AR activation card (cross-device bridge) | ![]() |
| Marker reference target for Hiro-based AR detection | ![]() |
| In-situ handheld AR runtime after marker lock | ![]() |
Interpretation for Table 3:
- Table 3, Column 2, Row 1 shows the QR-mediated handoff used to transfer the active object context to mobile AR runtime.
- Table 3, Column 2, Row 2 shows the canonical marker used by the AR pipeline for stable object anchoring.
- Table 3, Column 2, Row 3 shows a real mobile capture where marker lock, label rendering, and object placement are preserved in handheld conditions without synthetic plane occlusion.
flowchart LR
A[User Controls and Commands] --> B[Simulation Core Loop]
B --> C[Orbital Propagation]
C --> D[Event and Collision Detection]
D --> E[Forecast and Confidence Scoring]
E --> F[Desktop 3D Rendering]
E --> G[AR Marker Runtime]
E --> H[Scientific Reports and Logs]
H --> I[Decision Support Recommendations]
sequenceDiagram
participant U as User
participant UI as Interface Layer
participant ENG as Orbinex Engine
participant RND as Renderer/AR
participant LOG as Event Log
U->>UI: Change focus, filters, or simulation mode
UI->>ENG: Submit runtime command
ENG->>ENG: Update orbit states and small-body dynamics
ENG->>LOG: Emit event and forecast summaries
ENG->>RND: Publish updated body states
RND-->>UI: Frame and panel updates
UI-->>U: Scientific visual feedback
The core equations are provided in LaTeX for scientific readability.
graph TD
A["mu = G * M"] --> B["v = sqrt(mu / r)"]
A --> C["T = 2 * pi * sqrt(a^3 / mu)"]
B --> D["Velocity estimate"]
C --> E["Period estimate"]
F["eta = distance / relative_speed"] --> G["ETA forecast"]
H["confidence clamp"] --> G
I["log-scaled radius mapping"] --> J["Stable AR object visibility"]
| Equation | Implementation anchor | Practical role |
|---|---|---|
mu = G * M |
src/orbinex-compat.ts and orbinexsim-npm/src/index.ts | Gravitational parameter for orbit calculations |
v = sqrt(mu / r) |
src/orbinex-compat.ts | Circular velocity estimate |
T = 2*pi*sqrt(a^3/mu) |
src/orbinex-compat.ts | Orbital period estimation |
eta ~= distance / speed |
src/orbinex-compat.ts | Event forecast timing |
| Log-scaled AR radius mapping | orbinexsim-npm/src/ar-runtime.ts | Stable object visibility in AR |
| Module | Category | Used in | Why it is used |
|---|---|---|---|
| @galihru/orbinex | Physics core | App + npm wrapper | Constants and orbit sampling primitives |
| @galihru/orbinexsim | Integration wrapper | External consumers | One-call desktop/AR embedding API |
| three | Rendering | Web application | Real-time 3D scene graph and camera system |
| qrcode | Utility | Web application | AR deep-link QR generation |
| vite | Tooling | Build system | Development server and production bundling |
| Requirement | Recommended version | Notes |
|---|---|---|
| Node.js | 20.x LTS or newer | Required for Vite 7 and modern ESM toolchain |
| npm | 10.x or newer | Default package manager in this repository |
| Git | latest stable | Required for clone, pull, and CI-compatible workflows |
| Browser | Chromium/Edge/Firefox latest | AR mode requires secure-context camera support |
Use this ordered sequence when you want the fastest path from package install to full runtime validation:
- Install the published module in your consumer project.
npm install @galihru/orbinexsim- Clone this repository if you need direct source-level runtime customization.
git clone https://github.com/galihru/OrbinexSimulation.git
cd OrbinexSimulation- Install repository dependencies deterministically.
npm ci- Start the development runtime and validate desktop/AR entry points.
npm run dev- Build production artifacts once runtime behavior is validated.
npm run build- Build and optionally publish the wrapper package.
npm -C orbinexsim-npm run build
npm -C orbinexsim-npm packgit clone https://github.com/galihru/OrbinexSimulation.git
cd OrbinexSimulation
npm ciUse npm install only when intentionally updating dependency resolution or lockfile state.
npm run devOptional host/port override for LAN or device testing:
npm run dev -- --host 0.0.0.0 --port 5173Catalog synchronization can be triggered explicitly:
npm run catalog:updatenpm run buildThis command executes the full production chain:
npm run catalog:updatevite buildnode scripts/postbuild-optimize.mjs
Validate production output locally:
npm run preview -- --host 0.0.0.0 --port 4173The distributable output is generated in dist/.
npm -C orbinexsim-npm ci
npm -C orbinexsim-npm run build
npm -C orbinexsim-npm packPublish step (requires npm authentication and proper token/2FA policy):
npm -C orbinexsim-npm publish --access publicimport { createOrbinexSim } from "@galihru/orbinexsim";
const sim = createOrbinexSim("#app", {
mode: "desktop",
model: "Bumi",
autoRequestAccess: true
});
// Optional runtime switch to AR
await sim.launchAr({ camera: true, motionSensors: true });
// Scientific quick report from orbital sample
console.log(sim.buildQuickReport(1.496e11));| Output channel | Typical result |
|---|---|
| Scientific object panel | Stable physical descriptors (mass, radius, orbital distance, temperature estimate) |
| Event log | Time-indexed simulation events with confidence and relative velocity |
| Forecast section | Early warning for close-pass and potential-collision scenarios |
| AR mode | Marker-linked object rendering with runtime permission summary |
GitHub Pages deployment is handled by deploy-pages.yml.
- Push to the main branch.
- Ensure Pages source is set to GitHub Actions.
- Wait for workflow completion in the Actions tab.
MIT
Galih Ridho Utomo (姜瑞)









