mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Update examples collection
This commit is contained in:
16
emsdk-cache/emsdk-main/bazel/test_external/hello-embind.cc
Normal file
16
emsdk-cache/emsdk-main/bazel/test_external/hello-embind.cc
Normal file
@ -0,0 +1,16 @@
|
||||
#include <emscripten/bind.h>
|
||||
|
||||
using namespace emscripten;
|
||||
|
||||
class HelloClass {
|
||||
public:
|
||||
static std::string SayHello(const std::string &name) {
|
||||
return "Yo! " + name;
|
||||
};
|
||||
};
|
||||
|
||||
EMSCRIPTEN_BINDINGS(Hello) {
|
||||
emscripten::class_<HelloClass>("HelloClass")
|
||||
.constructor<>()
|
||||
.class_function("SayHello", &HelloClass::SayHello);
|
||||
}
|
||||
Reference in New Issue
Block a user