Compare commits
19 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
d5512eca74 | |
|
|
b5cf1a2e4e | |
|
|
82856c0d85 | |
|
|
1a551ab783 | |
|
|
ab01b1e0af | |
|
|
fce5974adb | |
|
|
8e329d5897 | |
|
|
e0776e986f | |
|
|
c634ab5511 | |
|
|
e1afa91277 | |
|
|
47d19ad2fe | |
|
|
edc75f8839 | |
|
|
9b5264d916 | |
|
|
7983e5d777 | |
|
|
109587f1dd | |
|
|
6e292f061a | |
|
|
161b2ca59a | |
|
|
998ab5a93c | |
|
|
bc4dcfbabe |
|
|
@ -185,6 +185,7 @@ declare namespace B2 {
|
||||||
GetFilterData(): Filter;
|
GetFilterData(): Filter;
|
||||||
Refilter(): void;
|
Refilter(): void;
|
||||||
GetBody(): Body;
|
GetBody(): Body;
|
||||||
|
GetNext(): Fixture;
|
||||||
TestPoint(p: Vec2): boolean;
|
TestPoint(p: Vec2): boolean;
|
||||||
RayCast(output: RayCastOutput, input: RayCastInput, childIndex: number): boolean;
|
RayCast(output: RayCastOutput, input: RayCastInput, childIndex: number): boolean;
|
||||||
GetMassData(massData: MassData): void;
|
GetMassData(massData: MassData): void;
|
||||||
|
|
@ -272,6 +273,8 @@ declare namespace B2 {
|
||||||
IsEnabled(): boolean;
|
IsEnabled(): boolean;
|
||||||
SetFixedRotation(flag: boolean): void;
|
SetFixedRotation(flag: boolean): void;
|
||||||
IsFixedRotation(): boolean;
|
IsFixedRotation(): boolean;
|
||||||
|
GetFixtureList(): Fixture;
|
||||||
|
GetJointList(): number;
|
||||||
GetWorld(): World;
|
GetWorld(): World;
|
||||||
Dump(): void;
|
Dump(): void;
|
||||||
}
|
}
|
||||||
|
|
@ -572,4 +575,10 @@ declare namespace B2 {
|
||||||
function ContactImpulseGetNormalImpulse(contactImpulsePtr: number, index: number): number;
|
function ContactImpulseGetNormalImpulse(contactImpulsePtr: number, index: number): number;
|
||||||
function ContactImpulseGetTangentImpulse(contactImpulsePtr: number, index: number): number;
|
function ContactImpulseGetTangentImpulse(contactImpulsePtr: number, index: number): number;
|
||||||
function ContactImpulseGetCount(contactImpulsePtr: number): number;
|
function ContactImpulseGetCount(contactImpulsePtr: number): number;
|
||||||
|
|
||||||
|
//JointEdge
|
||||||
|
function JointEdgeGetOther(jointEdgePtr: number): number;
|
||||||
|
function JointEdgeGetJoint(jointEdgePtr: number): number;
|
||||||
|
function JointEdgeGetPrev(jointEdgePtr: number): number;
|
||||||
|
function JointEdgeGetNext(jointEdgePtr: number): number;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -21,4 +21,11 @@
|
||||||
%include <javascriptinit.swg>
|
%include <javascriptinit.swg>
|
||||||
|
|
||||||
#define %module_macro(m) %feature("module_macro","m")
|
#define %module_macro(m) %feature("module_macro","m")
|
||||||
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
||||||
|
|
||||||
|
%define %virtual_inherit(klass)
|
||||||
|
%feature("virtual_inherit", "1") klass;
|
||||||
|
%typemap(in) klass *self
|
||||||
|
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
|
||||||
|
if (nullptr == $1) return true;%}
|
||||||
|
%enddef
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,7 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
$js_check_arg_count
|
$js_check_arg_count
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
$js_set_private_object
|
||||||
s.thisObject()->setPrivateObject(ptr);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
||||||
|
|
@ -62,8 +61,7 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
CC_UNUSED bool ok = true;
|
CC_UNUSED bool ok = true;
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
$js_set_private_object
|
||||||
s.thisObject()->setPrivateObject(ptr);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
@ -86,19 +84,20 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $jsmangledname: mangled class name
|
* - $classname_mangled: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
%fragment ("js_dtor", "templates")
|
%fragment ("js_dtor", "templates")
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s) {
|
static bool $jswrapper(se::State& s) {
|
||||||
|
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $jsmangledname: mangled class name
|
* - $classname_mangled: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* - ${destructor_action}: The custom destructor action to invoke.
|
* - ${destructor_action}: The custom destructor action to invoke.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -106,6 +105,7 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s)
|
static bool $jswrapper(se::State& s)
|
||||||
{
|
{
|
||||||
|
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -21,4 +21,11 @@
|
||||||
%include <javascriptinit.swg>
|
%include <javascriptinit.swg>
|
||||||
|
|
||||||
#define %module_macro(m) %feature("module_macro","m")
|
#define %module_macro(m) %feature("module_macro","m")
|
||||||
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
||||||
|
|
||||||
|
%define %virtual_inherit(klass)
|
||||||
|
%feature("virtual_inherit", "1") klass;
|
||||||
|
%typemap(in) klass *self
|
||||||
|
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
|
||||||
|
if (nullptr == $1) return true;%}
|
||||||
|
%enddef
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,7 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
$js_check_arg_count
|
$js_check_arg_count
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
$js_set_private_object
|
||||||
s.thisObject()->setPrivateObject(ptr);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
||||||
|
|
@ -62,8 +61,7 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
CC_UNUSED bool ok = true;
|
CC_UNUSED bool ok = true;
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
$js_set_private_object
|
||||||
s.thisObject()->setPrivateObject(ptr);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
@ -86,19 +84,20 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $jsmangledname: mangled class name
|
* - $classname_mangled: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
%fragment ("js_dtor", "templates")
|
%fragment ("js_dtor", "templates")
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s) {
|
static bool $jswrapper(se::State& s) {
|
||||||
|
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $jsmangledname: mangled class name
|
* - $classname_mangled: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* - ${destructor_action}: The custom destructor action to invoke.
|
* - ${destructor_action}: The custom destructor action to invoke.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -106,6 +105,7 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s)
|
static bool $jswrapper(se::State& s)
|
||||||
{
|
{
|
||||||
|
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,5 @@ glslang (Built using https://github.com/YunHsiao/glslang/tree/build)
|
||||||
linux: 11.5.0
|
linux: 11.5.0
|
||||||
openharmony:11.5.0 (commit: 1978c76)
|
openharmony:11.5.0 (commit: 1978c76)
|
||||||
|
|
||||||
swig ( Built using https://github.com/cocos/swig/tree/cocos-se, executable files are downloaded from https://github.com/cocos/swig/releases/tag/cocos-v1.1.6 )
|
swig ( Built using https://github.com/cocos/swig/tree/cocos-se, executable files are downloaded from https://github.com/cocos/swig/releases/tag/cocos-v1.1.7 )
|
||||||
win64: cocos-v1.1.6 (commit: f52be17)
|
all: cocos-v1.1.7 (commit: 7969da2)
|
||||||
mac: cocos-v1.1.6 (commit: f52be17)
|
|
||||||
linux: cocos-v1.1.6 (commit: f52be17)
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -21,4 +21,11 @@
|
||||||
%include <javascriptinit.swg>
|
%include <javascriptinit.swg>
|
||||||
|
|
||||||
#define %module_macro(m) %feature("module_macro","m")
|
#define %module_macro(m) %feature("module_macro","m")
|
||||||
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
|
||||||
|
|
||||||
|
%define %virtual_inherit(klass)
|
||||||
|
%feature("virtual_inherit", "1") klass;
|
||||||
|
%typemap(in) klass *self
|
||||||
|
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
|
||||||
|
if (nullptr == $1) return true;%}
|
||||||
|
%enddef
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,7 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
$js_check_arg_count
|
$js_check_arg_count
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
$js_set_private_object
|
||||||
s.thisObject()->setPrivateObject(ptr);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
|
||||||
|
|
@ -62,8 +61,7 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
CC_UNUSED bool ok = true;
|
CC_UNUSED bool ok = true;
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
|
$js_set_private_object
|
||||||
s.thisObject()->setPrivateObject(ptr);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
@ -86,19 +84,20 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $jsmangledname: mangled class name
|
* - $classname_mangled: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
%fragment ("js_dtor", "templates")
|
%fragment ("js_dtor", "templates")
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s) {
|
static bool $jswrapper(se::State& s) {
|
||||||
|
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* js_dtor: template for a destructor wrapper
|
* js_dtor: template for a destructor wrapper
|
||||||
* - $jsmangledname: mangled class name
|
* - $classname_mangled: mangled class name
|
||||||
* - $jstype: class type
|
* - $jstype: class type
|
||||||
* - ${destructor_action}: The custom destructor action to invoke.
|
* - ${destructor_action}: The custom destructor action to invoke.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -106,6 +105,7 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
%{
|
%{
|
||||||
static bool $jswrapper(se::State& s)
|
static bool $jswrapper(se::State& s)
|
||||||
{
|
{
|
||||||
|
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
SE_BIND_FINALIZE_FUNC($jswrapper) %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue