Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <emscripten/bind.h>
- // Bring Emscripten namespace into scope for the sake of readability
- using namespace emscripten;
- // Method being exported to JS
- float lerp(float a, float b, float t)
- {
- return (1 - t) * a + t * b;
- }
- // Embind Block that registers the 'lerp()' method under the group 'Module'
- EMSCRIPTEN_BINDINGS(Module) {
- function("lerp", &lerp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement