Skip to content

Update website - #236

Merged
rokotyan merged 14 commits into
github_pagesfrom
main
Jun 30, 2026
Merged

Update website#236
rokotyan merged 14 commits into
github_pagesfrom
main

Conversation

@rokotyan

Copy link
Copy Markdown
Contributor

No description provided.

rokotyan and others added 14 commits June 30, 2026 09:04
Ports the experimental collision force (previously written against regl)
to the luma.gl rendering pipeline. Points push each other apart when they
overlap, using a spatial-hash grid built with 4 offset passes to catch
cell-boundary collisions.

ForceCollision module:
- build-grid pass (point list, additive) + force pass (fullscreen quad,
  additive accumulation into velocity Fbo)
- GLSL ES 3.0 shaders with std140 uniform blocks, mirroring ForceManyBody

Config:
- simulationCollision — force strength (default 0, disabled)
- simulationCollisionRadius — fixed radius; undefined/0 derives from point sizes
- simulationCollisionPadding — extra gap between visual edges (default 0)

Simulation integration:
- Wired into simulation step, init, resource creation, and teardown
- Collision runs after attraction forces (links, clusters) so springs don't
  re-create overlap within the same tick (fixes standing oscillation)
- Per-pass correction capped to ~10% of collision radius to prevent overshoot
  ping-pong in dense areas
- GPU resources (grid/size textures, programs) allocated lazily on first use;
  graphs that never enable collision pay no memory cost
- Grid marked stale on point-size/position changes or radius/padding config changes

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
- Add simulationCollision, simulationCollisionRadius, and
  simulationCollisionPadding to the simulation configuration table in
  the Configuration docs, with recommended ranges and defaults.
- List Collision alongside the other simulation forces in the
  configuration intro.
- Add the Collision example to the README examples list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
- Invalidate collision resources when pointDefaultSize changes in
  derived-radius mode (radius 0/undefined). The setConfig path updated
  point sizes but left the size-derived collision grid/size texture stale.
- Clamp the force-pass cell coordinates to the grid bounds, matching
  build-grid.vert. Without this, a point that drifts more than one cell
  outside the space saw an all-out-of-bounds neighborhood and lost its
  collision response near borders.
- Scan data.pointSizes with a loop instead of Math.max(...Array.from(...));
  spreading a large typed array as arguments can throw a RangeError on
  big graphs before collision even initializes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
A large-graph stress test for the collision force: 50,000 points seeded
with heavy overlap in a dense disc, so the spatial-hash collision force
has to resolve a large number of overlaps every tick. Repulsion is off
and a gentle gravity keeps the points packed so collision keeps working;
the FPS monitor is enabled to read the cost under load.

Lives under Examples/Forces alongside the Collision demo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
…ptimize run

Signed-off-by: Stukova Olya <stukova.o@gmail.com>
Signed-off-by: Stukova Olya <stukova.o@gmail.com>
…ntime

Reported by CodeRabbit.

Signed-off-by: Stukova Olya <stukova.o@gmail.com>
Signed-off-by: Stukova Olya <stukova.o@gmail.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
@rokotyan rokotyan self-assigned this Jun 30, 2026
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 86d0a3a7-974c-4d7b-92c2-b5ad4cda37b6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rokotyan
rokotyan merged commit 185e700 into github_pages Jun 30, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants