|
|
|
@ -225,28 +225,6 @@ bool js_cocos2dx_spine_SkeletonRenderer_getBlendFunc(JSContext *cx, uint32_t arg
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonRenderer_drawSkeleton(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonRenderer* cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonRenderer_drawSkeleton : Invalid Native Object");
|
|
|
|
|
if (argc == 2) {
|
|
|
|
|
cocos2d::Mat4 arg0;
|
|
|
|
|
unsigned int arg1 = 0;
|
|
|
|
|
ok &= jsval_to_matrix(cx, args.get(0), &arg0);
|
|
|
|
|
ok &= jsval_to_uint32(cx, args.get(1), &arg1);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonRenderer_drawSkeleton : Error processing arguments");
|
|
|
|
|
cobj->drawSkeleton(arg0, arg1);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_drawSkeleton : wrong number of arguments: %d, was expecting %d", argc, 2);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonRenderer_updateWorldTransform(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
@ -491,6 +469,38 @@ bool js_cocos2dx_spine_SkeletonRenderer_getSkeleton(JSContext *cx, uint32_t argc
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_getSkeleton : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonRenderer_drawDebug(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonRenderer* cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonRenderer_drawDebug : Invalid Native Object");
|
|
|
|
|
if (argc == 3) {
|
|
|
|
|
cocos2d::Renderer* arg0 = nullptr;
|
|
|
|
|
cocos2d::Mat4 arg1;
|
|
|
|
|
unsigned int arg2 = 0;
|
|
|
|
|
do {
|
|
|
|
|
if (args.get(0).isNull()) { arg0 = nullptr; break; }
|
|
|
|
|
if (!args.get(0).isObject()) { ok = false; break; }
|
|
|
|
|
js_proxy_t *jsProxy;
|
|
|
|
|
JS::RootedObject tmpObj(cx, args.get(0).toObjectOrNull());
|
|
|
|
|
jsProxy = jsb_get_js_proxy(tmpObj);
|
|
|
|
|
arg0 = (cocos2d::Renderer*)(jsProxy ? jsProxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
|
|
|
|
} while (0);
|
|
|
|
|
ok &= jsval_to_matrix(cx, args.get(1), &arg1);
|
|
|
|
|
ok &= jsval_to_uint32(cx, args.get(2), &arg2);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonRenderer_drawDebug : Error processing arguments");
|
|
|
|
|
cobj->drawDebug(arg0, arg1, arg2);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_drawDebug : wrong number of arguments: %d, was expecting %d", argc, 3);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonRenderer_createWithFile(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
@ -501,8 +511,9 @@ bool js_cocos2dx_spine_SkeletonRenderer_createWithFile(JSContext *cx, uint32_t a
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
std::string arg1;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
spAtlas* arg1 = nullptr;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spAtlas*
|
|
|
|
|
ok = false;
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
spine::SkeletonRenderer* ret = spine::SkeletonRenderer::createWithFile(arg0, arg1);
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
@ -520,8 +531,9 @@ bool js_cocos2dx_spine_SkeletonRenderer_createWithFile(JSContext *cx, uint32_t a
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
std::string arg1;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
spAtlas* arg1 = nullptr;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spAtlas*
|
|
|
|
|
ok = false;
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
double arg2 = 0;
|
|
|
|
|
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2);
|
|
|
|
@ -538,14 +550,27 @@ bool js_cocos2dx_spine_SkeletonRenderer_createWithFile(JSContext *cx, uint32_t a
|
|
|
|
|
}
|
|
|
|
|
} while (0);
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
spine::SkeletonRenderer* ret = spine::SkeletonRenderer::create();
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
|
if (ret) {
|
|
|
|
|
jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<spine::SkeletonRenderer>(cx, (spine::SkeletonRenderer*)ret));
|
|
|
|
|
} else {
|
|
|
|
|
jsret = JSVAL_NULL;
|
|
|
|
|
};
|
|
|
|
|
args.rval().set(jsret);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
} while (0);
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
if (argc == 2) {
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
spAtlas* arg1 = nullptr;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spAtlas*
|
|
|
|
|
ok = false;
|
|
|
|
|
std::string arg1;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
spine::SkeletonRenderer* ret = spine::SkeletonRenderer::createWithFile(arg0, arg1);
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
@ -563,9 +588,8 @@ bool js_cocos2dx_spine_SkeletonRenderer_createWithFile(JSContext *cx, uint32_t a
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
spAtlas* arg1 = nullptr;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spAtlas*
|
|
|
|
|
ok = false;
|
|
|
|
|
std::string arg1;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
double arg2 = 0;
|
|
|
|
|
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2);
|
|
|
|
@ -764,7 +788,6 @@ void js_register_cocos2dx_spine_SkeletonRenderer(JSContext *cx, JS::HandleObject
|
|
|
|
|
JS_FN("setSlotsToSetupPose", js_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setToSetupPose", js_cocos2dx_spine_SkeletonRenderer_setToSetupPose, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("getBlendFunc", js_cocos2dx_spine_SkeletonRenderer_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("drawSkeleton", js_cocos2dx_spine_SkeletonRenderer_drawSkeleton, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("updateWorldTransform", js_cocos2dx_spine_SkeletonRenderer_updateWorldTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("initialize", js_cocos2dx_spine_SkeletonRenderer_initialize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setDebugBonesEnabled", js_cocos2dx_spine_SkeletonRenderer_setDebugBonesEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
@ -774,11 +797,12 @@ void js_register_cocos2dx_spine_SkeletonRenderer(JSContext *cx, JS::HandleObject
|
|
|
|
|
JS_FN("setBlendFunc", js_cocos2dx_spine_SkeletonRenderer_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setSkin", js_cocos2dx_spine_SkeletonRenderer_setSkin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("getSkeleton", js_cocos2dx_spine_SkeletonRenderer_getSkeleton, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("drawDebug", js_cocos2dx_spine_SkeletonRenderer_drawDebug, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FS_END
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static JSFunctionSpec st_funcs[] = {
|
|
|
|
|
JS_FN("create", js_cocos2dx_spine_SkeletonRenderer_createWithFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("create", js_cocos2dx_spine_SkeletonRenderer_createWithFile, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FS_END
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -805,46 +829,72 @@ void js_register_cocos2dx_spine_SkeletonRenderer(JSContext *cx, JS::HandleObject
|
|
|
|
|
JSClass *jsb_spine_SkeletonAnimation_class;
|
|
|
|
|
JSObject *jsb_spine_SkeletonAnimation_prototype;
|
|
|
|
|
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setStartListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : Invalid Native Object");
|
|
|
|
|
if (argc == 1) {
|
|
|
|
|
std::function<void (int)> arg0;
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : Invalid Native Object");
|
|
|
|
|
if (argc == 2) {
|
|
|
|
|
spTrackEntry* arg0 = nullptr;
|
|
|
|
|
std::function<void (int, int)> arg1;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spTrackEntry*
|
|
|
|
|
ok = false;
|
|
|
|
|
do {
|
|
|
|
|
if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION)
|
|
|
|
|
if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION)
|
|
|
|
|
{
|
|
|
|
|
JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
std::shared_ptr<JSFunctionWrapper> func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv()));
|
|
|
|
|
auto lambda = [=](int larg0) -> void {
|
|
|
|
|
std::shared_ptr<JSFunctionWrapper> func(new JSFunctionWrapper(cx, jstarget, args.get(1), args.thisv()));
|
|
|
|
|
auto lambda = [=](int larg0, int larg1) -> void {
|
|
|
|
|
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
|
|
|
|
jsval largv[1];
|
|
|
|
|
jsval largv[2];
|
|
|
|
|
largv[0] = int32_to_jsval(cx, larg0);
|
|
|
|
|
largv[1] = int32_to_jsval(cx, larg1);
|
|
|
|
|
JS::RootedValue rval(cx);
|
|
|
|
|
bool succeed = func->invoke(1, &largv[0], &rval);
|
|
|
|
|
bool succeed = func->invoke(2, &largv[0], &rval);
|
|
|
|
|
if (!succeed && JS_IsExceptionPending(cx)) {
|
|
|
|
|
JS_ReportPendingException(cx);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg0 = lambda;
|
|
|
|
|
arg1 = lambda;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
arg0 = nullptr;
|
|
|
|
|
arg1 = nullptr;
|
|
|
|
|
}
|
|
|
|
|
} while(0)
|
|
|
|
|
;
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : Error processing arguments");
|
|
|
|
|
cobj->setStartListener(arg0);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : Error processing arguments");
|
|
|
|
|
cobj->setTrackCompleteListener(arg0, arg1);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : wrong number of arguments: %d, was expecting %d", argc, 2);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_findAnimation(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : Invalid Native Object");
|
|
|
|
|
if (argc == 1) {
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : Error processing arguments");
|
|
|
|
|
spAnimation* ret = cobj->findAnimation(arg0);
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
|
jsret = spanimation_to_jsval(cx, *ret);
|
|
|
|
|
args.rval().set(jsret);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
@ -893,95 +943,28 @@ bool js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener(JSContext *cx, ui
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener : wrong number of arguments: %d, was expecting %d", argc, 2);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_getState(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_getState : Invalid Native Object");
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
spAnimationState* ret = cobj->getState();
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
|
jsret = spanimationstate_to_jsval(cx, *ret);
|
|
|
|
|
args.rval().set(jsret);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_getState : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setMix(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : Invalid Native Object");
|
|
|
|
|
if (argc == 2) {
|
|
|
|
|
spTrackEntry* arg0 = nullptr;
|
|
|
|
|
std::function<void (int, int)> arg1;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spTrackEntry*
|
|
|
|
|
ok = false;
|
|
|
|
|
do {
|
|
|
|
|
if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION)
|
|
|
|
|
{
|
|
|
|
|
JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
std::shared_ptr<JSFunctionWrapper> func(new JSFunctionWrapper(cx, jstarget, args.get(1), args.thisv()));
|
|
|
|
|
auto lambda = [=](int larg0, int larg1) -> void {
|
|
|
|
|
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
|
|
|
|
jsval largv[2];
|
|
|
|
|
largv[0] = int32_to_jsval(cx, larg0);
|
|
|
|
|
largv[1] = int32_to_jsval(cx, larg1);
|
|
|
|
|
JS::RootedValue rval(cx);
|
|
|
|
|
bool succeed = func->invoke(2, &largv[0], &rval);
|
|
|
|
|
if (!succeed && JS_IsExceptionPending(cx)) {
|
|
|
|
|
JS_ReportPendingException(cx);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg1 = lambda;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
arg1 = nullptr;
|
|
|
|
|
}
|
|
|
|
|
} while(0)
|
|
|
|
|
;
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : Error processing arguments");
|
|
|
|
|
cobj->setTrackCompleteListener(arg0, arg1);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setMix : Invalid Native Object");
|
|
|
|
|
if (argc == 3) {
|
|
|
|
|
std::string arg0;
|
|
|
|
|
std::string arg1;
|
|
|
|
|
double arg2 = 0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setMix : Error processing arguments");
|
|
|
|
|
cobj->setMix(arg0, arg1, arg2);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : wrong number of arguments: %d, was expecting %d", argc, 2);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : Invalid Native Object");
|
|
|
|
|
if (argc == 4) {
|
|
|
|
|
int arg0 = 0;
|
|
|
|
|
spEventType arg1;
|
|
|
|
|
spEvent* arg2 = nullptr;
|
|
|
|
|
int arg3 = 0;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spEvent*
|
|
|
|
|
ok = false;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : Error processing arguments");
|
|
|
|
|
cobj->onTrackEntryEvent(arg0, arg1, arg2, arg3);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : wrong number of arguments: %d, was expecting %d", argc, 4);
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setMix : wrong number of arguments: %d, was expecting %d", argc, 3);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
@ -1029,6 +1012,93 @@ bool js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener(JSContext *cx, ui
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener : wrong number of arguments: %d, was expecting %d", argc, 2);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setEndListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : Invalid Native Object");
|
|
|
|
|
if (argc == 1) {
|
|
|
|
|
std::function<void (int)> arg0;
|
|
|
|
|
do {
|
|
|
|
|
if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION)
|
|
|
|
|
{
|
|
|
|
|
JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
std::shared_ptr<JSFunctionWrapper> func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv()));
|
|
|
|
|
auto lambda = [=](int larg0) -> void {
|
|
|
|
|
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
|
|
|
|
jsval largv[1];
|
|
|
|
|
largv[0] = int32_to_jsval(cx, larg0);
|
|
|
|
|
JS::RootedValue rval(cx);
|
|
|
|
|
bool succeed = func->invoke(1, &largv[0], &rval);
|
|
|
|
|
if (!succeed && JS_IsExceptionPending(cx)) {
|
|
|
|
|
JS_ReportPendingException(cx);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg0 = lambda;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
arg0 = nullptr;
|
|
|
|
|
}
|
|
|
|
|
} while(0)
|
|
|
|
|
;
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : Error processing arguments");
|
|
|
|
|
cobj->setEndListener(arg0);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : Invalid Native Object");
|
|
|
|
|
if (argc == 4) {
|
|
|
|
|
int arg0 = 0;
|
|
|
|
|
spEventType arg1;
|
|
|
|
|
spEvent* arg2 = nullptr;
|
|
|
|
|
int arg3 = 0;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spEvent*
|
|
|
|
|
ok = false;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : Error processing arguments");
|
|
|
|
|
cobj->onAnimationStateEvent(arg0, arg1, arg2, arg3);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : wrong number of arguments: %d, was expecting %d", argc, 4);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_getState(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_getState : Invalid Native Object");
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
spAnimationState* ret = cobj->getState();
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
|
jsret = spanimationstate_to_jsval(cx, *ret);
|
|
|
|
|
args.rval().set(jsret);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_getState : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_update(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
@ -1049,6 +1119,49 @@ bool js_cocos2dx_spine_SkeletonAnimation_update(JSContext *cx, uint32_t argc, js
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_update : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setEventListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : Invalid Native Object");
|
|
|
|
|
if (argc == 1) {
|
|
|
|
|
std::function<void (int, spEvent *)> arg0;
|
|
|
|
|
do {
|
|
|
|
|
if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION)
|
|
|
|
|
{
|
|
|
|
|
JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
std::shared_ptr<JSFunctionWrapper> func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv()));
|
|
|
|
|
auto lambda = [=](int larg0, spEvent* larg1) -> void {
|
|
|
|
|
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
|
|
|
|
jsval largv[2];
|
|
|
|
|
largv[0] = int32_to_jsval(cx, larg0);
|
|
|
|
|
largv[1] = spevent_to_jsval(cx, *larg1);
|
|
|
|
|
JS::RootedValue rval(cx);
|
|
|
|
|
bool succeed = func->invoke(2, &largv[0], &rval);
|
|
|
|
|
if (!succeed && JS_IsExceptionPending(cx)) {
|
|
|
|
|
JS_ReportPendingException(cx);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg0 = lambda;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
arg0 = nullptr;
|
|
|
|
|
}
|
|
|
|
|
} while(0)
|
|
|
|
|
;
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : Error processing arguments");
|
|
|
|
|
cobj->setEventListener(arg0);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setCompleteListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
@ -1092,6 +1205,90 @@ bool js_cocos2dx_spine_SkeletonAnimation_setCompleteListener(JSContext *cx, uint
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setCompleteListener : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_clearTrack(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : Invalid Native Object");
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
cobj->clearTrack();
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (argc == 1) {
|
|
|
|
|
int arg0 = 0;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : Error processing arguments");
|
|
|
|
|
cobj->clearTrack(arg0);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_initialize(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_initialize : Invalid Native Object");
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
cobj->initialize();
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_initialize : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : Invalid Native Object");
|
|
|
|
|
if (argc == 4) {
|
|
|
|
|
int arg0 = 0;
|
|
|
|
|
spEventType arg1;
|
|
|
|
|
spEvent* arg2 = nullptr;
|
|
|
|
|
int arg3 = 0;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spEvent*
|
|
|
|
|
ok = false;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : Error processing arguments");
|
|
|
|
|
cobj->onTrackEntryEvent(arg0, arg1, arg2, arg3);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : wrong number of arguments: %d, was expecting %d", argc, 4);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_clearTracks(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTracks : Invalid Native Object");
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
cobj->clearTracks();
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_clearTracks : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
@ -1137,81 +1334,14 @@ bool js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener(JSContext *cx, uint
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener : wrong number of arguments: %d, was expecting %d", argc, 2);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setEventListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setStartListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : Invalid Native Object");
|
|
|
|
|
if (argc == 1) {
|
|
|
|
|
std::function<void (int, spEvent *)> arg0;
|
|
|
|
|
do {
|
|
|
|
|
if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION)
|
|
|
|
|
{
|
|
|
|
|
JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
std::shared_ptr<JSFunctionWrapper> func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv()));
|
|
|
|
|
auto lambda = [=](int larg0, spEvent* larg1) -> void {
|
|
|
|
|
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
|
|
|
|
jsval largv[2];
|
|
|
|
|
largv[0] = int32_to_jsval(cx, larg0);
|
|
|
|
|
largv[1] = spevent_to_jsval(cx, *larg1);
|
|
|
|
|
JS::RootedValue rval(cx);
|
|
|
|
|
bool succeed = func->invoke(2, &largv[0], &rval);
|
|
|
|
|
if (!succeed && JS_IsExceptionPending(cx)) {
|
|
|
|
|
JS_ReportPendingException(cx);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg0 = lambda;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
arg0 = nullptr;
|
|
|
|
|
}
|
|
|
|
|
} while(0)
|
|
|
|
|
;
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : Error processing arguments");
|
|
|
|
|
cobj->setEventListener(arg0);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setMix(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setMix : Invalid Native Object");
|
|
|
|
|
if (argc == 3) {
|
|
|
|
|
std::string arg0;
|
|
|
|
|
std::string arg1;
|
|
|
|
|
double arg2 = 0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setMix : Error processing arguments");
|
|
|
|
|
cobj->setMix(arg0, arg1, arg2);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setMix : wrong number of arguments: %d, was expecting %d", argc, 3);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_setEndListener(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : Invalid Native Object");
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : Invalid Native Object");
|
|
|
|
|
if (argc == 1) {
|
|
|
|
|
std::function<void (int)> arg0;
|
|
|
|
|
do {
|
|
|
|
@ -1237,97 +1367,13 @@ bool js_cocos2dx_spine_SkeletonAnimation_setEndListener(JSContext *cx, uint32_t
|
|
|
|
|
}
|
|
|
|
|
} while(0)
|
|
|
|
|
;
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : Error processing arguments");
|
|
|
|
|
cobj->setEndListener(arg0);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : Error processing arguments");
|
|
|
|
|
cobj->setStartListener(arg0);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_initialize(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_initialize : Invalid Native Object");
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
cobj->initialize();
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_initialize : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_clearTracks(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTracks : Invalid Native Object");
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
cobj->clearTracks();
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_clearTracks : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_clearTrack(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : Invalid Native Object");
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
cobj->clearTrack();
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (argc == 1) {
|
|
|
|
|
int arg0 = 0;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : Error processing arguments");
|
|
|
|
|
cobj->clearTrack(arg0);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
|
{
|
|
|
|
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
|
|
|
|
bool ok = true;
|
|
|
|
|
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
|
|
|
|
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
|
|
|
|
spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL);
|
|
|
|
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : Invalid Native Object");
|
|
|
|
|
if (argc == 4) {
|
|
|
|
|
int arg0 = 0;
|
|
|
|
|
spEventType arg1;
|
|
|
|
|
spEvent* arg2 = nullptr;
|
|
|
|
|
int arg3 = 0;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1);
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spEvent*
|
|
|
|
|
ok = false;
|
|
|
|
|
ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3);
|
|
|
|
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : Error processing arguments");
|
|
|
|
|
cobj->onAnimationStateEvent(arg0, arg1, arg2, arg3);
|
|
|
|
|
args.rval().setUndefined();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : wrong number of arguments: %d, was expecting %d", argc, 4);
|
|
|
|
|
JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t argc, jsval *vp)
|
|
|
|
@ -1340,8 +1386,9 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
std::string arg1;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
spAtlas* arg1 = nullptr;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spAtlas*
|
|
|
|
|
ok = false;
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithFile(arg0, arg1);
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
@ -1359,8 +1406,9 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
std::string arg1;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
spAtlas* arg1 = nullptr;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spAtlas*
|
|
|
|
|
ok = false;
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
double arg2 = 0;
|
|
|
|
|
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2);
|
|
|
|
@ -1377,14 +1425,27 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t
|
|
|
|
|
}
|
|
|
|
|
} while (0);
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
if (argc == 0) {
|
|
|
|
|
spine::SkeletonAnimation* ret = spine::SkeletonAnimation::create();
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
|
if (ret) {
|
|
|
|
|
jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<spine::SkeletonAnimation>(cx, (spine::SkeletonAnimation*)ret));
|
|
|
|
|
} else {
|
|
|
|
|
jsret = JSVAL_NULL;
|
|
|
|
|
};
|
|
|
|
|
args.rval().set(jsret);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
} while (0);
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
if (argc == 2) {
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
spAtlas* arg1 = nullptr;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spAtlas*
|
|
|
|
|
ok = false;
|
|
|
|
|
std::string arg1;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithFile(arg0, arg1);
|
|
|
|
|
jsval jsret = JSVAL_NULL;
|
|
|
|
@ -1402,9 +1463,8 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t
|
|
|
|
|
std::string arg0;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
spAtlas* arg1 = nullptr;
|
|
|
|
|
#pragma warning NO CONVERSION TO NATIVE FOR spAtlas*
|
|
|
|
|
ok = false;
|
|
|
|
|
std::string arg1;
|
|
|
|
|
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
|
|
|
|
if (!ok) { ok = true; break; }
|
|
|
|
|
double arg2 = 0;
|
|
|
|
|
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2);
|
|
|
|
@ -1717,28 +1777,29 @@ void js_register_cocos2dx_spine_SkeletonAnimation(JSContext *cx, JS::HandleObjec
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static JSFunctionSpec funcs[] = {
|
|
|
|
|
JS_FN("setStartListener", js_cocos2dx_spine_SkeletonAnimation_setStartListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setTrackEventListener", js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("getState", js_cocos2dx_spine_SkeletonAnimation_getState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setTrackCompleteListener", js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("onTrackEntryEvent", js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setTrackStartListener", js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("update", js_cocos2dx_spine_SkeletonAnimation_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setCompleteListener", js_cocos2dx_spine_SkeletonAnimation_setCompleteListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setTrackEndListener", js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setEventListener", js_cocos2dx_spine_SkeletonAnimation_setEventListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("findAnimation", js_cocos2dx_spine_SkeletonAnimation_findAnimation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setTrackEventListener", js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setMix", js_cocos2dx_spine_SkeletonAnimation_setMix, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setTrackStartListener", js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setEndListener", js_cocos2dx_spine_SkeletonAnimation_setEndListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("initialize", js_cocos2dx_spine_SkeletonAnimation_initialize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("clearTracks", js_cocos2dx_spine_SkeletonAnimation_clearTracks, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("clearTrack", js_cocos2dx_spine_SkeletonAnimation_clearTrack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("onAnimationStateEvent", js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("getState", js_cocos2dx_spine_SkeletonAnimation_getState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("update", js_cocos2dx_spine_SkeletonAnimation_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setEventListener", js_cocos2dx_spine_SkeletonAnimation_setEventListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setCompleteListener", js_cocos2dx_spine_SkeletonAnimation_setCompleteListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("clearTrack", js_cocos2dx_spine_SkeletonAnimation_clearTrack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("initialize", js_cocos2dx_spine_SkeletonAnimation_initialize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("onTrackEntryEvent", js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("clearTracks", js_cocos2dx_spine_SkeletonAnimation_clearTracks, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setTrackEndListener", js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("setStartListener", js_cocos2dx_spine_SkeletonAnimation_setStartListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("ctor", js_cocos2dx_spine_SkeletonAnimation_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FS_END
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static JSFunctionSpec st_funcs[] = {
|
|
|
|
|
JS_FN("create", js_cocos2dx_spine_SkeletonAnimation_createWithFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FN("create", js_cocos2dx_spine_SkeletonAnimation_createWithFile, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
|
|
|
JS_FS_END
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|