Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngraph.physics.primitives

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngraph.physics.primitives

Physics primitives for ngraph.* libraries

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by48.16%
Maintainers
1
Weekly downloads
 
Created
Source

ngraph.physics.primitives

Module with basic 2d and 3d physics primitives for ngraph. It defines interface for physical bodies, used in n-body simulation.

build status Examples

var physics = requrie('ngraph.physics.primitives');

var body = new physics.Body(); // create a new 2d body
console.dir(body.force); //  prints force value acting on this body
console.dir(body.pos);   // prints body's position in 2d space
console.log(body.mass);  // prints 1. Bodies should have a mass

var direction = new physics.Vector2d(); // create a 2d vector
console.log(direction.x, direction.y); // prints 0, 0

var spaceDirection = new physics.Vector3d(); // create a 3d vector
console.log(spaceDirection.x, spaceDirection.y, spaceDirection.z); // prints 0, 0, 0

Install

npm install ngraph.physics.primitives

Why?

I created this module to declare clear interface for expected bodies in N-Body force simulation. You don't have to use it, as long as your body object have the same properties as described here.

Keywords

FAQs

Package last updated on 19 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc