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

[v3.8.5] Reduce package size for spine module #17783

Merged
merged 82 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
53844c9
AOT test
dumganhar Oct 23, 2024
e150e61
Add size_type, value_type for spine::Vector
dumganhar Oct 25, 2024
befaa70
spine::Vector getX/Y should be const functions.
dumganhar Oct 25, 2024
83a596e
spine::Vector getX/Y should be const functions.
dumganhar Oct 25, 2024
f8ffec0
cleanup spine-wasm/CMakeLists.txt
dumganhar Oct 25, 2024
ccb8ddf
Refactor spine-type-export.cpp, remove unused apply binding.
dumganhar Oct 25, 2024
a46a5dd
Remove extra spine:: namespace in SkeletonData.h
dumganhar Oct 25, 2024
93d649b
Update spine-type-export.cpp
dumganhar Oct 25, 2024
31445e1
Don't using namespace in header files.
dumganhar Oct 23, 2024
b7f87e5
Update spine-wasm/CMakeLists.txt
dumganhar Oct 25, 2024
d5f1d86
Use select_overload
dumganhar Oct 25, 2024
09d6f22
Bind spine::String, treat it as std::string.
dumganhar Oct 23, 2024
96d95a8
Fix setFrame binding
dumganhar Oct 25, 2024
4d613ae
fix spine::String binding
dumganhar Oct 25, 2024
de446fd
Move implementation of spine::String to .cpp
dumganhar Oct 25, 2024
564e677
opt start.
dumganhar Oct 25, 2024
c6838d8
disable RTTI
dumganhar Oct 25, 2024
aa9f33e
update sp[ine-define.ts, don't hack String.
dumganhar Oct 25, 2024
0a5d159
embind property
dumganhar Oct 28, 2024
e6a72db
Temp
dumganhar Oct 28, 2024
4f8aa6c
Add ENABLE_JSON_PARSER configuration
dumganhar Oct 28, 2024
88e1e61
Update
dumganhar Oct 28, 2024
6fd4e42
Update
dumganhar Oct 28, 2024
5b59d17
Update
dumganhar Oct 28, 2024
bf60723
Add ENABLE_BINARY_PARSER and fix the binding of addAnimationWith
dumganhar Oct 29, 2024
c823316
Check whether skin name is valid.
dumganhar Oct 29, 2024
bf87c3d
Use malloc/free to implement WasmSpineExtension.
dumganhar Oct 29, 2024
865a444
update spine_new
dumganhar Oct 29, 2024
e130811
virtual function, isActive, setActive
dumganhar Oct 29, 2024
22b7e19
fix a typo in spine.-core.d.ts
dumganhar Oct 29, 2024
420e513
Use c calloc, malloc, free directly in wasmSpineExtension.cpp
dumganhar Oct 29, 2024
1a9774e
Update, use malloc
dumganhar Oct 29, 2024
6bb7eed
Update CMakeLists.txt
dumganhar Oct 29, 2024
782766d
Update getPropertyId binding, fix AttachmentTimeline::getFrames binding
dumganhar Oct 29, 2024
7a35797
Remove unused virtual getPropertyId in CurveTimeline.h
dumganhar Oct 29, 2024
500e72e
Revert SkeletonJson.h/.cpp
dumganhar Oct 29, 2024
0dcd70d
Revert override -> virtual for spine runtime, it may support lower ve…
dumganhar Oct 29, 2024
fccaca2
Fix property binding by mistake.
dumganhar Oct 29, 2024
08cb4ab
Using spine::Vector instead.
dumganhar Oct 29, 2024
f228aad
Fix binding of apply.
dumganhar Oct 29, 2024
36f0534
Remove unused code
dumganhar Oct 29, 2024
673f0f3
Cleanup
dumganhar Oct 29, 2024
d89106e
Cleanup
dumganhar Oct 29, 2024
07f9547
Revert
dumganhar Oct 29, 2024
75e95a6
cleanup spine-define.ts
dumganhar Oct 29, 2024
f3cfe22
Update external
dumganhar Oct 29, 2024
3c48bf6
Fix compile errors.
dumganhar Oct 29, 2024
ed2bd99
Don't use std types.
dumganhar Oct 30, 2024
bd721e0
Update CMAKE
dumganhar Oct 30, 2024
a5431a0
Update CMakeLists.header.txt
dumganhar Oct 30, 2024
31d7b7c
Update property binding, reduce property binding size.
dumganhar Oct 30, 2024
5348e7b
inline MathUtil
dumganhar Oct 30, 2024
889e8b9
Add missing include
dumganhar Oct 30, 2024
d0b5f45
[CI] interface-check use the latest spine wasm
dumganhar Oct 30, 2024
62f614b
Update ci
dumganhar Oct 30, 2024
4c0b57d
cleanup
dumganhar Oct 30, 2024
dc9a5f4
Cleanup
dumganhar Oct 30, 2024
89b3dba
Add spine::Json test.
dumganhar Oct 30, 2024
b6cfcdd
update cmake
dumganhar Oct 30, 2024
d1b9b68
More inline and code refactors
dumganhar Oct 30, 2024
6ad4a43
Merge branch '385-spine-aot-2' of github.com:dumganhar/cocos-engine i…
dumganhar Oct 31, 2024
1b4d2a0
Add -Oz support
dumganhar Oct 31, 2024
a61c834
Remove inline for Vector::clear
dumganhar Oct 31, 2024
ff56150
Refactor WasmSpineExtension
dumganhar Oct 31, 2024
7ae611d
more inlines
dumganhar Oct 31, 2024
0de18c9
getUVs return reference, so don't copy it.
dumganhar Oct 31, 2024
1fa6629
Refactor logic in Skeleton.cpp, avoid some invocations.
dumganhar Oct 31, 2024
0a2a3a1
Tweak Skin.cpp
dumganhar Oct 31, 2024
cf2e54d
Using ::abs
dumganhar Oct 31, 2024
66a73f6
More inline for Vector getter.
dumganhar Oct 31, 2024
66b3e15
Update CMakeLists.txt
dumganhar Oct 31, 2024
b149905
revert
dumganhar Oct 31, 2024
78e1435
Optimize Vector<SpineDebugShape>
dumganhar Nov 1, 2024
5c94b34
Add MathUtil::ipow which is depended by Json.cpp.
dumganhar Nov 1, 2024
01fdec9
Fix asmjs build
dumganhar Nov 1, 2024
2aed5fa
Fix missing #include <cstdint>
dumganhar Nov 1, 2024
564d356
Update CMakeLists.txt
dumganhar Nov 1, 2024
1bcd914
Update Extension.cpp
dumganhar Nov 1, 2024
c6439cc
Revert wasmSpineExtension.cpp, return nullptr if size is zero.
dumganhar Nov 5, 2024
492ae95
Fix memory leak in _realloc if size is zero.
dumganhar Nov 5, 2024
bd05c2b
Update external
dumganhar Nov 5, 2024
9247851
Merge branch 'v3.8.5' of https://github.com/cocos/cocos-engine into 3…
dumganhar Nov 5, 2024
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: 1 addition & 1 deletion .github/workflows/build-wasm-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: dumganhar/setup-emsdk@997d2cde2deabda085a11f98e86e842915b0e846
with:
version: 3.1.41
actions-cache-folder: 'emsdk-cache'
actions-cache-folder: 'emsdk-cache-3.1.41'

- name: Verify
run: |
Expand Down
205 changes: 205 additions & 0 deletions .github/workflows/emscripten-patches/embind/bind.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
// Copyright 2012 The Emscripten Authors. All rights reserved.
// Emscripten is available under two separate licenses, the MIT license and the
// University of Illinois/NCSA Open Source License. Both these licenses can be
// found in the LICENSE file.

#include <emscripten/bind.h>
#ifdef USE_CXA_DEMANGLE
#include <../lib/libcxxabi/include/cxxabi.h>
#endif
#include <algorithm>
#include <climits>
#include <emscripten/emscripten.h>
#include <emscripten/wire.h>
#include <limits>
#include <list>
#include <typeinfo>
#include <vector>

using namespace emscripten;
using namespace internal;

static char* pointerToHexString(const void* ptr) {
static const char hexDigits[] = "0123456789abcdef";
uintptr_t address = reinterpret_cast<uintptr_t>(ptr);
char str[20] = "0x"; // Includes the "0x" prefix
int index = 2;
bool leadingZero = true; // Used to skip leading zeros

// Convert the address to a hexadecimal string
for (int i = (sizeof(address) * 2) - 1; i >= 0; --i) {
char hexChar = hexDigits[(address >> (i * 4)) & 0xF];
if (hexChar != '0' || !leadingZero || i == 0) { // Ensures at least one zero in the final character
str[index++] = hexChar;
leadingZero = false;
}
}
str[index] = '\0';

return strdup(str);
}

extern "C" {
const char* EMSCRIPTEN_KEEPALIVE __getTypeName(const std::type_info* ti) {
if (has_unbound_type_names) {
#ifdef USE_CXA_DEMANGLE
int stat;
char* demangled = abi::__cxa_demangle(ti->name(), NULL, NULL, &stat);
if (stat == 0 && demangled) {
return demangled;
}

switch (stat) {
case -1:
return strdup("<allocation failure>");
case -2:
return strdup("<invalid C++ symbol>");
case -3:
return strdup("<invalid argument>");
default:
return strdup("<unknown error>");
}
#else
return strdup(ti->name());
#endif
} else {
//cjh char str[80];
// sprintf(str, "%p", reinterpret_cast<const void*>(ti));
// return strdup(str);
return pointerToHexString(reinterpret_cast<const void*>(ti));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use sprintf since it will take in lots of code in libc.

}
}

static InitFunc* init_funcs = nullptr;

EMSCRIPTEN_KEEPALIVE void _embind_initialize_bindings() {
for (auto* f = init_funcs; f; f = f->next) {
f->init_func();
}
}

void _embind_register_bindings(InitFunc* f) {
f->next = init_funcs;
init_funcs = f;
}

}

namespace {
template <typename T> static void register_integer(const char* name) {
using namespace internal;
_embind_register_integer(TypeID<T>::get(), name, sizeof(T), std::numeric_limits<T>::min(),
std::numeric_limits<T>::max());
}

template <typename T> static void register_bigint(const char* name) {
using namespace internal;
_embind_register_bigint(TypeID<T>::get(), name, sizeof(T), std::numeric_limits<T>::min(),
std::numeric_limits<T>::max());
}

template <typename T> static void register_float(const char* name) {
using namespace internal;
_embind_register_float(TypeID<T>::get(), name, sizeof(T));
}

// matches typeMapping in embind.js
enum TypedArrayIndex {
Int8Array,
Uint8Array,
Int16Array,
Uint16Array,
Int32Array,
Uint32Array,
Float32Array,
Float64Array,
// Only available if WASM_BIGINT
Int64Array,
Uint64Array,
};

template <typename T> constexpr TypedArrayIndex getTypedArrayIndex() {
static_assert(internal::typeSupportsMemoryView<T>(), "type does not map to a typed array");
return std::is_floating_point<T>::value
? (sizeof(T) == 4 ? Float32Array : Float64Array)
: (sizeof(T) == 1
? (std::is_signed<T>::value ? Int8Array : Uint8Array)
: (sizeof(T) == 2 ? (std::is_signed<T>::value ? Int16Array : Uint16Array)
: (sizeof(T) == 4 ? (std::is_signed<T>::value ? Int32Array : Uint32Array)
: (std::is_signed<T>::value ? Int64Array : Uint64Array))));
}

template <typename T> static void register_memory_view(const char* name) {
using namespace internal;
_embind_register_memory_view(TypeID<memory_view<T>>::get(), getTypedArrayIndex<T>(), name);
}
} // namespace

EMSCRIPTEN_BINDINGS(builtin) {
using namespace emscripten::internal;

_embind_register_void(TypeID<void>::get(), "void");

_embind_register_bool(TypeID<bool>::get(), "bool", sizeof(bool), true, false);

register_integer<char>("char");
register_integer<signed char>("signed char");
register_integer<unsigned char>("unsigned char");
register_integer<signed short>("short");
register_integer<unsigned short>("unsigned short");
register_integer<signed int>("int");
register_integer<unsigned int>("unsigned int");
#if __wasm64__
register_bigint<signed long>("long");
register_bigint<unsigned long>("unsigned long");
#else
register_integer<signed long>("long");
register_integer<unsigned long>("unsigned long");
#endif

register_bigint<int64_t>("int64_t");
register_bigint<uint64_t>("uint64_t");

register_float<float>("float");
register_float<double>("double");

/*cjh
_embind_register_std_string(TypeID<std::string>::get(), "std::string");
_embind_register_std_string(
TypeID<std::basic_string<unsigned char>>::get(), "std::basic_string<unsigned char>");
_embind_register_std_wstring(TypeID<std::wstring>::get(), sizeof(wchar_t), "std::wstring");
_embind_register_std_wstring(TypeID<std::u16string>::get(), sizeof(char16_t), "std::u16string");
_embind_register_std_wstring(TypeID<std::u32string>::get(), sizeof(char32_t), "std::u32string");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't register std::string since all code is changed to use spine::String which is smaller.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is bind.cpp only used for spine?

*/
_embind_register_emval(TypeID<val>::get(), "emscripten::val");
/*cjh
// Some of these types are aliases for each other. Luckily,
// embind.js's _embind_register_memory_view ignores duplicate
// registrations rather than asserting, so the first
// register_memory_view call for a particular type will take
// precedence.

register_memory_view<char>("emscripten::memory_view<char>");
register_memory_view<signed char>("emscripten::memory_view<signed char>");
register_memory_view<unsigned char>("emscripten::memory_view<unsigned char>");

register_memory_view<short>("emscripten::memory_view<short>");
register_memory_view<unsigned short>("emscripten::memory_view<unsigned short>");
register_memory_view<int>("emscripten::memory_view<int>");
register_memory_view<unsigned int>("emscripten::memory_view<unsigned int>");
register_memory_view<long>("emscripten::memory_view<long>");
register_memory_view<unsigned long>("emscripten::memory_view<unsigned long>");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use memory_view feature.


register_memory_view<int8_t>("emscripten::memory_view<int8_t>");
register_memory_view<uint8_t>("emscripten::memory_view<uint8_t>");
register_memory_view<int16_t>("emscripten::memory_view<int16_t>");
register_memory_view<uint16_t>("emscripten::memory_view<uint16_t>");
register_memory_view<int32_t>("emscripten::memory_view<int32_t>");
register_memory_view<uint32_t>("emscripten::memory_view<uint32_t>");
register_memory_view<int64_t>("emscripten::memory_view<int64_t>");
register_memory_view<uint64_t>("emscripten::memory_view<uint64_t>");

register_memory_view<float>("emscripten::memory_view<float>");
register_memory_view<double>("emscripten::memory_view<double>");
*/
}
2 changes: 1 addition & 1 deletion .github/workflows/generate-emsdk-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: dumganhar/setup-emsdk@997d2cde2deabda085a11f98e86e842915b0e846
with:
version: ${{ github.event.inputs.emsdk_version }}
actions-cache-folder: 'emsdk-cache'
actions-cache-folder: 'emsdk-cache-${{ github.event.inputs.emsdk_version }}'

- name: Verify
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/native-compile-webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: dumganhar/setup-emsdk@997d2cde2deabda085a11f98e86e842915b0e846
with:
version: 3.1.45
actions-cache-folder: 'emsdk-cache'
actions-cache-folder: 'emsdk-cache-3.1.45'

- name: Verify
run: |
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/web-interface-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,90 @@ jobs:
ref: "${{ env.EXT_VERSION_HEAD }}"
fetch-depth: 1

- name: Setup emsdk
uses: dumganhar/setup-emsdk@997d2cde2deabda085a11f98e86e842915b0e846
with:
version: 3.1.41
actions-cache-folder: 'emsdk-cache-3.1.41'

- name: Verify
run: |
which emcc
emcc -v

- name: Apply emscripten patches
run: |
echo "--------------------------------- Save bind.cpp ---------------------------------"
cp $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp.bak
echo "--------------------------------- Apply embind bind.cpp patches ---------------------------------"
cp -f ./engine-HEAD/.github/workflows/emscripten-patches/embind/bind.cpp $EMSDK/upstream/emscripten/system/lib/embind/
echo "--------------------------------- Apply patches DONE! ---------------------------------"
cat $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp

- name: Install ninja
run: |
if ! command -v ninja &> /dev/null; then
echo "Ninja not found, installing..."
# sudo apt update
sudo apt install ninja-build
else
echo "Ninja is already installed."
fi
which ninja

- name: Build Spine WASM
run: |
cd ./engine-HEAD/native/cocos/editor-support/spine-wasm
mkdir build-wasm
cd build-wasm
emcmake cmake .. -GNinja
ninja
ls -l

- name: Build Spine ASMJS
run: |
cd ./engine-HEAD/native/cocos/editor-support/spine-wasm
sed -i 's/set(BUILD_WASM 1)/set(BUILD_WASM 0)/g' CMakeLists.txt
mkdir build-asmjs
cd build-asmjs
emcmake cmake .. -GNinja
ninja
ls -l

- name: Copy files to external directory
run: |
mkdir dist
cp ./engine-HEAD/native/cocos/editor-support/spine-wasm/build-wasm/spine.wasm ./dist/
cp ./engine-HEAD/native/cocos/editor-support/spine-wasm/build-wasm/spine.js ./dist/spine.wasm.js
cp ./engine-HEAD/native/cocos/editor-support/spine-wasm/build-asmjs/spine.js.mem ./dist/
cp ./engine-HEAD/native/cocos/editor-support/spine-wasm/build-asmjs/spine.js ./dist/spine.asm.js
echo "-------- Before replace spine wasm -----------"
ls -l ./engine-HEAD/native/external/emscripten/spine/
cp -f ./dist/* ./engine-HEAD/native/external/emscripten/spine/
echo "-------- After replace spine wasm ------------"
ls -l ./engine-HEAD/native/external/emscripten/spine/
echo "-----------------------------------------------"

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: spine-emscripten
path: dist

- name: Build Head Declarations
working-directory: ./engine-HEAD
run: |
npm install
node ./.github/workflows/package-size-check.js

- name: Restore patches
run: |
echo "-------------------------- Restore patches ---------------------------------"
rm $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
mv $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp.bak $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp
echo "-------------------------- Restore patches DONE! ---------------------------------"
cat $EMSDK/upstream/emscripten/system/lib/embind/bind.cpp

- uses: LouisBrunner/[email protected]
with:
old: ./engine/bin/.declarations/cc.d.ts
Expand Down
2 changes: 1 addition & 1 deletion cocos/spine/lib/spine-core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
duration: number;
name: string;
timelines: Array<Timeline>;
apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 50 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 166. Maximum allowed is 150
hasTimeline(id: number): boolean;
}
interface Timeline {
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 54 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
getPropertyId(): number;
}
enum MixBlend {
Expand Down Expand Up @@ -94,7 +94,7 @@
getCurveType(frameIndex: number): number;
setCurve(frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void;
getCurvePercent(frameIndex: number, percent: number): number;
abstract apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 97 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 160. Maximum allowed is 150
}
class RotateTimeline extends CurveTimeline {
static ENTRIES: number;
Expand All @@ -106,7 +106,7 @@
constructor(frameCount: number);
getPropertyId(): number;
setFrame(frameIndex: number, time: number, degrees: number): void;
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 109 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
}
class TranslateTimeline extends CurveTimeline {
static readonly ENTRIES: number;
Expand All @@ -114,17 +114,17 @@
constructor(frameCount: number);
getPropertyId(): number;
setFrame(frameIndex: number, time: number, x: number, y: number): void;
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 117 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
}
class ScaleTimeline extends TranslateTimeline {
constructor(frameCount: number);
getPropertyId(): number;
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 122 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
}
class ShearTimeline extends TranslateTimeline {
constructor(frameCount: number);
getPropertyId(): number;
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 127 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
}
class ColorTimeline extends CurveTimeline {
static ENTRIES: number;
Expand All @@ -135,7 +135,7 @@
getSlotIndex(): number;
setSlotIndex(inValue: number): void;
setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number): void;
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 138 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
}
class TwoColorTimeline extends CurveTimeline {
static readonly ENTRIES: number;
Expand All @@ -146,7 +146,7 @@
getSlotIndex(): number;
setSlotIndex(inValue: number): void;
setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number): void;
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 149 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
}
class AttachmentTimeline implements Timeline {
slotIndex: number;
Expand All @@ -159,7 +159,7 @@
setSlotIndex(inValue: number): void;
getAttachmentNames(): Array<string>;
setFrame(frameIndex: number, time: number, attachmentName: string): void;
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;

Check warning on line 162 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
}
class DeformTimeline extends CurveTimeline {
slotIndex: number;
Expand Down Expand Up @@ -189,7 +189,7 @@
setFrame(frameIndex: number, time: number, drawOrder: Array<number>): void;
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
}
class IkConstraintTimeline extends Updatable {
class IkConstraintTimeline extends CurveTimeline {
static readonly ENTRIES: number;
frames: ArrayLike<number>;
constructor(frameCount: number);
Expand Down Expand Up @@ -781,7 +781,7 @@
MipMapNearestNearest = 9984,
MipMapLinearNearest = 9985,
MipMapNearestLinear = 9986,
MipMapLinearLinear = 9987

Check failure on line 784 in cocos/spine/lib/spine-core.d.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Duplicate enum member value 9987
}
enum TextureWrap {
MirroredRepeat = 33648,
Expand Down
Loading
Loading