Skip to content

feat(rapier): full collider shapes support#1403

Open
Neosoulink wants to merge 3 commits intomainfrom
feat/rapier-full-colliders-support
Open

feat(rapier): full collider shapes support#1403
Neosoulink wants to merge 3 commits intomainfrom
feat/rapier-full-colliders-support

Conversation

@Neosoulink
Copy link
Copy Markdown
Member

Summary

  • RigidBody component now uses RigidBodyCollidersShape via the collider prop to generate auto colliders
    • Supported shapes: cuboid, ball, capsule, cone, cylinder, convexHull, trimesh.
  • Full Collider Shapes support
    • Supported ColliderShape: ball, capsule, cone, convexHull, convexMesh, cuboid, cylinder, heightfield, polyline, roundCone, roundConvexHull, roundConvexMesh, roundCuboid, roundCylinder, trimesh.
  • Align Collider components with ColliderShape.
  • Code clean-up and accessibility improvements.

Breaking changes

This integration was designed to be backwards compatible, but some changes were necessary to align with the new ColliderShape.

  • Old hull collider no longer supported, use convexHull instead.

### Description

- `RigidBody` component now uses `RigidBodyCollidersShape` via the `collider` prop to generate auto colliders
  - Supported shapes: `cuboid`, `ball`, `capsule`, `cone`, `cylinder`, `convexHull`, `trimesh`
- Full Collider Shapes support
  - Supported `ColliderShape`: `ball`, `capsule`, `cone`, `convexHull`, `convexMesh`, `cuboid`, `cylinder`, `heightfield`, `polyline`, `roundCone`, `roundConvexHull`, `roundConvexMesh`, `roundCuboid`, `roundCylinder`, `trimesh`
- Align `Collider` components with `ColliderShape`
- Code clean up and accessibility improvements.

#### Breaking changes

This integration was designed to be backwards compatible, but some changes were necessary to align with the new `ColliderShape`.

- Old `Hull` collider no longer supported, use `convexHull` instead.
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 18, 2026

Deploy Preview for tresjs-lab ready!

Name Link
🔨 Latest commit 28c0bea
🔍 Latest deploy log https://app.netlify.com/projects/tresjs-lab/deploys/69f945b8db3004000865d8b8
😎 Deploy Preview https://deploy-preview-1403--tresjs-lab.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 18, 2026

Deploy Preview for tresjs-docs ready!

Name Link
🔨 Latest commit 28c0bea
🔍 Latest deploy log https://app.netlify.com/projects/tresjs-docs/deploys/69f945b8e25af50008f60486
😎 Deploy Preview https://deploy-preview-1403--tresjs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 18, 2026

Deploy Preview for cientos-tresjs ready!

Name Link
🔨 Latest commit 28c0bea
🔍 Latest deploy log https://app.netlify.com/projects/cientos-tresjs/deploys/69f945b810ba92000811cad2
😎 Deploy Preview https://deploy-preview-1403--cientos-tresjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 1, 2026

Open in StackBlitz

@tresjs/cientos

npm i https://pkg.pr.new/@tresjs/cientos@1403

@tresjs/core

npm i https://pkg.pr.new/@tresjs/core@1403

@tresjs/eslint-config

npm i https://pkg.pr.new/@tresjs/eslint-config@1403

@tresjs/leches

npm i https://pkg.pr.new/@tresjs/leches@1403

@tresjs/nuxt

npm i https://pkg.pr.new/@tresjs/nuxt@1403

@tresjs/post-processing

npm i https://pkg.pr.new/@tresjs/post-processing@1403

commit: 28c0bea

Copy link
Copy Markdown
Member

@JaimeTorrealba JaimeTorrealba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry the delay man, I was busy and this is a BIG PR, I was testing on details, the types, and the behaivor and LGTM, this is an amazing job, you even take the time to improve types and naming, thanks for that.

I got only three comments:

  1. After we merge #1395 I think there will be some conflicts (this is the main reason I don't approve this one right now for me is good to go)
  2. The example of Heightfield is well... useless, I think we can improve this one adding all the new shapes falling to the heightfield or something similar, you know to show the new shapes
  3. There's no docs. I know we discuss about it but fractly the way I see the changes on the docs are all minor (removing the hull, and add the new shapes to the props) I would prefer you doing it here

@Neosoulink
Copy link
Copy Markdown
Member Author

  1. After we merge feat(rapier): contact force #1395 I think there will be some conflicts (this is the main reason I don't approve this one right now for me is good to go)
  2. The example of Heightfield is well... useless, I think we can improve this one adding all the new shapes falling to the heightfield or something similar, you know to show the new shapes
  3. There's no docs. I know we discuss about it but fractly the way I see the changes on the docs are all minor (removing the hull, and add the new shapes to the props) I would prefer you doing it here

No worries @JaimeTorrealba!

  1. No problem, we can merge that PR first. Once merged, I'll resolve conflicts in this PR.
  2. You're right, in the demo, I used a 1x1 heightfield, let me improve it with something more suitable! (from rapier.rs/demos3d)
  3. Alright! I'll also update the Doc and let you know ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants