What is verb?
verb provides advanced tools like derivative evaluation, adaptive tessellation, and intersection. Verb provides a concurrent execution runtime via WebWorkers in modern browsers and thread pools on other platforms and is suitable for use in a datacenter or in the browser.
verb is not a graphics library. It nicely compliments web graphics libraries like three.js, but is happy to live without one.
How is verb organized?
The library is split into four parts:
- verb.geom - Geometric types that make it easy to work with NURBS. Includes many commonly used curve and surface types.
- verb.core - Mathematical and geometric utilities that are shared throughout the library.
- verb.eval - Fundamental NURBS algorithms for evaluation, intersection, analysis, and more.
- verb.exe - Tools for managing multi-core evaluation on different platforms.
Most people should just use verb.geom. The other parts provide more powerful features and more direct access to core parts of the library.
verb compiles for:
You should have installed haxe 3.2.1 and node.js 4.2.1. If you're using OS X, ensure that you have installed XCode 7.
Install node.js dependencies:
Install haxe dependencies:
haxelib install promhx
npm install -g grunt-cli
You can install verb with npm
npm install verb-nurbs
You can use verb with require.js (AMD) or browserify (commonjs) in the browser or in node.js.
You'll find many usage examples in the examples directory.
Run all unit tests:
Compiling for C#
haxelib install hxcs
Output goes to build/cs.
Compiling for C++
haxelib install hxcpp
Output goes to build/cpp.
Compiling for Python
Make sure python is installed.
Output goes to build/verb.py
Compiling for PHP
Output goes to build/php
Compiling for other platforms
Haxe compiles for other platforms, including Flash and Neko. I have not tried to compile for these platforms - would you like to contribute?
Compiling for Java
verb does not currently compile for Java. It probably wouldn't be hard to do - would you like to contribute?
Using verb with three.js
You can find good examples of using verb with three in the examples directory. There's an example code showing how to convert verb geometric types in to three.js Meshes and Lines in the verb examples.