Skip to content
This repository was archived by the owner on Oct 3, 2022. It is now read-only.
/ plugin-physics Public archive

Physics plugin to animate rigid bodies for the webgl engine Polygonjs

License

Notifications You must be signed in to change notification settings

polygonjs/plugin-physics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

55a7d93 · Oct 2, 2022

History

51 Commits
Jan 28, 2021
Apr 27, 2022
Apr 27, 2022
Dec 30, 2020
Dec 30, 2020
Jan 28, 2021
Jan 28, 2021
Dec 30, 2020
Dec 30, 2020
Oct 2, 2022
Apr 27, 2022
Jan 25, 2022
Apr 27, 2022

Repository files navigation

RETIRED

This repository is not used anymore, as the physics has been fully integrated into the core engine and source

Polygonjs Physics Plugin

This adds several nodes to handle physics in the Polygonjs webgl engine.

  • Sop/PhysicsSolver: computes the input geometries and attributes and solves the simulation at every frame
  • Sop/PhysicsRbdAttributes: creates attributes necessary for rigid body simulations
  • Sop/PhysicsForceAttributes: creates attributes to define forces

This is currently using Ammo from https://github.com/giniedp/ammojs-typed.

See example scene:

scene with physics

Install

Import the plugin:

yarn add @polygonjs/plugin-physics

And register the plugin in the function configurePolygonjs in the file PolyConfig.js so that the physics nodes can be accessible in both the editor and your exported scene:

import {polyPluginPhysics} from '@polygonjs/plugin-physics/dist/src/index';

export function configurePolygonjs(poly) {
	poly.registerPlugin(polyPluginPhysics);
}

About

Physics plugin to animate rigid bodies for the webgl engine Polygonjs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published