Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: add spine doc #2262

Merged
merged 4 commits into from
Aug 2, 2024
Merged

Conversation

johanzhu
Copy link
Contributor

@johanzhu johanzhu commented Jul 24, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

Summary by CodeRabbit

  • New Features

    • Enhanced documentation for integrating Spine animations, including detailed asset management and usage instructions.
    • Introduction of new examples showcasing Spine animations, including character customization and interactive features.
    • New classes and components added, enabling more complex animation handling and user interactions.
  • Bug Fixes

    • Improved resource loading efficiency by consolidating multiple URLs into single resource files.
  • Documentation

    • Comprehensive updates to clarify and enhance the usability of Spine animation integration within the Galacean editor, including new guides and example files.
  • Refactor

    • Updated rendering methods for Spine animations, improving performance and simplifying entity management.
  • Style

    • Adjusted camera settings and animation scaling for better visual representation.

Copy link

coderabbitai bot commented Jul 24, 2024

Walkthrough

The updates significantly enhance the documentation and examples for integrating Spine animations within the Galacean engine. Key improvements include detailed asset management, streamlined animation handling, improved user interactivity through character customization, and enhanced performance. New examples demonstrate functionalities such as skin changes and physics interactions, making it easier for developers to implement and manage Spine animations effectively in their projects.

Changes

Files Change Summary
docs/zh/graphics/2D/spine.md Expanded documentation on Spine animation integration, highlighting asset management, advantages of Spine over frame-based animations, and detailed configuration steps.
examples/spine-animation.ts, examples/spine-change-attachment.ts, examples/spine-performance.ts
examples/spine-follow-shoot.ts Introduced character interaction with animations based on pointer input, setting up multiple states for character actions.
examples/spine-full-skin-change.ts, examples/spine-mix-and-match.ts
examples/spine-physics.ts Introduced a physics simulation for Spine animations with user interaction, enabling real-time manipulation based on pointer input.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Engine
    participant Character
    participant Animation

    User->>Engine: Initialize Scene
    Engine->>Character: Load Spine Resource
    Character->>Animation: Set Animation State
    User->>Character: Interact (Pointer Input)
    Character->>Animation: Update Position and State
    Animation->>User: Display Animation
Loading

🐇 In a world of spins and twirls,
The rabbit hops, as magic unfurls.
With skins that change and actions that pop,
Animation dances, never to stop!
Hooray for the updates, so bright and so bold,
In the realm of Galacean, new stories unfold!
🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5f9709c and 4cea23e.

Files selected for processing (8)
  • docs/zh/graphics/2D/spine.md (1 hunks)
  • examples/spine-animation.ts (2 hunks)
  • examples/spine-change-attachment.ts (2 hunks)
  • examples/spine-follow-shoot.ts (1 hunks)
  • examples/spine-full-skin-change.ts (1 hunks)
  • examples/spine-mix-and-match.ts (1 hunks)
  • examples/spine-performance.ts (2 hunks)
  • examples/spine-physics.ts (1 hunks)
Additional context used
LanguageTool
docs/zh/graphics/2D/spine.md

[uncategorized] ~13-~13: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"投入
Context: ...术需求:** Spine 动画需要的美术资源更少,能为您节省出更多的人力物力更好的投入到游戏开发中去。 - 流畅性: Spine 动画使用差值算法计算中间...

(wb4)


[uncategorized] ~15-~15: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:方便"地"更换
Context: ...的效果。 - 装备附件: 图片绑定在骨骼上来实现动画。如果你需要可以方便的更换角色的装备满足不同的需求。甚至改变角色的样貌来达到动画重用的效果。 - **...

(wb4)


[uncategorized] ~161-~161: 您的意思是"设置"过度""?
Context: ...n 方法后,会立即切换当前轨道的动画。如果你需要动画切换时有过渡效果,就需要设置过渡的持续时间了。这时就需要 [AnimationStateData](https:...

(DU3_DU4)


[uncategorized] ~202-~202: 您的意思是""过度"持续"?
Context: ...idth=467" width="467"> 假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,当 delay 设置为 0 时,动画 B 会从 1 - ...

(DU3_DU4)


[uncategorized] ~204-~204: 您的意思是""过度"持续"?
Context: ...毕前,下一个动画就会开始播放,如下图所示: 同样假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,动画 B 则会从 0.6 秒开始过渡到动画 B。 <i...

(DU3_DU4)


[uncategorized] ~208-~208: 您的意思是"是"过度""?
Context: ...delay 参数与 addAnimation 一样。 mixDuration 是过渡持续时间,动画会逐渐回到初始状态。如下图所示(右侧棕色区域即是空动画), <i...

(DU3_DU4)


[uncategorized] ~208-~208: 您的意思是“"既"是”吗?
Context: ...uration 是过渡持续时间,动画会逐渐回到初始状态。如下图所示(右侧棕色区域即是空动画), <img src="https://intranetproxy....

(JI11_JI2)


[uncategorized] ~339-~339: 成分累赘: “来自” “于” 不一起使用,请删除 “于”:"来自"。
Context: ...in(mixAndMatchSkin); } } ``` 代码中皮肤的名称来自于官方的 mix-and-match 示例,该示例可以在下面的章节看到。 # 在...

(wb2)

Markdownlint
docs/zh/graphics/2D/spine.md

398-398: null
Bare URL used

(MD034, no-bare-urls)


415-415: null
Bare URL used

(MD034, no-bare-urls)


32-32: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


36-36: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


40-40: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


46-46: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


50-50: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


54-54: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


61-61: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


65-65: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


72-72: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


77-77: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


81-81: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


86-86: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


100-100: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


106-106: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


110-110: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


116-116: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


195-195: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


200-200: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


206-206: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


210-210: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


223-223: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


356-356: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


360-360: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

Additional comments not posted (41)
examples/spine-performance.ts (3)

6-7: Verify the usage of SpineAnimationRenderer.

Ensure that the new import SpineAnimationRenderer is correctly used throughout the file and that it is necessary for the updated functionality.

Verification successful

Verified the usage of SpineAnimationRenderer.

The import statement for SpineAnimationRenderer is correctly used throughout the file examples/spine-performance.ts and other related files.

  • examples/spine-performance.ts
  • examples/spine-follow-shoot.ts
  • examples/spine-animation.ts
  • examples/spine-physics.ts
  • examples/spine-full-skin-change.ts
  • examples/spine-change-attachment.ts
  • examples/spine-mix-and-match.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer`. Expect: Only valid usage.
rg --type python -A 5 $'SpineAnimationRenderer'

Length of output: 77


Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer` in TypeScript files. Expect: Only valid usage.
rg --type typescript -A 5 $'SpineAnimationRenderer'

Length of output: 85


Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer` in all files and filter to TypeScript files. Expect: Only valid usage.
rg SpineAnimationRenderer -g '*.ts' -A 5

Length of output: 6680


28-32: Verify the new spine entity instantiation.

Ensure that the new method of instantiating the spine entity directly from the engine is correct and aligns with best practices.


24-26: Verify the new resource URL.

Ensure that the new URL for the JSON file is correct and that the resource loading mechanism is efficient.

Verification successful

Let's correct the file type and re-run the search to verify the new resource URL in the codebase.


Let's search for the URL in all files to verify its usage in the codebase.


Verified the new resource URL.

The new URL for the JSON file is correctly used in the following files:

  • examples/spine-performance.ts
  • examples/spine-animation.ts

Both instances are for loading a spine animation resource and appear to be implemented correctly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new resource URL in the codebase.

# Test: Search for the usage of the new URL. Expect: Only valid usage.
rg --type python -A 5 $'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/qGISZ7QTJFkEL0Qx/spineboy/spineboy.json'

Length of output: 164


Script:

#!/bin/bash
# Description: Verify the new resource URL in the codebase.

# Test: Search for the usage of the new URL. Expect: Only valid usage.
rg --type typescript -A 5 $'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/qGISZ7QTJFkEL0Qx/spineboy/spineboy.json'

Length of output: 172


Script:

#!/bin/bash
# Description: Verify the new resource URL in the codebase.

# Test: Search for the usage of the new URL. Expect: Only valid usage.
rg -A 5 $'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/qGISZ7QTJFkEL0Qx/spineboy/spineboy.json'

Length of output: 1055

examples/spine-animation.ts (4)

37-57: Verify the new animation handling logic.

Ensure that the new animation handling logic (multiple animations queued for playback and an event listener for animation completion) is correct and enhances the animation control flow.

Verification successful

Verify the new animation handling logic.

The new animation handling logic, which includes multiple animations queued for playback and an event listener for animation completion, is correctly implemented and enhances the animation control flow.

  • The state.addListener method is used only in the examples/spine-animation.ts file.
  • The provided code snippet shows the complete implementation of the new animation handling logic.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new animation handling logic in the codebase.

# Test: Search for the usage of the new animation handling logic. Expect: Only valid usage.
rg --type python -A 5 $'state.addListener'

Length of output: 72


Script:

#!/bin/bash
# Description: Verify the new animation handling logic in the codebase.

# Test: Search for the usage of the new animation handling logic. Expect: Only valid usage.
rg --type typescript -A 5 $'state.addListener'

Length of output: 80


Script:

#!/bin/bash
# Description: Verify the new animation handling logic in the codebase.

# Test: Search for the usage of the new animation handling logic. Expect: Only valid usage.
rg --type ts -A 5 $'state.addListener'

Length of output: 390


6-7: Verify the usage of SpineAnimationRenderer.

Ensure that the new import SpineAnimationRenderer is correctly used throughout the file and that it is necessary for the updated functionality.

Verification successful

Verified the usage of SpineAnimationRenderer.

The import statement for SpineAnimationRenderer is correctly used throughout the file and is necessary for the updated functionality.

  • examples/spine-animation.ts
  • examples/spine-performance.ts
  • examples/spine-follow-shoot.ts
  • examples/spine-mix-and-match.ts
  • examples/spine-full-skin-change.ts
  • examples/spine-physics.ts
  • examples/spine-change-attachment.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer`. Expect: Only valid usage.
rg --type python -A 5 $'SpineAnimationRenderer'

Length of output: 77


Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer`. Expect: Only valid usage.
rg --type typescript -A 5 'SpineAnimationRenderer'

Length of output: 85


Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer`. Expect: Only valid usage.
rg --glob '*.ts' -A 5 'SpineAnimationRenderer'

Length of output: 6684


31-36: Verify the new spine entity instantiation.

Ensure that the new method of instantiating the spine entity directly from the engine is correct and aligns with best practices.

Verification successful

Verified the new spine entity instantiation.

The method new Entity(engine) is consistently used across the codebase, confirming that it is correct and aligns with best practices.

  • examples/spine-animation.ts
  • examples/spine-performance.ts
  • examples/spine-follow-shoot.ts
  • examples/spine-physics.ts
  • examples/spine-change-attachment.ts
  • examples/spine-mix-and-match.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new spine entity instantiation method in the codebase.

# Test: Search for the usage of the new instantiation method. Expect: Only valid usage.
rg --type python -A 5 $'new Entity(engine)'

Length of output: 75


Script:

#!/bin/bash
# Description: Verify the new spine entity instantiation method in the codebase.

# Test: Search for the usage of the new instantiation method. Expect: Only valid usage.
rg --type typescript -A 5 $'new Entity(engine)'

Length of output: 83


Script:

#!/bin/bash
# Description: Verify the new spine entity instantiation method in the codebase.

# Test: Search for the usage of the new instantiation method. Expect: Only valid usage.
rg --type ts -A 5 $'new Entity(engine)'

Length of output: 40


Script:

#!/bin/bash
# Description: Verify all instances of the Entity instantiation method in the codebase.

# Test: Search for all instances of the new Entity instantiation method. Expect: Only valid usage.
rg --type ts -A 5 $'new Entity'

Length of output: 34575


21-23: Verify the new camera settings.

Ensure that the new camera settings (position, nearClipPlane, and farClipPlane) are correct and enhance the rendering depth.

Verification successful

Verify the new camera settings.

Ensure that the new camera settings (position, nearClipPlane, and farClipPlane) are correct and enhance the rendering depth.


Verify the new camera settings.

Ensure that the new camera settings (position, nearClipPlane, and farClipPlane) are correct and enhance the rendering depth.


Verify the new camera settings.

Ensure that the new camera settings (position, nearClipPlane, and farClipPlane) are correct and enhance the rendering depth.


Verified the new camera settings.

The new camera settings (position, nearClipPlane, and farClipPlane) are consistently used across multiple files, indicating that they are correctly implemented to enhance the rendering depth.

  • examples/spine-animation.ts
  • examples/spine-change-attachment.ts
  • examples/spine-follow-shoot.ts
  • examples/spine-full-skin-change.ts
  • examples/spine-mix-and-match.ts
  • examples/spine-physics.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new camera settings in the codebase.

# Test: Search for the usage of the new camera settings. Expect: Only valid usage.
rg --type python -A 5 $'cameraEntity.transform.position = new Vector3(0, 0, 100)'

Length of output: 113


Script:

#!/bin/bash
# Description: Verify the new camera settings in the codebase.

# Test: Search for the usage of the new camera settings. Expect: Only valid usage.
rg --type typescript -A 5 $'cameraEntity.transform.position = new Vector3(0, 0, 100)'

Length of output: 121


Script:

#!/bin/bash
# Description: Verify the new camera settings in the codebase.

# Test: Search for the usage of the new camera settings. Expect: Only valid usage.
rg --type ts -A 5 $'cameraEntity.transform.position = new Vector3(0, 0, 100)'

Length of output: 78


Script:

#!/bin/bash
# Description: Verify the new camera settings in the codebase.

# Test: Search for the usage of the new camera position setting. Expect: Only valid usage.
rg --type ts -A 5 $'transform.position = new Vector3(0, 0, 100)'

# Test: Search for the usage of the new camera nearClipPlane setting. Expect: Only valid usage.
rg --type ts -A 5 $'camera.nearClipPlane = 0.001'

# Test: Search for the usage of the new camera farClipPlane setting. Expect: Only valid usage.
rg --type ts -A 5 $'camera.farClipPlane = 20000'

Length of output: 5011

examples/spine-change-attachment.ts (4)

39-47: Verify the new attachment handling logic.

Ensure that the new attachment handling logic (utilizing the skeleton.findSlot method for direct manipulation of attachments) is correct and enhances the efficiency of attachment management.

Verification successful

Verified the new attachment handling logic.

The new attachment handling logic utilizing the skeleton.findSlot method for direct manipulation of attachments is correctly implemented in the provided context.

  • examples/spine-change-attachment.ts: Verified usage of skeleton.findSlot.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new attachment handling logic in the codebase.

# Test: Search for the usage of the new attachment handling logic. Expect: Only valid usage.
rg --type python -A 5 $'skeleton.findSlot'

Length of output: 72


Script:

#!/bin/bash
# Description: Verify the new attachment handling logic in the TypeScript codebase.

# Test: Search for the usage of the new attachment handling logic. Expect: Only valid usage.
rg --type ts -A 5 'skeleton.findSlot'

Length of output: 695


6-7: Verify the usage of SpineAnimationRenderer.

Ensure that the new import SpineAnimationRenderer is correctly used throughout the file and that it is necessary for the updated functionality.

Verification successful

Verified the usage of SpineAnimationRenderer.

The import SpineAnimationRenderer is correctly used throughout the file and is necessary for the updated functionality.

  • examples/spine-change-attachment.ts
  • examples/spine-mix-and-match.ts
  • examples/spine-physics.ts
  • examples/spine-performance.ts
  • examples/spine-full-skin-change.ts
  • examples/spine-follow-shoot.ts
  • examples/spine-animation.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer`. Expect: Only valid usage.
rg --type python -A 5 $'SpineAnimationRenderer'

Length of output: 77


Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer`. Expect: Only valid usage.
rg --type typescript -A 5 $'SpineAnimationRenderer'

Length of output: 85


Script:

#!/bin/bash
# Description: Verify the usage of `SpineAnimationRenderer` in the codebase.

# Test: Search for the usage of `SpineAnimationRenderer`. Expect: Only valid usage.
rg -t ts -A 5 'SpineAnimationRenderer'

Length of output: 6676


27-29: Verify the new resource URL.

Ensure that the new URL for the JSON file is correct and that the resource loading mechanism is efficient.

Verification successful

The new resource URL is valid and correctly configured.

  • The URL is accessible and returns the expected JSON content type.
  • The resource loading mechanism is functioning as expected.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new resource URL in the codebase.

# Test: Search for the usage of the new URL. Expect: Only valid usage.
rg --type python -A 5 $'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/24ejL92gvbWxsXRi/mix-and-match/mix-and-match.json'

Length of output: 174


Script:

#!/bin/bash
# Description: Verify the new resource URL in the codebase.

# Test: Search for the usage of the new URL. Expect: Only valid usage.
rg --type typescript -A 5 $'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/24ejL92gvbWxsXRi/mix-and-match/mix-and-match.json'

Length of output: 182


Script:

#!/bin/bash
# Description: Verify the new resource URL in the codebase.

# Test: Search for the usage of the new URL. Expect: Only valid usage.
rg --type ts -A 5 $'https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/24ejL92gvbWxsXRi/mix-and-match/mix-and-match.json'

Length of output: 1651


Script:

#!/bin/bash
# Description: Check the accessibility and content type of the new resource URL.

# Test: Verify the URL is accessible and returns JSON content.
curl -I https://mdn.alipayobjects.com/huamei_kz4wfo/uri/file/as/2/kz4wfo/4/mp/24ejL92gvbWxsXRi/mix-and-match/mix-and-match.json

Length of output: 1825


21-23: Verify the new camera settings.

Ensure that the new camera settings (position, nearClipPlane, and farClipPlane) are correct and enhance the rendering depth.

Verification successful

The new camera settings are correct and consistent with other examples in the codebase.

The values for position, nearClipPlane, and farClipPlane are used similarly in other files, indicating a standard practice for enhancing rendering depth.

  • examples/spine-change-attachment.ts
  • examples/spine-animation.ts
  • examples/spine-follow-shoot.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new camera settings in the codebase.

# Test: Search for the usage of the new camera settings. Expect: Only valid usage.
rg --type python -A 5 $'cameraEntity.transform.position = new Vector3(0, 0, 100)'

Length of output: 113


Script:

#!/bin/bash
# Description: Verify the new camera settings in the codebase.

# Test: Search for the usage of the new camera settings. Expect: Only valid usage.
rg --type typescript -A 5 $'cameraEntity.transform.position = new Vector3(0, 0, 100)'

Length of output: 121


Script:

#!/bin/bash
# Description: Verify the new camera settings in the codebase.

# Test: Search for the usage of the new camera settings. Expect: Only valid usage.
rg --type ts -A 5 $'cameraEntity.transform.position = new Vector3(0, 0, 100)'

Length of output: 78


Script:

#!/bin/bash
# Description: Verify the new camera settings in the codebase by searching for related camera settings.

# Test: Search for any camera settings adjustments in the TypeScript files.
rg --type ts -A 5 'cameraEntity.transform.position'
rg --type ts -A 5 'camera.nearClipPlane'
rg --type ts -A 5 'camera.farClipPlane'

Length of output: 45173

examples/spine-full-skin-change.ts (6)

1-5: Ensure metadata correctness.

Verify that the metadata, such as title, category, and thumbnail, is correct and relevant to the content of the file.


6-8: Imports look good.

The imports are necessary for the functionality provided in the file.


10-26: Engine creation and initialization look good.

The engine is created and initialized correctly, and the scene and camera are set up properly.


28-41: Resource loading and Spine animation setup look good.

The resources are loaded correctly, and the Spine animations are set up properly.


43-59: GUI setup for skin change looks good.

The GUI is set up correctly, and the skin change functionality is implemented properly.


63-64: Engine run initiation looks good.

The engine run is initiated correctly.

examples/spine-physics.ts (6)

1-5: Ensure metadata correctness.

Verify that the metadata, such as title, category, and thumbnail, is correct and relevant to the content of the file.


6-8: Imports look good.

The imports are necessary for the functionality provided in the file.


9-23: Engine creation and initialization look good.

The engine is created and initialized correctly, and the scene and camera are set up properly.


25-41: Resource loading and Spine animation setup look good.

The resources are loaded correctly, and the Spine animations are set up properly.


43-59: Script for Spine animation interaction looks good.

The script is implemented correctly, and the interaction logic is sound.


62-63: Engine run initiation looks good.

The engine run is initiated correctly.

examples/spine-follow-shoot.ts (6)

1-5: Ensure metadata correctness.

Verify that the metadata, such as title, category, and thumbnail, is correct and relevant to the content of the file.


6-8: Imports look good.

The imports are necessary for the functionality provided in the file.


9-23: Engine creation and initialization look good.

The engine is created and initialized correctly, and the scene and camera are set up properly.


25-36: Resource loading and Spine animation setup look good.

The resources are loaded correctly, and the Spine animations are set up properly.


43-68: Script for Spine animation interaction looks good.

The script is implemented correctly, and the interaction logic is sound.


72-73: Engine run initiation looks good.

The engine run is initiated correctly.

examples/spine-mix-and-match.ts (5)

6-8: Imports look good.

All necessary modules are imported correctly.


14-20: Engine setup looks good.

The engine is created, the canvas is resized, and the scene and root entity are set up correctly.


10-13: GUI setup looks good.

A new dat.GUI instance is created, and the logger is enabled.


28-131: Resource loading and entity setup look good.

The Spine resource is loaded, and the Spine entity is created and configured correctly. The dat.GUI interface is used to set up various skins and animations.


136-210: Class implementation looks good.

The MixAndMatch class is well-implemented, with methods for updating character skin and combined skin, as well as adding equipment skins.

docs/zh/graphics/2D/spine.md (7)

9-17: Introduction and advantages of Spine animations look good.

The introduction is clear and accurately describes the advantages of Spine animations over traditional frame-based animations.

Tools
LanguageTool

[uncategorized] ~13-~13: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"投入
Context: ...术需求:** Spine 动画需要的美术资源更少,能为您节省出更多的人力物力更好的投入到游戏开发中去。 - 流畅性: Spine 动画使用差值算法计算中间...

(wb4)


[uncategorized] ~15-~15: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:方便"地"更换
Context: ...的效果。 - 装备附件: 图片绑定在骨骼上来实现动画。如果你需要可以方便的更换角色的装备满足不同的需求。甚至改变角色的样貌来达到动画重用的效果。 - **...

(wb4)


19-67: Asset management section looks good.

The steps for exporting and importing assets from the Spine editor are clear and accurately described.

Tools
Markdownlint

32-32: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


36-36: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


40-40: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


46-46: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


50-50: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


54-54: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


61-61: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


65-65: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


70-87: SpineSkeletonData and SpineAtlas assets section looks good.

The descriptions of SpineSkeletonData and SpineAtlas assets and how to preview and manage them in the Galacean editor are clear and accurately explained.

Tools
Markdownlint

72-72: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


77-77: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


81-81: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


86-86: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


92-130: Component usage section looks good.

The steps for adding and configuring Spine components in the Galacean editor are clear and accurately described.

Tools
Markdownlint

100-100: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


106-106: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


110-110: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


116-116: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


131-243: Scripting section looks good.

The examples of using the AnimationState API for controlling animations and handling animation events are clear and accurately described.

Tools
LanguageTool

[uncategorized] ~161-~161: 您的意思是"设置"过度""?
Context: ...n 方法后,会立即切换当前轨道的动画。如果你需要动画切换时有过渡效果,就需要设置过渡的持续时间了。这时就需要 [AnimationStateData](https:...

(DU3_DU4)


[uncategorized] ~202-~202: 您的意思是""过度"持续"?
Context: ...idth=467" width="467"> 假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,当 delay 设置为 0 时,动画 B 会从 1 - ...

(DU3_DU4)


[uncategorized] ~204-~204: 您的意思是""过度"持续"?
Context: ...毕前,下一个动画就会开始播放,如下图所示: 同样假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,动画 B 则会从 0.6 秒开始过渡到动画 B。 <i...

(DU3_DU4)


[uncategorized] ~208-~208: 您的意思是"是"过度""?
Context: ...delay 参数与 addAnimation 一样。 mixDuration 是过渡持续时间,动画会逐渐回到初始状态。如下图所示(右侧棕色区域即是空动画), <i...

(DU3_DU4)


[uncategorized] ~208-~208: 您的意思是“"既"是”吗?
Context: ...uration 是过渡持续时间,动画会逐渐回到初始状态。如下图所示(右侧棕色区域即是空动画), <img src="https://intranetproxy....

(JI11_JI2)

Markdownlint

195-195: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


200-200: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


206-206: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


210-210: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


223-223: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


249-338: Skeleton operations section looks good.

The examples of modifying bone positions, changing attachments, and mixing skins are clear and accurately described.


341-470: Additional sections and performance suggestions look good.

The examples, versioning information, upgrade instructions, and performance suggestions are clear and accurately described.

Tools
Markdownlint

398-398: null
Bare URL used

(MD034, no-bare-urls)


415-415: null
Bare URL used

(MD034, no-bare-urls)


356-356: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


360-360: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Outside diff range, codebase verification and nitpick comments (3)
docs/zh/graphics/2D/spine/overview.md (1)

9-20: Improve grammatical accuracy.

There are some grammatical improvements suggested by LanguageTool.

- 需要的美术资源更少,能为您节省出更多的人力物力更好的投入到游戏开发中去。
+ 需要的美术资源更少,能为您节省出更多的人力物力更好地投入到游戏开发中去。

- 可以方便的更换角色的装备满足不同的需求。
+ 可以方便地更换角色的装备满足不同的需求。
Tools
LanguageTool

[uncategorized] ~13-~13: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"投入
Context: ...术需求:** Spine 动画需要的美术资源更少,能为您节省出更多的人力物力更好的投入到游戏开发中去。 - 流畅性: Spine 动画使用差值算法计算中间...

(wb4)


[uncategorized] ~15-~15: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:方便"地"更换
Context: ...的效果。 - 装备附件: 图片绑定在骨骼上来实现动画。如果你需要可以方便的更换角色的装备满足不同的需求。甚至改变角色的样貌来达到动画重用的效果。 - **...

(wb4)

docs/zh/graphics/2D/spine/example.md (2)

9-38: Use headings instead of emphasis for section titles.

The static analysis tool suggests using headings instead of emphasis for section titles.

- **动画控制**
+ ### 动画控制

- **跟踪射击**
+ ### 跟踪射击

- **局部换肤**
+ ### 局部换肤

- **整体换肤**
+ ### 整体换肤

- **皮肤混搭**
+ ### 皮肤混搭

- **物理**
+ ### 物理
Tools
Markdownlint

9-9: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


14-14: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


24-24: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


29-29: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


34-34: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


39-41: Improve grammatical accuracy.

There is a grammatical improvement suggested by LanguageTool.

- 下一章节:[版本与性能](/docs/graphics/2D/spine/other)
+ 下一章节:[版本与性能](/docs/graphics/2D/spine/other)
Tools
LanguageTool

[uncategorized] ~41-~41: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...rc="spine-physics.ts"> 下一章节:版本与性能

(wa5)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4cea23e and 0d1d521.

Files selected for processing (6)
  • docs/zh/graphics/2D/2d.md (1 hunks)
  • docs/zh/graphics/2D/spine/editor.md (1 hunks)
  • docs/zh/graphics/2D/spine/example.md (1 hunks)
  • docs/zh/graphics/2D/spine/other.md (1 hunks)
  • docs/zh/graphics/2D/spine/overview.md (1 hunks)
  • docs/zh/graphics/2D/spine/runtime.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • docs/zh/graphics/2D/2d.md
Additional context used
LanguageTool
docs/zh/graphics/2D/spine/overview.md

[uncategorized] ~13-~13: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"投入
Context: ...术需求:** Spine 动画需要的美术资源更少,能为您节省出更多的人力物力更好的投入到游戏开发中去。 - 流畅性: Spine 动画使用差值算法计算中间...

(wb4)


[uncategorized] ~15-~15: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:方便"地"更换
Context: ...的效果。 - 装备附件: 图片绑定在骨骼上来实现动画。如果你需要可以方便的更换角色的装备满足不同的需求。甚至改变角色的样貌来达到动画重用的效果。 - **...

(wb4)

docs/zh/graphics/2D/spine/example.md

[uncategorized] ~41-~41: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...rc="spine-physics.ts"> 下一章节:版本与性能

(wa5)

docs/zh/graphics/2D/spine/editor.md

[uncategorized] ~132-~132: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...d) 流程,导出编辑器项目。



下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graph...

(wa5)

docs/zh/graphics/2D/spine/runtime.md

[uncategorized] ~184-~184: 您的意思是"设置"过度""?
Context: ...on 方法后,会立即切换当前轨道的动画。如果你需要动画切换时有过渡效果,需要设置过渡的持续时间。可以通过 [AnimationStateData](https://...

(DU3_DU4)


[uncategorized] ~225-~225: 您的意思是""过度"持续"?
Context: ...idth=467" width="377"> 假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,当 delay 设置为 0 时,动画 B 会从 1 - ...

(DU3_DU4)


[uncategorized] ~227-~227: 您的意思是""过度"持续"?
Context: ...毕前,下一个动画就会开始播放,如下图所示: 同样假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,动画 B 则会从 0.6 秒开始过渡到动画 B。 <i...

(DU3_DU4)


[uncategorized] ~233-~233: 您的意思是"是"过度""?
Context: ...delay 参数与 addAnimation 一样。 mixDuration 是过渡持续时间,动画会在 mixDuration 时间内逐渐回到初始状态。如下图所示(...

(DU3_DU4)


[uncategorized] ~233-~233: 您的意思是“"既"是”吗?
Context: ...画会在 mixDuration 时间内逐渐回到初始状态。如下图所示(右侧棕色区域即是空动画), <img src="https://intranetproxy....

(JI11_JI2)


[uncategorized] ~380-~380: 成分累赘: “来自” “于” 不一起使用,请删除 “于”:"来自"。
Context: ...in(mixAndMatchSkin); } } ``` 代码中皮肤的名称来自于 mix-and-match 示例。 下一个章节会给大家展示全部的 [Spin...

(wb2)

Markdownlint
docs/zh/graphics/2D/spine/example.md

9-9: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


14-14: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


24-24: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


29-29: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


34-34: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

docs/zh/graphics/2D/spine/editor.md

23-23: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


27-27: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


31-31: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


37-37: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


41-41: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


45-45: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


52-52: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


56-56: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


62-62: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


67-67: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


71-71: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


76-76: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


90-90: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


96-96: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


100-100: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


106-106: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


115-115: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

docs/zh/graphics/2D/spine/runtime.md

155-155: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time

(MD001, heading-increment)


82-82: null
Bare URL used

(MD034, no-bare-urls)


83-83: null
Bare URL used

(MD034, no-bare-urls)


84-84: null
Bare URL used

(MD034, no-bare-urls)


102-102: null
Bare URL used

(MD034, no-bare-urls)


103-103: null
Bare URL used

(MD034, no-bare-urls)


339-339: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


356-356: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


149-149: null
No empty links

(MD042, no-empty-links)


41-41: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


44-44: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


218-218: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


223-223: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


229-229: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


235-235: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


249-249: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

Additional comments not posted (14)
docs/zh/graphics/2D/spine/overview.md (2)

1-7: Metadata section looks good.

The metadata section is correctly formatted and provides necessary information for documentation structure.


20-24: Content section looks good.

The content section is clear and provides useful navigation for the reader.

docs/zh/graphics/2D/spine/example.md (1)

1-7: Metadata section looks good.

The metadata section is correctly formatted and provides necessary information for documentation structure.

docs/zh/graphics/2D/spine/other.md (5)

1-7: Metadata section looks good.

The metadata section is correctly formatted and provides necessary information for documentation structure.


9-18: Version section looks good.

The version section is informative and well-written.


20-22: Upgrade section looks good.

The upgrade section is clear and provides useful instructions for the reader.


23-30: Performance section looks good.

The performance section is informative and well-structured.


31-32: Questions section looks good.

The questions section is clear and provides useful information for the reader.

docs/zh/graphics/2D/spine/editor.md (3)

1-7: Front matter looks good.

The front matter is correctly formatted.


9-11: Introduction is clear and concise.

The introduction provides a good overview of the content.


126-127: Export section looks good.

The section provides a clear link to the project export process.

docs/zh/graphics/2D/spine/runtime.md (3)

1-7: Front matter looks good.

The front matter is correctly formatted.


9-11: Introduction is clear and concise.

The introduction provides a good overview of the content.


13-21: Installation instructions are clear and correctly formatted.

The steps to install the Galacean Spine runtime are well-documented.

Comment on lines +16 to +17
1. [导出 skeleton 和 animation 数据](https://zh.esotericsoftware.com/spine-export)
2. [导出包含 skeleton 图像的 texture atlases](https://zh.esotericsoftware.com/spine-texture-packer)
Copy link

@coderabbitai coderabbitai bot Jul 25, 2024

Choose a reason for hiding this comment

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

Add alt text to images.

Images should have alternate text to improve accessibility.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721205852909-9c6db2f1-7e47-45d7-ac0b-a6ebf9f95f68.png#clientId=uf07edf19-371c-4&from=paste&height=354&id=qQazJ&originHeight=812&originWidth=466&originalType=binary&ratio=2&rotation=0&showTitle=false&size=188598&status=done&style=shadow&taskId=u95ae3381-21c1-4bf6-9249-64901470a7e&title=&width=203" width="203">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721205852909-9c6db2f1-7e47-45d7-ac0b-a6ebf9f95f68.png#clientId=uf07edf19-371c-4&from=paste&height=354&id=qQazJ&originHeight=812&originWidth=466&originalType=binary&ratio=2&rotation=0&showTitle=false&size=188598&status=done&style=shadow&taskId=u95ae3381-21c1-4bf6-9249-64901470a7e&title=&width=203" width="203" alt="Export window in Spine editor">

Also applies to: 23-23, 27-27, 31-31, 37-37, 41-41, 45-45

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

Choose a reason for hiding this comment

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

@johanzhu, thank you for adding the alt text to the images. This will significantly improve the accessibility of the documentation. Great job!


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!

## 2. 在 Galacean 编辑器中导入资产
从 Spine 编辑器导出资产后,第二步就要将资产导入至 Galacean 编辑器了。打开编辑器后,将导出的文件直接拖入到[资产面板](https://antg.antgroup.com/engine/docs/latest/cn/assets-interface)中,即可完成上传

<img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721208067896-206d850e-20fc-44a6-9987-6a8556b10e3b.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=u4bb88103&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=8620071&status=done&style=shadow&taskId=ua9290849-8cb2-46ac-98b6-e2b22ab0d83&title=&width=992" width="992">
Copy link

@coderabbitai coderabbitai bot Jul 25, 2024

Choose a reason for hiding this comment

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

Add alt text to images.

Images should have alternate text to improve accessibility.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721208067896-206d850e-20fc-44a6-9987-6a8556b10e3b.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=u4bb88103&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=8620071&status=done&style=shadow&taskId=ua9290849-8cb2-46ac-98b6-e2b22ab0d83&title=&width=992" width="992">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721208067896-206d850e-20fc-44a6-9987-6a8556b10e3b.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=u4bb88103&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=8620071&status=done&style=shadow&taskId=ua9290849-8cb2-46ac-98b6-e2b22ab0d83&title=&width=992" width="992" alt="Importing assets into Galacean editor">

Also applies to: 56-56, 62-62, 67-67, 71-71, 76-76

Tools
Markdownlint

52-52: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

Choose a reason for hiding this comment

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

@johanzhu Thank you for adding the alt text to the images. This will greatly improve the accessibility of the documentation. If there's anything else you need assistance with, feel free to let me know!


拖入添加是最快捷的一种方式。点击 SpineSkeletonData 资产,按住后拖动到视图区,就能快速创建一个添加了 Spine 组件的实体,并指定资产为刚刚选中的 SpineSkeletonData 资产。

<img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721210070086-6db51cd8-4493-4b4d-93ee-16c8187fe843.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=ucc4cc750&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=7335004&status=done&style=shadow&taskId=u97b775ac-f0f4-4f0f-80f6-077cacc66d5&title=&width=992" width="992">
Copy link

@coderabbitai coderabbitai bot Jul 25, 2024

Choose a reason for hiding this comment

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

Add alt text to images.

Images should have alternate text to improve accessibility.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721210070086-6db51cd8-4493-4b4d-93ee-16c8187fe843.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=ucc4cc750&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=7335004&status=done&style=shadow&taskId=u97b775ac-f0f4-4f0f-80f6-077cacc66d5&title=&width=992" width="992">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721210070086-6db51cd8-4493-4b4d-93ee-16c8187fe843.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=ucc4cc750&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=7335004&status=done&style=shadow&taskId=u97b775ac-f0f4-4f0f-80f6-077cacc66d5&title=&width=992" width="992" alt="Adding Spine animations to the scene">

Also applies to: 96-96, 100-100, 106-106, 115-115

Tools
Markdownlint

90-90: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

Choose a reason for hiding this comment

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

@johanzhu Thank you for adding the alt text to the images.


Spine 组件的配置如下:

<img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721269455151-ceaf0b7e-a00b-4ba4-a109-0cdb08c135f2.png#clientId=uf07edf19-371c-4&from=paste&height=199&id=ucac2f7de&originHeight=398&originWidth=1060&originalType=binary&ratio=2&rotation=0&showTitle=false&size=82934&status=done&style=shadow&taskId=ub50cded7-5559-41de-b104-9db3c4bb4f5&title=&width=530" width="503">
Copy link

@coderabbitai coderabbitai bot Jul 25, 2024

Choose a reason for hiding this comment

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

Add alt text to image.

Images should have alternate text to improve accessibility.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721269455151-ceaf0b7e-a00b-4ba4-a109-0cdb08c135f2.png#clientId=uf07edf19-371c-4&from=paste&height=199&id=ucac2f7de&originHeight=398&originWidth=1060&originalType=binary&ratio=2&rotation=0&showTitle=false&size=82934&status=done&style=shadow&taskId=ub50cded7-5559-41de-b104-9db3c4bb4f5&title=&width=530" width="503">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721269455151-ceaf0b7e-a00b-4ba4-a109-0cdb08c135f2.png#clientId=uf07edf19-371c-4&from=paste&height=199&id=ucac2f7de&originHeight=398&originWidth=1060&originalType=binary&ratio=2&rotation=0&showTitle=false&size=82934&status=done&style=shadow&taskId=ub50cded7-5559-41de-b104-9db3c4bb4f5&title=&width=530" width="503" alt="Spine component configuration options">
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721269455151-ceaf0b7e-a00b-4ba4-a109-0cdb08c135f2.png#clientId=uf07edf19-371c-4&from=paste&height=199&id=ucac2f7de&originHeight=398&originWidth=1060&originalType=binary&ratio=2&rotation=0&showTitle=false&size=82934&status=done&style=shadow&taskId=ub50cded7-5559-41de-b104-9db3c4bb4f5&title=&width=530" width="503">
<img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721269455151-ceaf0b7e-a00b-4ba4-a109-0cdb08c135f2.png#clientId=uf07edf19-371c-4&from=paste&height=199&id=ucac2f7de&originHeight=398&originWidth=1060&originalType=binary&ratio=2&rotation=0&showTitle=false&size=82934&status=done&style=shadow&taskId=ub50cded7-5559-41de-b104-9db3c4bb4f5&title=&width=530" width="503" alt="Spine component configuration options">
Tools
Markdownlint

115-115: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

Choose a reason for hiding this comment

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

@johanzhu, thank you for making the change. The alt text has been successfully added to the image.

If you need any further assistance, feel free to ask!


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!

<b>若未添加至场景中,则需要在代码中手动加载</b>,步骤如下:
1. 首先,需要找到 Spine 动画的资产链接,点击 Galacean 编辑器的下载按钮,选择 project URL,拷贝 project.json 后打开,找到上传的 spine 动画文件(skel / json):

<img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721297144951-6dafb4e3-ccfa-495e-a540-8b3918b66400.png#clientId=u4b0ad8a6-bdc5-4&from=paste&height=480&id=u8ed78f33&originHeight=533&originWidth=359&originalType=binary&ratio=1&rotation=0&showTitle=false&size=40311&status=done&style=none&taskId=udf9587bf-1818-470f-a108-8ca0d7fe9d0&title=&width=323" width="330">
Copy link

@coderabbitai coderabbitai bot Jul 25, 2024

Choose a reason for hiding this comment

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

Add alt text to images.

Images should have alternate text to improve accessibility.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721297144951-6dafb4e3-ccfa-495e-a540-8b3918b66400.png#clientId=u4b0ad8a6-bdc5-4&from=paste&height=480&id=u8ed78f33&originHeight=533&originWidth=359&originalType=binary&ratio=1&rotation=0&showTitle=false&size=40311&status=done&style=none&taskId=udf9587bf-1818-470f-a108-8ca0d7fe9d0&title=&width=330" width="330">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721297144951-6dafb4e3-ccfa-495e-a540-8b3918b66400.png#clientId=u4b0ad8a6-bdc5-4&from=paste&height=480&id=u8ed78f33&originHeight=533&originWidth=359&originalType=binary&ratio=1&rotation=0&showTitle=false&size=40311&status=done&style=none&taskId=udf9587bf-1818-470f-a108-8ca0d7fe9d0&title=&width=330" width="330" alt="Finding spine asset file in project.json">

Also applies to: 44-44, 218-218, 223-223, 229-229, 235-235, 249-249

Tools
Markdownlint

41-41: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

Choose a reason for hiding this comment

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

@johanzhu, I have verified that the alt text has been successfully added to the images in the docs/zh/graphics/2D/spine/runtime.md file. Thank you for making the changes!

Analysis chain
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for the presence of alt text in image tags within docs/zh/graphics/2D/spine/runtime.md
grep -E '<img.*alt="' docs/zh/graphics/2D/spine/runtime.md

Length of output: 2967


## 使用运行时 API

在[前一个章节]()中,为大家介绍了编辑器中 Spine 组件的配置项。通过这些配置项目,能够对 Spine 动画进行一些基础的配置。
Copy link

@coderabbitai coderabbitai bot Jul 25, 2024

Choose a reason for hiding this comment

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

Fix empty link.

The link to the previous chapter is empty and should be updated with the correct URL.

- 在[前一个章节]()中
+ 在[前一个章节](previous-chapter-url)中
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[前一个章节]()中,为大家介绍了编辑器中 Spine 组件的配置项。通过这些配置项目,能够对 Spine 动画进行一些基础的配置。
[前一个章节](previous-chapter-url)中,为大家介绍了编辑器中 Spine 组件的配置项。通过这些配置项目,能够对 Spine 动画进行一些基础的配置。
Tools
Markdownlint

149-149: null
No empty links

(MD042, no-empty-links)

Copy link
Collaborator

Choose a reason for hiding this comment

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

同意兔子的说法

Copy link

Choose a reason for hiding this comment

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

@cptbtptpbcptdtptp 感谢您的同意。我们将继续进行修复空链接的工作。


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!


}
```
代码中皮肤的名称来自于 mix-and-match 示例。
Copy link

@coderabbitai coderabbitai bot Jul 25, 2024

Choose a reason for hiding this comment

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

Remove redundant word.

The phrase "名称来自于 mix-and-match 示例" should be "名称来自 mix-and-match 示例".

- 名称来自于 mix-and-match 示例。
+ 名称来自 mix-and-match 示例。
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
代码中皮肤的名称来自于 mix-and-match 示例。
代码中皮肤的名称来自 mix-and-match 示例。
Tools
LanguageTool

[uncategorized] ~380-~380: 成分累赘: “来自” “于” 不一起使用,请删除 “于”:"来自"。
Context: ...in(mixAndMatchSkin); } } ``` 代码中皮肤的名称来自于 mix-and-match 示例。 下一个章节会给大家展示全部的 [Spin...

(wb2)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

Choose a reason for hiding this comment

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

@johanzhu, thank you for confirming the change has been made.


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!


Spine 组件暴露了两个重要的对象 (AnimationState 和 Skeleton) 来进行动画控制与骨架操作,以实现更加复杂的效果。下面是详细的使用方式:

#### 动画控制 AnimationState
Copy link

@coderabbitai coderabbitai bot Jul 25, 2024

Choose a reason for hiding this comment

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

Fix heading level.

Heading levels should only increment by one level at a time.

- #### 动画控制 AnimationState
+ ### 动画控制 AnimationState
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### 动画控制 AnimationState
### 动画控制 AnimationState
Tools
Markdownlint

155-155: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time

(MD001, heading-increment)

Copy link
Collaborator

Choose a reason for hiding this comment

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

同意兔子的说法

Copy link

Choose a reason for hiding this comment

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

@cptbtptpbcptdtptp, 感谢您的同意。调整标题级别将有助于改善文档的结构和可读性。


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!


本章节为大家介绍如何在 Galacean 编辑器中使用 Spine 动画。

Galacean 编辑器内置了对 Spine 动画的支持,无需额外下载或配置,开箱即用,大大简化了开发流程。
Copy link
Collaborator

Choose a reason for hiding this comment

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

顺序换下:
Galacean 编辑器内置了对 Spine 动画的支持,无需额外下载或配置,开箱即用,大大简化了开发流程。本章节为大家介绍如何在 Galacean 编辑器中使用 Spine 动画。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Galacean 编辑器内置了对 Spine 动画的支持,无需额外下载或配置,开箱即用,大大简化了开发流程。

## 1. 从 Spine 编辑器导出资产
第一步,需要从 Spine 编辑器导出你的 Spine 动画素材,你可以在《Spine用户指南》中找到完整的步骤, 说明如何:
Copy link
Collaborator

Choose a reason for hiding this comment

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

《Spine用户指南》给个跳转

Copy link
Collaborator

@cptbtptpbcptdtptp cptbtptpbcptdtptp Aug 1, 2024

Choose a reason for hiding this comment

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

可以加个 note

编辑器版本依赖请参照

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


}
```
##### **播放动画**
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


无论是通过编辑器导出的项目,或者 procode 项目,都需要通过安装 @galacean/engine-spine (即Galacean Spine 运行时) 来实现 Spine 动画的加载与渲染。

## 安装
Copy link
Collaborator

Choose a reason for hiding this comment

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

「无论是通过编辑器导出的项目,或者 procode 项目,都需要通过安装 @galacean/engine-spine (即Galacean Spine 运行时) 来实现 Spine 动画的加载与渲染。」
放到这

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 1, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range, codebase verification and nitpick comments (2)
docs/zh/graphics/2D/spine/editor.md (1)

9-9: Improve introduction clarity.

The introduction is clear, but consider adding more details about the benefits of using Spine with the Galacean editor.

- Galacean 编辑器内置了对 Spine 动画的支持,无需额外下载或配置,开箱即用,大大简化了开发流程。本章节为大家介绍如何在 Galacean 编辑器中使用 Spine 动画。
+ Galacean 编辑器内置了对 Spine 动画的支持,无需额外下载或配置,开箱即用,大大简化了开发流程。通过本章节,您将了解如何在 Galacean 编辑器中使用 Spine 动画,并充分利用其强大的功能来提升您的开发效率。
docs/zh/graphics/2D/spine/runtime.md (1)

9-9: Improve introduction clarity.

The introduction is clear, but consider adding more details about the benefits of using Spine with the Galacean runtime.

- 本章节为大家介绍如何在代码中使用 Galacean Spine 运行时。
+ 本章节为大家介绍如何在代码中使用 Galacean Spine 运行时,并充分利用其强大的功能来提升您的开发效率。
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0d1d521 and 6fe678d.

Files selected for processing (2)
  • docs/zh/graphics/2D/spine/editor.md (1 hunks)
  • docs/zh/graphics/2D/spine/runtime.md (1 hunks)
Additional context used
LanguageTool
docs/zh/graphics/2D/spine/editor.md

[uncategorized] ~133-~133: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...d) 流程,导出编辑器项目。



下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graph...

(wa5)

docs/zh/graphics/2D/spine/runtime.md

[uncategorized] ~247-~247: 您的意思是"设置"过度""?
Context: ...on 方法后,会立即切换当前轨道的动画。如果你需要动画切换时有过渡效果,需要设置过渡的持续时间。可以通过 [AnimationStateData](https://...

(DU3_DU4)


[uncategorized] ~288-~288: 您的意思是""过度"持续"?
Context: ..."animation delay = 0"> 假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,当 delay 设置为 0 时,动画 B 会从 1 - ...

(DU3_DU4)


[uncategorized] ~290-~290: 您的意思是""过度"持续"?
Context: ...毕前,下一个动画就会开始播放,如下图所示: 同样假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,动画 B 则会从 0.6 秒开始过渡到动画 B。 <i...

(DU3_DU4)


[uncategorized] ~296-~296: 您的意思是"是"过度""?
Context: ...delay 参数与 addAnimation 一样。 mixDuration 是过渡持续时间,动画会在 mixDuration 时间内逐渐回到初始状态。如下图所示(...

(DU3_DU4)


[uncategorized] ~296-~296: 您的意思是“"既"是”吗?
Context: ...画会在 mixDuration 时间内逐渐回到初始状态。如下图所示(右侧棕色区域即是空动画), <img src="https://intranetproxy....

(JI11_JI2)

Markdownlint
docs/zh/graphics/2D/spine/runtime.md

81-81: null
Bare URL used

(MD034, no-bare-urls)


82-82: null
Bare URL used

(MD034, no-bare-urls)


83-83: null
Bare URL used

(MD034, no-bare-urls)


101-101: null
Bare URL used

(MD034, no-bare-urls)


102-102: null
Bare URL used

(MD034, no-bare-urls)


402-402: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


419-419: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

Additional comments not posted (9)
docs/zh/graphics/2D/spine/editor.md (5)

1-11: Ensure metadata is correct.

The metadata section seems correct, but ensure that the order, title, type, group, and label values are accurate and consistent with the rest of the documentation.


14-49: Ensure alt text for images.

All images should have alt text to improve accessibility. This has been flagged in previous reviews and should be addressed consistently.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721205852909-9c6db2f1-7e47-45d7-ac0b-a6ebf9f95f68.png#clientId=uf07edf19-371c-4&from=paste&height=354&id=qQazJ&originHeight=812&originWidth=466&originalType=binary&ratio=2&rotation=0&showTitle=false&size=188598&status=done&style=shadow&taskId=u95ae3381-21c1-4bf6-9249-64901470a7e&title=&width=203" width="203">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721205852909-9c6db2f1-7e47-45d7-ac0b-a6ebf9f95f68.png#clientId=uf07edf19-371c-4&from=paste&height=354&id=qQazJ&originHeight=812&originWidth=466&originalType=binary&ratio=2&rotation=0&showTitle=false&size=188598&status=done&style=shadow&taskId=u95ae3381-21c1-4bf6-9249-64901470a7e&title=&width=203" width="203" alt="Export window in Spine editor">

50-77: Ensure alt text for images.

All images should have alt text to improve accessibility. This has been flagged in previous reviews and should be addressed consistently.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721208067896-206d850e-20fc-44a6-9987-6a8556b10e3b.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=u4bb88103&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=8620071&status=done&style=shadow&taskId=ua9290849-8cb2-46ac-98b6-e2b22ab0d83&title=&width=992" width="992">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721208067896-206d850e-20fc-44a6-9987-6a8556b10e3b.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=u4bb88103&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=8620071&status=done&style=shadow&taskId=ua9290849-8cb2-46ac-98b6-e2b22ab0d83&title=&width=992" width="992" alt="Drag spine assets into Galacean editor">

83-126: Ensure alt text for images.

All images should have alt text to improve accessibility. This has been flagged in previous reviews and should be addressed consistently.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721210070086-6db51cd8-4493-4b4d-93ee-16c8187fe843.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=ucc4cc750&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=7335004&status=done&style=shadow&taskId=u97b775ac-f0f4-4f0f-80f6-077cacc66d5&title=&width=992" width="992">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/gif/76063/1721210070086-6db51cd8-4493-4b4d-93ee-16c8187fe843.gif#clientId=uf07edf19-371c-4&from=paste&height=540&id=ucc4cc750&originHeight=1080&originWidth=1984&originalType=binary&ratio=2&rotation=0&showTitle=false&size=7335004&status=done&style=shadow&taskId=u97b775ac-f0f4-4f0f-80f6-077cacc66d5&title=&width=992" width="992" alt="Drag Spine skeleton data asset into viewport">

111-134: Ensure alt text for images.

All images should have alt text to improve accessibility. This has been flagged in previous reviews and should be addressed consistently.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721269455151-ceaf0b7e-a00b-4ba4-a109-0cdb08c135f2.png#clientId=uf07edf19-371c-4&from=paste&height=199&id=ucac2f7de&originHeight=398&originWidth=1060&originalType=binary&ratio=2&rotation=0&showTitle=false&size=82934&status=done&style=shadow&taskId=ub50cded7-5559-41de-b104-9db3c4bb4f5&title=&width=530" width="503">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721269455151-ceaf0b7e-a00b-4ba4-a109-0cdb08c135f2.png#clientId=uf07edf19-371c-4&from=paste&height=199&id=ucac2f7de&originHeight=398&originWidth=1060&originalType=binary&ratio=2&rotation=0&showTitle=false&size=82934&status=done&style=shadow&taskId=ub50cded7-5559-41de-b104-9db3c4bb4f5&title=&width=530" width="503" alt="Spine animation renderer component config">
Tools
LanguageTool

[uncategorized] ~133-~133: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...d) 流程,导出编辑器项目。



下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graph...

(wa5)

docs/zh/graphics/2D/spine/runtime.md (4)

1-9: Ensure metadata is correct.

The metadata section seems correct, but ensure that the order, title, type, group, and label values are accurate and consistent with the rest of the documentation.


12-22: Ensure code blocks are correct.

The code blocks for installation and import are correct, but ensure that the package name and import statement are accurate.


24-143: Ensure alt text for images.

All images should have alt text to improve accessibility. This has been flagged in previous reviews and should be addressed consistently.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721297144951-6dafb4e3-ccfa-495e-a540-8b3918b66400.png#clientId=u4b0ad8a6-bdc5-4&from=paste&height=480&id=u8ed78f33&originHeight=533&originWidth=359&originalType=binary&ratio=1&rotation=0&showTitle=false&size=40311&status=done&style=none&taskId=udf9587bf-1818-470f-a108-8ca0d7fe9d0&title=&width=330" width="330">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721297144951-6dafb4e3-ccfa-495e-a540-8b3918b66400.png#clientId=u4b0ad8a6-bdc5-4&from=paste&height=480&id=u8ed78f33&originHeight=533&originWidth=359&originalType=binary&ratio=1&rotation=0&showTitle=false&size=40311&status=done&style=none&taskId=udf9587bf-1818-470f-a108-8ca0d7fe9d0&title=&width=330" width="330" alt="Project export panel">
Tools
Markdownlint

81-81: null
Bare URL used

(MD034, no-bare-urls)


82-82: null
Bare URL used

(MD034, no-bare-urls)


83-83: null
Bare URL used

(MD034, no-bare-urls)


101-101: null
Bare URL used

(MD034, no-bare-urls)


102-102: null
Bare URL used

(MD034, no-bare-urls)


146-445: Ensure alt text for images.

All images should have alt text to improve accessibility. This has been flagged in previous reviews and should be addressed consistently.

- <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721274299254-431c2e96-9c3b-482e-a06b-350023042200.png#clientId=uf07edf19-371c-4&from=paste&height=129&id=u189d34f4&originHeight=348&originWidth=1286&originalType=binary&ratio=2&rotation=0&showTitle=false&size=92765&status=done&style=none&taskId=u329862b0-6b18-42b7-b7f2-4a5c118842d&title=&width=477" width="377">
+ <img src="https://intranetproxy.alipay.com/skylark/lark/0/2024/png/76063/1721274299254-431c2e96

<details>
<summary>Tools</summary>

<details>
<summary>LanguageTool</summary><blockquote>

[uncategorized] ~247-~247: 您的意思是"设置"过度""?
Context: ...on 方法后,会立即切换当前轨道的动画。如果你需要动画切换时有过渡效果,需要设置过渡的持续时间。可以通过 [AnimationStateData](https://...

(DU3_DU4)

---

[uncategorized] ~288-~288: 您的意思是""过度"持续"?
Context: ..."animation delay = 0">  假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,当 delay 设置为 0 时,动画 B 会从 1 - ...

(DU3_DU4)

---

[uncategorized] ~290-~290: 您的意思是""过度"持续"?
Context: ...毕前,下一个动画就会开始播放,如下图所示: 同样假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,动画 B 则会从 0.6 秒开始过渡到动画 B。  <i...

(DU3_DU4)

---

[uncategorized] ~296-~296: 您的意思是"是"过度""?
Context: ...delay 参数与 addAnimation 一样。 mixDuration 是过渡持续时间,动画会在 mixDuration 时间内逐渐回到初始状态。如下图所示(...

(DU3_DU4)

---

[uncategorized] ~296-~296: 您的意思是“"既"是”吗?
Context: ...画会在 mixDuration 时间内逐渐回到初始状态。如下图所示(右侧棕色区域即是空动画),  <img src="https://intranetproxy....

(JI11_JI2)

</blockquote></details>
<details>
<summary>Markdownlint</summary><blockquote>

402-402: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

419-419: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

</blockquote></details>

</details>

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->



</br></br></br></br>
下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graphics/2D/spine/runtime)
Copy link

Choose a reason for hiding this comment

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

Fix grammatical issue.

The sentence is missing a measure word.

- 下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graphics/2D/spine/runtime)
+ 下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graphics/2D/spine/runtime)

Committable suggestion was skipped due to low confidence.

Tools
LanguageTool

[uncategorized] ~133-~133: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...d) 流程,导出编辑器项目。



下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graph...

(wa5)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range, codebase verification and nitpick comments (3)
docs/zh/graphics/2D/spine/editor.md (2)

9-11: Ensure clarity and completeness.

The introductory paragraph is clear but could benefit from a brief mention of the benefits of using Spine animations in the Galacean editor.

- Galacean 编辑器内置了对 Spine 动画的支持,无需额外下载或配置,开箱即用,大大简化了开发流程。本章节为大家介绍如何在 Galacean 编辑器中使用 Spine 动画。
+ Galacean 编辑器内置了对 Spine 动画的支持,无需额外下载或配置,开箱即用,大大简化了开发流程,使动画制作更加高效。本章节为大家介绍如何在 Galacean 编辑器中使用 Spine 动画。

26-28: Ensure clarity and completeness.

The instructions for exporting assets are clear but could benefit from a brief mention of why binary format is recommended over JSON.

- 选择导出窗口左上角的**二进制** ( 推荐使用二进制,以二进制格式而不是JSON格式导出,会使文件体积更小,加载更快
+ 选择导出窗口左上角的**二进制**(推荐使用二进制,以二进制格式而不是JSON格式导出,会使文件体积更小,加载更快,并提高性能。
docs/zh/graphics/2D/spine/runtime.md (1)

13-13: Ensure clarity and completeness.

The installation instructions are clear but could benefit from a brief mention of the benefits of using Spine animations at runtime.

- 无论是通过编辑器导出的项目,或者 procode 项目,都需要通过安装 @galacean/engine-spine (即Galacean Spine 运行时) 来实现 Spine 动画的加载与渲染。
+ 无论是通过编辑器导出的项目,或者 procode 项目,都需要通过安装 @galacean/engine-spine (即Galacean Spine 运行时) 来实现 Spine 动画的加载与渲染,从而提高动画的性能和灵活性。
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6fe678d and fcb33ff.

Files selected for processing (2)
  • docs/zh/graphics/2D/spine/editor.md (1 hunks)
  • docs/zh/graphics/2D/spine/runtime.md (1 hunks)
Additional context used
LanguageTool
docs/zh/graphics/2D/spine/editor.md

[uncategorized] ~133-~133: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...d) 流程,导出编辑器项目。



下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graph...

(wa5)

docs/zh/graphics/2D/spine/runtime.md

[uncategorized] ~250-~250: 您的意思是"设置"过度""?
Context: ...on 方法后,会立即切换当前轨道的动画。如果你需要动画切换时有过渡效果,需要设置过渡的持续时间。可以通过 [AnimationStateData](https://...

(DU3_DU4)


[uncategorized] ~291-~291: 您的意思是""过度"持续"?
Context: ..."animation delay = 0"> 假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,当 delay 设置为 0 时,动画 B 会从 1 - ...

(DU3_DU4)


[uncategorized] ~293-~293: 您的意思是""过度"持续"?
Context: ...毕前,下一个动画就会开始播放,如下图所示: 同样假设动画 A 的时长为 1 秒,过渡持续时间为 0.2 秒,动画 B 则会从 0.6 秒开始过渡到动画 B。 <i...

(DU3_DU4)


[uncategorized] ~299-~299: 您的意思是"是"过度""?
Context: ...delay 参数与 addAnimation 一样。 mixDuration 是过渡持续时间,动画会在 mixDuration 时间内逐渐回到初始状态。如下图所示(...

(DU3_DU4)


[uncategorized] ~299-~299: 您的意思是“"既"是”吗?
Context: ...画会在 mixDuration 时间内逐渐回到初始状态。如下图所示(右侧棕色区域即是空动画), <img src="https://intranetproxy....

(JI11_JI2)

Markdownlint
docs/zh/graphics/2D/spine/runtime.md

81-81: null
Bare URL used

(MD034, no-bare-urls)


82-82: null
Bare URL used

(MD034, no-bare-urls)


83-83: null
Bare URL used

(MD034, no-bare-urls)


101-101: null
Bare URL used

(MD034, no-bare-urls)


102-102: null
Bare URL used

(MD034, no-bare-urls)


405-405: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


422-422: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

Additional comments not posted (26)
docs/zh/graphics/2D/spine/editor.md (18)

24-24: Alt text for the image is appropriate.

The alt text "Export panel in Spine editor" is appropriate and improves accessibility.


28-28: Alt text for the image is appropriate.

The alt text "Export window in Spine editor" is appropriate and improves accessibility.


32-32: Alt text for the image is appropriate.

The alt text "Click packing texture atlas button in Export window" is appropriate and improves accessibility.


38-38: Alt text for the image is appropriate.

The alt text "Texture pack window in Spine Editor" is appropriate and improves accessibility.


42-42: Alt text for the image is appropriate.

The alt text "Click export button in texture pack window" is appropriate and improves accessibility.


46-46: Alt text for the image is appropriate.

The alt text "Spine assets in folder" is appropriate and improves accessibility.


53-53: Alt text for the image is appropriate.

The alt text "Drag spine assets into Galacean editor" is appropriate and improves accessibility.


57-57: Alt text for the image is appropriate.

The alt text "Use upload button to upload spine assets" is appropriate and improves accessibility.


63-63: Alt text for the image is appropriate.

The alt text "Spine skeleton data asset icon" is appropriate and improves accessibility.


68-68: Alt text for the image is appropriate.

The alt text "Spine skeleton data preview" is appropriate and improves accessibility.


72-72: Alt text for the image is appropriate.

The alt text "Spine atlas asset" is appropriate and improves accessibility.


77-77: Alt text for the image is appropriate.

The alt text "Spine atlas preview" is appropriate and improves accessibility.


91-91: Alt text for the image is appropriate.

The alt text "Drag Spine skeleton data asset into viewport" is appropriate and improves accessibility.


97-97: Alt text for the image is appropriate.

The alt text "Quick add Spine animation renderer" is appropriate and improves accessibility.


101-101: Alt text for the image is appropriate.

The alt text "Select spine skeleton data asset in component panel" is appropriate and improves accessibility.


107-107: Alt text for the image is appropriate.

The alt text "Use add component to add spine animation renderer" is appropriate and improves accessibility.


116-116: Alt text for the image is appropriate.

The alt text "Spine animation renderer component config" is appropriate and improves accessibility.


133-133: Fix grammatical issue.

The sentence is missing a measure word.

- 下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graphics/2D/spine/runtime)
+ 下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graphics/2D/spine/runtime)

Likely invalid or redundant comment.

Tools
LanguageTool

[uncategorized] ~133-~133: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...d) 流程,导出编辑器项目。



下一章节:[在代码中使用 Galacean Spine 运行时](/docs/graph...

(wa5)

docs/zh/graphics/2D/spine/runtime.md (8)

40-40: Alt text for the image is appropriate.

The alt text "Project export panel" is appropriate and improves accessibility.


42-42: Alt text for the image is appropriate.

The alt text "Spine skeleton data file" is appropriate and improves accessibility.


223-223: Alt text for the image is appropriate.

The alt text "Animation event diagram" is appropriate and improves accessibility.


284-284: Alt text for the image is appropriate.

The alt text "animation delay > 0" is appropriate and improves accessibility.


289-289: Alt text for the image is appropriate.

The alt text "animation delay = 0" is appropriate and improves accessibility.


295-295: Alt text for the image is appropriate.

The alt text "animation delay < 0" is appropriate and improves accessibility.


301-301: Alt text for the image is appropriate.

The alt text "Add empty animation api" is appropriate and improves accessibility.


315-315: Alt text for the image is appropriate.

The alt text "Animation event diagram" is appropriate and improves accessibility.

Comment on lines +101 to +103
https://your.spineboyjson?ext=.json<br>
https://your.spineboyatlas?ext=.atlas <br>
或者添加 fileExtensions 参数来指定资源后缀类型:
Copy link

Choose a reason for hiding this comment

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

Fix bare URLs.

Bare URLs should be avoided in Markdown. Use proper link syntax instead.

- https://your.spineboyjson?ext=.json<br>
- https://your.spineboyatlas?ext=.atlas <br>
+ [spineboy.json](https://your.spineboyjson?ext=.json) <br>
+ [spineboy.atlas](https://your.spineboyatlas?ext=.atlas) <br>
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
https://your.spineboyjson?ext=.json<br>
https://your.spineboyatlas?ext=.atlas <br>
或者添加 fileExtensions 参数来指定资源后缀类型:
[spineboy.json](https://your.spineboyjson?ext=.json) <br>
[spineboy.atlas](https://your.spineboyatlas?ext=.atlas) <br>
或者添加 fileExtensions 参数来指定资源后缀类型:
Tools
Markdownlint

101-101: null
Bare URL used

(MD034, no-bare-urls)


102-102: null
Bare URL used

(MD034, no-bare-urls)

Comment on lines +81 to +83
https://your.spineboy.json <br>
https://your.spineboy.atlas <br>
https://your.spineboy.png <br>
Copy link

Choose a reason for hiding this comment

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

Fix bare URLs.

Bare URLs should be avoided in Markdown. Use proper link syntax instead.

- https://your.spineboy.json <br>
- https://your.spineboy.atlas <br>
- https://your.spineboy.png <br>
+ [spineboy.json](https://your.spineboy.json) <br>
+ [spineboy.atlas](https://your.spineboy.atlas) <br>
+ [spineboy.png](https://your.spineboy.png) <br>
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
https://your.spineboy.json <br>
https://your.spineboy.atlas <br>
https://your.spineboy.png <br>
[spineboy.json](https://your.spineboy.json) <br>
[spineboy.atlas](https://your.spineboy.atlas) <br>
[spineboy.png](https://your.spineboy.png) <br>
Tools
Markdownlint

81-81: null
Bare URL used

(MD034, no-bare-urls)


82-82: null
Bare URL used

(MD034, no-bare-urls)


83-83: null
Bare URL used

(MD034, no-bare-urls)

}
```
代码中皮肤的名称来自 mix-and-match 示例。

Copy link

Choose a reason for hiding this comment

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

Fix grammatical issue.

The phrase "名称来自于 mix-and-match 示例" should be "名称来自 mix-and-match 示例".

- 名称来自于 mix-and-match 示例。
+ 名称来自 mix-and-match 示例。
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
名称来自 mix-and-match 示例。

Copy link
Collaborator

@cptbtptpbcptdtptp cptbtptpbcptdtptp left a comment

Choose a reason for hiding this comment

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

+1

@cptbtptpbcptdtptp cptbtptpbcptdtptp merged commit e998dd7 into galacean:dev/1.3 Aug 2, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants