Compare commits

...

183 Commits

Author SHA1 Message Date
ww-rm
c1677bda48 Merge pull request #148 from ww-rm/dev/wpf
v0.16.12
2025-11-09 23:23:22 +08:00
ww-rm
83d054382c update changelog 2025-11-09 23:22:11 +08:00
ww-rm
608de7f2e8 update to v0.16.12 2025-11-09 23:18:26 +08:00
ww-rm
6f2eb504ab 完善嵌入逻辑 2025-11-09 12:29:41 +08:00
ww-rm
2b53e0b60b 重构 2025-11-09 00:27:01 +08:00
ww-rm
e96db328fa 增加桌面投影帧率显示 2025-11-08 23:05:08 +08:00
ww-rm
874404e3d3 增加最大帧率的首选项,移除用户状态中最大帧率的记忆 2025-11-08 19:44:15 +08:00
ww-rm
8e771fbaa4 重构Win32Natives 2025-11-08 19:17:09 +08:00
ww-rm
fb319e09d8 完善逻辑 2025-11-08 17:42:11 +08:00
ww-rm
849f1813be 拆分双渲染线程 2025-11-08 17:34:20 +08:00
ww-rm
763d2e295e 拆分逻辑帧和渲染帧 2025-11-08 17:17:25 +08:00
ww-rm
d6ca3cca92 增加实时帧率显示 2025-11-08 00:09:55 +08:00
ww-rm
32c826a3db 修复label不显示下划线的问题 2025-11-07 23:20:05 +08:00
ww-rm
b17f3bec79 add comment 2025-11-07 18:40:30 +08:00
ww-rm
246f70fd4d 修改延迟保存时间为1s 2025-11-04 18:29:27 +08:00
ww-rm
7eb140a030 增强报错日志输出 2025-11-03 18:13:01 +08:00
ww-rm
c68a91fe3f 修改日志输出等级 2025-11-03 18:09:05 +08:00
ww-rm
dc2cb61219 Merge pull request #144 from ww-rm/dev/wpf
v0.16.11
2025-11-02 22:09:34 +08:00
ww-rm
decbb10fcb 修复可能的null错误 2025-11-02 22:05:58 +08:00
ww-rm
c538fd8960 Merge pull request #143 from ww-rm/dev/wpf
v0.16.11
2025-11-02 21:38:33 +08:00
ww-rm
cc884f7f5b update to v0.16.11 2025-11-02 21:36:29 +08:00
ww-rm
dcfe48912b 修改缩放倍数 2025-11-02 21:36:00 +08:00
ww-rm
3c77365f60 update readme 2025-11-02 21:34:22 +08:00
ww-rm
baff9579e5 update changelog 2025-11-02 21:33:10 +08:00
ww-rm
44f4367f3e 增加shift切换缩放倍速 2025-11-02 21:30:08 +08:00
ww-rm
5823d58dca 调整面板顺序 2025-11-02 15:26:20 +08:00
ww-rm
7bb76d508e 移动浏览目录至用户状态 2025-11-02 15:25:43 +08:00
ww-rm
b4c7579d24 修复字体颜色错误 2025-11-02 15:07:08 +08:00
ww-rm
aafe487d96 调试标题 2025-11-02 14:28:54 +08:00
ww-rm
dc2f6a2dad 改善性能 2025-11-02 14:22:00 +08:00
ww-rm
10b691d897 增加调试标志位 2025-11-02 12:24:17 +08:00
ww-rm
50219946ec 修改缩放变化量 2025-11-02 11:20:24 +08:00
ww-rm
659f6fb690 Merge pull request #142 from ww-rm/dev/wpf
update readme
2025-10-29 23:22:06 +08:00
ww-rm
af5cb97f1a update readme 2025-10-29 23:21:10 +08:00
ww-rm
1be9e9e75f Merge pull request #141 from ww-rm/dev/wpf
update readme
2025-10-29 23:19:26 +08:00
ww-rm
b0308db977 update readme 2025-10-29 23:18:40 +08:00
ww-rm
2dbcfe4ea7 update readme 2025-10-29 23:17:51 +08:00
ww-rm
9040e02025 Merge pull request #140 from ww-rm/dev/wpf
v0.16.10
2025-10-29 21:35:34 +08:00
ww-rm
b3ba073368 完善日志 2025-10-29 21:34:30 +08:00
ww-rm
332019a667 修复文件夹无法自动创建的bug 2025-10-29 21:00:38 +08:00
ww-rm
add9cf157d 修改压缩路径 2025-10-29 20:54:35 +08:00
ww-rm
8b0ea750d8 Merge pull request #139 from ww-rm/dev/wpf
v0.16.10
2025-10-29 20:45:24 +08:00
ww-rm
733739921d update changelog 2025-10-29 20:44:20 +08:00
ww-rm
e0f46f521a update to v0.16.10 2025-10-29 20:43:43 +08:00
ww-rm
aa4245ef2a add linux release 2025-10-29 20:42:31 +08:00
ww-rm
a262538eba 增加linux条件依赖 2025-10-29 19:48:23 +08:00
ww-rm
2e4a5a75c0 修复着色器语法兼容性错误 2025-10-29 19:33:45 +08:00
ww-rm
9331656431 修改项目配置 2025-10-28 22:03:39 +08:00
ww-rm
64bc12db06 Merge pull request #136 from ww-rm/dev/wpf
v0.16.9
2025-10-27 23:51:47 +08:00
ww-rm
7a29fee641 update readme 2025-10-27 23:50:39 +08:00
ww-rm
49f95ddbb7 add readme 2025-10-27 23:48:21 +08:00
ww-rm
317ee71882 update changelog 2025-10-27 23:45:16 +08:00
ww-rm
7780fbda28 update ignore 2025-10-27 23:43:57 +08:00
ww-rm
b54c6a1777 update to v0.16.9 2025-10-27 23:43:52 +08:00
ww-rm
617157044c 增加透明度参数 2025-10-27 23:33:25 +08:00
ww-rm
29d7e8d9d8 移除依赖库 2025-10-27 22:26:33 +08:00
ww-rm
701d1fcf90 增加日志 2025-10-27 07:35:05 +08:00
ww-rm
df36d46528 增加动态进度条 2025-10-27 00:00:44 +08:00
ww-rm
3459f3af03 修复进度回调done值错误 2025-10-26 23:59:57 +08:00
ww-rm
5498508700 移除不受支持的格式 2025-10-26 23:16:40 +08:00
ww-rm
a61bb43250 增加preview命令 2025-10-26 22:14:34 +08:00
ww-rm
aace461ae0 修改方法名 2025-10-26 22:05:48 +08:00
ww-rm
c02cec9a18 修改图像质量默认值为100 2025-10-26 22:01:40 +08:00
ww-rm
31daed9e81 移除不受支持的图像格式 2025-10-26 21:49:58 +08:00
ww-rm
997d55350d 修复可能的资源泄露 2025-10-26 21:28:11 +08:00
ww-rm
cc6d1b6c00 更新注释 2025-10-26 19:35:43 +08:00
ww-rm
e14c54c3a4 调整时间轴处理顺序 2025-10-26 17:35:51 +08:00
ww-rm
5eba515eac 增加 query 命令 2025-10-26 17:31:20 +08:00
ww-rm
f878530184 重构 2025-10-26 16:30:13 +08:00
ww-rm
81d9224658 增加参数验证 2025-10-26 16:22:49 +08:00
ww-rm
9d9edb8bc4 增加 export 命令 2025-10-26 16:16:43 +08:00
ww-rm
d3b5814c6f small change 2025-10-26 15:52:47 +08:00
ww-rm
aade44cffb 增加注释 2025-10-26 15:19:09 +08:00
ww-rm
c4956b9c16 重构 2025-10-26 13:26:47 +08:00
ww-rm
7ca431b214 增加System.CommandLine库 2025-10-25 17:19:27 +08:00
ww-rm
74538ddf74 apng和mov格式参数改为枚举量类型 2025-10-25 17:04:39 +08:00
ww-rm
779500ee8e 修改ApngPred属性名为PredMethod 2025-10-25 16:47:00 +08:00
ww-rm
ee7c9e9e54 Merge pull request #132 from jayng9663/dev/wpf
Add --warmup option to control physics warmup loops
2025-10-24 23:07:13 +08:00
ww-rm
d335645dc1 remove unnecessary frame loops 2025-10-19 20:46:42 +08:00
ww-rm
0893bd4b54 Merge pull request #133 from ww-rm/dev/wpf
v0.16.8
2025-10-19 20:19:48 +08:00
ww-rm
862926b43e update to v0.16.8 2025-10-19 20:18:11 +08:00
ww-rm
0324ba7971 update changelog 2025-10-19 20:18:02 +08:00
Jay
6a17ec0397 Add --warmup option to control physics warmup loops
Create a new --warmup argument to specify the number of warmup loops for physics before export. This allows users to control how many times the animation is pre-processed to stabilize physics.
2025-10-19 04:59:34 -07:00
ww-rm
53a7700798 增加单独的参数拷贝方式 2025-10-19 17:59:33 +08:00
ww-rm
30608e05bc 修改窗口默认大小 2025-10-19 15:16:05 +08:00
ww-rm
3dcd7b22ca 增加皮肤和插槽的全部启用禁用菜单项 2025-10-19 15:10:45 +08:00
ww-rm
dae5d0b7c7 增加侧边栏折叠功能 2025-10-19 01:01:34 +08:00
ww-rm
f5d3f93cde 增加侧边栏图标样式 2025-10-19 00:05:46 +08:00
ww-rm
dbd7c13c32 Merge branch 'dev/wpf' of github.com:ww-rm/SpineViewer into dev/wpf 2025-10-17 22:44:50 +08:00
ww-rm
b662d8f68a Merge pull request #131 from jhq223/feature/cli-enhancements
Feat(CLI): Add Single-Frame Export and Fix Related Bugs
2025-10-17 22:44:33 +08:00
ww-rm
02445d36e5 增加实时状态保存 2025-10-17 22:41:49 +08:00
ww-rm
b178e48e84 去除默认的最小化提示弹框 2025-10-16 23:54:07 +08:00
ww-rm
c90713ffe7 change tolower to tolowerinvariant 2025-10-16 22:33:36 +08:00
jhq223
dc472cf2a8 Fix: Resolve frame export logic and slot visibility issues
This commit addresses two critical bugs in the single-frame export functionality of the CLI tool.

1.  **Corrects Export Mode Detection for Ambiguous Formats (.webp):**
    - Previously, any output format also supported by the video exporter (like `.webp`) would incorrectly trigger video export mode, ignoring the `--time` argument intended for single-frame captures.
    - The logic is now updated to prioritize the presence of the `--time` argument. If this argument is provided, the tool is forced into single-frame export mode, correctly handling formats like static `.webp`.
    - This was implemented by changing the `time` variable to a nullable float (`float?`) to reliably detect if the argument was passed.

2.  **Fixes "Slot Not Found" Error for `--hide-slot`:**
    - The operation to hide slots was being performed *before* the animation was applied to the skeleton. This caused failures when trying to hide slots that are only activated or have attachments during a specific animation.
    - The slot visibility logic has been moved to execute *after* the animation state is set and the skeleton is updated to the target frame. This ensures that the skeleton is in its final pose, making all relevant slots available for modification.
2025-10-16 20:57:50 +08:00
jhq223
03c599264e feat(cli): Add single-frame image export
Extends the CLI to support exporting single frames as images (.png, .jpg, etc.) in addition to video.

The export logic now determines the output type based on the file extension of the `--output` path.

- Adds new arguments: `--time` to specify the frame and `--quality` for image compression.
- Uses `FrameExporter` for recognized image formats.
- Updates the help message with the new options.
2025-10-16 19:56:13 +08:00
ww-rm
8f7297bea5 Merge pull request #129 from jhq223/feature/cli-enhancements
feat: Add --skin and --hide-slot CLI arguments
2025-10-15 20:59:40 +08:00
jhq223
e4d655012b feat: Add --skin and --hide-slot CLI arguments 2025-10-15 16:01:18 +08:00
ww-rm
4b23c779d3 Merge pull request #124 from ww-rm/dev/wpf
v0.16.7
2025-10-06 14:04:13 +08:00
ww-rm
f5684a50dc update to v0.16.7 2025-10-06 14:03:19 +08:00
ww-rm
579ce9f944 update changelog 2025-10-06 14:03:03 +08:00
ww-rm
7aa88089b8 修复空帧导致的包围盒计算错误 2025-10-06 14:02:21 +08:00
ww-rm
be983f8407 修复窗口二次显示错误 2025-10-06 13:32:03 +08:00
ww-rm
249b930602 Merge pull request #122 from ww-rm/dev/wpf
v0.16.6
2025-10-04 20:55:59 +08:00
ww-rm
6472f378b7 update to v0.16.6 2025-10-04 20:53:29 +08:00
ww-rm
8672f0571c udpate changelog 2025-10-04 20:53:06 +08:00
ww-rm
e7a990c1bd 修复可能出现的0缩放错误 2025-10-04 20:50:08 +08:00
ww-rm
6727fa8e8f Merge pull request #120 from ww-rm/dev/wpf
v0.16.5
2025-10-04 16:59:08 +08:00
ww-rm
66d8c489b5 update to v0.16.5 2025-10-04 16:58:32 +08:00
ww-rm
1931c4713a update changelog 2025-10-04 16:58:09 +08:00
ww-rm
f19f172e7c 修复窗口联动显示问题 2025-10-04 16:56:32 +08:00
ww-rm
092fa76124 修复对于某些旧atlas没有size行的读取异常 2025-10-04 16:38:14 +08:00
ww-rm
a0b7db0a70 Merge pull request #119 from ww-rm/dev/wpf
v0.16.4
2025-10-04 00:11:15 +08:00
ww-rm
6438b46ea0 修复样式错误 2025-10-04 00:09:38 +08:00
ww-rm
2bf73db9d3 补充前景色绑定 2025-10-03 23:54:54 +08:00
ww-rm
03c4974c9f Merge pull request #118 from ww-rm/dev/wpf
v0.16.4
2025-10-03 23:50:05 +08:00
ww-rm
760fa3a451 update to v0.16.4 2025-10-03 23:49:12 +08:00
ww-rm
018d8f5330 update changelog 2025-10-03 23:48:25 +08:00
ww-rm
c9730e1a11 完善标题栏皮肤颜色切换 2025-10-03 23:45:35 +08:00
ww-rm
1f6e19e544 修改日志着色 2025-10-03 22:29:43 +08:00
ww-rm
a1a0777791 重构样式 2025-10-03 22:22:21 +08:00
ww-rm
887e3f76d2 增加程序皮肤首选项 2025-10-03 19:38:48 +08:00
ww-rm
8b622050fa 重构 2025-10-03 19:11:59 +08:00
ww-rm
20369aaf43 调整颜色按钮背景色固定白色 2025-10-03 16:17:26 +08:00
ww-rm
07c0e84b7d 修复颜色错误 2025-10-03 16:11:04 +08:00
ww-rm
6770acaffd small change 2025-10-03 13:34:45 +08:00
ww-rm
6201ccc7d1 去除独立颜色使用 2025-10-03 09:46:14 +08:00
ww-rm
965d1c469e 增加ColorPicker使用 2025-10-03 09:19:02 +08:00
ww-rm
b448ca8cb0 重构 2025-10-02 22:42:21 +08:00
ww-rm
2204eb6c75 增加apng格式并且调整部分布局结构 2025-10-02 22:18:05 +08:00
ww-rm
0abe063899 调整文件结构 2025-10-02 15:18:40 +08:00
ww-rm
6f9b357473 Merge pull request #116 from ww-rm/dev/wpf
v0.16.3
2025-10-02 14:22:11 +08:00
ww-rm
152d842043 update to v0.16.3 2025-10-02 14:21:35 +08:00
ww-rm
d16f97d574 update changelog 2025-10-02 14:21:18 +08:00
ww-rm
d28eabaca5 解决可能卡死问题 2025-10-02 14:19:53 +08:00
ww-rm
b730f677be 完善像素检测 2025-10-02 14:04:42 +08:00
ww-rm
8f8806417a 完善工作区加载模型逻辑 2025-10-02 11:44:51 +08:00
ww-rm
06694c9e89 补充注释 2025-10-02 11:29:13 +08:00
ww-rm
e9b0ce3db2 增加None命中测试等级 2025-10-02 11:19:22 +08:00
ww-rm
4c72608398 修改部分布局 2025-10-02 11:01:38 +08:00
ww-rm
7e99882fbf 增加命中测试等级选项 2025-10-02 10:32:24 +08:00
ww-rm
0d72d8749a 调整调试输出逻辑 2025-10-02 10:23:51 +08:00
ww-rm
d5b7a74520 增加Name属性 2025-10-02 10:17:12 +08:00
ww-rm
0202027edb 修复模型添加顺序错误 2025-10-02 09:32:17 +08:00
ww-rm
d1d32b6292 Merge pull request #115 from ww-rm/dev/wpf
v0.16.2
2025-10-01 23:48:03 +08:00
ww-rm
b32485e122 update to v0.16.2 2025-10-01 23:45:01 +08:00
ww-rm
36d578f4d4 update changelog 2025-10-01 23:44:42 +08:00
ww-rm
42bd5c2830 增加精确命中检测和插槽输出 2025-10-01 23:43:03 +08:00
ww-rm
44548618e8 精简代码 2025-10-01 19:58:39 +08:00
ww-rm
681b1be360 修复添加顺序错误 2025-10-01 18:45:03 +08:00
ww-rm
30dee9978c 重构并增加HitTest 2025-10-01 16:35:51 +08:00
ww-rm
47aafc7948 Merge pull request #113 from ww-rm/dev/wpf
v0.16.1
2025-09-30 22:19:01 +08:00
ww-rm
1d8e2efdff update to v0.16.1 2025-09-30 22:14:07 +08:00
ww-rm
dd504d32ca 修复3.4的附件残留问题 2025-09-30 14:47:00 +08:00
ww-rm
267c7b81c3 Merge pull request #111 from ww-rm/dev/wpf
update readme
2025-09-30 12:19:17 +08:00
ww-rm
c4a6fd9d86 update readme 2025-09-30 12:18:45 +08:00
ww-rm
6e46152e4c Merge pull request #110 from ww-rm/dev/wpf
update readme
2025-09-30 12:00:41 +08:00
ww-rm
f2f296e494 update readme 2025-09-30 11:59:51 +08:00
ww-rm
34f9eeff2c Merge pull request #109 from ww-rm/dev/wpf
v0.16.0
2025-09-30 11:49:45 +08:00
ww-rm
1278fefea2 update readme 2025-09-30 11:47:55 +08:00
ww-rm
48d46afcff update readme 2025-09-30 11:12:06 +08:00
ww-rm
6742dacaf2 update to v0.16.0 2025-09-30 10:53:06 +08:00
ww-rm
3337ecc03a update changelog 2025-09-30 10:52:10 +08:00
ww-rm
b9eaacd1f7 修复可能的3.4版本附件残留问题 2025-09-30 10:30:25 +08:00
ww-rm
a0ada51325 修复跨线程错误 2025-09-30 09:21:54 +08:00
ww-rm
8e03911957 修复可能的窗口大小不正确问题 2025-09-30 08:55:00 +08:00
ww-rm
0b3db0fd0d 增加IsShuttingDownFromTray标志位 2025-09-30 08:45:28 +08:00
ww-rm
bb2862ed4f 增加最小化至托盘图标功能 2025-09-30 01:53:14 +08:00
ww-rm
8c3be98b54 修复记忆状态中的长度单位错误 2025-09-30 00:28:05 +08:00
ww-rm
b76224c010 调整顺序 2025-09-30 00:00:32 +08:00
ww-rm
bd9f8d714a 增加开机自启功能和自启设置 2025-09-29 23:26:06 +08:00
ww-rm
6900968555 调整布局 2025-09-29 00:05:41 +08:00
ww-rm
741d334a92 切换桌面投影时自动设置预览分辨率为主屏幕分辨率 2025-09-28 22:20:48 +08:00
ww-rm
b583108afa 更新模板 2025-09-28 20:44:12 +08:00
ww-rm
f7ace4dfe9 Merge pull request #106 from ww-rm/dev/wpf
v0.15.19
2025-09-27 23:48:05 +08:00
ww-rm
7ce2bd5629 update to v0.15.19 2025-09-27 23:46:25 +08:00
ww-rm
41716df7b2 update changelog 2025-09-27 23:45:49 +08:00
ww-rm
fe9b9829e2 增加 wallpaper view 2025-09-27 23:43:54 +08:00
ww-rm
4365c2a008 small change 2025-09-27 23:41:31 +08:00
ww-rm
7896e072e7 移除LastState中背景图片的记忆 2025-09-27 21:24:15 +08:00
ww-rm
940397c673 增加Texture加载失败时的日志信息 2025-09-27 18:49:29 +08:00
ww-rm
d57ea781f0 修复由于可能存在问题的奇数长度顶点数组导致的数组越界问题 2025-09-27 18:48:54 +08:00
ww-rm
b74f2811a7 add SFMLRenderWindow 2025-09-27 18:20:06 +08:00
ww-rm
66223f952b 重载后自动选中列表模型 2025-09-24 23:54:05 +08:00
271 changed files with 7233 additions and 3027 deletions

View File

@@ -15,4 +15,4 @@ assignees: ''
如果有必要,提供报错时的有关截图。/If applicable, add screenshots to help explain your problem.
## 附件(可选)/Attachments (Optional)
请将会**出现问题的文件**以及**日志文件**打包成一个 ZIP 后作为附件贴在 issue 内。/Please compress the problematic files and the log files into a single ZIP archive and attach it to this issue.
请将会**出现问题的文件**以及**日志文件**打包成一个 ZIP 后作为附件贴在 issue 内,日志文件位于程序目录下的 `logs` 文件夹内。/Please compress the problematic files and the log files into a single ZIP archive and attach it to this issue. The log files are located in the `logs` folder under the program directory.

View File

@@ -11,6 +11,10 @@ jobs:
build-release:
if: ${{ github.event.pull_request.merged == true }}
runs-on: windows-latest
outputs:
version: ${{ steps.extract_version.outputs.version }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
env:
PROJECT_NAME: SpineViewer
PROJ_CLI_NAME: SpineViewerCLI
@@ -27,21 +31,15 @@ jobs:
dotnet-version: "8.0.x"
- name: Extract version from csproj
id: extract_version
shell: pwsh
run: |
[xml]$proj = Get-Content "$env:PROJECT_NAME\$env:PROJECT_NAME.csproj"
$VERSION_NUM = $proj.Project.PropertyGroup.Version
$VERSION_TAG = "v$VERSION_NUM".Trim()
"VERSION=$VERSION_TAG" >> $env:GITHUB_ENV
- name: Check Version Tag
shell: pwsh
run: |
if (-not $env:VERSION) {
Write-Error "Version tag not found in csproj file."
exit 1
}
Write-Host "Version tag found: $env:VERSION"
echo "Version tag found: $VERSION_TAG"
echo "version=$VERSION_TAG" >> $env:GITHUB_OUTPUT
echo "VERSION=$VERSION_TAG" >> $env:GITHUB_ENV
- name: Tag merge commit
shell: pwsh
@@ -63,19 +61,11 @@ jobs:
dotnet publish "$env:PROJECT_NAME\$env:PROJECT_NAME.csproj" -c Release -r win-x64 --sc true -o "publish\$env:PROJECT_NAME-$env:VERSION-SelfContained"
dotnet publish "$env:PROJ_CLI_NAME\$env:PROJ_CLI_NAME.csproj" -c Release -r win-x64 --sc true -o "publish\$env:PROJECT_NAME-$env:VERSION-SelfContained"
- name: Create release directory
- name: Compress Windows builds
shell: pwsh
run: |
New-Item -ItemType Directory -Path release -Force | Out-Null
- name: Compress FrameworkDependent version
shell: pwsh
run: |
Compress-Archive -Path "publish\$env:PROJECT_NAME-$env:VERSION\*" -DestinationPath "release\$env:PROJECT_NAME-$env:VERSION.zip" -Force
- name: Compress SelfContained version
shell: pwsh
run: |
Compress-Archive -Path "publish\$env:PROJECT_NAME-$env:VERSION-SelfContained\*" -DestinationPath "release\$env:PROJECT_NAME-$env:VERSION-SelfContained.zip" -Force
- name: Create GitHub Release
@@ -89,7 +79,7 @@ jobs:
draft: false
prerelease: false
- name: Upload FrameworkDependent zip
- name: Upload Windows FrameworkDependent zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -99,7 +89,7 @@ jobs:
asset_name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}.zip
asset_content_type: application/zip
- name: Upload SelfContained zip
- name: Upload Windows SelfContained zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -108,3 +98,43 @@ jobs:
asset_path: release/${{ env.PROJECT_NAME }}-${{ env.VERSION }}-SelfContained.zip
asset_name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-SelfContained.zip
asset_content_type: application/zip
build-release-linux:
needs: build-release
if: ${{ github.event.pull_request.merged == true }}
runs-on: ubuntu-latest
env:
PROJ_CLI_NAME: SpineViewerCLI
VERSION: ${{ needs.build-release.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-tags: true
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
- name: Publish Linux SelfContained version
run: |
dotnet publish "$PROJ_CLI_NAME/$PROJ_CLI_NAME.csproj" -c Release -r linux-x64 --sc true -o "publish/${PROJ_CLI_NAME}-${VERSION}-Linux-SelfContained"
- name: Compress Linux build
run: |
mkdir -p release
cd publish
zip -r "../release/${PROJ_CLI_NAME}-${VERSION}-Linux-SelfContained.zip" "${PROJ_CLI_NAME}-${VERSION}-Linux-SelfContained"
- name: Upload Linux zip to GitHub Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build-release.outputs.upload_url }}
asset_path: release/${{ env.PROJ_CLI_NAME }}-${{ env.VERSION }}-Linux-SelfContained.zip
asset_name: ${{ env.PROJ_CLI_NAME }}-${{ env.VERSION }}-Linux-SelfContained.zip
asset_content_type: application/zip

2
.gitignore vendored
View File

@@ -396,3 +396,5 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
launchSettings.json

View File

@@ -1,5 +1,90 @@
# CHANGELOG
## v0.16.12
- 修复 label 控件文字显示问题
- 增强报错日志输出
- 增加实时帧率显示
- 首选项增加预览画面和投影最大帧率设置,移除用户状态和工作区帧率记忆
- 优化某些性能
## v0.16.11
- 增加 shift 切换缩放倍数
- 改善后台性能
- 修复字体显示颜色问题
- 调整浏览目录参数保存至用户状态
- 调整浏览面板至最后
## v0.16.10
- 增加 Linux 平台 CLI 工具构建
## v0.16.9
- 重构 CLI 工具
## v0.16.8
- 去除首次的最小化提示弹框
- 窗口布局改变后实时保存
- 增加侧边栏图标和折叠功能
- 增加皮肤和插槽参数面板的全部启用/禁用菜单项
- 修改窗口默认大小
- 支持复制并应用单独的模型皮肤或插槽参数
## v0.16.7
- 修复空帧导致的包围盒计算错误
- 修复重复启动程序无法唤出界面的问题
## v0.16.6
- 修复控件尺寸为0时导致的画面缩放错误
## v0.16.5
- 修复对于无 size 行的旧 atlas 格式读取错误
- 修复托盘化之后无法联动显示窗口的问题
## v0.16.4
- 增加 apng 导出格式
- 增加颜色拾取器面板
- 增加程序皮肤(主题颜色)首选项
- 优化部分使用体验
## v0.16.3
- 修复加载工作区时的顺序错误
- 调整部分调试渲染的逻辑
- 完善命中检测逻辑
## v0.16.2
- 修复批量添加时的添加顺序错误
- 增加精确命中检测和插槽输出功能
- 部分代码重构
## v0.16.1
- 修复 3.4 版本存在的附件残留问题
## v0.16.0
- 增加最小化至托盘图标功能
- 调整部分参数项的顺序
- 增加开机自启和自启文件设置
- 切换桌面投影时自动设置预览分辨率为主屏幕分辨率
- 修复 3.4 版本下可能存在的附件残留问题
## v0.15.19
- 模型重载后选中最后一个重载模型
- 修复 3.4 版本可能的奇数顶点数组导致的越界崩溃问题
- 移除参数自动记录中的背景图片路径
- 增加测试性桌面投影功能
## v0.15.18
- 完善窗口日志颜色标记

View File

@@ -4,10 +4,11 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0-windows</TargetFramework>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.15.18</Version>
<Version>0.16.0</Version>
<UseWPF>true</UseWPF>
</PropertyGroup>

View File

@@ -1,140 +1,167 @@
# [SpineViewer](https://github.com/ww-rm/SpineViewer)
[![Build and Release](https://github.com/ww-rm/SpineViewer/actions/workflows/dotnet-desktop.yml/badge.svg)](https://github.com/ww-rm/SpineViewer/actions/workflows/dotnet-desktop.yml)
[![Build and Release](https://github.com/ww-rm/SpineViewer/actions/workflows/dotnet-release.yml/badge.svg)](https://github.com/ww-rm/SpineViewer/actions/workflows/dotnet-release.yml)
[![GitHub Release](https://img.shields.io/github/v/release/ww-rm/SpineViewer?logo=github\&logoColor=959da5\&label=Release\&labelColor=3f4850)](https://github.com/ww-rm/SpineViewer/releases)
[![Downloads](https://img.shields.io/github/downloads/ww-rm/SpineViewer/total?logo=github\&logoColor=959da5\&label=Downloads\&labelColor=3f4850)](https://github.com/ww-rm/SpineViewer/releases)
![Languages](https://img.shields.io/badge/Languages-中文%20%7C%20English%20%7C%20日本語-blue)
[中文](README.md) | [English](README.en.md)
A simple and user-friendly Spine file viewer and exporter with multi-language support (Chinese/English/Japanese).
Spine file viewer & exporter, also a dynamic wallpaper program supporting Spine animations.
![previewer](img/preview.webp)
![previewer](https://github.com/user-attachments/assets/697ae86f-ddf0-445d-951c-cf04f5206e40)
## Features
* Supports multiple versions of Spine files.
* Batch open files via drag-and-drop or copy-paste.
* Batch preview functionality.
* List-based multi-skeleton viewing and render order management.
* Batch adjustment of skeleton parameters using multi-selection.
* Multi-track animation settings.
* Skin and custom slot attachment settings.
* Custom slot visibility settings.
* Debug rendering support.
* View/model/track time scale adjustment.
* Track alpha blending parameter settings.
* Fullscreen preview mode.
* Export to single frame/image sequence/animated GIF/video formats.
* Automatic resolution batch export.
* FFmpeg custom export support.
* Program parameter saving.
* File name extension association.
* Supports texture image formats other than PNG.
* ...
### Supported Spine Versions
| Version | View & Export |
| :-----: | :------------------: |
| `2.1.x` | :white\_check\_mark: |
| `3.4.x` | :white\_check\_mark: |
| `3.5.x` | :white\_check\_mark: |
| `3.6.x` | :white\_check\_mark: |
| `3.7.x` | :white\_check\_mark: |
| `3.8.x` | :white\_check\_mark: |
| `4.0.x` | :white\_check\_mark: |
| `4.1.x` | :white\_check\_mark: |
| `4.2.x` | :white\_check\_mark: |
| `4.3.x` | |
More versions under development \:rocket: \:rocket: \:rocket:
### Supported Export Formats
| Format | Use Case |
| -------------- | ----------------------------------------------------------------------------- |
| Single Frame | Generate high-resolution images of models; manually adjust the desired frame. |
| Frame Sequence | Supports PNG format with transparency and lossless compression. |
| GIF/Video | Export preview animations or common video formats. |
| Custom Export | Supports arbitrary FFmpeg parameters for custom, complex export needs. |
## Installation
Download the compressed package from the [Release](https://github.com/ww-rm/SpineViewer/releases) page.
The software requires the [.NET Desktop Runtime 8.0.x](https://dotnet.microsoft.com/download/dotnet/8.0) to run.
Alternatively, download the package with the `SelfContained` suffix for standalone execution.
For exporting GIF/MP4 and other animation/video formats, FFmpeg must be installed and added to the system environment variables. Visit the [FFmpeg Windows download page](https://ffmpeg.org/download.html#build-windows) or download the latest version directly: [ffmpeg-release-full.7z](https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z).
## Usage
### How to Change the Display Language
In the menu, go to "File" -> "Preferences..." -> "Language," select your desired language, and confirm the change.
### Basic Overview
The program is organized into a left-right layout:
* **Left Panel:** Functionality panel.
* **Right Panel:** Preview display.
The left panel includes three sub-panels:
* **Browse:** Preview the content of a specified folder without importing files into the program. This panel allows generating `.webp` previews for models or importing selected models.
* **Model:** Lists imported models for rendering. Parameters and rendering order can be adjusted here, along with other model-related functionalities.
* **Display:** Adjust parameters for the right-side preview display.
Hover your mouse over buttons, labels, or input fields to see help text for most UI elements.
### Skeleton Import
Drag-and-drop or paste skeleton files/directories into the Model panel.
Alternatively, use the right-click menu in the Browse panel to import selected items.
### Content Adjustment
The Model panel supports right-click menus, some shortcuts, and batch adjustments of model parameters through multi-selection.
For preview display adjustments:
* **Left-click:** Select and drag models. Hold `Ctrl` for multi-selection, synchronized with the left-side list.
* **Right-click:** Drag the entire display.
* **Scroll wheel:** Zoom in/out. Hold `Ctrl` to scale selected models.
* **Render selected-only mode:** In this mode, the preview only shows selected models, and selection status can only be changed via the left-side list.
The buttons below the preview display allow time adjustments, serving as a simple playback control.
### Content Export
Export follows the **WYSIWYG (What You See Is What You Get)** principle, meaning the preview display reflects the exported output.
Use the right-click menu in the Model panel to export selected items.
Key export parameters include:
* **Output folder:** Optional. When not specified, output is saved to the respective model folder; otherwise, all output is saved to the provided folder.
* **Export single:** By default, each model is exported independently. Selecting "Export single" renders all selected models in a single frame, producing a unified output.
* **Auto resolution:** Ignores the preview resolution and viewport parameters, exporting output at the actual size of the content. For animations/videos, the output matches the size required for full visibility.
### More Information
For detailed usage and documentation, see the [Wiki](https://github.com/ww-rm/SpineViewer/wiki). For usage questions or bug reports, submit an [Issue](https://github.com/ww-rm/SpineViewer/issues).
## Acknowledgements
* [spine-runtimes](https://github.com/EsotericSoftware/spine-runtimes)
* [SFML.Net](https://github.com/SFML/SFML.Net)
* [FFMpegCore](https://github.com/rosenbjerg/FFMpegCore)
* [HandyControl](https://github.com/HandyOrg/HandyControl)
* [NLog](https://github.com/NLog/NLog)
* [SkiaSharp](https://github.com/mono/SkiaSharp)
[https://github.com/user-attachments/assets/37b6b730-088a-4352-827a-c338127a16f0](https://github.com/user-attachments/assets/37b6b730-088a-4352-827a-c338127a16f0)
---
*If you find this project helpful, please give it a \:star: and share it with others! :)*
## Features
- Supports multiple Spine file versions (`2.1.x; 3.4.x - 4.2.-`)
- List-based multi-skeleton view with rendering order management
- Supports multi-track animations
- Supports skin/slot/attachment settings
- Debug rendering support
- Frame rate / model / track time scale adjustment
- Track alpha blending control
- Export single frame / GIF / video
- Custom export via FFmpeg
- Supports non-PNG texture formats
- Desktop dynamic wallpaper with auto-start support
- ......
---
## Installation
Download the compressed package from the [Releases](https://github.com/ww-rm/SpineViewer/releases) page.
The program requires the [.NET Desktop Runtime 8.0.x](https://dotnet.microsoft.com/download/dotnet/8.0) to be installed.
You can also download packages with the `SelfContained` suffix, which can run independently without additional installations.
Exporting GIF/MP4 or other animated/video formats requires **ffmpeg** installed locally and added to the system PATH. Download [FFmpeg for Windows](https://ffmpeg.org/download.html#build-windows) or the latest full build [ffmpeg-release-full.7z](https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z).
---
## Changing Display Language
Currently, the program supports the following interface languages:
- `ZH` (Chinese)
- `EN` (English)
- `JA` (Japanese)
Change the language via the menu: **File → Preferences… → Language**, then confirm.
---
## Usage
### Overview
The program uses a left-right layout: the left panel contains controls, the right panel displays the preview.
The left panel contains three sub-panels:
- **Models**: Lists imported and rendered models. Set model parameters, rendering order, and other model-related functions here.
- **Browser**: Preview files in a folder without actually importing them. Generate WebP previews or import selected models.
- **Canvas**: Set parameters for the right-side preview display.
Most buttons, labels, or input fields show help text on hover.
---
### Importing Skeletons
Drag-and-drop or paste skeleton files/folders directly into the **Models** panel.
Alternatively, use the right-click menu in the **Browser** panel to import selected items.
---
### Adjusting Content
The **Models** panel supports right-click menus, some hotkeys, and batch editing via multi-selection.
Mouse interactions in the preview panel:
- **Left click**: select and drag models. Hold `Ctrl` for multi-selection (synchronized with the model list).
- **Right click**: drag the entire canvas.
- **Mouse wheel**: zoom in/out. Hold `Ctrl` to scale selected models together, use `Shift` to switch zoom factor.
- **Render selected only**: preview only the selected models, selection can only be changed via the left panel.
Playback controls below the preview allow time adjustment, acting as a simple player.
---
### Exporting Content
Right-click on models in the list to access export options.
Key export parameters:
- **Output folder**: Optional. If not provided, outputs go to each models folder. Otherwise, all outputs go to the specified folder.
- **Single export**: Default exports each model separately. If enabled, all selected models are rendered together in one output.
- **Auto resolution**: Ignores preview canvas resolution; exported resolution matches the actual size of content. For animations or videos, ensures full display of the animation.
---
### Dynamic Wallpaper
The dynamic wallpaper projects the current preview content to the desktop in real time.
Enable or disable via program preferences or the tray icon menu. Save workspace files to preserve model and canvas settings.
Auto-start with Windows can also be enabled, along with loading a specific workspace on startup.
---
### Command-line Tool
The project includes a CLI tool `SpineViewerCLI` for simple operations on a single model (querying parameters, exporting, etc.). Windows and Linux binaries are provided in Releases.
```bash
$ SpineViewerCLI -h
Description:
Root Command
Usage:
SpineViewerCLI [command] [options]
Options:
-q, --quiet Suppress console logging (quiet mode).
-?, -h, --help Show help and usage information
--version Show version information
Commands:
query <skel> Query information of single model
preview <skel> Preview a model
export <skel> Export single model
```
---
### More
Detailed instructions and usage guides can be found in the [Wiki](https://github.com/ww-rm/SpineViewer/wiki).
Report issues or bugs via [GitHub Issues](https://github.com/ww-rm/SpineViewer/issues).
---
## Acknowledgements
- [spine-runtimes](https://github.com/EsotericSoftware/spine-runtimes)
- [SFML.Net](https://github.com/SFML/SFML.Net)
- [FFMpegCore](https://github.com/rosenbjerg/FFMpegCore)
- [HandyControl](https://github.com/HandyOrg/HandyControl)
- [NLog](https://github.com/NLog/NLog)
- [SkiaSharp](https://github.com/mono/SkiaSharp)
- [Spectre.Console](https://github.com/spectreconsole/spectre.console)
---
*If you like this project, please give it a :star: and share it with others! :\)*
[![Stargazers over time](https://starchart.cc/ww-rm/SpineViewer.svg?variant=adaptive)](https://starchart.cc/ww-rm/SpineViewer)

109
README.md
View File

@@ -1,63 +1,34 @@
# [SpineViewer](https://github.com/ww-rm/SpineViewer)
[![Build and Release](https://github.com/ww-rm/SpineViewer/actions/workflows/dotnet-desktop.yml/badge.svg)](https://github.com/ww-rm/SpineViewer/actions/workflows/dotnet-desktop.yml)
[![Build and Release](https://github.com/ww-rm/SpineViewer/actions/workflows/dotnet-release.yml/badge.svg)](https://github.com/ww-rm/SpineViewer/actions/workflows/dotnet-release.yml)
[![GitHub Release](https://img.shields.io/github/v/release/ww-rm/SpineViewer?logo=github&logoColor=959da5&label=Release&labelColor=3f4850)](https://github.com/ww-rm/SpineViewer/releases)
[![Downloads](https://img.shields.io/github/downloads/ww-rm/SpineViewer/total?logo=github&logoColor=959da5&label=Downloads&labelColor=3f4850)](https://github.com/ww-rm/SpineViewer/releases)
![Languages](https://img.shields.io/badge/Languages-中文%20%7C%20English%20%7C%20日本語-blue)
[中文](README.md) | [English](README.en.md)
一个简单好用的 Spine 文件查看&导出程序, 支持中/英/日多语言界面.
Spine 文件查看&导出程序, 同时也是支持 Spine 的动态壁纸程序.
![previewer](img/preview.webp)
![previewer](https://github.com/user-attachments/assets/697ae86f-ddf0-445d-951c-cf04f5206e40)
https://github.com/user-attachments/assets/37b6b730-088a-4352-827a-c338127a16f0
## 功能
- 支持多版本 spine 文件
- 支持拖拽/复制粘贴批量打开文件
- 支持批量预览
- 支持多版本 spine 文件 (`2.1.x; 3.4.x - 4.2.x`)
- 支持列表式多骨骼查看和渲染层级管理
- 支持列表多选批量设置骨骼参数
- 支持多轨道动画设置
- 支持皮肤/自定义插槽附件设置
- 支持自定义插槽可见性
- 支持多轨道动画
- 支持皮肤/插槽/附件设置
- 支持调试渲染
- 支持画面/模型/轨道时间倍速设置
- 支持设置轨道 Alpha 混合参数
- 支持全屏预览
- 支持单帧/动图/视频文件导出
- 支持自动分辨率批量导出
- 支持 FFmpeg 自定义导出
- 支持程序参数保存
- 支持文件后缀关联
- 支持非 png 格式的纹理图片格式
- 支持非 PNG 格式的纹理图片格式
- 支持开机自启常驻动态壁纸
- ......
### Spine 版本支持
| 版本 | 查看&导出 |
| :---: | :---: |
| `2.1.x` | :white_check_mark: |
| `3.4.x` | :white_check_mark: |
| `3.5.x` | :white_check_mark: |
| `3.6.x` | :white_check_mark: |
| `3.7.x` | :white_check_mark: |
| `3.8.x` | :white_check_mark: |
| `4.0.x` | :white_check_mark: |
| `4.1.x` | :white_check_mark: |
| `4.2.x` | :white_check_mark: |
| `4.3.x` | |
更多版本正在施工 :rocket: :rocket: :rocket:
### 导出格式支持
| 导出格式 | 适用场景 |
| --- | --- |
| 单帧画面 | 支持生成高清模型画面图像, 可手动调节需要的一帧. |
| 帧序列 | 支持 PNG 格式帧序列, 可保留透明通道且无损压缩. |
| 动图/视频 | 可以生成预览动图或者常见格式视频. |
| 自定义导出 | 除上述预设方案, 支持提供任意 FFmpeg 参数进行导出, 满足自定义复杂需求. |
## 安装
前往 [Release](https://github.com/ww-rm/SpineViewer/releases) 界面下载压缩包.
@@ -68,20 +39,26 @@
导出 GIF/MP4 等动图/视频格式需要在本地安装 ffmpeg 命令行, 并且添加至环境变量, [点击前往 FFmpeg-Windows 下载页面](https://ffmpeg.org/download.html#build-windows), 也可以点这个下载最新版本 [ffmpeg-release-full.7z](https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z).
## 修改显示语言
本项目目前支持以下界面显示语言:
- `ZH` (中文)
- `EN` (English)
- `JA` (日本語)
可以通过窗口菜单的 "文件" -> "首选项..." -> "语言", 选择你需要的语言并确认修改.
## 使用方法
### 如何修改显示语言
窗口菜单的 "文件" -> "首选项..." -> "语言", 选择你需要的语言并确认修改.
### 基本介绍
程序大致是左右布局, 左侧是功能面板, 右侧是画面.
左侧有三个子面板, 分别是:
- **浏览**. 该面板用于预览指定文件夹的内容, 并没有真正导入文件到程序. 在该面板可以为模型生成 webp 格式的预览图, 或者导入选中的模型.
- **模型**. 该面板记录导入并进行渲染的模型列表, 可以在这个面板设置与模型渲染相关的参数和渲染顺序, 以及一些与模型有关的功能.
- **浏览**. 该面板用于预览指定文件夹的内容, 并没有真正导入文件到程序. 在该面板可以为模型生成 webp 格式的预览图, 或者导入选中的模型.
- **画面**. 该面板用于设置右侧预览画面的参数.
绝大部分按钮或者标签或者输入框都可以通过鼠标指针悬停来获取帮助文本.
@@ -100,16 +77,14 @@
- 左键可以选择和拖拽模型, 按下 `Ctrl` 键可以实现多选, 与左侧列表选择是联动的.
- 右键对整体画面进行拖动.
- 滚轮进行画面缩放, 按住 `Ctrl` 可以对选中的模型进行批量缩放.
- 滚轮进行画面缩放, 按住 `Ctrl` 可以对选中的模型进行批量缩放, `Shift` 可以切换缩放倍数.
- 仅渲染选中模式, 在该模式下, 预览画面仅包含被选中的模型, 并且只能通过左侧列表改变选中状态.
预览画面下方按钮支持对画面时间进行调整, 可以当作一个简易的播放器.
### 内容导出
导出遵循 "所见即所得" 原则, 即实时预览的画面就是你导出的画面.
在模型面板里, 右键菜单可以对选中项进行导出操作.
在模型列表里, 右键单击选中的模型, 弹出菜单里可以对选中项执行导出操作.
导出有以下几个关键参数:
@@ -117,6 +92,37 @@
- 导出单个. 默认是每个模型独立导出, 即对模型列表进行批量操作, 如果选择仅导出单个, 那么被导出的所有模型将在同一个画面上被渲染, 输出产物只有一份.
- 自动分辨率. 该模式会忽略预览画面的分辨率和视区参数, 导出产物的分辨率与被导出内容的实际大小一致, 如果是动图或者视频则会与完整显示动画的必需大小一致.
### 动态壁纸
动态壁纸通过桌面投影实现, 可以将当前预览画面上的内容实时投影至桌面.
在程序首选项或者托盘图标右键菜单中可以进行桌面投影的启用与否, 模型和画面参数调整完成后, 可以将当前参数保存为工作区文件, 方便之后恢复该配置.
如果希望开机自启常驻壁纸, 也可以在首选项中启用开机自启, 并且设置启动后需要加载的工作区文件.
### 命令行工具
项目附带一个纯命令行工具 `SpineViewerCLI`, 目前支持对单个模型执行一些简单操作, 例如参数值查询以及导出等, 并且 Release 界面提供 Windows 和 Linux 多平台二进制文件.
```bash
$ SpineViewerCLI -h
Description:
Root Command
Usage:
SpineViewerCLI [command] [options]
Options:
-q, --quiet Suppress console logging (quiet mode).
-?, -h, --help Show help and usage information
--version Show version information
Commands:
query <skel> Query information of single model
preview <skel> Preview a model
export <skel> Export single model
```
### 更多
更为详细的使用方法和说明见 [Wiki](https://github.com/ww-rm/SpineViewer/wiki), 有使用上的问题或者 BUG 可以提个 [Issue](https://github.com/ww-rm/SpineViewer/issues).
@@ -129,9 +135,10 @@
- [HandyControl](https://github.com/HandyOrg/HandyControl)
- [NLog](https://github.com/NLog/NLog)
- [SkiaSharp](https://github.com/mono/SkiaSharp)
- [Spectre.Console](https://github.com/spectreconsole/spectre.console)
---
*如果你觉得这个项目不错请给个 :star:, 并分享给更多人知道! :)*
*如果你觉得这个项目不错请给个 :star:, 并分享给更多人知道! :\)*
[![Stargazers over time](https://starchart.cc/ww-rm/SpineViewer.svg?variant=adaptive)](https://starchart.cc/ww-rm/SpineViewer)

View File

@@ -64,10 +64,10 @@ namespace SFMLRenderer
hs?.Dispose();
}
private nint HwndMessageHook(nint hwnd, int msg, nint wParam, nint lParam, ref bool handled)
private IntPtr HwndMessageHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
_renderWindow?.DispatchEvents();
return nint.Zero;
return IntPtr.Zero;
}
}
}

View File

@@ -240,8 +240,8 @@ namespace SFMLRenderer
if (RenderWindow is null) return;
float parentW = (float)sizeInfo.NewSize.Width;
float parentH = (float)sizeInfo.NewSize.Height;
float renderW = (float)_hwndHost.ActualWidth;
float renderH = (float)_hwndHost.ActualHeight;
float renderW = _resolution.X;
float renderH = _resolution.Y;
float scale = Math.Min(parentW / renderW, parentH / renderH); // 两方向取较小值, 保证 parent 覆盖 render
renderW *= scale;
renderH *= scale;

View File

@@ -0,0 +1,180 @@
using SFML.Graphics;
using SFML.System;
using SFML.Window;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Threading;
using Win32Natives;
namespace SFMLRenderer
{
public class SFMLRenderWindow : RenderWindow, ISFMLRenderer
{
private readonly DispatcherTimer _timer = new() { Interval = TimeSpan.FromMilliseconds(10) };
public SFMLRenderWindow(VideoMode mode, string title, Styles style) : base(mode, title, style)
{
SetActive(false);
_timer.Tick += (s, e) => DispatchEvents();
_timer.Start();
SetVisible(false);
var handle = SystemHandle;
var exStyle = User32.GetWindowLong(handle, User32.GWL_EXSTYLE) | User32.WS_EX_LAYERED;
User32.SetWindowLong(handle, User32.GWL_EXSTYLE, exStyle);
User32.SetLayeredWindowAttributes(handle, 0, byte.MaxValue, User32.LWA_ALPHA);
RendererCreated?.Invoke(this, EventArgs.Empty);
}
public event EventHandler? RendererCreated;
public event EventHandler? RendererDisposing
{
add => throw new NotImplementedException();
remove => throw new NotImplementedException();
}
public event EventHandler<MouseMoveEventArgs>? CanvasMouseMove
{
add { MouseMoved += value; }
remove { MouseMoved -= value; }
}
public event EventHandler<MouseButtonEventArgs>? CanvasMouseButtonPressed
{
add { MouseButtonPressed += value; }
remove { MouseButtonPressed -= value; }
}
public event EventHandler<MouseButtonEventArgs>? CanvasMouseButtonReleased
{
add { MouseButtonReleased += value; }
remove { MouseButtonReleased -= value; }
}
public event EventHandler<MouseWheelScrollEventArgs>? CanvasMouseWheelScrolled
{
add { MouseWheelScrolled += value; }
remove { MouseWheelScrolled -= value; }
}
public Vector2u Resolution
{
get => Size;
set => Size = value;
}
public Vector2f Center
{
get
{
using var view = GetView();
return view.Center;
}
set
{
using var view = GetView();
view.Center = value;
SetView(view);
}
}
public float Zoom
{
get
{
using var view = GetView();
return Math.Abs(Size.X / view.Size.X); // XXX: 仅使用宽度进行缩放计算
}
set
{
value = Math.Abs(value);
if (value <= 0) return;
using var view = GetView();
var signX = Math.Sign(view.Size.X);
var signY = Math.Sign(view.Size.Y);
var resolution = Size;
view.Size = new(resolution.X / value * signX, resolution.Y / value * signY);
SetView(view);
}
}
public float Rotation
{
get
{
using var view = GetView();
return view.Rotation;
}
set
{
using var view = GetView();
view.Rotation = value;
SetView(view);
}
}
public bool FlipX
{
get
{
using var view = GetView();
return view.Size.X < 0;
}
set
{
using var view = GetView();
var size = view.Size;
if (size.X > 0 && value || size.X < 0 && !value)
size.X *= -1;
view.Size = size;
SetView(view);
}
}
public bool FlipY
{
get
{
using var view = GetView();
return view.Size.Y < 0;
}
set
{
using var view = GetView();
var size = view.Size;
if (size.Y > 0 && value || size.Y < 0 && !value)
size.Y *= -1;
view.Size = size;
SetView(view);
}
}
public uint MaxFps
{
get => _maxFps;
set
{
SetFramerateLimit(value);
_maxFps = value;
}
}
private uint _maxFps = 0;
public bool VerticalSync
{
get => _verticalSync;
set
{
SetVerticalSyncEnabled(value);
_verticalSync = value;
}
}
private bool _verticalSync = false;
}
}

View File

@@ -4,10 +4,11 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net8.0-windows</TargetFramework>
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.15.4</Version>
<Version>0.16.6</Version>
<UseWPF>true</UseWPF>
</PropertyGroup>
@@ -19,4 +20,8 @@
<PackageReference Include="SFML.Net" Version="2.6.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Win32Natives\Win32Natives.csproj" />
</ItemGroup>
</Project>

View File

@@ -92,7 +92,7 @@ namespace Spine.Exporters
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_logger.Error("Failed to export {0} {1}, {2}", _format, output, ex.Message);
}
}

View File

@@ -1,18 +1,14 @@
using SFML.Graphics;
using SFML.System;
using SkiaSharp;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace SpineViewer.Extensions
namespace Spine.Exporters
{
public static class SFMLExtension
public static class Extension
{
/// <summary>
/// 获取适合指定画布参数下能够覆盖包围盒的画布视区包围盒
@@ -59,25 +55,5 @@ namespace SpineViewer.Extensions
self.Size.Y
);
}
public static FloatRect ToFloatRect(this Rect self)
{
return new((float)self.X, (float)self.Y, (float)self.Width, (float)self.Height);
}
public static Vector2f ToVector2f(this Size self)
{
return new((float)self.Width, (float)self.Height);
}
public static Vector2u ToVector2u(this Size self)
{
return new((uint)self.Width, (uint)self.Height);
}
public static Vector2i ToVector2i(this Size self)
{
return new((int)self.Width, (int)self.Height);
}
}
}

View File

@@ -28,12 +28,40 @@ namespace Spine.Exporters
{
Gif,
Webp,
Apng,
Mp4,
Webm,
Mkv,
Mov,
}
/// <summary>
/// Apng 格式预测器算法
/// </summary>
public enum ApngPredMethod
{
None = 0,
Sub = 1,
Up = 2,
Avg = 3,
Paeth = 4,
Mixed = 5,
}
/// <summary>
/// Mov prores_ks 编码器 profile 参数
/// </summary>
public enum MovProfile
{
Auto = -1,
Proxy = 0,
Light = 1,
Standard = 2,
High = 3,
Yuv4444 = 4,
Yuv4444Extreme = 5,
}
/// <summary>
/// 视频格式
/// </summary>
@@ -41,34 +69,40 @@ namespace Spine.Exporters
private VideoFormat _format = VideoFormat.Mp4;
/// <summary>
/// 动图是否循环 [Gif/Webp]
/// [Gif/Webp/Apng] 动图是否循环
/// </summary>
public bool Loop { get => _loop; set => _loop = value; }
private bool _loop = true;
/// <summary>
/// 质量 [Webp]
/// [Webp] 质量
/// </summary>
public int Quality { get => _quality; set => _quality = Math.Clamp(value, 0, 100); }
private int _quality = 75;
/// <summary>
/// 无损压缩 [Webp]
/// [Webp] 无损压缩
/// </summary>
public bool Lossless { get => _lossless; set => _lossless = value; }
private bool _lossless = false;
/// <summary>
/// CRF [Mp4/Webm/Mkv]
/// [Apng] 预测器算法
/// </summary>
public ApngPredMethod PredMethod { get => _predMethod; set => _predMethod = value; }
private ApngPredMethod _predMethod = ApngPredMethod.Mixed;
/// <summary>
/// [Mp4/Webm/Mkv] CRF
/// </summary>
public int Crf { get => _crf; set => _crf = Math.Clamp(value, 0, 63); }
private int _crf = 23;
/// <summary>
/// prores_ks 编码器的配置等级, -1 是自动, 越高质量越好, 只有 4 及以上才有透明通道 [Mov]
/// [Mov] prores_ks 编码器的配置等级, 越高质量越好, 只有 <see cref="MovProfile.Yuv4444"> 及以上才有透明通道
/// </summary>
public int Profile { get => _profile; set => _profile = Math.Clamp(value, -1, 5); }
private int _profile = 5;
public MovProfile Profile { get => _profile; set => _profile = value; }
private MovProfile _profile = MovProfile.Yuv4444Extreme;
/// <summary>
/// 获取的一帧, 结果是预乘的
@@ -93,6 +127,7 @@ namespace Spine.Exporters
{
VideoFormat.Gif => SetGifOptions,
VideoFormat.Webp => SetWebpOptions,
VideoFormat.Apng => SetApngOptions,
VideoFormat.Mp4 => SetMp4Options,
VideoFormat.Webm => SetWebmOptions,
VideoFormat.Mkv => SetMkvOptions,
@@ -109,7 +144,7 @@ namespace Spine.Exporters
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_logger.Error("Failed to export {0} {1}, {2}", _format, output, ex.Message);
}
}
@@ -132,6 +167,13 @@ namespace Spine.Exporters
.WithCustomArgument(customArgs);
}
private void SetApngOptions(FFMpegArgumentOptions options)
{
var customArgs = $"-vf unpremultiply=inplace=1 -plays {(_loop ? 0 : 1)} -pred {(int)_predMethod}";
options.ForceFormat("apng").WithVideoCodec("apng").ForcePixelFormat("rgba")
.WithCustomArgument(customArgs);
}
private void SetMp4Options(FFMpegArgumentOptions options)
{
// XXX: windows 默认播放器在播放 MP4 格式时对于 libx264 编码器只支持 yuv420p 的像素格式
@@ -164,7 +206,7 @@ namespace Spine.Exporters
var customArgs = "-vf unpremultiply=inplace=1";
options.ForceFormat("mov").WithVideoCodec("prores_ks").ForcePixelFormat("yuva444p10le")
.WithFastStart()
.WithCustomArgument($"-profile {_profile}")
.WithCustomArgument($"-profile {(int)_profile}")
.WithCustomArgument(customArgs);
}
}

View File

@@ -18,11 +18,27 @@ namespace Spine.Exporters
public FrameExporter(uint width = 100, uint height = 100) : base(width, height) { }
public FrameExporter(Vector2u resolution) : base(resolution) { }
public SKEncodedImageFormat Format { get => _format; set => _format = value; }
public SKEncodedImageFormat Format
{
get => _format;
set {
switch (value)
{
case SKEncodedImageFormat.Jpeg:
case SKEncodedImageFormat.Png:
case SKEncodedImageFormat.Webp:
_format = value;
break;
default:
_logger.Warn("Omit unsupported exporter format: {0}", value);
break;
}
}
}
protected SKEncodedImageFormat _format = SKEncodedImageFormat.Png;
public int Quality { get => _quality; set => _quality = Math.Clamp(value, 0, 100); }
protected int _quality = 80;
protected int _quality = 100;
public override void Export(string output, params SpineObject[] spines)
{
@@ -33,5 +49,15 @@ namespace Spine.Exporters
using var stream = File.OpenWrite(output);
data.SaveTo(stream);
}
/// <summary>
/// 获取帧图像, 结果是预乘的
/// </summary>
public SKImage ExportMemoryImage(params SpineObject[] spines)
{
using var frame = GetFrame(spines);
var info = new SKImageInfo(frame.Width, frame.Height, SKColorType.Rgba8888, SKAlphaType.Premul);
return SKImage.FromPixelCopy(info, frame.Image.Pixels);
}
}
}

View File

@@ -24,7 +24,7 @@ namespace Spine.Exporters
int frameCount = GetFrameCount();
int frameIdx = 0;
_progressReporter?.Invoke(frameCount, 0, $"[{frameIdx}/{frameCount}] {output}");
_progressReporter?.Invoke(frameCount, 0, $"[0/{frameCount}] {output}"); // 导出帧序列单独在此处调用进度报告
foreach (var frame in GetFrames(spines))
{
if (ct.IsCancellationRequested)
@@ -37,7 +37,7 @@ namespace Spine.Exporters
var savePath = Path.Combine(output, $"frame_{_fps}_{frameIdx:d6}.png");
var info = new SKImageInfo(frame.Width, frame.Height, SKColorType.Rgba8888, SKAlphaType.Premul);
_progressReporter?.Invoke(frameCount, frameIdx, $"[{frameIdx + 1}/{frameCount}] {savePath}");
_progressReporter?.Invoke(frameCount, frameIdx + 1, $"[{frameIdx + 1}/{frameCount}] {savePath}");
try
{
using var skImage = SKImage.FromPixelCopy(info, frame.Image.Pixels);
@@ -47,7 +47,7 @@ namespace Spine.Exporters
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_logger.Error("Failed to save frame {0}, {1}", savePath, ex.Message);
}
finally

View File

@@ -92,7 +92,7 @@ namespace Spine.Exporters
}
/// <summary>
/// 生成帧序列
/// 生成帧序列, 用于导出帧序列
/// </summary>
protected IEnumerable<SFMLImageVideoFrame> GetFrames(SpineObject[] spines)
{
@@ -121,14 +121,14 @@ namespace Spine.Exporters
}
/// <summary>
/// 生成帧序列, 支持中途取消和进度输出
/// 生成帧序列, 支持中途取消和进度输出, 用于动图视频等单个文件输出
/// </summary>
protected IEnumerable<SFMLImageVideoFrame> GetFrames(SpineObject[] spines, string output, CancellationToken ct)
{
int frameCount = GetFrameCount();
int frameIdx = 0;
_progressReporter?.Invoke(frameCount, 0, $"[{frameIdx}/{frameCount}] {output}");
_progressReporter?.Invoke(frameCount, 0, $"[0/{frameCount}] {output}");
foreach (var frame in GetFrames(spines))
{
if (ct.IsCancellationRequested)
@@ -138,7 +138,7 @@ namespace Spine.Exporters
break;
}
_progressReporter?.Invoke(frameCount, frameIdx, $"[{frameIdx + 1}/{frameCount}] {output}");
_progressReporter?.Invoke(frameCount, frameIdx + 1, $"[{frameIdx + 1}/{frameCount}] {output}");
yield return frame;
frameIdx++;
}

View File

@@ -1,4 +1,5 @@
using SFML.Graphics;
using NLog;
using SFML.Graphics;
using SkiaSharp;
using System;
using System.Collections.Generic;
@@ -6,7 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.SpineWrappers
namespace Spine.Implementations
{
/// <summary>
/// 实现不同版本的 TextureLoader
@@ -22,6 +23,8 @@ namespace Spine.SpineWrappers
SpineRuntime41.TextureLoader,
SpineRuntime42.TextureLoader
{
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
/// <summary>
/// 默认的全局纹理加载器
/// </summary>
@@ -44,9 +47,18 @@ namespace Spine.SpineWrappers
private Texture ReadTexture(string path)
{
if (!File.Exists(path))
{
_logger.Error($"Texture file not found, {path}");
throw new FileNotFoundException("Texture file not found", path);
}
using var codec = SKCodec.Create(path, out var result);
if (codec is null || result != SKCodecResult.Success)
{
_logger.Error($"Failed to create codec '{path}', {result}");
throw new InvalidOperationException($"Failed to create codec '{path}', {result}");
}
var width = codec.Info.Width;
var height = codec.Info.Height;
@@ -57,7 +69,10 @@ namespace Spine.SpineWrappers
result = codec.GetPixels(info, out var pixels);
if (result != SKCodecResult.Success)
{
_logger.Error($"Failed to decode image '{path}', {result}");
throw new InvalidOperationException($"Failed to decode image '{path}', {result}");
}
Texture tex = new((uint)width, (uint)height);
tex.Update(pixels);
@@ -97,6 +112,14 @@ namespace Spine.SpineWrappers
if (ForceMipmap) texture.GenerateMipmap();
page.rendererObject = texture;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Load(SpineRuntime34.AtlasPage page, string path)
@@ -132,6 +155,14 @@ namespace Spine.SpineWrappers
if (ForceMipmap) texture.GenerateMipmap();
page.rendererObject = texture;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Load(SpineRuntime35.AtlasPage page, string path)
@@ -167,6 +198,14 @@ namespace Spine.SpineWrappers
if (ForceMipmap) texture.GenerateMipmap();
page.rendererObject = texture;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Load(SpineRuntime36.AtlasPage page, string path)
@@ -202,6 +241,14 @@ namespace Spine.SpineWrappers
if (ForceMipmap) texture.GenerateMipmap();
page.rendererObject = texture;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Load(SpineRuntime37.AtlasPage page, string path)
@@ -237,6 +284,14 @@ namespace Spine.SpineWrappers
if (ForceMipmap) texture.GenerateMipmap();
page.rendererObject = texture;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Load(SpineRuntime38.AtlasPage page, string path)
@@ -273,9 +328,13 @@ namespace Spine.SpineWrappers
page.rendererObject = texture;
// 似乎是不需要设置的, 因为存在某些 png 和 atlas 大小不同的情况, 一般是有一些缩放, 如果设置了反而渲染异常
// page.width = (int)texture.Size.X;
// page.height = (int)texture.Size.Y;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Load(SpineRuntime40.AtlasPage page, string path)
@@ -311,6 +370,14 @@ namespace Spine.SpineWrappers
if (ForceMipmap) texture.GenerateMipmap();
page.rendererObject = texture;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Load(SpineRuntime41.AtlasPage page, string path)
@@ -346,6 +413,14 @@ namespace Spine.SpineWrappers
if (ForceMipmap) texture.GenerateMipmap();
page.rendererObject = texture;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Load(SpineRuntime42.AtlasPage page, string path)
@@ -381,6 +456,14 @@ namespace Spine.SpineWrappers
if (ForceMipmap) texture.GenerateMipmap();
page.rendererObject = texture;
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
if (page.width <= 0 || page.height <= 0)
{
var texSize = texture.Size;
page.width = (int)texSize.X;
page.height = (int)texSize.Y;
}
}
public virtual void Unload(object texture)

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime21;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
internal sealed class Animation21(Animation innerObject) : IAnimation
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime21;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
internal sealed class AnimationState21(AnimationState innerObject, SpineObjectData21 data) : IAnimationState
{
@@ -35,7 +35,7 @@ namespace Spine.Implementations.SpineWrappers.V21
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -64,7 +64,7 @@ namespace Spine.Implementations.SpineWrappers.V21
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -93,7 +93,7 @@ namespace Spine.Implementations.SpineWrappers.V21
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;

View File

@@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime21;
namespace Spine.Implementations.SpineWrappers.V21.Attachments
namespace Spine.Implementations.V21.Attachments
{
internal abstract class Attachment21(Attachment innerObject) : IAttachment
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V21;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime21;
namespace Spine.Implementations.SpineWrappers.V21.Attachments
namespace Spine.Implementations.V21.Attachments
{
internal sealed class BoundingBoxAttachment21(BoundingBoxAttachment innerObject) :
Attachment21(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V21.Attachments
public override BoundingBoxAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot21 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V21;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime21;
namespace Spine.Implementations.SpineWrappers.V21.Attachments
namespace Spine.Implementations.V21.Attachments
{
internal sealed class MeshAttachment21(MeshAttachment innerObject) :
Attachment21(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V21.Attachments
public override MeshAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot21 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V21;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime21;
namespace Spine.Implementations.SpineWrappers.V21.Attachments
namespace Spine.Implementations.V21.Attachments
{
internal sealed class RegionAttachment21(RegionAttachment innerObject) :
Attachment21(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V21.Attachments
public override RegionAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot21 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V21;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime21;
namespace Spine.Implementations.SpineWrappers.V21.Attachments
namespace Spine.Implementations.V21.Attachments
{
internal sealed class SkinnedMeshAttachment21(SkinnedMeshAttachment innerObject) :
Attachment21(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V21.Attachments
public override SkinnedMeshAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot21 st)
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime21;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
internal sealed class Bone21(Bone innerObject, Bone21? parent = null) : IBone
{

View File

@@ -5,10 +5,10 @@ using System.Text;
using System.Threading.Tasks;
using System.Collections.Frozen;
using System.Collections.Immutable;
using Spine.SpineWrappers;
using SpineRuntime21;
using Spine.Interfaces;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
internal sealed class Skeleton21 : ISkeleton
{
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V21
public Skeleton InnerObject => _o;
public string Name => _o.Data.Name;
public float R { get => _o.R; set => _o.R = value; }
public float G { get => _o.G; set => _o.G = value; }
public float B { get => _o.B; set => _o.B = value; }
@@ -95,11 +96,6 @@ namespace Spine.Implementations.SpineWrappers.V21
public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose();
public void Update(float delta) => _o.Update(delta);
public void GetBounds(out float x, out float y, out float w, out float h)
{
_o.GetBounds(out x, out y, out w, out h);
}
public override string ToString() => _o.ToString();
}
}

View File

@@ -1,5 +1,5 @@
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using Spine.Utils;
using SpineRuntime21;
using System;
@@ -8,7 +8,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
internal sealed class SkeletonClipping21 : ISkeletonClipping
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime21;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
internal sealed class Skin21 : ISkin
{

View File

@@ -5,10 +5,11 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using SpineRuntime21;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
internal sealed class Slot21 : ISlot
{
@@ -39,7 +40,7 @@ namespace Spine.Implementations.SpineWrappers.V21
public float A { get => _o.A; set => _o.A = value; }
public IBone Bone => _bone;
public Spine.SpineWrappers.Attachments.IAttachment? Attachment
public IAttachment? Attachment
{
get
{

View File

@@ -6,12 +6,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using SpineRuntime21;
using Spine.Implementations.SpineWrappers.V21.Attachments;
using Spine.Implementations.V21.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
[SpineImplementation(2, 1)]
internal sealed class SpineObjectData21 : SpineObjectData
@@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V21
private readonly ImmutableArray<IAnimation> _animations;
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
public SpineObjectData21(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
public SpineObjectData21(string skelPath, string atlasPath, TextureLoader textureLoader)
: base(skelPath, atlasPath, textureLoader)
{
// 加载 atlas
@@ -36,7 +36,7 @@ namespace Spine.Implementations.SpineWrappers.V21
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.SpineWrappers.V21
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.SpineWrappers.V21
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.SpineWrappers.V21
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime21;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V21
namespace Spine.Implementations.V21
{
internal sealed class TrackEntry21(TrackEntry innerObject, AnimationState21 animationState, SpineObjectData21 data): ITrackEntry
{
@@ -34,7 +34,7 @@ namespace Spine.Implementations.SpineWrappers.V21
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -63,7 +63,7 @@ namespace Spine.Implementations.SpineWrappers.V21
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -92,7 +92,7 @@ namespace Spine.Implementations.SpineWrappers.V21
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime34;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
internal sealed class Animation34(Animation innerObject) : IAnimation
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime34;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
internal sealed class AnimationState34(AnimationState innerObject, SpineObjectData34 data) : IAnimationState
{
@@ -36,7 +36,7 @@ namespace Spine.Implementations.SpineWrappers.V34
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -65,7 +65,7 @@ namespace Spine.Implementations.SpineWrappers.V34
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -94,7 +94,7 @@ namespace Spine.Implementations.SpineWrappers.V34
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;

View File

@@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime34;
namespace Spine.Implementations.SpineWrappers.V34.Attachments
namespace Spine.Implementations.V34.Attachments
{
internal abstract class Attachment34(Attachment innerObject) : IAttachment
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V34;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime34;
namespace Spine.Implementations.SpineWrappers.V34.Attachments
namespace Spine.Implementations.V34.Attachments
{
internal sealed class BoundingBoxAttachment34(BoundingBoxAttachment innerObject) :
Attachment34(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V34.Attachments
public override BoundingBoxAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot34 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V34;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime34;
namespace Spine.Implementations.SpineWrappers.V34.Attachments
namespace Spine.Implementations.V34.Attachments
{
internal sealed class MeshAttachment34(MeshAttachment innerObject) :
Attachment34(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V34.Attachments
public override MeshAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot34 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V34;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime34;
namespace Spine.Implementations.SpineWrappers.V34.Attachments
namespace Spine.Implementations.V34.Attachments
{
internal sealed class PathAttachment34(PathAttachment innerObject) :
Attachment34(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V34.Attachments
public override PathAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot34 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V34;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime34;
namespace Spine.Implementations.SpineWrappers.V34.Attachments
namespace Spine.Implementations.V34.Attachments
{
internal sealed class RegionAttachment34(RegionAttachment innerObject) :
Attachment34(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V34.Attachments
public override RegionAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot34 st)
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime34;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
internal sealed class Bone34(Bone innerObject, Bone34? parent = null) : IBone
{

View File

@@ -5,10 +5,10 @@ using System.Text;
using System.Threading.Tasks;
using System.Collections.Frozen;
using System.Collections.Immutable;
using Spine.SpineWrappers;
using SpineRuntime34;
using Spine.Interfaces;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
internal sealed class Skeleton34 : ISkeleton
{
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V34
public Skeleton InnerObject => _o;
public string Name => _o.Data.Name;
public float R { get => _o.R; set => _o.R = value; }
public float G { get => _o.G; set => _o.G = value; }
public float B { get => _o.B; set => _o.B = value; }
@@ -95,12 +96,6 @@ namespace Spine.Implementations.SpineWrappers.V34
public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose();
public void Update(float delta) => _o.Update(delta);
public void GetBounds(out float x, out float y, out float w, out float h)
{
float[] _ = [];
_o.GetBounds(out x, out y, out w, out h);
}
public override string ToString() => _o.ToString();
}
}

View File

@@ -1,5 +1,5 @@
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using Spine.Utils;
using SpineRuntime34;
using System;
@@ -8,7 +8,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
internal sealed class SkeletonClipping34 : ISkeletonClipping
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime34;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
internal sealed class Skin34 : ISkin
{

View File

@@ -5,10 +5,11 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using SpineRuntime34;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
internal sealed class Slot34 : ISlot
{
@@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V34
public float A { get => _o.A; set => _o.A = value; }
public IBone Bone => _bone;
public Spine.SpineWrappers.Attachments.IAttachment? Attachment
public IAttachment? Attachment
{
get
{

View File

@@ -6,12 +6,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using SpineRuntime34;
using Spine.Implementations.SpineWrappers.V34.Attachments;
using Spine.Implementations.V34.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
[SpineImplementation(3, 4)]
internal sealed class SpineObjectData34 : SpineObjectData
@@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V34
private readonly ImmutableArray<IAnimation> _animations;
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
public SpineObjectData34(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
public SpineObjectData34(string skelPath, string atlasPath, TextureLoader textureLoader)
: base(skelPath, atlasPath, textureLoader)
{
// 加载 atlas
@@ -36,7 +36,7 @@ namespace Spine.Implementations.SpineWrappers.V34
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.SpineWrappers.V34
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.SpineWrappers.V34
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.SpineWrappers.V34
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime34;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V34
namespace Spine.Implementations.V34
{
internal sealed class TrackEntry34(TrackEntry innerObject, AnimationState34 animationState, SpineObjectData34 data): ITrackEntry
{
@@ -34,7 +34,7 @@ namespace Spine.Implementations.SpineWrappers.V34
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -63,7 +63,7 @@ namespace Spine.Implementations.SpineWrappers.V34
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -92,7 +92,7 @@ namespace Spine.Implementations.SpineWrappers.V34
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime35;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
internal sealed class Animation35(Animation innerObject) : IAnimation
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
internal sealed class AnimationState35(AnimationState innerObject, SpineObjectData35 data) : IAnimationState
{
@@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Interrupt += f;
@@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;
@@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Dispose += f;

View File

@@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35.Attachments
namespace Spine.Implementations.V35.Attachments
{
internal abstract class Attachment35(Attachment innerObject) : IAttachment
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V35;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35.Attachments
namespace Spine.Implementations.V35.Attachments
{
internal sealed class BoundingBoxAttachment35(BoundingBoxAttachment innerObject) :
Attachment35(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments
public override BoundingBoxAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot35 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V35;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35.Attachments
namespace Spine.Implementations.V35.Attachments
{
internal sealed class ClippingAttachment35(ClippingAttachment innerObject) :
Attachment35(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments
public override ClippingAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot35 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V35;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35.Attachments
namespace Spine.Implementations.V35.Attachments
{
internal sealed class MeshAttachment35(MeshAttachment innerObject) :
Attachment35(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments
public override MeshAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot35 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V35;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35.Attachments
namespace Spine.Implementations.V35.Attachments
{
internal sealed class PathAttachment35(PathAttachment innerObject) :
Attachment35(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments
public override PathAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot35 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V35;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35.Attachments
namespace Spine.Implementations.V35.Attachments
{
internal sealed class PointAttachment35(PointAttachment innerObject) :
Attachment35(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments
public override PointAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot35 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V35;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35.Attachments
namespace Spine.Implementations.V35.Attachments
{
internal sealed class RegionAttachment35(RegionAttachment innerObject) :
Attachment35(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments
public override RegionAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot35 st)
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
internal sealed class Bone35(Bone innerObject, Bone35? parent = null) : IBone
{

View File

@@ -5,10 +5,10 @@ using System.Text;
using System.Threading.Tasks;
using System.Collections.Frozen;
using System.Collections.Immutable;
using Spine.SpineWrappers;
using SpineRuntime35;
using Spine.Interfaces;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
internal sealed class Skeleton35 : ISkeleton
{
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V35
public Skeleton InnerObject => _o;
public string Name => _o.Data.Name;
public float R { get => _o.R; set => _o.R = value; }
public float G { get => _o.G; set => _o.G = value; }
public float B { get => _o.B; set => _o.B = value; }
@@ -95,12 +96,6 @@ namespace Spine.Implementations.SpineWrappers.V35
public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose();
public void Update(float delta) => _o.Update(delta);
public void GetBounds(out float x, out float y, out float w, out float h)
{
float[] _ = [];
_o.GetBounds(out x, out y, out w, out h, ref _);
}
public override string ToString() => _o.ToString();
}
}

View File

@@ -1,5 +1,5 @@
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using Spine.Utils;
using SpineRuntime35;
using System;
@@ -8,7 +8,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
internal sealed class SkeletonClipping35 : ISkeletonClipping
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime35;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
internal sealed class Skin35 : ISkin
{

View File

@@ -5,10 +5,11 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using SpineRuntime35;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
internal sealed class Slot35 : ISlot
{
@@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V35
public float A { get => _o.A; set => _o.A = value; }
public IBone Bone => _bone;
public Spine.SpineWrappers.Attachments.IAttachment? Attachment
public IAttachment? Attachment
{
get
{

View File

@@ -6,12 +6,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using SpineRuntime35;
using Spine.Implementations.SpineWrappers.V35.Attachments;
using Spine.Implementations.V35.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
[SpineImplementation(3, 5)]
internal sealed class SpineObjectData35 : SpineObjectData
@@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V35
private readonly ImmutableArray<IAnimation> _animations;
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
public SpineObjectData35(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
public SpineObjectData35(string skelPath, string atlasPath, TextureLoader textureLoader)
: base(skelPath, atlasPath, textureLoader)
{
// 加载 atlas
@@ -36,7 +36,7 @@ namespace Spine.Implementations.SpineWrappers.V35
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.SpineWrappers.V35
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.SpineWrappers.V35
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.SpineWrappers.V35
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime35;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V35
namespace Spine.Implementations.V35
{
internal sealed class TrackEntry35(TrackEntry innerObject, AnimationState35 animationState, SpineObjectData35 data): ITrackEntry
{
@@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Interrupt += f;
@@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;
@@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V35
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Dispose += f;

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime36;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
internal sealed class Animation36(Animation innerObject) : IAnimation
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
internal sealed class AnimationState36(AnimationState innerObject, SpineObjectData36 data) : IAnimationState
{
@@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Interrupt += f;
@@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;
@@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Dispose += f;

View File

@@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36.Attachments
namespace Spine.Implementations.V36.Attachments
{
internal abstract class Attachment36(Attachment innerObject) : IAttachment
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V36;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36.Attachments
namespace Spine.Implementations.V36.Attachments
{
internal sealed class BoundingBoxAttachment36(BoundingBoxAttachment innerObject) :
Attachment36(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments
public override BoundingBoxAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot36 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V36;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36.Attachments
namespace Spine.Implementations.V36.Attachments
{
internal sealed class ClippingAttachment36(ClippingAttachment innerObject) :
Attachment36(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments
public override ClippingAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot36 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V36;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36.Attachments
namespace Spine.Implementations.V36.Attachments
{
internal sealed class MeshAttachment36(MeshAttachment innerObject) :
Attachment36(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments
public override MeshAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot36 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V36;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36.Attachments
namespace Spine.Implementations.V36.Attachments
{
internal sealed class PathAttachment36(PathAttachment innerObject) :
Attachment36(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments
public override PathAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot36 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V36;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36.Attachments
namespace Spine.Implementations.V36.Attachments
{
internal sealed class PointAttachment36(PointAttachment innerObject) :
Attachment36(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments
public override PointAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot36 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V36;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36.Attachments
namespace Spine.Implementations.V36.Attachments
{
internal sealed class RegionAttachment36(RegionAttachment innerObject) :
Attachment36(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments
public override RegionAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot36 st)
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
internal sealed class Bone36(Bone innerObject, Bone36? parent = null) : IBone
{

View File

@@ -5,10 +5,10 @@ using System.Text;
using System.Threading.Tasks;
using System.Collections.Frozen;
using System.Collections.Immutable;
using Spine.SpineWrappers;
using SpineRuntime36;
using Spine.Interfaces;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
internal sealed class Skeleton36 : ISkeleton
{
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V36
public Skeleton InnerObject => _o;
public string Name => _o.Data.Name;
public float R { get => _o.R; set => _o.R = value; }
public float G { get => _o.G; set => _o.G = value; }
public float B { get => _o.B; set => _o.B = value; }
@@ -95,12 +96,6 @@ namespace Spine.Implementations.SpineWrappers.V36
public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose();
public void Update(float delta) => _o.Update(delta);
public void GetBounds(out float x, out float y, out float w, out float h)
{
float[] _ = [];
_o.GetBounds(out x, out y, out w, out h, ref _);
}
public override string ToString() => _o.ToString();
}
}

View File

@@ -1,5 +1,5 @@
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using Spine.Utils;
using SpineRuntime36;
using System;
@@ -8,7 +8,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
internal sealed class SkeletonClipping36 : ISkeletonClipping
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime36;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
internal sealed class Skin36 : ISkin
{

View File

@@ -5,10 +5,11 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using SpineRuntime36;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
internal sealed class Slot36 : ISlot
{
@@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V36
public float A { get => _o.A; set => _o.A = value; }
public IBone Bone => _bone;
public Spine.SpineWrappers.Attachments.IAttachment? Attachment
public IAttachment? Attachment
{
get
{

View File

@@ -6,12 +6,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using SpineRuntime36;
using Spine.Implementations.SpineWrappers.V36.Attachments;
using Spine.Implementations.V36.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
[SpineImplementation(3, 6)]
internal sealed class SpineObjectData36 : SpineObjectData
@@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V36
private readonly ImmutableArray<IAnimation> _animations;
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
public SpineObjectData36(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
public SpineObjectData36(string skelPath, string atlasPath, TextureLoader textureLoader)
: base(skelPath, atlasPath, textureLoader)
{
// 加载 atlas
@@ -36,7 +36,7 @@ namespace Spine.Implementations.SpineWrappers.V36
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.SpineWrappers.V36
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.SpineWrappers.V36
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.SpineWrappers.V36
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime36;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V36
namespace Spine.Implementations.V36
{
internal sealed class TrackEntry36(TrackEntry innerObject, AnimationState36 animationState, SpineObjectData36 data): ITrackEntry
{
@@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Interrupt += f;
@@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;
@@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V36
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Dispose += f;

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime37;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
internal sealed class Animation37(Animation innerObject) : IAnimation
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
internal sealed class AnimationState37(AnimationState innerObject, SpineObjectData37 data) : IAnimationState
{
@@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Interrupt += f;
@@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;
@@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Dispose += f;

View File

@@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37.Attachments
namespace Spine.Implementations.V37.Attachments
{
internal abstract class Attachment37(Attachment innerObject) : IAttachment
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V37;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37.Attachments
namespace Spine.Implementations.V37.Attachments
{
internal sealed class BoundingBoxAttachment37(BoundingBoxAttachment innerObject) :
Attachment37(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments
public override BoundingBoxAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot37 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V37;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37.Attachments
namespace Spine.Implementations.V37.Attachments
{
internal sealed class ClippingAttachment37(ClippingAttachment innerObject) :
Attachment37(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments
public override ClippingAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot37 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V37;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37.Attachments
namespace Spine.Implementations.V37.Attachments
{
internal sealed class MeshAttachment37(MeshAttachment innerObject) :
Attachment37(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments
public override MeshAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot37 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V37;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37.Attachments
namespace Spine.Implementations.V37.Attachments
{
internal sealed class PathAttachment37(PathAttachment innerObject) :
Attachment37(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments
public override PathAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot37 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V37;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37.Attachments
namespace Spine.Implementations.V37.Attachments
{
internal sealed class PointAttachment37(PointAttachment innerObject) :
Attachment37(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments
public override PointAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot37 st)
{

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V37;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37.Attachments
namespace Spine.Implementations.V37.Attachments
{
internal sealed class RegionAttachment37(RegionAttachment innerObject) :
Attachment37(innerObject),
@@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments
public override RegionAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot37 st)
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
internal sealed class Bone37(Bone innerObject, Bone37? parent = null) : IBone
{

View File

@@ -5,10 +5,10 @@ using System.Text;
using System.Threading.Tasks;
using System.Collections.Frozen;
using System.Collections.Immutable;
using Spine.SpineWrappers;
using SpineRuntime37;
using Spine.Interfaces;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
internal sealed class Skeleton37 : ISkeleton
{
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V37
public Skeleton InnerObject => _o;
public string Name => _o.Data.Name;
public float R { get => _o.R; set => _o.R = value; }
public float G { get => _o.G; set => _o.G = value; }
public float B { get => _o.B; set => _o.B = value; }
@@ -95,12 +96,6 @@ namespace Spine.Implementations.SpineWrappers.V37
public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose();
public void Update(float delta) => _o.Update(delta);
public void GetBounds(out float x, out float y, out float w, out float h)
{
float[] _ = [];
_o.GetBounds(out x, out y, out w, out h, ref _);
}
public override string ToString() => _o.ToString();
}
}

View File

@@ -1,5 +1,5 @@
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using Spine.Utils;
using SpineRuntime37;
using System;
@@ -8,7 +8,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
internal sealed class SkeletonClipping37 : ISkeletonClipping
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime37;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
internal sealed class Skin37 : ISkin
{

View File

@@ -5,10 +5,11 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using SpineRuntime37;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
internal sealed class Slot37 : ISlot
{
@@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V37
public float A { get => _o.A; set => _o.A = value; }
public IBone Bone => _bone;
public Spine.SpineWrappers.Attachments.IAttachment? Attachment
public IAttachment? Attachment
{
get
{

View File

@@ -6,12 +6,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.Utils;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using SpineRuntime37;
using Spine.Implementations.SpineWrappers.V37.Attachments;
using Spine.Implementations.V37.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
[SpineImplementation(3, 7)]
internal sealed class SpineObjectData37 : SpineObjectData
@@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V37
private readonly ImmutableArray<IAnimation> _animations;
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
public SpineObjectData37(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
public SpineObjectData37(string skelPath, string atlasPath, TextureLoader textureLoader)
: base(skelPath, atlasPath, textureLoader)
{
// 加载 atlas
@@ -36,7 +36,7 @@ namespace Spine.Implementations.SpineWrappers.V37
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.SpineWrappers.V37
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.SpineWrappers.V37
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.SpineWrappers.V37
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime37;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V37
namespace Spine.Implementations.V37
{
internal sealed class TrackEntry37(TrackEntry innerObject, AnimationState37 animationState, SpineObjectData37 data): ITrackEntry
{
@@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Interrupt += f;
@@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;
@@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V37
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Dispose += f;

View File

@@ -1,4 +1,4 @@
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime38;
using System;
using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Implementations.SpineWrappers.V38
namespace Spine.Implementations.V38
{
internal sealed class Animation38(Animation innerObject) : IAnimation
{

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.Interfaces;
using SpineRuntime38;
namespace Spine.Implementations.SpineWrappers.V38
namespace Spine.Implementations.V38
{
internal sealed class AnimationState38(AnimationState innerObject, SpineObjectData38 data) : IAnimationState
{
@@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V38
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Start += f;
@@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V38
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Interrupt += f;
@@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V38
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.End += f;
@@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V38
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Complete += f;
@@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V38
if (value is null) return;
if (!_eventMapping.TryGetValue(value, out var f))
{
_eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t));
_eventMapping[value] = f = (t) => value(GetTrackEntry(t));
_eventCount[value] = 0;
}
_o.Dispose += f;

View File

@@ -3,12 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers;
using Spine.SpineWrappers.Attachments;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime38;
using SpineRuntime38.Attachments;
namespace Spine.Implementations.SpineWrappers.V38.Attachments
namespace Spine.Implementations.V38.Attachments
{
internal abstract class Attachment38(Attachment innerObject) : IAttachment
{

View File

@@ -3,11 +3,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V38;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime38;
using SpineRuntime38.Attachments;
namespace Spine.Implementations.SpineWrappers.V38.Attachments
namespace Spine.Implementations.V38.Attachments
{
internal sealed class BoundingBoxAttachment38(BoundingBoxAttachment innerObject) :
Attachment38(innerObject),
@@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments
public override BoundingBoxAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot38 st)
{

View File

@@ -3,11 +3,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V38;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime38;
using SpineRuntime38.Attachments;
namespace Spine.Implementations.SpineWrappers.V38.Attachments
namespace Spine.Implementations.V38.Attachments
{
internal sealed class ClippingAttachment38(ClippingAttachment innerObject) :
Attachment38(innerObject),
@@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments
public override ClippingAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot38 st)
{

View File

@@ -3,11 +3,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spine.SpineWrappers.Attachments;
using Spine.Implementations.V38;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using SpineRuntime38;
using SpineRuntime38.Attachments;
namespace Spine.Implementations.SpineWrappers.V38.Attachments
namespace Spine.Implementations.V38.Attachments
{
internal sealed class MeshAttachment38(MeshAttachment innerObject) :
Attachment38(innerObject),
@@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments
public override MeshAttachment InnerObject => _o;
public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices)
public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
{
if (slot is Slot38 st)
{

Some files were not shown because too many files have changed in this diff Show More