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

behavior-tree-flat-buffer

v0.9.7

Published

Wrapper around BehaviorTree.CPP (in WASM) for the purpose of writing FlatBuffers

Downloads

7

Readme

Build Status npm version

BehaviorTreeFlatBuffer

A wrapper for BehaviorTree.CPP for the purpose of writing FlatBuffers. Pass a javascript callback and a valid Groot xml file. A log in FlatBuffer format will be written via the callback in Int8Array Buffers.

Dependencies

  • emscripten compiler (I'm using) 1.39.11
  • https://github.com/BehaviorTree/BehaviorTree.CPP (included via submodule)

Publish notes to myself

  • Publish with:
nvm use 14
source emsdk/emsdk_env.sh
make wasm build
npm publish

Quirks about WASM

  • Not sure if I know how to shutdown the wasm properly. It may be better to only have one instance
    • This stems from how I am including the .js file output by emscripten. Not sure how to fix this.
  • My test has the wasm file in the path of /out where it is built, but publish requires a different path
    • Thus I patch the .js file

Quirks about wrapper

  • BehaviorTree.CPP is well written and throws many errors during the operations I need. Thus I patched out some error checking. I generated the patch with:
cd lib/BehaviorTree.CPP/src
diff xml_parsing.cpp xml_parsing2.cpp > ../../../patch/xml_parsing.patch

or

cd lib/BehaviorTree.CPP/src
cp tree_node.cpp tree_node2.cpp
git checkout tree_node.cpp
diff tree_node.cpp tree_node2.cpp > ../../../patch/tree_node.patch

See Also Emscripten

  • https://github.com/Planeshifter/emscripten-examples/tree/master/01_PassingArrays Arrays js->C
  • https://stackoverflow.com/questions/28904273/struct-operations-in-javascript-through-emscripten Arrays c->js
  • https://stackoverflow.com/questions/47248045/webassembly-calling-javascript-methods-from-wasm-i-e-within-c-code Arrays c->js
  • https://stackoverflow.com/questions/55446258/emscripten-pass-uint8-t-array-to-javascript Arrays c->js
  • https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#calling-javascript-functions-as-function-pointers-from-c Types for c->js

See Also Make/patch

  • https://stackoverflow.com/questions/7394290/how-to-check-return-value-from-the-shell-directive deal with exit codes from make
  • https://unix.stackexchange.com/questions/55780/check-if-a-file-or-folder-has-been-patched-already only patch if not patched