Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.8.1 add spine jsb apis #15674

Merged
merged 32 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d6dd7e3
open some spine apis
zxx43 Jun 20, 2023
b50bf53
add some apis
zxx43 Jun 21, 2023
7d17de5
add spine jsb convert
zxx43 Jun 30, 2023
8708f2f
add some manual interfaces
zxx43 Jul 3, 2023
4152ef5
fix some jsb
zxx43 Jul 5, 2023
f6e685a
fix getAttachments
zxx43 Jul 5, 2023
691c00e
remove findAttachmentsForSlot
zxx43 Jul 5, 2023
9ab9d38
manual VertexEffect::begin
zxx43 Jul 5, 2023
6815951
remove SkinEntry
zxx43 Jul 10, 2023
abf9066
change some apis
zxx43 Jul 12, 2023
104174e
fix isObject
zxx43 Jul 12, 2023
3b05ff9
use entry ptr instead of entry
zxx43 Jul 12, 2023
8feadfd
remove array.get()
zxx43 Jul 12, 2023
3a9d961
remove array.get()
zxx43 Jul 12, 2023
fa30dd0
Merge branch 'v3.8.1' into 3.8.1-spine
zxx43 Jul 13, 2023
ce255ed
fix ci
zxx43 Jul 13, 2023
6d929e8
Merge branch '3.8.1-spine' of github.com:zxx43/engine into 3.8.1-spine
zxx43 Jul 13, 2023
a02eb3f
fix ci
zxx43 Jul 13, 2023
354f430
change include
zxx43 Jul 13, 2023
bce3db6
fix SWIGINTERN
zxx43 Jul 13, 2023
ccde279
fix test-case
zxx43 Jul 17, 2023
b20a0df
use rename
zxx43 Jul 17, 2023
3f90c54
check spine instance null
zxx43 Jul 17, 2023
d14ee59
fix eslint
zxx43 Jul 18, 2023
2f75f77
Merge branch 'v3.8.1' into 3.8.1-spine
zxx43 Jul 18, 2023
f7a1e61
fix eslint
zxx43 Jul 18, 2023
7fce084
add some missing apis
zxx43 Jul 20, 2023
fee88de
add getAttachmentByName
zxx43 Aug 3, 2023
777bd08
Merge branch 'v3.8.1' into 3.8.1-spine
zxx43 Aug 3, 2023
f0dbe6f
modify jsb api
zxx43 Aug 3, 2023
2e5fb35
Merge branch '3.8.1-spine' of github.com:zxx43/engine into 3.8.1-spine
zxx43 Aug 3, 2023
9ce4096
fix eslint
zxx43 Aug 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2354,6 +2354,8 @@ if(USE_MIDDLEWARE)
cocos/editor-support/spine-creator-support/spine-cocos2dx.h
NO_WERROR cocos/editor-support/spine-creator-support/VertexEffectDelegate.cpp
cocos/editor-support/spine-creator-support/VertexEffectDelegate.h
NO_WERROR cocos/editor-support/spine-creator-support/Vector2.cpp
cocos/editor-support/spine-creator-support/Vector2.h

)
cocos_source_files(
Expand Down
21 changes: 21 additions & 0 deletions native/cocos/bindings/manual/jsb_conversions_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,8 @@ bool sevalue_to_native(const se::Value &from, cc::IBArray *to, se::Object * /*ct

#if CC_USE_SPINE

#include "cocos/editor-support/spine-creator-support/Vector2.h"
dumganhar marked this conversation as resolved.
Show resolved Hide resolved

// NOLINTNEXTLINE(readability-identifier-naming)
bool sevalue_to_native(const se::Value &val, spine::String *obj, se::Object * /*unused*/) {
*obj = val.toString().data();
Expand Down Expand Up @@ -1162,6 +1164,25 @@ bool sevalue_to_native(const se::Value &v, spine::Vector<spine::String> *ret, se

return true;
}

bool sevalue_to_native(const se::Value &from, spine::Vector2 *to, se::Object * /*unused*/) {
SE_PRECONDITION2(from.isObject(), false, "Convert parameter to Vec2 failed!");

se::Object *obj = from.toObject();
CHECK_ASSIGN_PRVOBJ_RET(obj, to)
se::Value tmp;
set_member_field(obj, to, "x", &spine::Vector2::x, tmp);
set_member_field(obj, to, "y", &spine::Vector2::y, tmp);
return true;
}

bool nativevalue_to_se(const spine::Vector2 &from, se::Value &to, se::Object * /*unused*/) {
se::HandleObject obj(se::Object::createPlainObject());
obj->setProperty("x", se::Value(from.x));
obj->setProperty("y", se::Value(from.y));
to.setObject(obj);
return true;
}
#endif

#if CC_USE_MIDDLEWARE
Expand Down
5 changes: 5 additions & 0 deletions native/cocos/bindings/manual/jsb_conversions_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
class Vector;
template <typename K, typename V>
class Map;
class Vector2;
} // namespace spine

#endif
Expand Down Expand Up @@ -600,6 +601,10 @@

bool sevalue_to_native(const se::Value &v, spine::Vector<spine::String> *ret, se::Object *ctx); // NOLINT(readability-identifier-naming)

bool sevalue_to_native(const se::Value &from, spine::Vector2 *to, se::Object * /*unused*/); // NOLINT(readability-identifier-naming)

bool nativevalue_to_se(const spine::Vector2 &from, se::Value &to, se::Object * /*unused*/);

Check failure on line 606 in native/cocos/bindings/manual/jsb_conversions_spec.h

View workflow job for this annotation

GitHub Actions / ClangTidy Android

invalid case style for function 'nativevalue_to_se' (readability-identifier-naming)
dumganhar marked this conversation as resolved.
Show resolved Hide resolved

#endif

inline bool nativevalue_to_se(const se::Object *from, se::Value &to, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming)
Expand Down
Loading
Loading