mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1630 from dumganhar/iss1564-update-tests
issue #1564: Made ChipmunkTest of TestJavascript works
This commit is contained in:
commit
b79b3335bd
|
@ -77,7 +77,6 @@ public:
|
|||
ccBlendFunc getBlendFunc() const;
|
||||
void setBlendFunc(const ccBlendFunc &blendFunc);
|
||||
|
||||
protected:
|
||||
CCDrawNode();
|
||||
|
||||
private:
|
||||
|
|
|
@ -218,6 +218,16 @@ CCPhysicsDebugNode::~CCPhysicsDebugNode()
|
|||
{
|
||||
}
|
||||
|
||||
cpSpace* CCPhysicsDebugNode::getSpace() const
|
||||
{
|
||||
return m_pSpacePtr;
|
||||
}
|
||||
|
||||
void CCPhysicsDebugNode::setSpace(cpSpace *space)
|
||||
{
|
||||
m_pSpacePtr = space;
|
||||
}
|
||||
|
||||
NS_CC_EXT_END
|
||||
|
||||
#endif // CC_ENABLE_CHIPMUNK_INTEGRATION
|
||||
|
|
|
@ -58,7 +58,6 @@ public:
|
|||
cpSpace* getSpace() const;
|
||||
void setSpace(cpSpace *space);
|
||||
|
||||
protected:
|
||||
CCPhysicsDebugNode();
|
||||
};
|
||||
|
||||
|
|
|
@ -341,6 +341,29 @@ cc.LabelAtlas.create = function( a,b,c,d,e ) {
|
|||
}
|
||||
};
|
||||
|
||||
// PhysicsDebugNode
|
||||
cc.PhysicsDebugNode.create = function( space ) {
|
||||
var s = space;
|
||||
if( space.handle !== undefined )
|
||||
s = space.handle;
|
||||
return cc.PhysicsDebugNode._create( s );
|
||||
};
|
||||
cc.PhysicsDebugNode.prototype.setSpace = function( space ) {
|
||||
var s = space;
|
||||
if( space.handle !== undefined )
|
||||
s = space.handle;
|
||||
return this._setSpace( s );
|
||||
};
|
||||
|
||||
// PhysicsSprite
|
||||
cc.PhysicsSprite.prototype.setBody = function( body ) {
|
||||
var b = body;
|
||||
if( body.handle !== undefined )
|
||||
b = body.handle;
|
||||
return this._setBody( b );
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Associates a base class with a native superclass
|
||||
* @function
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f184c9ce002b7f4e2c21acdda145ca35c34e72a4
|
||||
Subproject commit 084a9547052542a068bd8f2548160a94e238897e
|
|
@ -180,9 +180,7 @@ xcopy "$(ProjectDir)..\cocos2d-js-tests\src" "$(OutDir)\TestJavascriptRes\src\"
|
|||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_auto_classes.h" />
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_auto_classes_registration.h" />
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_functions.h" />
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_functions.hpp" />
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_manual.h" />
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_manual.hpp" />
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_registration.h" />
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_config.h" />
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_core.h" />
|
||||
|
|
|
@ -90,15 +90,9 @@
|
|||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_functions.h">
|
||||
<Filter>bindings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_functions.hpp">
|
||||
<Filter>bindings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_manual.h">
|
||||
<Filter>bindings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_manual.hpp">
|
||||
<Filter>bindings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\scripting\javascript\bindings\js_bindings_chipmunk_registration.h">
|
||||
<Filter>bindings</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -1286,7 +1286,7 @@ JSBool js_BezierActions_create(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
config.controlPoint_2 = arr[1];
|
||||
config.endPosition = arr[2];
|
||||
|
||||
CCBezierBy* ret = CCBezierBy::create(t, config);
|
||||
T* ret = T::create(t, config);
|
||||
|
||||
free(arr);
|
||||
|
||||
|
@ -1299,7 +1299,7 @@ JSBool js_BezierActions_create(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
jsret = OBJECT_TO_JSVAL(p->obj);
|
||||
} else {
|
||||
// create a new js obj of that class
|
||||
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::CCBezierBy>(cx, ret);
|
||||
js_proxy_t *proxy = js_get_or_create_proxy<T>(cx, ret);
|
||||
jsret = OBJECT_TO_JSVAL(proxy->obj);
|
||||
}
|
||||
} else {
|
||||
|
@ -1815,7 +1815,7 @@ extern JSObject* js_cocos2dx_CCCardinalSplineBy_prototype;
|
|||
extern JSObject* js_cocos2dx_CCBezierTo_prototype;
|
||||
extern JSObject* js_cocos2dx_CCBezierBy_prototype;
|
||||
extern JSObject* js_cocos2dx_CCScheduler_prototype;
|
||||
extern JSObject* js_cocos2dx_CCTMXLayer_prototype;
|
||||
extern JSObject* js_cocos2dx_CCDrawNode_prototype;
|
||||
|
||||
|
||||
// setBlendFunc
|
||||
|
@ -1877,10 +1877,14 @@ JSBool js_cocos2dx_CCParticleSystem_setBlendFunc(JSContext *cx, uint32_t argc, j
|
|||
return js_cocos2dx_setBlendFunc<CCParticleSystem>(cx, argc, vp);
|
||||
}
|
||||
|
||||
JSBool js_cocos2dx_CCDrawNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
return js_cocos2dx_setBlendFunc<CCDrawNode>(cx, argc, vp);
|
||||
}
|
||||
|
||||
// CCTMXLayer
|
||||
JSBool js_cocos2dx_CCTMXLayer_getTileFlagsAt(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
|
||||
jsval *argv = JS_ARGV(cx, vp);
|
||||
JSObject *obj;
|
||||
CCTMXLayer* cobj;
|
||||
|
@ -1901,6 +1905,65 @@ JSBool js_cocos2dx_CCTMXLayer_getTileFlagsAt(JSContext *cx, uint32_t argc, jsval
|
|||
return JS_FALSE;
|
||||
}
|
||||
|
||||
//#pragma mark - CCDrawNode
|
||||
|
||||
// Arguments: Array of points, fill color (ccc4f), width(float), border color (ccc4f)
|
||||
// Ret value: void
|
||||
JSBool js_cocos2dx_CCDrawNode_drawPolygon(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSObject* obj = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj);
|
||||
CCDrawNode* cobj = (CCDrawNode*)(proxy ? proxy->ptr : NULL);
|
||||
TEST_NATIVE_OBJECT(cx, cobj)
|
||||
|
||||
if ( argc == 4) {
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
JSObject *argArray; ccColor4F argFillColor; double argWidth; ccColor4F argBorderColor;
|
||||
|
||||
ok &= JS_ValueToObject(cx, *argvp++, &argArray);
|
||||
if( ! (argArray && JS_IsArrayObject(cx, argArray) ) )
|
||||
return JS_FALSE;
|
||||
|
||||
JSObject *tmp_arg;
|
||||
ok &= JS_ValueToObject( cx, *argvp++, &tmp_arg );
|
||||
argFillColor = *(ccColor4F*)JS_GetArrayBufferViewData( tmp_arg, cx );
|
||||
|
||||
ok &= JS_ValueToNumber( cx, *argvp++, &argWidth );
|
||||
|
||||
ok &= JS_ValueToObject( cx, *argvp++, &tmp_arg );
|
||||
argBorderColor = *(ccColor4F*)JS_GetArrayBufferViewData( tmp_arg, cx );
|
||||
|
||||
if( ! ok )
|
||||
return JS_FALSE;
|
||||
|
||||
{
|
||||
uint32_t l;
|
||||
if( ! JS_GetArrayLength(cx, argArray, &l) )
|
||||
return JS_FALSE;
|
||||
|
||||
CCPoint* verts = new CCPoint[ l ];
|
||||
CCPoint p;
|
||||
|
||||
for( int i=0; i<l; i++ ) {
|
||||
jsval pointvp;
|
||||
if( ! JS_GetElement(cx, argArray, i, &pointvp) )
|
||||
return JS_FALSE;
|
||||
p = jsval_to_ccpoint(cx, pointvp);
|
||||
|
||||
verts[i] = p;
|
||||
}
|
||||
|
||||
cobj->drawPolygon(verts, l, argFillColor, argWidth, argBorderColor);
|
||||
CC_SAFE_DELETE_ARRAY(verts);
|
||||
}
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 4);
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
void register_cocos2dx_js_extensions(JSContext* cx, JSObject* global)
|
||||
{
|
||||
|
@ -1946,6 +2009,9 @@ void register_cocos2dx_js_extensions(JSContext* cx, JSObject* global)
|
|||
|
||||
JS_DefineFunction(cx, js_cocos2dx_CCTMXLayer_prototype, "getTileFlagsAt", js_cocos2dx_CCTMXLayer_getTileFlagsAt, 1, JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
|
||||
JS_DefineFunction(cx, js_cocos2dx_CCDrawNode_prototype, "drawPoly", js_cocos2dx_CCDrawNode_drawPolygon, 4, JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
JS_DefineFunction(cx, js_cocos2dx_CCDrawNode_prototype, "setBlendFunc", js_cocos2dx_CCDrawNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
|
||||
tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.BezierBy; })()"));
|
||||
JS_DefineFunction(cx, tmpObj, "create", JSB_CCBezierBy_actionWithDuration, 2, JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
|
||||
|
|
|
@ -1,286 +0,0 @@
|
|||
//
|
||||
// Created by Rohan Kuruvilla
|
||||
// Copyright (c) 2012 Zynga Inc. All rights reserved.
|
||||
//
|
||||
#ifndef __JS_BINDINGS_CHIPMUNK_FUNCTIONS_HPP__
|
||||
#define __JS_BINDINGS_CHIPMUNK_FUNCTIONS_HPP__
|
||||
|
||||
JSBool JSPROXY_cpArbiterGetCount(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterGetDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterGetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterGetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterGetNormal(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterGetPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterGetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterIgnore(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterIsFirstContact(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterSetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterSetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterSetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterTotalImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterTotalImpulseWithFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterTotalKE(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpAreaForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpAreaForSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBArea(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBClampVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBContainsBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBContainsVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBExpand(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBIntersects(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBIntersectsSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBMerge(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBMergedArea(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBNewForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBSegmentQuery(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBBWrapVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyActivate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyActivateStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyAlloc(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyApplyForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyApplyImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetAngVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetAngVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetMass(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetMoment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetPos(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetRot(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetTorque(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetVelAtLocalPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetVelAtWorldPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyInit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyInitStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyIsRogue(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyIsSleeping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyIsStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyKineticEnergy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyLocal2World(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyNewStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyResetForces(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetAngVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetAngVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetMass(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetMoment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetPos(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetTorque(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySetVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySleep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodySleepWithGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyUpdatePosition(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyUpdateVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyWorld2Local(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBoxShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBoxShapeNew2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpCircleShapeGetOffset(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpCircleShapeGetRadius(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpCircleShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintActivateBodies(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintGetA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintGetB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintGetErrorBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintGetImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintGetMaxBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintGetMaxForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintSetErrorBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintSetMaxBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpConstraintSetMaxForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedRotarySpringGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedRotarySpringGetRestAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedRotarySpringGetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedRotarySpringNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedRotarySpringSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedRotarySpringSetRestAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedRotarySpringSetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringGetRestLength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringGetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringSetRestLength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpDampedSpringSetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGearJointGetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGearJointGetRatio(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGearJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGearJointSetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGearJointSetRatio(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGrooveJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGrooveJointGetGrooveA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGrooveJointGetGrooveB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGrooveJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGrooveJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGrooveJointSetGrooveA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpGrooveJointSetGrooveB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpInitChipmunk(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpMomentForBox(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpMomentForBox2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpMomentForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpMomentForSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPinJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPinJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPinJointGetDist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPinJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPinJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPinJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPinJointSetDist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPivotJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPivotJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPivotJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPivotJointNew2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPivotJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPivotJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPolyShapeGetNumVerts(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpPolyShapeGetVert(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRatchetJointGetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRatchetJointGetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRatchetJointGetRatchet(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRatchetJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRatchetJointSetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRatchetJointSetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRatchetJointSetRatchet(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpResetShapeIdCounter(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRotaryLimitJointGetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRotaryLimitJointGetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRotaryLimitJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRotaryLimitJointSetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpRotaryLimitJointSetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSegmentShapeGetA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSegmentShapeGetB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSegmentShapeGetNormal(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSegmentShapeGetRadius(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSegmentShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSegmentShapeSetNeighbors(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeCacheBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetCollisionType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetLayers(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetSensor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeGetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapePointQuery(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeSetBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeSetCollisionType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeSetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeSetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeSetGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeSetLayers(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeSetSensor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeSetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpShapeUpdate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSimpleMotorGetRate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSimpleMotorNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSimpleMotorSetRate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointGetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointGetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointSetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSlideJointSetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceActivateShapesTouchingShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceAddBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceAddConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceAddShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceAddStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceAlloc(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceContainsBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceContainsConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceContainsShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetCollisionBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetCollisionPersistence(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetCollisionSlop(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetCurrentTimeStep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetEnableContactGraph(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetGravity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetIdleSpeedThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetIterations(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetSleepTimeThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceGetStaticBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceInit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceIsLocked(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpacePointQueryFirst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceReindexShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceReindexShapesForBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceReindexStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceRemoveBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceRemoveConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceRemoveShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceRemoveStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetCollisionBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetCollisionPersistence(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetCollisionSlop(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetEnableContactGraph(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetGravity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetIdleSpeedThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetIterations(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceSetSleepTimeThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceStep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceUseSpatialHash(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpfabs(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpfclamp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpfclamp01(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpflerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpflerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpfmax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpfmin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpv(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvadd(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvclamp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvcross(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvdist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvdistsq(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvdot(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpveql(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvforangle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvlength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvlengthsq(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvlerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvlerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvmult(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvnear(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvneg(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvnormalize(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvnormalize_safe(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvperp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvproject(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvrotate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvrperp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvslerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvslerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvsub(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvtoangle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpvunrotate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
#endif /* __JS_BINDINGS_CHIPMUNK_FUNCTIONS_HPP__ */
|
||||
|
|
@ -0,0 +1,285 @@
|
|||
/*
|
||||
* AUTOGENERATED FILE. DO NOT EDIT IT
|
||||
* Generated by "generate_js_bindings.py -c chipmunk_jsb.ini" on 2012-10-18
|
||||
* Script version: v0.3
|
||||
*/
|
||||
#include "js_bindings_config.h"
|
||||
#ifdef JSB_INCLUDE_CHIPMUNK
|
||||
|
||||
#include "js_bindings_chipmunk_manual.h"
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetCount", JSB_cpArbiterGetCount, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetDepth", JSB_cpArbiterGetDepth, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetElasticity", JSB_cpArbiterGetElasticity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetFriction", JSB_cpArbiterGetFriction, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetNormal", JSB_cpArbiterGetNormal, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetPoint", JSB_cpArbiterGetPoint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetSurfaceVelocity", JSB_cpArbiterGetSurfaceVelocity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterIgnore", JSB_cpArbiterIgnore, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterIsFirstContact", JSB_cpArbiterIsFirstContact, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterSetElasticity", JSB_cpArbiterSetElasticity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterSetFriction", JSB_cpArbiterSetFriction, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterSetSurfaceVelocity", JSB_cpArbiterSetSurfaceVelocity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterTotalImpulse", JSB_cpArbiterTotalImpulse, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterTotalImpulseWithFriction", JSB_cpArbiterTotalImpulseWithFriction, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterTotalKE", JSB_cpArbiterTotalKE, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "areaForCircle", JSB_cpAreaForCircle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "areaForSegment", JSB_cpAreaForSegment, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBArea", JSB_cpBBArea, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBClampVect", JSB_cpBBClampVect, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBContainsBB", JSB_cpBBContainsBB, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBContainsVect", JSB_cpBBContainsVect, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBExpand", JSB_cpBBExpand, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBIntersects", JSB_cpBBIntersects, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBIntersectsSegment", JSB_cpBBIntersectsSegment, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBMerge", JSB_cpBBMerge, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBMergedArea", JSB_cpBBMergedArea, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBNew", JSB_cpBBNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBNewForCircle", JSB_cpBBNewForCircle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBSegmentQuery", JSB_cpBBSegmentQuery, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBWrapVect", JSB_cpBBWrapVect, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyActivate", JSB_cpBodyActivate, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyActivateStatic", JSB_cpBodyActivateStatic, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyApplyForce", JSB_cpBodyApplyForce, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyApplyImpulse", JSB_cpBodyApplyImpulse, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyDestroy", JSB_cpBodyDestroy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyFree", JSB_cpBodyFree, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetAngVel", JSB_cpBodyGetAngVel, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetAngVelLimit", JSB_cpBodyGetAngVelLimit, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetAngle", JSB_cpBodyGetAngle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetForce", JSB_cpBodyGetForce, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetMass", JSB_cpBodyGetMass, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetMoment", JSB_cpBodyGetMoment, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetPos", JSB_cpBodyGetPos, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetRot", JSB_cpBodyGetRot, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetSpace", JSB_cpBodyGetSpace, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetTorque", JSB_cpBodyGetTorque, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetVel", JSB_cpBodyGetVel, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetVelAtLocalPoint", JSB_cpBodyGetVelAtLocalPoint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetVelAtWorldPoint", JSB_cpBodyGetVelAtWorldPoint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetVelLimit", JSB_cpBodyGetVelLimit, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyInit", JSB_cpBodyInit, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyInitStatic", JSB_cpBodyInitStatic, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyIsRogue", JSB_cpBodyIsRogue, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyIsSleeping", JSB_cpBodyIsSleeping, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyIsStatic", JSB_cpBodyIsStatic, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyKineticEnergy", JSB_cpBodyKineticEnergy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyLocal2World", JSB_cpBodyLocal2World, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyNew", JSB_cpBodyNew, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyNewStatic", JSB_cpBodyNewStatic, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyResetForces", JSB_cpBodyResetForces, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetAngVel", JSB_cpBodySetAngVel, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetAngVelLimit", JSB_cpBodySetAngVelLimit, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetAngle", JSB_cpBodySetAngle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetForce", JSB_cpBodySetForce, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetMass", JSB_cpBodySetMass, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetMoment", JSB_cpBodySetMoment, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetPos", JSB_cpBodySetPos, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetTorque", JSB_cpBodySetTorque, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetVel", JSB_cpBodySetVel, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetVelLimit", JSB_cpBodySetVelLimit, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySleep", JSB_cpBodySleep, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySleepWithGroup", JSB_cpBodySleepWithGroup, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyUpdatePosition", JSB_cpBodyUpdatePosition, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyUpdateVelocity", JSB_cpBodyUpdateVelocity, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyWorld2Local", JSB_cpBodyWorld2Local, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "boxShapeNew", JSB_cpBoxShapeNew, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "boxShapeNew2", JSB_cpBoxShapeNew2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "circleShapeGetOffset", JSB_cpCircleShapeGetOffset, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "circleShapeGetRadius", JSB_cpCircleShapeGetRadius, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "circleShapeNew", JSB_cpCircleShapeNew, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintActivateBodies", JSB_cpConstraintActivateBodies, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintDestroy", JSB_cpConstraintDestroy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintFree", JSB_cpConstraintFree, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetA", JSB_cpConstraintGetA, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetB", JSB_cpConstraintGetB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetErrorBias", JSB_cpConstraintGetErrorBias, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetImpulse", JSB_cpConstraintGetImpulse, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetMaxBias", JSB_cpConstraintGetMaxBias, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetMaxForce", JSB_cpConstraintGetMaxForce, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetSpace", JSB_cpConstraintGetSpace, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintSetErrorBias", JSB_cpConstraintSetErrorBias, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintSetMaxBias", JSB_cpConstraintSetMaxBias, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintSetMaxForce", JSB_cpConstraintSetMaxForce, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringGetDamping", JSB_cpDampedRotarySpringGetDamping, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringGetRestAngle", JSB_cpDampedRotarySpringGetRestAngle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringGetStiffness", JSB_cpDampedRotarySpringGetStiffness, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringNew", JSB_cpDampedRotarySpringNew, 5, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringSetDamping", JSB_cpDampedRotarySpringSetDamping, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringSetRestAngle", JSB_cpDampedRotarySpringSetRestAngle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringSetStiffness", JSB_cpDampedRotarySpringSetStiffness, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetAnchr1", JSB_cpDampedSpringGetAnchr1, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetAnchr2", JSB_cpDampedSpringGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetDamping", JSB_cpDampedSpringGetDamping, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetRestLength", JSB_cpDampedSpringGetRestLength, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetStiffness", JSB_cpDampedSpringGetStiffness, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringNew", JSB_cpDampedSpringNew, 7, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetAnchr1", JSB_cpDampedSpringSetAnchr1, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetAnchr2", JSB_cpDampedSpringSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetDamping", JSB_cpDampedSpringSetDamping, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetRestLength", JSB_cpDampedSpringSetRestLength, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetStiffness", JSB_cpDampedSpringSetStiffness, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointGetPhase", JSB_cpGearJointGetPhase, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointGetRatio", JSB_cpGearJointGetRatio, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointNew", JSB_cpGearJointNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointSetPhase", JSB_cpGearJointSetPhase, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointSetRatio", JSB_cpGearJointSetRatio, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointGetAnchr2", JSB_cpGrooveJointGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointGetGrooveA", JSB_cpGrooveJointGetGrooveA, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointGetGrooveB", JSB_cpGrooveJointGetGrooveB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointNew", JSB_cpGrooveJointNew, 5, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointSetAnchr2", JSB_cpGrooveJointSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointSetGrooveA", JSB_cpGrooveJointSetGrooveA, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointSetGrooveB", JSB_cpGrooveJointSetGrooveB, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "initChipmunk", JSB_cpInitChipmunk, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "momentForBox", JSB_cpMomentForBox, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "momentForBox2", JSB_cpMomentForBox2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "momentForCircle", JSB_cpMomentForCircle, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "momentForSegment", JSB_cpMomentForSegment, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointGetAnchr1", JSB_cpPinJointGetAnchr1, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointGetAnchr2", JSB_cpPinJointGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointGetDist", JSB_cpPinJointGetDist, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointNew", JSB_cpPinJointNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointSetAnchr1", JSB_cpPinJointSetAnchr1, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointSetAnchr2", JSB_cpPinJointSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointSetDist", JSB_cpPinJointSetDist, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointGetAnchr1", JSB_cpPivotJointGetAnchr1, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointGetAnchr2", JSB_cpPivotJointGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointNew", JSB_cpPivotJointNew, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointNew2", JSB_cpPivotJointNew2, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointSetAnchr1", JSB_cpPivotJointSetAnchr1, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointSetAnchr2", JSB_cpPivotJointSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "polyShapeGetNumVerts", JSB_cpPolyShapeGetNumVerts, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "polyShapeGetVert", JSB_cpPolyShapeGetVert, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointGetAngle", JSB_cpRatchetJointGetAngle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointGetPhase", JSB_cpRatchetJointGetPhase, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointGetRatchet", JSB_cpRatchetJointGetRatchet, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointNew", JSB_cpRatchetJointNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointSetAngle", JSB_cpRatchetJointSetAngle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointSetPhase", JSB_cpRatchetJointSetPhase, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointSetRatchet", JSB_cpRatchetJointSetRatchet, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "resetShapeIdCounter", JSB_cpResetShapeIdCounter, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointGetMax", JSB_cpRotaryLimitJointGetMax, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointGetMin", JSB_cpRotaryLimitJointGetMin, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointNew", JSB_cpRotaryLimitJointNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointSetMax", JSB_cpRotaryLimitJointSetMax, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointSetMin", JSB_cpRotaryLimitJointSetMin, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeGetA", JSB_cpSegmentShapeGetA, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeGetB", JSB_cpSegmentShapeGetB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeGetNormal", JSB_cpSegmentShapeGetNormal, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeGetRadius", JSB_cpSegmentShapeGetRadius, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeNew", JSB_cpSegmentShapeNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeSetNeighbors", JSB_cpSegmentShapeSetNeighbors, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeCacheBB", JSB_cpShapeCacheBB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeDestroy", JSB_cpShapeDestroy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeFree", JSB_cpShapeFree, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetBB", JSB_cpShapeGetBB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetBody", JSB_cpShapeGetBody, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetCollisionType", JSB_cpShapeGetCollisionType, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetElasticity", JSB_cpShapeGetElasticity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetFriction", JSB_cpShapeGetFriction, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetGroup", JSB_cpShapeGetGroup, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetLayers", JSB_cpShapeGetLayers, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetSensor", JSB_cpShapeGetSensor, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetSpace", JSB_cpShapeGetSpace, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetSurfaceVelocity", JSB_cpShapeGetSurfaceVelocity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapePointQuery", JSB_cpShapePointQuery, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetBody", JSB_cpShapeSetBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetCollisionType", JSB_cpShapeSetCollisionType, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetElasticity", JSB_cpShapeSetElasticity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetFriction", JSB_cpShapeSetFriction, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetGroup", JSB_cpShapeSetGroup, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetLayers", JSB_cpShapeSetLayers, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetSensor", JSB_cpShapeSetSensor, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetSurfaceVelocity", JSB_cpShapeSetSurfaceVelocity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeUpdate", JSB_cpShapeUpdate, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "simpleMotorGetRate", JSB_cpSimpleMotorGetRate, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "simpleMotorNew", JSB_cpSimpleMotorNew, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "simpleMotorSetRate", JSB_cpSimpleMotorSetRate, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointGetAnchr1", JSB_cpSlideJointGetAnchr1, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointGetAnchr2", JSB_cpSlideJointGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointGetMax", JSB_cpSlideJointGetMax, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointGetMin", JSB_cpSlideJointGetMin, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointNew", JSB_cpSlideJointNew, 6, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointSetAnchr1", JSB_cpSlideJointSetAnchr1, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointSetAnchr2", JSB_cpSlideJointSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointSetMax", JSB_cpSlideJointSetMax, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointSetMin", JSB_cpSlideJointSetMin, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceActivateShapesTouchingShape", JSB_cpSpaceActivateShapesTouchingShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddBody", JSB_cpSpaceAddBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddConstraint", JSB_cpSpaceAddConstraint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddShape", JSB_cpSpaceAddShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddStaticShape", JSB_cpSpaceAddStaticShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceContainsBody", JSB_cpSpaceContainsBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceContainsConstraint", JSB_cpSpaceContainsConstraint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceContainsShape", JSB_cpSpaceContainsShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceDestroy", JSB_cpSpaceDestroy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceFree", JSB_cpSpaceFree, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetCollisionBias", JSB_cpSpaceGetCollisionBias, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetCollisionPersistence", JSB_cpSpaceGetCollisionPersistence, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetCollisionSlop", JSB_cpSpaceGetCollisionSlop, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetCurrentTimeStep", JSB_cpSpaceGetCurrentTimeStep, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetDamping", JSB_cpSpaceGetDamping, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetEnableContactGraph", JSB_cpSpaceGetEnableContactGraph, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetGravity", JSB_cpSpaceGetGravity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetIdleSpeedThreshold", JSB_cpSpaceGetIdleSpeedThreshold, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetIterations", JSB_cpSpaceGetIterations, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetSleepTimeThreshold", JSB_cpSpaceGetSleepTimeThreshold, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetStaticBody", JSB_cpSpaceGetStaticBody, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceInit", JSB_cpSpaceInit, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceIsLocked", JSB_cpSpaceIsLocked, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceNew", JSB_cpSpaceNew, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spacePointQueryFirst", JSB_cpSpacePointQueryFirst, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceReindexShape", JSB_cpSpaceReindexShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceReindexShapesForBody", JSB_cpSpaceReindexShapesForBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceReindexStatic", JSB_cpSpaceReindexStatic, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceRemoveBody", JSB_cpSpaceRemoveBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceRemoveConstraint", JSB_cpSpaceRemoveConstraint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceRemoveShape", JSB_cpSpaceRemoveShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceRemoveStaticShape", JSB_cpSpaceRemoveStaticShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetCollisionBias", JSB_cpSpaceSetCollisionBias, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetCollisionPersistence", JSB_cpSpaceSetCollisionPersistence, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetCollisionSlop", JSB_cpSpaceSetCollisionSlop, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetDamping", JSB_cpSpaceSetDamping, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetEnableContactGraph", JSB_cpSpaceSetEnableContactGraph, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetGravity", JSB_cpSpaceSetGravity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetIdleSpeedThreshold", JSB_cpSpaceSetIdleSpeedThreshold, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetIterations", JSB_cpSpaceSetIterations, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetSleepTimeThreshold", JSB_cpSpaceSetSleepTimeThreshold, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceStep", JSB_cpSpaceStep, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceUseSpatialHash", JSB_cpSpaceUseSpatialHash, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fabs", JSB_cpfabs, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fclamp", JSB_cpfclamp, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fclamp01", JSB_cpfclamp01, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "flerp", JSB_cpflerp, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "flerpconst", JSB_cpflerpconst, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fmax", JSB_cpfmax, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fmin", JSB_cpfmin, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vadd", JSB_cpvadd, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vclamp", JSB_cpvclamp, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vcross", JSB_cpvcross, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vdist", JSB_cpvdist, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vdistsq", JSB_cpvdistsq, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vdot", JSB_cpvdot, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "veql", JSB_cpveql, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vforangle", JSB_cpvforangle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vlength", JSB_cpvlength, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vlengthsq", JSB_cpvlengthsq, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vlerp", JSB_cpvlerp, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vlerpconst", JSB_cpvlerpconst, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vmult", JSB_cpvmult, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vnear", JSB_cpvnear, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vneg", JSB_cpvneg, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vnormalize", JSB_cpvnormalize, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vnormalize_safe", JSB_cpvnormalize_safe, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vperp", JSB_cpvperp, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vproject", JSB_cpvproject, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vrotate", JSB_cpvrotate, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vrperp", JSB_cpvrperp, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vslerp", JSB_cpvslerp, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vslerpconst", JSB_cpvslerpconst, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vsub", JSB_cpvsub, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vtoangle", JSB_cpvtoangle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vunrotate", JSB_cpvunrotate, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
|
||||
|
||||
#endif // JSB_INCLUDE_CHIPMUNK
|
|
@ -38,6 +38,63 @@ USING_NS_CC_EXT;
|
|||
void static freeSpaceChildren(cpSpace *space);
|
||||
|
||||
|
||||
template <class T>
|
||||
js_type_class_t *js_get_type_from_native(T* native_obj) {
|
||||
js_type_class_t *typeProxy;
|
||||
uint32_t typeId = reinterpret_cast<int>(typeid(*native_obj).name());
|
||||
//const char *nam = typeid(*native_obj).name();
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, typeProxy);
|
||||
if (!typeProxy) {
|
||||
TypeInfo *typeInfo = dynamic_cast<TypeInfo *>(native_obj);
|
||||
if (typeInfo) {
|
||||
typeId = typeInfo->getClassTypeInfo();
|
||||
} else {
|
||||
typeId = reinterpret_cast<int>(typeid(T).name());
|
||||
}
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, typeProxy);
|
||||
}
|
||||
return typeProxy;
|
||||
}
|
||||
|
||||
/**
|
||||
* you don't need to manage the returned pointer. The returned pointer should be deleted
|
||||
* using JS_REMOVE_PROXY. Most of the time you do that in the C++ destructor.
|
||||
*/
|
||||
template<class T>
|
||||
js_proxy_t *js_get_or_create_proxy(JSContext *cx, T *native_obj) {
|
||||
js_proxy_t *proxy;
|
||||
HASH_FIND_PTR(_native_js_global_ht, &native_obj, proxy);
|
||||
if (!proxy) {
|
||||
js_type_class_t *typeProxy = js_get_type_from_native<T>(native_obj);
|
||||
assert(typeProxy);
|
||||
JSObject* js_obj = JS_NewObject(cx, typeProxy->jsclass, typeProxy->proto, typeProxy->parentProto);
|
||||
JS_NEW_PROXY(proxy, native_obj, js_obj);
|
||||
|
||||
JS_AddNamedObjectRoot(cx, &proxy->obj, typeid(native_obj).name());
|
||||
return proxy;
|
||||
} else {
|
||||
return proxy;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
static JSBool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
TypeTest<T> t;
|
||||
T* cobj = new T();
|
||||
js_type_class_t *p;
|
||||
uint32_t typeId = t.s_id();
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, p);
|
||||
assert(p);
|
||||
JSObject *_tmp = JS_NewObject(cx, p->jsclass, p->proto, p->parentProto);
|
||||
js_proxy_t *pp;
|
||||
JS_NEW_PROXY(pp, cobj, _tmp);
|
||||
JS_AddObjectRoot(cx, &pp->obj);
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(_tmp));
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
#pragma mark - convertions
|
||||
|
||||
/*
|
||||
|
@ -131,63 +188,144 @@ JSBool JSPROXY_CCPhysicsSprite_setIgnoreBodyRotation_(JSContext *cx, uint32_t ar
|
|||
return JS_TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* CCPhysicsDebugNode
|
||||
*/
|
||||
//#pragma mark - CCPhysicsDebugNode
|
||||
|
||||
JSClass* JSB_CCPhysicsDebugNode_class = NULL;
|
||||
JSObject* JSB_CCPhysicsDebugNode_object = NULL;
|
||||
extern JSObject *js_cocos2dx_CCDrawNode_prototype;
|
||||
|
||||
// Constructor
|
||||
|
||||
// Destructor
|
||||
void JSB_CCPhysicsDebugNode_finalize(JSFreeOp *fop, JSObject *obj)
|
||||
{
|
||||
CCLOGINFO("jsbindings: finalizing JS object %p (CCPhysicsDebugNode)", obj);
|
||||
}
|
||||
|
||||
// Arguments: cpSpace*
|
||||
// Ret value: CCPhysicsDebugNode* (o)
|
||||
JSBool JSB_CCPhysicsDebugNode_debugNodeForCPSpace__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION3( argc == 1, cx, JS_FALSE, "Invalid number of arguments" );
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
cpSpace* arg0;
|
||||
|
||||
ok &= jsval_to_opaque( cx, *argvp++, (void**)&arg0 );
|
||||
JSB_PRECONDITION3(ok, cx, JS_FALSE, "Error processing arguments");
|
||||
|
||||
CCPhysicsDebugNode* ret = CCPhysicsDebugNode::create(arg0);
|
||||
jsval jsret;
|
||||
do {
|
||||
if (ret) {
|
||||
TypeTest<CCPhysicsDebugNode> t;
|
||||
js_type_class_t *typeClass;
|
||||
uint32_t typeId = t.s_id();
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, typeClass);
|
||||
assert(typeClass);
|
||||
JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto);
|
||||
jsret = OBJECT_TO_JSVAL(obj);
|
||||
js_proxy_t *p;
|
||||
JS_NEW_PROXY(p, ret, obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
JS_SET_RVAL(cx, vp, jsret);
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
// Arguments: cpSpace*
|
||||
// Ret value: void (None)
|
||||
JSBool JSB_CCPhysicsDebugNode_setSpace_(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, jsthis);
|
||||
CCPhysicsDebugNode* real = (CCPhysicsDebugNode *)(proxy ? proxy->ptr : NULL);
|
||||
TEST_NATIVE_OBJECT(cx, real)
|
||||
|
||||
JSB_PRECONDITION3( argc == 1, cx, JS_FALSE, "Invalid number of arguments" );
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
cpSpace* arg0;
|
||||
|
||||
ok &= jsval_to_opaque( cx, *argvp++, (void**)&arg0 );
|
||||
JSB_PRECONDITION3(ok, cx, JS_FALSE, "Error processing arguments");
|
||||
|
||||
real->setSpace(arg0);
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
// Arguments:
|
||||
// Ret value: cpSpace* (N/A)
|
||||
JSBool JSB_CCPhysicsDebugNode_space(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, jsthis);
|
||||
CCPhysicsDebugNode* real = (CCPhysicsDebugNode *)(proxy ? proxy->ptr : NULL);
|
||||
TEST_NATIVE_OBJECT(cx, real)
|
||||
JSB_PRECONDITION3( argc == 0, cx, JS_FALSE, "Invalid number of arguments" );
|
||||
cpSpace* ret_val;
|
||||
|
||||
ret_val = real->getSpace();
|
||||
|
||||
jsval ret_jsval = opaque_to_jsval( cx, ret_val );
|
||||
JS_SET_RVAL(cx, vp, ret_jsval);
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
void JSB_CCPhysicsDebugNode_createClass(JSContext *cx, JSObject* globalObj, const char* name )
|
||||
{
|
||||
JSB_CCPhysicsDebugNode_class = (JSClass *)calloc(1, sizeof(JSClass));
|
||||
JSB_CCPhysicsDebugNode_class->name = name;
|
||||
JSB_CCPhysicsDebugNode_class->addProperty = JS_PropertyStub;
|
||||
JSB_CCPhysicsDebugNode_class->delProperty = JS_PropertyStub;
|
||||
JSB_CCPhysicsDebugNode_class->getProperty = JS_PropertyStub;
|
||||
JSB_CCPhysicsDebugNode_class->setProperty = JS_StrictPropertyStub;
|
||||
JSB_CCPhysicsDebugNode_class->enumerate = JS_EnumerateStub;
|
||||
JSB_CCPhysicsDebugNode_class->resolve = JS_ResolveStub;
|
||||
JSB_CCPhysicsDebugNode_class->convert = JS_ConvertStub;
|
||||
JSB_CCPhysicsDebugNode_class->finalize = JSB_CCPhysicsDebugNode_finalize;
|
||||
JSB_CCPhysicsDebugNode_class->flags = 0;
|
||||
|
||||
static JSPropertySpec properties[] = {
|
||||
{0, 0, 0, 0, 0}
|
||||
};
|
||||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("_setSpace", JSB_CCPhysicsDebugNode_setSpace_, 1, JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE),
|
||||
JS_FN("getSpace", JSB_CCPhysicsDebugNode_space, 0, JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
static JSFunctionSpec st_funcs[] = {
|
||||
JS_FN("_create", JSB_CCPhysicsDebugNode_debugNodeForCPSpace__static, 1, JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
TypeTest<cocos2d::CCDrawNode> t1;
|
||||
js_type_class_t *typeClass;
|
||||
uint32_t typeId = t1.s_id();
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, typeClass);
|
||||
assert(typeClass);
|
||||
|
||||
template <class T>
|
||||
js_type_class_t *js_get_type_from_native(T* native_obj) {
|
||||
js_type_class_t *typeProxy;
|
||||
uint32_t typeId = reinterpret_cast<int>(typeid(*native_obj).name());
|
||||
//const char *nam = typeid(*native_obj).name();
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, typeProxy);
|
||||
if (!typeProxy) {
|
||||
TypeInfo *typeInfo = dynamic_cast<TypeInfo *>(native_obj);
|
||||
if (typeInfo) {
|
||||
typeId = typeInfo->getClassTypeInfo();
|
||||
} else {
|
||||
typeId = reinterpret_cast<int>(typeid(T).name());
|
||||
}
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, typeProxy);
|
||||
}
|
||||
return typeProxy;
|
||||
}
|
||||
JSB_CCPhysicsDebugNode_object = JS_InitClass(cx, globalObj, typeClass->proto, JSB_CCPhysicsDebugNode_class, dummy_constructor<CCPhysicsDebugNode>, 0,properties,funcs,NULL,st_funcs);
|
||||
|
||||
/**
|
||||
* you don't need to manage the returned pointer. The returned pointer should be deleted
|
||||
* using JS_REMOVE_PROXY. Most of the time you do that in the C++ destructor.
|
||||
*/
|
||||
template<class T>
|
||||
js_proxy_t *js_get_or_create_proxy(JSContext *cx, T *native_obj) {
|
||||
js_proxy_t *proxy;
|
||||
HASH_FIND_PTR(_native_js_global_ht, &native_obj, proxy);
|
||||
if (!proxy) {
|
||||
js_type_class_t *typeProxy = js_get_type_from_native<T>(native_obj);
|
||||
assert(typeProxy);
|
||||
JSObject* js_obj = JS_NewObject(cx, typeProxy->jsclass, typeProxy->proto, typeProxy->parentProto);
|
||||
JS_NEW_PROXY(proxy, native_obj, js_obj);
|
||||
|
||||
JS_AddNamedObjectRoot(cx, &proxy->obj, typeid(native_obj).name());
|
||||
return proxy;
|
||||
} else {
|
||||
return proxy;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
static JSBool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
TypeTest<T> t;
|
||||
T* cobj = new T();
|
||||
js_type_class_t *p;
|
||||
uint32_t typeId = t.s_id();
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, p);
|
||||
assert(p);
|
||||
JSObject *_tmp = JS_NewObject(cx, p->jsclass, p->proto, p->parentProto);
|
||||
js_proxy_t *pp;
|
||||
JS_NEW_PROXY(pp, cobj, _tmp);
|
||||
JS_AddObjectRoot(cx, &pp->obj);
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(_tmp));
|
||||
|
||||
return JS_TRUE;
|
||||
TypeTest<CCPhysicsDebugNode> t;
|
||||
js_type_class_t *p;
|
||||
typeId = t.s_id();
|
||||
HASH_FIND_INT(_js_global_type_ht, &typeId, p);
|
||||
if (!p) {
|
||||
p = (js_type_class_t *)malloc(sizeof(js_type_class_t));
|
||||
p->type = typeId;
|
||||
p->jsclass = JSB_CCPhysicsDebugNode_class;
|
||||
p->proto = JSB_CCPhysicsDebugNode_object;
|
||||
p->parentProto = typeClass->proto;
|
||||
HASH_ADD_INT(_js_global_type_ht, type, p);
|
||||
}
|
||||
}
|
||||
|
||||
// Arguments: NSString*, CGRect
|
||||
|
@ -337,7 +475,7 @@ void JSPROXY_CCPhysicsSprite_createClass(JSContext *cx, JSObject* globalObj)
|
|||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("getBody", JSPROXY_CCPhysicsSprite_body, 0, JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE),
|
||||
JS_FN("getIgnoreBodyRotation", JSPROXY_CCPhysicsSprite_ignoreBodyRotation, 0, JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE),
|
||||
JS_FN("setBody", JSPROXY_CCPhysicsSprite_setBody_, 1, JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE),
|
||||
JS_FN("_setBody", JSPROXY_CCPhysicsSprite_setBody_, 1, JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE),
|
||||
JS_FN("setIgnoreBodyRotation", JSPROXY_CCPhysicsSprite_setIgnoreBodyRotation_, 1, JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -386,6 +524,20 @@ void register_CCPhysicsSprite(JSContext *cx, JSObject *obj) {
|
|||
JSPROXY_CCPhysicsSprite_createClass(cx, obj);
|
||||
}
|
||||
|
||||
void register_CCPhysicsDebugNode(JSContext *cx, JSObject *obj) {
|
||||
jsval nsval;
|
||||
JSObject *ns;
|
||||
JS_GetProperty(cx, obj, "cc", &nsval);
|
||||
if (nsval == JSVAL_VOID) {
|
||||
ns = JS_NewObject(cx, NULL, NULL, NULL);
|
||||
nsval = OBJECT_TO_JSVAL(ns);
|
||||
JS_SetProperty(cx, obj, "cc", &nsval);
|
||||
} else {
|
||||
JS_ValueToObject(cx, nsval, &ns);
|
||||
}
|
||||
obj = ns;
|
||||
JSB_CCPhysicsDebugNode_createClass(cx, obj, "PhysicsDebugNode");
|
||||
}
|
||||
|
||||
JSBool jsval_to_cpBB( JSContext *cx, jsval vp, cpBB *ret )
|
||||
{
|
||||
|
|
|
@ -92,6 +92,7 @@ void JSB_cpBase_createClass(JSContext* cx, JSObject* globalObj, const char * nam
|
|||
extern JSObject* JSB_cpBase_object;
|
||||
extern JSClass* JSB_cpBase_class;
|
||||
extern void register_CCPhysicsSprite(JSContext *cx, JSObject *obj);
|
||||
extern void register_CCPhysicsDebugNode(JSContext *cx, JSObject *obj);
|
||||
|
||||
// Manual constructor / destructors
|
||||
JSBool JSB_cpPolyShape_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
//
|
||||
// Created by Rohan Kuruvilla
|
||||
// Copyright (c) 2012 Zynga Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef __js_bindings_chipmunk_manual
|
||||
#define __js_bindings_chipmunk_manual
|
||||
|
||||
#include "chipmunk.h"
|
||||
#include "jsapi.h"
|
||||
#include "js_bindings_chipmunk_functions.hpp"
|
||||
|
||||
JSBool JSPROXY_cpSpaceAddCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpSpaceRemoveCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
JSBool JSPROXY_cpArbiterGetBodies(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpArbiterGetShapes(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
JSBool JSPROXY_cpBodySetUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSPROXY_cpBodyGetUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
|
||||
void register_chipmunk_manual(JSContext* cx, JSObject* obj);
|
||||
|
||||
extern "C" {
|
||||
void JSPROXY_CCPhysicsSprite_createClass(JSContext *cx, JSObject* globalObj);
|
||||
}
|
||||
|
||||
void register_CCPhysicsSprite(JSContext *cx, JSObject *obj);
|
||||
|
||||
#endif // __js_bindings_chipmunk_manual
|
|
@ -46,297 +46,8 @@ void jsb_register_chipmunk(JSContext *_cx, JSObject *object)
|
|||
JS_SetProperty(_cx, object, "cp", &chipmunkVal);
|
||||
|
||||
JSB_cpBase_createClass(_cx, chipmunk, "Base"); // manual base class registration
|
||||
JSB_cpConstraint_createClass(_cx, chipmunk, "Constraint");
|
||||
JSB_cpGrooveJoint_createClass(_cx, chipmunk, "GrooveJoint");
|
||||
JSB_cpSimpleMotor_createClass(_cx, chipmunk, "SimpleMotor");
|
||||
JSB_cpPivotJoint_createClass(_cx, chipmunk, "PivotJoint");
|
||||
JSB_cpPinJoint_createClass(_cx, chipmunk, "PinJoint");
|
||||
JSB_cpSlideJoint_createClass(_cx, chipmunk, "SlideJoint");
|
||||
JSB_cpGearJoint_createClass(_cx, chipmunk, "GearJoint");
|
||||
JSB_cpDampedRotarySpring_createClass(_cx, chipmunk, "DampedRotarySpring");
|
||||
JSB_cpDampedSpring_createClass(_cx, chipmunk, "DampedSpring");
|
||||
JSB_cpRatchetJoint_createClass(_cx, chipmunk, "RatchetJoint");
|
||||
JSB_cpRotaryLimitJoint_createClass(_cx, chipmunk, "RotaryLimitJoint");
|
||||
JSB_cpArbiter_createClass(_cx, chipmunk, "Arbiter");
|
||||
JSB_cpSpace_createClass(_cx, chipmunk, "Space");
|
||||
JSB_cpBody_createClass(_cx, chipmunk, "Body");
|
||||
JSB_cpShape_createClass(_cx, chipmunk, "Shape");
|
||||
JSB_cpCircleShape_createClass(_cx, chipmunk, "CircleShape");
|
||||
JSB_cpSegmentShape_createClass(_cx, chipmunk, "SegmentShape");
|
||||
JSB_cpPolyShape_createClass(_cx, chipmunk, "PolyShape");
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetCount", JSB_cpArbiterGetCount, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetDepth", JSB_cpArbiterGetDepth, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetElasticity", JSB_cpArbiterGetElasticity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetFriction", JSB_cpArbiterGetFriction, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetNormal", JSB_cpArbiterGetNormal, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetPoint", JSB_cpArbiterGetPoint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterGetSurfaceVelocity", JSB_cpArbiterGetSurfaceVelocity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterIgnore", JSB_cpArbiterIgnore, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterIsFirstContact", JSB_cpArbiterIsFirstContact, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterSetElasticity", JSB_cpArbiterSetElasticity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterSetFriction", JSB_cpArbiterSetFriction, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterSetSurfaceVelocity", JSB_cpArbiterSetSurfaceVelocity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterTotalImpulse", JSB_cpArbiterTotalImpulse, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterTotalImpulseWithFriction", JSB_cpArbiterTotalImpulseWithFriction, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "arbiterTotalKE", JSB_cpArbiterTotalKE, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "areaForCircle", JSB_cpAreaForCircle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "areaForSegment", JSB_cpAreaForSegment, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBArea", JSB_cpBBArea, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBClampVect", JSB_cpBBClampVect, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBContainsBB", JSB_cpBBContainsBB, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBContainsVect", JSB_cpBBContainsVect, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBExpand", JSB_cpBBExpand, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBIntersects", JSB_cpBBIntersects, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBIntersectsSegment", JSB_cpBBIntersectsSegment, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBMerge", JSB_cpBBMerge, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBMergedArea", JSB_cpBBMergedArea, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBNew", JSB_cpBBNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBNewForCircle", JSB_cpBBNewForCircle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBSegmentQuery", JSB_cpBBSegmentQuery, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bBWrapVect", JSB_cpBBWrapVect, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyActivate", JSB_cpBodyActivate, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyActivateStatic", JSB_cpBodyActivateStatic, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyApplyForce", JSB_cpBodyApplyForce, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyApplyImpulse", JSB_cpBodyApplyImpulse, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyDestroy", JSB_cpBodyDestroy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyFree", JSB_cpBodyFree, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetAngVel", JSB_cpBodyGetAngVel, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetAngVelLimit", JSB_cpBodyGetAngVelLimit, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetAngle", JSB_cpBodyGetAngle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetForce", JSB_cpBodyGetForce, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetMass", JSB_cpBodyGetMass, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetMoment", JSB_cpBodyGetMoment, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetPos", JSB_cpBodyGetPos, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetRot", JSB_cpBodyGetRot, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetSpace", JSB_cpBodyGetSpace, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetTorque", JSB_cpBodyGetTorque, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetVel", JSB_cpBodyGetVel, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetVelAtLocalPoint", JSB_cpBodyGetVelAtLocalPoint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetVelAtWorldPoint", JSB_cpBodyGetVelAtWorldPoint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyGetVelLimit", JSB_cpBodyGetVelLimit, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyInit", JSB_cpBodyInit, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyInitStatic", JSB_cpBodyInitStatic, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyIsRogue", JSB_cpBodyIsRogue, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyIsSleeping", JSB_cpBodyIsSleeping, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyIsStatic", JSB_cpBodyIsStatic, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyKineticEnergy", JSB_cpBodyKineticEnergy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyLocal2World", JSB_cpBodyLocal2World, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyNew", JSB_cpBodyNew, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyNewStatic", JSB_cpBodyNewStatic, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyResetForces", JSB_cpBodyResetForces, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetAngVel", JSB_cpBodySetAngVel, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetAngVelLimit", JSB_cpBodySetAngVelLimit, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetAngle", JSB_cpBodySetAngle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetForce", JSB_cpBodySetForce, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetMass", JSB_cpBodySetMass, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetMoment", JSB_cpBodySetMoment, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetPos", JSB_cpBodySetPos, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetTorque", JSB_cpBodySetTorque, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetVel", JSB_cpBodySetVel, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySetVelLimit", JSB_cpBodySetVelLimit, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySleep", JSB_cpBodySleep, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodySleepWithGroup", JSB_cpBodySleepWithGroup, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyUpdatePosition", JSB_cpBodyUpdatePosition, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyUpdateVelocity", JSB_cpBodyUpdateVelocity, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "bodyWorld2Local", JSB_cpBodyWorld2Local, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "boxShapeNew", JSB_cpBoxShapeNew, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "boxShapeNew2", JSB_cpBoxShapeNew2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "circleShapeGetOffset", JSB_cpCircleShapeGetOffset, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "circleShapeGetRadius", JSB_cpCircleShapeGetRadius, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "circleShapeNew", JSB_cpCircleShapeNew, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintActivateBodies", JSB_cpConstraintActivateBodies, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintDestroy", JSB_cpConstraintDestroy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintFree", JSB_cpConstraintFree, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetA", JSB_cpConstraintGetA, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetB", JSB_cpConstraintGetB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetErrorBias", JSB_cpConstraintGetErrorBias, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetImpulse", JSB_cpConstraintGetImpulse, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetMaxBias", JSB_cpConstraintGetMaxBias, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetMaxForce", JSB_cpConstraintGetMaxForce, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintGetSpace", JSB_cpConstraintGetSpace, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintSetErrorBias", JSB_cpConstraintSetErrorBias, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintSetMaxBias", JSB_cpConstraintSetMaxBias, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "constraintSetMaxForce", JSB_cpConstraintSetMaxForce, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringGetDamping", JSB_cpDampedRotarySpringGetDamping, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringGetRestAngle", JSB_cpDampedRotarySpringGetRestAngle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringGetStiffness", JSB_cpDampedRotarySpringGetStiffness, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringNew", JSB_cpDampedRotarySpringNew, 5, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringSetDamping", JSB_cpDampedRotarySpringSetDamping, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringSetRestAngle", JSB_cpDampedRotarySpringSetRestAngle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedRotarySpringSetStiffness", JSB_cpDampedRotarySpringSetStiffness, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetAnchr1", JSB_cpDampedSpringGetAnchr1, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetAnchr2", JSB_cpDampedSpringGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetDamping", JSB_cpDampedSpringGetDamping, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetRestLength", JSB_cpDampedSpringGetRestLength, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringGetStiffness", JSB_cpDampedSpringGetStiffness, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringNew", JSB_cpDampedSpringNew, 7, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetAnchr1", JSB_cpDampedSpringSetAnchr1, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetAnchr2", JSB_cpDampedSpringSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetDamping", JSB_cpDampedSpringSetDamping, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetRestLength", JSB_cpDampedSpringSetRestLength, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "dampedSpringSetStiffness", JSB_cpDampedSpringSetStiffness, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointGetPhase", JSB_cpGearJointGetPhase, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointGetRatio", JSB_cpGearJointGetRatio, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointNew", JSB_cpGearJointNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointSetPhase", JSB_cpGearJointSetPhase, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "gearJointSetRatio", JSB_cpGearJointSetRatio, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointGetAnchr2", JSB_cpGrooveJointGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointGetGrooveA", JSB_cpGrooveJointGetGrooveA, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointGetGrooveB", JSB_cpGrooveJointGetGrooveB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointNew", JSB_cpGrooveJointNew, 5, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointSetAnchr2", JSB_cpGrooveJointSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointSetGrooveA", JSB_cpGrooveJointSetGrooveA, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "grooveJointSetGrooveB", JSB_cpGrooveJointSetGrooveB, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "initChipmunk", JSB_cpInitChipmunk, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "momentForBox", JSB_cpMomentForBox, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "momentForBox2", JSB_cpMomentForBox2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "momentForCircle", JSB_cpMomentForCircle, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "momentForSegment", JSB_cpMomentForSegment, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointGetAnchr1", JSB_cpPinJointGetAnchr1, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointGetAnchr2", JSB_cpPinJointGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointGetDist", JSB_cpPinJointGetDist, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointNew", JSB_cpPinJointNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointSetAnchr1", JSB_cpPinJointSetAnchr1, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointSetAnchr2", JSB_cpPinJointSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pinJointSetDist", JSB_cpPinJointSetDist, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointGetAnchr1", JSB_cpPivotJointGetAnchr1, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointGetAnchr2", JSB_cpPivotJointGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointNew", JSB_cpPivotJointNew, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointNew2", JSB_cpPivotJointNew2, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointSetAnchr1", JSB_cpPivotJointSetAnchr1, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "pivotJointSetAnchr2", JSB_cpPivotJointSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "polyShapeGetNumVerts", JSB_cpPolyShapeGetNumVerts, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "polyShapeGetVert", JSB_cpPolyShapeGetVert, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointGetAngle", JSB_cpRatchetJointGetAngle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointGetPhase", JSB_cpRatchetJointGetPhase, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointGetRatchet", JSB_cpRatchetJointGetRatchet, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointNew", JSB_cpRatchetJointNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointSetAngle", JSB_cpRatchetJointSetAngle, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointSetPhase", JSB_cpRatchetJointSetPhase, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "ratchetJointSetRatchet", JSB_cpRatchetJointSetRatchet, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "resetShapeIdCounter", JSB_cpResetShapeIdCounter, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointGetMax", JSB_cpRotaryLimitJointGetMax, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointGetMin", JSB_cpRotaryLimitJointGetMin, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointNew", JSB_cpRotaryLimitJointNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointSetMax", JSB_cpRotaryLimitJointSetMax, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "rotaryLimitJointSetMin", JSB_cpRotaryLimitJointSetMin, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeGetA", JSB_cpSegmentShapeGetA, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeGetB", JSB_cpSegmentShapeGetB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeGetNormal", JSB_cpSegmentShapeGetNormal, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeGetRadius", JSB_cpSegmentShapeGetRadius, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeNew", JSB_cpSegmentShapeNew, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "segmentShapeSetNeighbors", JSB_cpSegmentShapeSetNeighbors, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeCacheBB", JSB_cpShapeCacheBB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeDestroy", JSB_cpShapeDestroy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeFree", JSB_cpShapeFree, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetBB", JSB_cpShapeGetBB, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetBody", JSB_cpShapeGetBody, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetCollisionType", JSB_cpShapeGetCollisionType, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetElasticity", JSB_cpShapeGetElasticity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetFriction", JSB_cpShapeGetFriction, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetGroup", JSB_cpShapeGetGroup, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetLayers", JSB_cpShapeGetLayers, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetSensor", JSB_cpShapeGetSensor, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetSpace", JSB_cpShapeGetSpace, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeGetSurfaceVelocity", JSB_cpShapeGetSurfaceVelocity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapePointQuery", JSB_cpShapePointQuery, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetBody", JSB_cpShapeSetBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetCollisionType", JSB_cpShapeSetCollisionType, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetElasticity", JSB_cpShapeSetElasticity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetFriction", JSB_cpShapeSetFriction, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetGroup", JSB_cpShapeSetGroup, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetLayers", JSB_cpShapeSetLayers, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetSensor", JSB_cpShapeSetSensor, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeSetSurfaceVelocity", JSB_cpShapeSetSurfaceVelocity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "shapeUpdate", JSB_cpShapeUpdate, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "simpleMotorGetRate", JSB_cpSimpleMotorGetRate, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "simpleMotorNew", JSB_cpSimpleMotorNew, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "simpleMotorSetRate", JSB_cpSimpleMotorSetRate, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointGetAnchr1", JSB_cpSlideJointGetAnchr1, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointGetAnchr2", JSB_cpSlideJointGetAnchr2, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointGetMax", JSB_cpSlideJointGetMax, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointGetMin", JSB_cpSlideJointGetMin, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointNew", JSB_cpSlideJointNew, 6, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointSetAnchr1", JSB_cpSlideJointSetAnchr1, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointSetAnchr2", JSB_cpSlideJointSetAnchr2, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointSetMax", JSB_cpSlideJointSetMax, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "slideJointSetMin", JSB_cpSlideJointSetMin, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceActivateShapesTouchingShape", JSB_cpSpaceActivateShapesTouchingShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddBody", JSB_cpSpaceAddBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddConstraint", JSB_cpSpaceAddConstraint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddShape", JSB_cpSpaceAddShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddStaticShape", JSB_cpSpaceAddStaticShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceContainsBody", JSB_cpSpaceContainsBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceContainsConstraint", JSB_cpSpaceContainsConstraint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceContainsShape", JSB_cpSpaceContainsShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceDestroy", JSB_cpSpaceDestroy, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceFree", JSB_cpSpaceFree, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetCollisionBias", JSB_cpSpaceGetCollisionBias, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetCollisionPersistence", JSB_cpSpaceGetCollisionPersistence, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetCollisionSlop", JSB_cpSpaceGetCollisionSlop, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetCurrentTimeStep", JSB_cpSpaceGetCurrentTimeStep, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetDamping", JSB_cpSpaceGetDamping, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetEnableContactGraph", JSB_cpSpaceGetEnableContactGraph, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetGravity", JSB_cpSpaceGetGravity, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetIdleSpeedThreshold", JSB_cpSpaceGetIdleSpeedThreshold, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetIterations", JSB_cpSpaceGetIterations, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetSleepTimeThreshold", JSB_cpSpaceGetSleepTimeThreshold, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceGetStaticBody", JSB_cpSpaceGetStaticBody, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceInit", JSB_cpSpaceInit, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceIsLocked", JSB_cpSpaceIsLocked, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceNew", JSB_cpSpaceNew, 0, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spacePointQueryFirst", JSB_cpSpacePointQueryFirst, 4, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceReindexShape", JSB_cpSpaceReindexShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceReindexShapesForBody", JSB_cpSpaceReindexShapesForBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceReindexStatic", JSB_cpSpaceReindexStatic, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceRemoveBody", JSB_cpSpaceRemoveBody, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceRemoveConstraint", JSB_cpSpaceRemoveConstraint, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceRemoveShape", JSB_cpSpaceRemoveShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceRemoveStaticShape", JSB_cpSpaceRemoveStaticShape, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetCollisionBias", JSB_cpSpaceSetCollisionBias, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetCollisionPersistence", JSB_cpSpaceSetCollisionPersistence, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetCollisionSlop", JSB_cpSpaceSetCollisionSlop, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetDamping", JSB_cpSpaceSetDamping, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetEnableContactGraph", JSB_cpSpaceSetEnableContactGraph, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetGravity", JSB_cpSpaceSetGravity, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetIdleSpeedThreshold", JSB_cpSpaceSetIdleSpeedThreshold, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetIterations", JSB_cpSpaceSetIterations, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceSetSleepTimeThreshold", JSB_cpSpaceSetSleepTimeThreshold, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceStep", JSB_cpSpaceStep, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceUseSpatialHash", JSB_cpSpaceUseSpatialHash, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fabs", JSB_cpfabs, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fclamp", JSB_cpfclamp, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fclamp01", JSB_cpfclamp01, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "flerp", JSB_cpflerp, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "flerpconst", JSB_cpflerpconst, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fmax", JSB_cpfmax, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "fmin", JSB_cpfmin, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vadd", JSB_cpvadd, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vclamp", JSB_cpvclamp, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vcross", JSB_cpvcross, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vdist", JSB_cpvdist, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vdistsq", JSB_cpvdistsq, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vdot", JSB_cpvdot, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "veql", JSB_cpveql, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vforangle", JSB_cpvforangle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vlength", JSB_cpvlength, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vlengthsq", JSB_cpvlengthsq, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vlerp", JSB_cpvlerp, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vlerpconst", JSB_cpvlerpconst, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vmult", JSB_cpvmult, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vnear", JSB_cpvnear, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vneg", JSB_cpvneg, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vnormalize", JSB_cpvnormalize, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vnormalize_safe", JSB_cpvnormalize_safe, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vperp", JSB_cpvperp, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vproject", JSB_cpvproject, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vrotate", JSB_cpvrotate, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vrperp", JSB_cpvrperp, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vslerp", JSB_cpvslerp, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vslerpconst", JSB_cpvslerpconst, 3, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vsub", JSB_cpvsub, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vtoangle", JSB_cpvtoangle, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "vunrotate", JSB_cpvunrotate, 2, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
#include "js_bindings_chipmunk_auto_classes_registration.h"
|
||||
#include "js_bindings_chipmunk_functions_registration.h"
|
||||
|
||||
// manual
|
||||
JS_DefineFunction(_cx, chipmunk, "spaceAddCollisionHandler", JSB_cpSpaceAddCollisionHandler, 8, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
|
@ -351,5 +62,6 @@ void jsb_register_chipmunk(JSContext *_cx, JSObject *object)
|
|||
JS_DefineFunction(_cx, chipmunk, "centroidForPoly", JSB_cpCentroidForPoly, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
JS_DefineFunction(_cx, chipmunk, "recenterPoly", JSB_cpRecenterPoly, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
register_CCPhysicsSprite(_cx, object);
|
||||
register_CCPhysicsDebugNode(_cx, object);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,33 +45,33 @@
|
|||
#else
|
||||
#define JSB_PRECONDITION( condition, error_msg) do { \
|
||||
if( ! (condition) ) { \
|
||||
printf("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
cocos2d::CCLog("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
return JS_FALSE; \
|
||||
} \
|
||||
} while(0)
|
||||
#define ASSERT( condition, error_msg) do { \
|
||||
if( ! (condition) ) { \
|
||||
printf("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
cocos2d::CCLog("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
return false; \
|
||||
} \
|
||||
} while(0)
|
||||
#define JSB_PRECONDITION2( condition, context, ret_value, error_msg) do { \
|
||||
if( ! (condition) ) { \
|
||||
printf("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
cocos2d::CCLog("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
JS_ReportPendingException( context ); \
|
||||
return ret_value; \
|
||||
} \
|
||||
} while(0)
|
||||
#define JSB_PRECONDITION3( condition, context, ret_value, error_msg) do { \
|
||||
if( ! (condition) ) { \
|
||||
printf("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
cocos2d::CCLog("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
JS_ReportError( context, error_msg ); \
|
||||
return ret_value; \
|
||||
} \
|
||||
} while(0)
|
||||
#define JSB_PRECONDITION( condition, error_msg) do { \
|
||||
if( ! (condition) ) { \
|
||||
printf("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
cocos2d::CCLog("jsb: ERROR in %s: %s\n", __FUNCTION__, error_msg); \
|
||||
return JS_FALSE; \
|
||||
} \
|
||||
} while(0)
|
||||
|
|
Loading…
Reference in New Issue