npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cooljapan/oxiphysics

v0.1.2

Published

WebAssembly bindings for the OxiPhysics engine

Readme

oxiphysics-wasm

Status: Stable (v0.1.2)

Full wasm-bindgen 0.2 bindings: 929 #[wasm_bindgen] annotations across 27 bridge files exposing the entire physics surface to JavaScript. Build via cargo build --target wasm32-unknown-unknown -p oxiphysics-wasm, then run wasm-bindgen / wasm-pack over the resulting artifact for JS glue generation.

WebAssembly frontend layer for the OxiPhysics engine.
Version: 0.1.2 | Updated: 2026-06-06


Architecture

This crate provides a self-contained physics engine annotated with #[wasm_bindgen] for direct JavaScript interop. It does not depend on any other oxiphysics-* crate — all engine logic is embedded here. The crate compiles cleanly to wasm32-unknown-unknown and exposes a flat, JS-friendly API surface (primitive arguments, flat-array returns, no Rust references across the boundary).


Quick start (JavaScript)

import init, {
    WasmPhysicsEngine,
    WasmDebugDraw,
    WasmWorld,
} from "./pkg/oxiphysics_wasm.js";

await init();

// Create an engine with Earth gravity.
const engine = new WasmPhysicsEngine(0.0, -9.81, 0.0);

// Add a 1 kg sphere at height 10 m.
const ball = engine.add_dynamic_body(1.0, 0.0, 10.0, 0.0);
engine.add_sphere_collider(ball, 0.5);

// Add a static ground plane at y=0.
const ground = engine.add_static_body(0.0, 0.0, 0.0);
engine.add_plane_collider(ground, 0.0, 1.0, 0.0, 0.0);

// Simulate for one second (with internal substeps).
engine.step(1.0);

const [x, y, z] = engine.get_position(ball);
console.log(`Ball fell to y=${y.toFixed(3)}`);

Public API Surface

929 #[wasm_bindgen] annotations · ~27k Rust SLoC · 922 host tests · 0 stubs

Modules

| Module | Description | |---|---| | analytics_bridge | Performance metrics and analytics export | | body_query | Query API for rigid body state | | constraint_bridge | Constraint/joint configuration bridge | | debug_tools | Debug info extraction and inspection | | engine | Core simulation engine (submodules: step, state, world, …) | | error | Error and Result types | | events | Collision/sensor event queue | | fluid_bridge | SPH/LBM fluid state bridge | | io_bridge | Scene serialization in/out | | js_api | JavaScript-facing API surface (future #[wasm_bindgen] targets) | | material_bridge | Material parameter bridge | | math_helpers | WASM-friendly math utilities (submodules) | | particle_system | Particle update and management | | physics_config | Global simulation configuration | | renderer | Render data extraction for WebGL | | sim_controls | Play/pause/reset/step controls | | simulation_api | Top-level simulation entry points | | types | Shared primitive types |

Key exported types

WasmPhysicsEngine, Error, Result;
BodyState, ColliderConfig, ColliderShapeType, ContactResult, DebugInfo, QuatWasm, RaycastResult, RigidBodyConfig, SimulationConfig, TransformWasm, Vec3Wasm


Roadmap

| Milestone | Target | |---|---| | Self-contained engine + web API complete | ✅ 0.1.0 | | wasm-bindgen #[wasm_bindgen] annotation pass | ✅ 0.1.1 | | wasm-pack / wasm-bindgen-cli build pipeline | 🔲 0.2.0 | | npm package publish | 🔲 0.2.0 | | WGPU/WebGL render integration | 🔲 0.3.0 |


License

Apache-2.0 — Copyright 2026 COOLJAPAN OU (Team Kitasan)