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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ubii-web-ik-force-computation

v0.0.7

Published

Receives Inverse Kinematics targets and current pose data and publishes required forces for physical avatar

Downloads

3

Readme

ubii-web-ik-force-computation

Ubi-Interact Inverse Kinematics and force computation for web browsers. This is a necessary step in physical embodiment scenarios, where users are represented virtually through a physical avatar.

Usage

Ubii-web-ik-force-computation can be used either as a standalone demo or as a node module in Your own applications.

Prerequisites

This project communicates with a Ubi-Interact master node. Even though some of the functionality can be tested without it, it is recommended to have one.

To calculate a full pose using inverse kinematics, this module receives IK targets from another Ubi-Interact component. ubii-web-target-publisher simplifies the process of publishing targets using abstractions similar to the ones in this module.

To calculate the necessary forces and applying them to a physical avatar, this module needs to communicate with other Ubi-Interact components. ubii-web-avatar-applier simplifies this process using similar abstractions to this module as well.

Online Demo

The demo in this project is available at https://goldst.dev/ubii-web-ik-force-computation.

Running the demo locally

After cloning, install, and run the project:

npm install
npm start

Your terminal will contain the demo URL, e.g. http://localhost:8080. Note that the command starts a development server which is not suitable for production environments.

Using this project as a node module

To your existing node project, add the module:

npm i ubii-web-ik-force-computation

You can either initialize the processor in HTML using the bundled version:

<script src=".node_modules/ubii-web-ik-force-computation/dist/bundle.js"></script>

<script>
    new UbiiWebIkForceComputation.Processor(options);
</script>

Or you can import it directly in your JavaScript/TypeScript project:

import { Processor } from 'ubii-web-ik-force-computation';

new Processor(options);

For available options, see ProcessorOptions.ts.

That's it! Other than supplying the options, no further configuration is necessary. If you want to stop the processor, just call stop() on the processor object.

Technical Details

The general structure of this project is similar to ubii-web-target-publisher and ubii-web-avatar-applier, however, it is somewhat more complex:

The Processor either directly (useDevice===true) or indirectly (false) creates an instance of HumanIK, a class which sets up bones and constraints using IK.ts and calculates them on demand. ik.ts is very constrained in the amount and kind of constraints it offers, thus, the human pose will not be completely realistic.

When useDevice is false (default setting), this module creates a processing module, which is doing the same thing, but has more potential for optimization. With some changes, it may run in a separate thread. The code for processing modules (folders devices, nodes, processing with the exception of processing/ProcessingModuleAvatarMotionControls.ts, storage) is taken from ubii-node-nodejs, and only slightly modified – very generous broad were added so that it works with TypeScript, and some lines of code were changed to ensure compatibility with ubii-node-webbrowser.

License and Credits

MIT