dorkhub

THREE-XPBD

XPBD physics in THREE.js

markeasting
TypeScript584 forksMITupdated 1 year ago
visit the demogit clone https://github.com/markeasting/THREE-XPBD.gitmarkeasting/THREE-XPBD

THREE.js feat. XPBD physics 🌈

Based on Extended Position Based Dynamics by Matthias Müller.

Refer to the docs directory to view the papers and source code used in this project.

Demo: https://markeasting.github.io/three/

Development

npm install - Install dependencies

npm run dev - Runs the local dev server

npm run build - Build the project

Features

Core

  • XPBD update loop
  • XPBD World / body manager
  • Rigid bodies
  • Body 'sleep' feature
  • applyForce()
  • applyTorque()

Collision solver

  • Penetration
  • Surface properties: friction & restitution
  • Broad phase (AABB)
  • Narrow phase (GJK / EPA)
  • Convex hull generation
  • Contact manifold generation / clipping algorithm
  • Broad phase (sorting algorithm)
  • Broad phase (spatial subdivision / octree)
  • Narrow phase (optimized primitives: spheres, capsules)
  • Object pool for Vec3 instances

Constraints

  • Basic constraint
  • Mouse picking/dragging
  • Calculate constraint force
  • Damping
  • Swing / twist limits

more like this

lottery

🎉🌟✨🎈年会抽奖程序,基于 Express + Three.js的 3D 球体抽奖程序,奖品🧧🎁,文字,图片,抽奖规则均可配置,😜抽奖人员信息Excel一键导入😍,抽奖结果Excel导出😎,给你的抽奖活动带来全新酷炫体验🚀🚀🚀

JavaScript4.6k

BubbleML

A multiphase multiphysics dataset and benchmarks for scientific machine learning

Python50

search

search projects, people, and tags