@polygonjs/plugin-physics

    1.0.11 • Public • Published

    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);
    }

    Install

    npm i @polygonjs/plugin-physics

    DownloadsWeekly Downloads

    13

    Version

    1.0.11

    License

    MIT

    Unpacked Size

    10.7 MB

    Total Files

    58

    Last publish

    Collaborators

    • polygonjs