Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
box2d-native
Advanced tools
Box2D v2.3.1 as native Node.js addon.
Box2D compiled as static library, Node.js C++ addon produced by swig.
Requires curl
, make
, cmake
, g++
. See also requirements for building swig and node-gyp
Install with NPM:
npm install node-gyp -g
npm install box2d-native
IMPORTANT: Installation tested only on Linux with Node.js >= 4.2.1 and gc++ 4.9.
import {World, Vec2, BodyDef, Body} from 'box2d-native';
let world = new World(gravity);
let body = world.CreateBody(new BodyDef());
world.Step(1 / 60, 3, 3);
Original "namespaced" Box2D classes (b2Vec2
, b2World
...) are also exposed.
IMPORTANT: Runs only with Node.js v4.2.1
npm install node-gyp -g
git checkout https://github.com/zuker/box2d-native.git
cd box2d-native/demo
npm install
npm start
Results from bench2d (i7 2.9GHZ, 4GB RAM, Ubuntu 15.04):
box2d.js: ms/frame: 3.5537109375 5th %ile: 3 95th %ile: 4
box2d-native: ms/frame: 1.689453125 5th %ile: 1 95th %ile: 2
FAQs
Box2D as native addon
The npm package box2d-native receives a total of 0 weekly downloads. As such, box2d-native popularity was classified as not popular.
We found that box2d-native demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.