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

Update XR , Start and Input doc #2275

Merged
merged 5 commits into from
Aug 2, 2024

Conversation

cptbtptpbcptdtptp
Copy link
Collaborator

@cptbtptpbcptdtptp cptbtptpbcptdtptp commented Jul 29, 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

    • Introduced a guide for developing mini-programs compatible with Alipay and Taobao.
    • Added documentation for the XR Manager, detailing its role in managing XR workflows.
    • New sections on camera textures and session management introduced to enhance XR development.
    • Comprehensive input system overview for cross-platform compatibility now available.
    • Added new documentation files for Input Manager, Session Manager, and advanced tracking components.
  • Documentation

    • Improved clarity and accuracy of existing documentation across various topics, including engine functionalities and XR capabilities.
    • Updated links and terminology for better navigation and consistency within the documentation.
    • Newly structured quick-start guide for Chinese users, featuring an overview and quick-start sections.
  • Chores

    • Reorganized documentation structure and metadata for improved accessibility and usability.

Copy link

coderabbitai bot commented Jul 29, 2024

Walkthrough

The recent changes enhance the clarity, accessibility, and organization of the Galacean documentation across various components. Key updates include the introduction of new sections focusing on mini-programs and XR functionalities, along with the refinement of existing content to improve link accuracy and terminology consistency. Overall, these modifications aim to provide a more structured and user-friendly experience for developers utilizing the framework.

Changes

Files Change Summary
docs/zh/_meta.json Renamed "输入" to "交互"; added "miniProgram" section for enhanced functionality.
docs/zh/core/engine.md Refined engine descriptions; expanded WebGLEngine.create method explanation; added class diagram for WebGLEngineConfiguration.
docs/zh/graphics/2D/*.md Updated hyperlinks for 2D graphics resources to a standardized format; enhanced clarity without content changes.
docs/zh/xr/*.md Introduced new documentation for XR features, including session management, input management, and advanced toolkit components; reorganized existing sections for better clarity.
docs/zh/quick-start/*.md Enhanced clarity and updated links; added a version management document; refined overview of the Galacean Engine.
docs/zh/input/*.md Updated terminology for input-related documentation; introduced new section for the input system overview.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Engine
    participant Documentation

    Developer->>Documentation: Access updated docs
    Documentation->>Engine: Implement new features
    Engine->>Developer: Improved usability and clarity
Loading

🐰 In the meadow where changes bloom,
A rabbit hops, dispelling gloom.
With links so clear and paths so bright,
For developers, a joyful sight!
Documentation's fresh and spry,
Let's leap ahead, oh my, oh my! 🐇✨


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: 5

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 31245db and 099e5fd.

Files selected for processing (32)
  • docs/zh/_meta.json (2 hunks)
  • docs/zh/core/engine.md (3 hunks)
  • docs/zh/graphics/2D/2d.md (1 hunks)
  • docs/zh/graphics/2D/lottie.md (2 hunks)
  • docs/zh/graphics/2D/sprite.md (2 hunks)
  • docs/zh/graphics/2D/spriteAtlas.md (4 hunks)
  • docs/zh/graphics/2D/spriteMask.md (1 hunks)
  • docs/zh/graphics/2D/spriteRenderer.md (2 hunks)
  • docs/zh/graphics/camera/camera.md (1 hunks)
  • docs/zh/graphics/camera/component.md (3 hunks)
  • docs/zh/graphics/camera/control.md (1 hunks)
  • docs/zh/graphics/camera/texture.md (1 hunks)
  • docs/zh/graphics/mesh/mesh.md (3 hunks)
  • docs/zh/graphics/renderer/renderer.md (1 hunks)
  • docs/zh/input/framebuffer-picker.md (1 hunks)
  • docs/zh/input/input.md (1 hunks)
  • docs/zh/input/pointer.md (3 hunks)
  • docs/zh/miniProgram/miniProgame.md (1 hunks)
  • docs/zh/quick-start/_meta.json (1 hunks)
  • docs/zh/quick-start/overview.md (4 hunks)
  • docs/zh/quick-start/version.md (1 hunks)
  • docs/zh/script/script.md (1 hunks)
  • docs/zh/xr/_meta.json (1 hunks)
  • docs/zh/xr/overall.md (1 hunks)
  • docs/zh/xr/quickStart/debug.md (1 hunks)
  • docs/zh/xr/quickStart/develop.md (1 hunks)
  • docs/zh/xr/system/camera.md (3 hunks)
  • docs/zh/xr/system/features.md (4 hunks)
  • docs/zh/xr/system/input.md (1 hunks)
  • docs/zh/xr/system/manager.md (1 hunks)
  • docs/zh/xr/system/session.md (1 hunks)
  • docs/zh/xr/system/toolkit.md (1 hunks)
Files skipped from review due to trivial changes (11)
  • docs/zh/graphics/2D/2d.md
  • docs/zh/graphics/2D/lottie.md
  • docs/zh/graphics/2D/sprite.md
  • docs/zh/graphics/2D/spriteMask.md
  • docs/zh/graphics/2D/spriteRenderer.md
  • docs/zh/graphics/camera/camera.md
  • docs/zh/graphics/renderer/renderer.md
  • docs/zh/input/framebuffer-picker.md
  • docs/zh/input/pointer.md
  • docs/zh/quick-start/_meta.json
  • docs/zh/xr/_meta.json
Additional context used
Markdownlint
docs/zh/script/script.md

14-14: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


15-15: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


16-16: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


17-17: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


14-14: Column: 1
Hard tabs

(MD010, no-hard-tabs)


15-15: Column: 1
Hard tabs

(MD010, no-hard-tabs)


16-16: Column: 1
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 1
Hard tabs

(MD010, no-hard-tabs)

docs/zh/xr/system/camera.md

24-24: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

docs/zh/input/input.md

32-32: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

docs/zh/xr/overall.md

29-29: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

docs/zh/xr/system/toolkit.md

8-8: null
No empty links

(MD042, no-empty-links)


8-8: null
No empty links

(MD042, no-empty-links)


30-30: null
No empty links

(MD042, no-empty-links)

docs/zh/core/engine.md

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

(MD045, no-alt-text)


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

(MD045, no-alt-text)

docs/zh/xr/quickStart/develop.md

32-32: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)


37-37: null
No empty links

(MD042, no-empty-links)


112-112: null
No empty links

(MD042, no-empty-links)

docs/zh/quick-start/overview.md

78-78: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

docs/zh/graphics/2D/spriteAtlas.md

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

(MD045, no-alt-text)

docs/zh/miniProgram/miniProgame.md

36-36: Column: 2
Hard tabs

(MD010, no-hard-tabs)


221-221: Column: 1
Hard tabs

(MD010, no-hard-tabs)


222-222: Column: 1
Hard tabs

(MD010, no-hard-tabs)


223-223: Column: 1
Hard tabs

(MD010, no-hard-tabs)


225-225: Column: 1
Hard tabs

(MD010, no-hard-tabs)


236-236: Column: 1
Hard tabs

(MD010, no-hard-tabs)


237-237: Column: 1
Hard tabs

(MD010, no-hard-tabs)


238-238: Column: 1
Hard tabs

(MD010, no-hard-tabs)


151-151: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

LanguageTool
docs/zh/input/input.md

[uncategorized] ~8-~8: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:基本"地"输入
Context: ...: 交互 label: Interact --- Galacean 提供了基本的输入系统,基于跨端跨平台的特性,交互系统在 PC 端和移动端都有很好的兼容性。当...

(wb4)

docs/zh/xr/overall.md

[uncategorized] ~28-~28: L’asterisco si usa per un’omissione nel numero di tre consecutivi: "***".
Context: ...gine-xr@galacean/engine-web-xr是实现 **WebXR** 必须引入的依赖,相较于上述两个包,@galacean/engi...

(GR_09_001)

docs/zh/graphics/mesh/mesh.md

[uncategorized] ~29-~29: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:常用"地"设置
Context: ...s/graphics/mesh/modelMesh/) | 封装了常用的设置顶点数据和索引数据的方法,非常简单易用。开发者若想要快速地去自定义几何体可以...

(wb4)


[uncategorized] ~30-~30: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:灵活"地"实现
Context: ...以及一些与几何体绘制相关的指令。具备高效、灵活、简洁等特点。开发者如果想高效灵活的实现自定义几何体就可以使用该类 | | [内置几何体](/docs/graphi...

(wb4)

docs/zh/quick-start/overview.md

[uncategorized] ~15-~15: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:快速"地"创建
Context: ...up.com/editor) 是一个在线 Web 互动创作平台。它可以帮助你快速的创建、编辑和导出一个互动项目。你可以通过 Galacean Editor 快速上...

(wb4)


[uncategorized] ~70-~70: 若非古汉语,则量词“二”可能使用错误,您的意思是否是:"两方"?
Context: ...,需要配套使用 1.3.y 版本的工具包。 ### 二方生态包 另外还有一些二方生态包,引入和使用方式和引擎工具包相同: | 包 | 解释 | API | |...

(wa5)

docs/zh/miniProgram/miniProgame.md

[uncategorized] ~79-~79: 若非古汉语,则量词“二”可能使用错误,您的意思是否是:"两方"?
Context: ...## 补充说明 ### 小程序项目使用 OrbitControl 1. 引入二方库 ```bash npm install @galacean/engine-...

(wa5)

Additional comments not posted (97)
docs/zh/script/script.md (1)

1-8: LGTM!

The front matter and introduction provide a clear overview of the script system and its connection to the engine and game logic.

docs/zh/graphics/camera/texture.md (3)

1-11: LGTM!

The front matter and introduction provide a clear explanation of depth textures and their usage.


13-15: LGTM!

The playground example and note provide useful information about depth textures and their rendering.


17-19: LGTM!

The introduction provides a clear explanation of opaque textures and their usage.

docs/zh/xr/system/camera.md (2)

Line range hint 1-10:
LGTM!

The front matter and introduction provide a clear explanation of the camera manager and how to access it.


12-14: LGTM!

The updated description provides a useful link for additional information about fixedFoveation.

docs/zh/input/input.md (4)

1-6: LGTM!

The metadata section is correctly formatted and relevant to the documentation.


10-12: LGTM!

The input types section is clear and well-structured.


35-37: LGTM!

The framebuffer picking section is clear and provides useful information.


8-8: Fix grammatical issue.

The phrase "基本的输入系统" should be "基本地输入系统" to be grammatically correct.

- Galacean 提供了基本的输入系统,基于跨端跨平台的特性,交互系统在 PC 端和移动端都有很好的兼容性。
+ Galacean 提供了基本地输入系统,基于跨端跨平台的特性,交互系统在 PC 端和移动端都有很好的兼容性。

Likely invalid or redundant comment.

Tools
LanguageTool

[uncategorized] ~8-~8: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:基本"地"输入
Context: ...: 交互 label: Interact --- Galacean 提供了基本的输入系统,基于跨端跨平台的特性,交互系统在 PC 端和移动端都有很好的兼容性。当...

(wb4)

docs/zh/_meta.json (2)

57-59: LGTM!

The title change from "输入" to "交互" is more descriptive and aligns with the content of the input documentation.


74-79: LGTM!

The addition of the "miniProgram" section enhances the documentation structure and provides a dedicated space for mini program settings.

docs/zh/xr/overall.md (2)

10-18: LGTM!

The architecture section is clear and provides valuable information about the design principles of the Galacean XR framework.


32-38: LGTM!

The quick start section is clear and provides useful information for getting started with XR development.

docs/zh/xr/system/session.md (4)

1-8: Introduction section looks good.

The introduction is clear and provides a concise overview of the XR session manager.


10-17: Properties section looks good.

The properties section is well-structured and informative.


19-27: Methods section looks good.

The methods section is well-structured and informative.


29-39: State transitions section looks good.

The state transitions section is clear and the diagram is helpful.

docs/zh/graphics/mesh/mesh.md (4)

Line range hint 1-9: Introduction section looks good.

The introduction is clear and the links are correctly updated.


15-17: Mesh assets section looks good.

The section is clear and the links are correctly updated.


29-31: Usage section looks good.

The section is clear and the links are correctly updated.

Tools
LanguageTool

[uncategorized] ~29-~29: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:常用"地"设置
Context: ...s/graphics/mesh/modelMesh/) | 封装了常用的设置顶点数据和索引数据的方法,非常简单易用。开发者若想要快速地去自定义几何体可以...

(wb4)


[uncategorized] ~30-~30: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:灵活"地"实现
Context: ...以及一些与几何体绘制相关的指令。具备高效、灵活、简洁等特点。开发者如果想高效灵活的实现自定义几何体就可以使用该类 | | [内置几何体](/docs/graphi...

(wb4)


48-48: Common geometries section looks good.

The section is clear and the links are correctly updated.

docs/zh/xr/system/manager.md (4)

1-8: Introduction section looks good.

The introduction is clear and provides a concise overview of the XR manager.


16-25: Properties section looks good.

The properties section is well-structured and informative.


28-37: Methods section looks good.

The methods section is well-structured and informative.


38-57: Overall flow section looks good.

The overall flow section is clear and the diagram is helpful.

docs/zh/xr/quickStart/debug.md (4)

1-11: Introduction is clear and concise.

The introduction provides a good overview of the document's purpose.


12-31: PC debugging instructions are well-detailed.

The steps for setting up and using the Immersive Web Emulator are clear and include helpful links and images.


32-53: Mobile debugging instructions are well-detailed.

The steps for setting up and debugging on mobile devices are clear and include helpful links and images.


54-57: Best practices recommendation is practical.

The recommendation to complete most work and verification on PC to improve efficiency is practical and should help developers.

docs/zh/xr/system/input.md (4)

1-14: Introduction is clear and concise.

The introduction provides a good overview of the XR input manager and the types of input devices it manages.


15-22: Methods section is clear and informative.

The table of methods available in the XR input manager and their explanations are clear and useful.


23-33: Supported input devices section is clear and informative.

The table of supported input devices and their explanations are clear and useful.


34-61: Usage examples are clear and useful.

The code examples for listening to device updates and getting the pose of a controller are clear and provide useful information for developers.

docs/zh/graphics/camera/control.md (4)

Line range hint 1-13:
Introduction is clear and concise.

The introduction provides a good overview of camera controls and their relationship with the Camera component.


13-14: Note about adding the Camera component is clear.

The note emphasizes the importance of adding the Camera component before adding camera controls and is clear.


Line range hint 15-33:
OrbitControl section is clear and informative.

The section provides useful information about the OrbitControl component and its properties.


Line range hint 34-61:
FreeControl and OrthoControl sections are clear and informative.

The sections provide useful information about the FreeControl and OrthoControl components and their properties.

docs/zh/quick-start/version.md (6)

10-12: LGTM!

The section on version management tools is well-written and informative.


16-26: LGTM!

The section on package management tools is well-written and informative.


30-39: LGTM!

The section on version naming rules and release strategy is well-written and informative.


41-43: LGTM!

The section on version upgrade guides is well-written and informative.


47-51: LGTM!

The section on version dependencies is well-written and informative.


55-69: LGTM!

The section on other related topics is well-written and informative.

docs/zh/xr/system/features.md (5)

2-2: LGTM!

The order update is straightforward and does not introduce any issues.


44-46: LGTM!

The change enhances readability without altering the logic.


88-95: LGTM!

The change improves the robustness of the image tracking feature.


100-100: LGTM!

The change reflects the shift in focus from plane tracking to image tracking within the documentation.


Line range hint 1-116:
LGTM!

The documentation on the features of the XR system is comprehensive and well-written.

docs/zh/xr/system/toolkit.md (6)

10-16: LGTM!

The section on component types is well-written and informative.


18-28: LGTM!

The section on inheritance relationships is well-written and informative.


32-40: LGTM!

The section on XROrigin is well-written and informative.


42-48: LGTM!

The section on TrackedComponent is well-written and informative.


50-58: LGTM!

The section on XRTrackedObjectManager is well-written and informative.


59-76: LGTM!

The sections on XRAnchorManager, XRImageManager, and XRPlaneManager are well-written and informative.

docs/zh/core/engine.md (6)

8-8: Refinement of functionality description approved.

The change from "三大功能" to "功能" provides a more flexible and readable description.


28-29: Expansion of WebGLEngine.create method explanation approved.

The additional details about rendering context configuration and subsystem initialization enhance the documentation's utility.


30-50: Introduction of WebGLEngineConfiguration class diagram approved.

The visual representation aids developers in understanding the configuration options.


52-71: Update to rendering context instructions approved.

The more comprehensive instructions and clearer examples improve the documentation's clarity.

Tools
Markdownlint

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

(MD045, no-alt-text)


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

(MD045, no-alt-text)


75-81: Reformatting of property table approved.

The clearer table format and more detailed descriptions enhance readability and utility.


103-104: Update to method table formatting approved.

The improved formatting makes it easier to read and understand the purpose of each method.

docs/zh/xr/quickStart/develop.md (10)

1-8: Introduction section approved.

The overview is clear and sets the stage for the rest of the document.


10-17: Editor development process section approved.

The process is well-documented and the flowchart provides a clear visual reference.


19-23: Creating a project section approved.

The instructions are clear and the included image provides a helpful visual reference.


25-33: Adding XR nodes section approved.

The instructions are clear and the notes provide essential information for developers.

Tools
Markdownlint

32-32: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)


35-39: Previewing section approved.

The instructions are clear and the included image provides a helpful visual reference.

Tools
Markdownlint

37-37: null
No empty links

(MD042, no-empty-links)


41-84: Adding XR capabilities section approved.

The instructions are clear and the included images provide helpful visual references.


45-54: Anchor tracking section approved.

The instructions are clear and the included table provides detailed information about the component's properties.


56-74: Image tracking section approved.

The instructions are clear and the included table provides detailed information about the component's properties.


76-84: Plane tracking section approved.

The instructions are clear and the included table provides detailed information about the component's properties.


110-114: ProCode development section approved.

The minimal example is clear and provides a good starting point for developers.

Tools
Markdownlint

112-112: null
No empty links

(MD042, no-empty-links)

docs/zh/quick-start/overview.md (8)

8-11: Refinement of introduction approved.

The changes improve the clarity and highlight the key features of the engine.


Line range hint 15-24:
Update to editor section approved.

The shift towards business-oriented project initiation is beneficial for developers.

Tools
LanguageTool

[uncategorized] ~15-~15: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:快速"地"创建
Context: ...up.com/editor) 是一个在线 Web 互动创作平台。它可以帮助你快速的创建、编辑和导出一个互动项目。你可以通过 Galacean Editor 快速上...

(wb4)


Line range hint 26-33:
Update to runtime section approved.

The inclusion of non-core functionalities and custom business logic capabilities provides a more comprehensive view of the engine's capabilities.


34-41: Update to core packages section approved.

The accurate links to the core packages and their documentation improve the utility.


59-64: Update to toolkit section approved.

The accurate links to the toolkit packages and their documentation improve the utility.


70-75: Update to third-party packages section approved.

The inclusion of third-party ecosystem packages and their documentation links provides a more comprehensive view of the available packages.

Tools
LanguageTool

[uncategorized] ~70-~70: 若非古汉语,则量词“二”可能使用错误,您的意思是否是:"两方"?
Context: ...,需要配套使用 1.3.y 版本的工具包。 ### 二方生态包 另外还有一些二方生态包,引入和使用方式和引擎工具包相同: | 包 | 解释 | API | |...

(wa5)


81-90: Update to compatibility section approved.

The clarification of WebGL support and the inclusion of specific documentation links improve the clarity and utility.


92-92: Open-source contribution section approved.

The encouragement of community involvement and the provision of clear pathways for contributions are beneficial.

docs/zh/graphics/2D/spriteAtlas.md (6)

23-23: Verify the updated link to the asset panel documentation.

Ensure that the link /docs/assets/interface/ correctly points to the asset panel documentation.


27-27: Verify the updated link to the inspector panel documentation.

Ensure that the link /docs/interface/inspector/ correctly points to the inspector panel documentation.


37-37: Verify the updated link to the inspector panel documentation.

Ensure that the link /docs/interface/inspector/ correctly points to the inspector panel documentation.


43-43: Verify the updated link to the inspector panel documentation.

Ensure that the link /docs/interface/inspector/ correctly points to the inspector panel documentation.


51-51: Verify the updated link to the inspector panel documentation.

Ensure that the link /docs/interface/inspector/ correctly points to the inspector panel documentation.


75-82: Verify the updated descriptions and new warning.

Ensure that the descriptions regarding texture size limits (1, 2048] are accurate and clear. Verify the new warning about exceeding texture limits and the suggested solutions.

docs/zh/miniProgram/miniProgame.md (6)

10-16: Verify the links to Alipay and Taobao mini-program documentation.

Ensure that the links to Alipay and Taobao mini-program development and publishing documentation are correct:


20-23: Verify the accuracy of the project export information and the image.

Ensure that the information about the project export functionality is accurate and the image is relevant and correctly referenced.


26-54: Verify the project startup instructions, directory structure, and image.

Ensure that the instructions for project startup are accurate and clear. Verify the correctness of the directory structure and the relevance of the image.

Tools
Markdownlint

36-36: Column: 2
Hard tabs

(MD010, no-hard-tabs)


57-74: Verify the information on local resource handling and known issues.

Ensure that the information on local resource handling is accurate and clear. Verify the accuracy of the known issues listed.


77-115: Verify the instructions for using OrbitControl in mini-program projects.

Ensure that the instructions for using OrbitControl in mini-program projects are accurate and clear. Verify the correctness of the code snippets and the relevance of the HTML structure.

Tools
LanguageTool

[uncategorized] ~79-~79: 若非古汉语,则量词“二”可能使用错误,您的意思是否是:"两方"?
Context: ...## 补充说明 ### 小程序项目使用 OrbitControl 1. 引入二方库 ```bash npm install @galacean/engine-...

(wa5)


139-240: Verify the instructions for creating and using Galacean mini-program projects.

Ensure that the instructions for creating and using Galacean mini-program projects are accurate and clear. Verify the correctness of the code snippets and the relevance of the configuration details.

Tools
Markdownlint

221-221: Column: 1
Hard tabs

(MD010, no-hard-tabs)


222-222: Column: 1
Hard tabs

(MD010, no-hard-tabs)


223-223: Column: 1
Hard tabs

(MD010, no-hard-tabs)


225-225: Column: 1
Hard tabs

(MD010, no-hard-tabs)


236-236: Column: 1
Hard tabs

(MD010, no-hard-tabs)


237-237: Column: 1
Hard tabs

(MD010, no-hard-tabs)


238-238: Column: 1
Hard tabs

(MD010, no-hard-tabs)


151-151: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/zh/graphics/camera/component.md (6)

63-83: Verify the updated descriptions of camera properties.

Ensure that the updated descriptions of camera properties, such as nearClipPlane, farClipPlane, and others, are accurate and clear.


Line range hint 105-118:
Verify the instructions for retrieving the camera component.

Ensure that the instructions for retrieving the camera component are accurate and clear. Verify the correctness of the code snippets.


121-136: Verify the updated descriptions of camera methods.

Ensure that the updated descriptions of camera methods, such as resetProjectionMatrix, render, and others, are accurate and clear.


137-142: Verify the new section on Shader replacement and the playground example.

Ensure that the new section on Shader replacement is accurate and clear. Verify the relevance of the playground example.


143-146: Verify the additional details on spatial transformation methods.

Ensure that the additional details on spatial transformation methods are accurate and clear.


149-149: Verify the new section on onBeginRender and onEndRender lifecycle callbacks.

Ensure that the new section on onBeginRender and onEndRender lifecycle callbacks is accurate and clear.

Comment on lines +31 to +33
> ⚠️ 不要将触控的监听源设置为 `window` ,因为 `window` 无法接收 `PointerLevel` 事件,会导致触控信息紊乱。

> ⚠️ 若将键盘的监听源设置为某个 `HtmlElement`,需要设置它的 `tabIndex` 从而可以 focus ,例如您可以调用一次 `canvas.tabIndex = canvas.tabIndex;`
Copy link

Choose a reason for hiding this comment

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

Fix Markdownlint issue.

Remove the blank line inside the blockquote to comply with Markdownlint rules.

> ⚠️ 不要将触控的监听源设置为 `window` ,因为 `window` 无法接收 `PointerLevel` 事件,会导致触控信息紊乱。
->
> ⚠️ 若将键盘的监听源设置为某个 `HtmlElement`,需要设置它的 `tabIndex` 从而可以 focus ,例如您可以调用一次 `canvas.tabIndex = canvas.tabIndex;`

Committable suggestion was skipped due to low confidence.

Tools
Markdownlint

32-32: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

Comment on lines +10 to +17
在本章节,您可以了解到:

- [脚本类](/docs/script/class/):脚本回调的生命周期及如何用脚本控制实体
- 脚本工作流
- [创建脚本](/docs/script/create/):声明与绑定脚本
- [编辑脚本](/docs/script/edit/):脚本编辑界面,引入三方包,预览及事件调试
- [脚本参数](/docs/script/attributes/)
- [事件通信](/docs/script/communication/)
Copy link

Choose a reason for hiding this comment

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

Fix unordered list indentation and replace hard tabs with spaces.

The unordered list items should be indented with spaces instead of tabs.

-	- [创建脚本](/docs/script/create/):声明与绑定脚本
-	- [编辑脚本](/docs/script/edit/):脚本编辑界面,引入三方包,预览及事件调试
-	- [脚本参数](/docs/script/attributes/)
-	- [事件通信](/docs/script/communication/)
+  - [创建脚本](/docs/script/create/):声明与绑定脚本
+  - [编辑脚本](/docs/script/edit/):脚本编辑界面,引入三方包,预览及事件调试
+  - [脚本参数](/docs/script/attributes/)
+  - [事件通信](/docs/script/communication/)
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
在本章节,您可以了解到:
- [脚本类](/docs/script/class/):脚本回调的生命周期及如何用脚本控制实体
- 脚本工作流
- [创建脚本](/docs/script/create/):声明与绑定脚本
- [编辑脚本](/docs/script/edit/):脚本编辑界面,引入三方包,预览及事件调试
- [脚本参数](/docs/script/attributes/)
- [事件通信](/docs/script/communication/)
在本章节,您可以了解到:
- [脚本类](/docs/script/class/):脚本回调的生命周期及如何用脚本控制实体
- 脚本工作流
- [创建脚本](/docs/script/create/):声明与绑定脚本
- [编辑脚本](/docs/script/edit/):脚本编辑界面,引入三方包,预览及事件调试
- [脚本参数](/docs/script/attributes/)
- [事件通信](/docs/script/communication/)
Tools
Markdownlint

14-14: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


15-15: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


16-16: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


17-17: Expected: 2; Actual: 1
Unordered list indentation

(MD007, ul-indent)


14-14: Column: 1
Hard tabs

(MD010, no-hard-tabs)


15-15: Column: 1
Hard tabs

(MD010, no-hard-tabs)


16-16: Column: 1
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 1
Hard tabs

(MD010, no-hard-tabs)

Comment on lines +28 to +30
> `@galacean/engine-xr` 和 `@galacean/engine-web-xr`是实现 **WebXR** 必须引入的依赖,相较于上述两个包,`@galacean/engine-toolkit-xr` 则不是必须的,但它的存在可以让编辑器开发 XR 变得更加简单。

> XR 包之间的依赖规则遵守[版本依赖规则](/docs/quick-start/version/#版本依赖),即 `@galacean/engine-xr` 和 `@galacean/engine-web-xr` 的版本需与 `@galacean/engine` 保持一致,`@galacean/engine-toolkit-xr` 的大版本需要与 `@galacean/engine` 保持一致。
Copy link

Choose a reason for hiding this comment

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

Fix Markdownlint issue.

Remove the blank line inside the blockquote to comply with Markdownlint rules.

> `@galacean/engine-xr` 和 `@galacean/engine-web-xr`是实现 **WebXR** 必须引入的依赖,相较于上述两个包,`@galacean/engine-toolkit-xr` 则不是必须的,但它的存在可以让编辑器开发 XR 变得更加简单。
->
> XR 包之间的依赖规则遵守[版本依赖规则](/docs/quick-start/version/#版本依赖),即 `@galacean/engine-xr` 和 `@galacean/engine-web-xr` 的版本需与 `@galacean/engine` 保持一致,`@galacean/engine-toolkit-xr` 的大版本需要与 `@galacean/engine` 保持一致。

Committable suggestion was skipped due to low confidence.

Tools
LanguageTool

[uncategorized] ~28-~28: L’asterisco si usa per un’omissione nel numero di tre consecutivi: "***".
Context: ...gine-xr@galacean/engine-web-xr是实现 **WebXR** 必须引入的依赖,相较于上述两个包,@galacean/engi...

(GR_09_001)

Markdownlint

29-29: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

Comment on lines +23 to +25
> 当 XR 会话类型为 AR 时,需要绑定的相机类型为 `XRTrackedInputDevice.Camera`

> 当 XR 会话类型为 VR 时,需要绑定的相机类型为 `XRTrackedInputDevice.LeftCamera` 和 `XRTrackedInputDevice.RightCamera`
Copy link

Choose a reason for hiding this comment

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

Fix blank line inside blockquote.

Remove the blank line inside the blockquote to improve formatting.

- > 当 XR 会话类型为 AR 时,需要绑定的相机类型为 `XRTrackedInputDevice.Camera`
- 
- > 当 XR 会话类型为 VR 时,需要绑定的相机类型为 `XRTrackedInputDevice.LeftCamera` 和 `XRTrackedInputDevice.RightCamera`
+ > 当 XR 会话类型为 AR 时,需要绑定的相机类型为 `XRTrackedInputDevice.Camera`
+ > 当 XR 会话类型为 VR 时,需要绑定的相机类型为 `XRTrackedInputDevice.LeftCamera` 和 `XRTrackedInputDevice.RightCamera`
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
> 当 XR 会话类型为 AR 时,需要绑定的相机类型为 `XRTrackedInputDevice.Camera`
> 当 XR 会话类型为 VR 时,需要绑定的相机类型为 `XRTrackedInputDevice.LeftCamera``XRTrackedInputDevice.RightCamera`
> 当 XR 会话类型为 AR 时,需要绑定的相机类型为 `XRTrackedInputDevice.Camera`
> 当 XR 会话类型为 VR 时,需要绑定的相机类型为 `XRTrackedInputDevice.LeftCamera``XRTrackedInputDevice.RightCamera`
Tools
Markdownlint

24-24: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

label: XR
---

为了方便开发者快速[开发 XR 项目](),Galacean 提供了 [@galacean/engine-toolkit-xr]() 高级组件 ,本文将详细讲述高级组件的属性与接口。
Copy link

Choose a reason for hiding this comment

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

Fix empty links.

The section contains empty links that need to be fixed.

- 为了方便开发者快速[开发 XR 项目](),Galacean 提供了 [@galacean/engine-toolkit-xr]() 高级组件 ,本文将详细讲述高级组件的属性与接口。
+ 为了方便开发者快速[开发 XR 项目](https://example.com/xr-project),Galacean 提供了 [@galacean/engine-toolkit-xr](https://example.com/toolkit-xr) 高级组件 ,本文将详细讲述高级组件的属性与接口。
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
为了方便开发者快速[开发 XR 项目](),Galacean 提供了 [@galacean/engine-toolkit-xr]() 高级组件 ,本文将详细讲述高级组件的属性与接口。
为了方便开发者快速[开发 XR 项目](https://example.com/xr-project),Galacean 提供了 [@galacean/engine-toolkit-xr](https://example.com/toolkit-xr) 高级组件 ,本文将详细讲述高级组件的属性与接口。
Tools
Markdownlint

8-8: null
No empty links

(MD042, no-empty-links)


8-8: null
No empty links

(MD042, no-empty-links)

@cptbtptpbcptdtptp cptbtptpbcptdtptp self-assigned this Aug 2, 2024
@cptbtptpbcptdtptp cptbtptpbcptdtptp added the documentation Improvements or additions to documentation label Aug 2, 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 (4)
docs/zh/quick-start/overview.md (3)

11-13: Invalid links found.

The links to the runtime and toolkit repositories are invalid. Please verify and update the following links:

Analysis chain

Verify updated links.

Ensure that the updated links to the runtime and toolkit are correct and lead to the appropriate documentation sections.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the updated links in the documentation.

# Test: Check if the links are valid and accessible.
for link in "https://github.com/galacean/runtime" "https://github.com/galacean/runtime-toolkit"; do
  curl -s -o /dev/null -w "%{http_code}" "$link" | grep -q "200" || echo "Invalid link: $link"
done

Length of output: 619


34-41: Invalid links found.

The links provided in the documentation are invalid and do not lead to the appropriate sections. Please verify and update the following links:

  • /apis/galacean
  • /docs/physics/overall
  • /docs/graphics/shader/lab
  • /docs/xr/overall
Analysis chain

Verify updated links.

Ensure that the updated links to the core packages and their documentation are correct and lead to the appropriate sections.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the updated links in the documentation.

# Test: Check if the links are valid and accessible.
for link in "/apis/galacean" "/docs/physics/overall" "/docs/graphics/shader/lab" "/docs/xr/overall"; do
  curl -s -o /dev/null -w "%{http_code}" "https://galacean.antgroup.com$link" | grep -q "200" || echo "Invalid link: $link"
done

Length of output: 1131


8-10: Correct the documentation links.

The links provided in the documentation are incorrect. Here are the correct paths for the documentation files:

  • 渲染: /docs/zh/graphics/renderer/renderer.md
  • 物理: /docs/zh/physics/overall.md
  • 动画: /docs/zh/animation/overview.md
  • 交互: /docs/zh/input/input.md
  • XR: /docs/zh/xr/overall.md

Please update the links accordingly.

Analysis chain

Verify updated links.

Ensure that the updated links to the various functionalities (渲染, 物理, 动画, 交互, XR) are correct and lead to the appropriate documentation sections.


Verify the existence and correct paths of the documentation files.

I will search for the specified documentation files within the repository to confirm their existence and correct paths.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the updated links in the documentation.

# Test: Check if the links are valid and accessible.
for link in "/docs/graphics/renderer/renderer" "/docs/physics/overall" "/docs/animation/overview" "/docs/input/input" "/docs/xr/overall"; do
  curl -s -o /dev/null -w "%{http_code}" "https://galacean.antgroup.com$link" | grep -q "200" || echo "Invalid link: $link"
done

Length of output: 1644


Script:

#!/bin/bash
# Description: Verify the existence and correct paths of the documentation files.

# Search for the specified documentation files within the repository.
for doc in "renderer.md" "overall.md" "overview.md" "input.md"; do
  fd "$doc" || echo "File not found: $doc"
done

Length of output: 1077

docs/zh/graphics/2D/spriteAtlas.md (1)

23-23: Invalid link detected.

The link "https://galacean.antgroup.com/docs/assets/interface/" provided in the documentation is invalid and does not lead to a valid page. Please update the link to ensure it directs users to the correct resource.

  • Invalid link: https://galacean.antgroup.com/docs/assets/interface/
Analysis chain

Verify updated link.

Ensure that the updated link to the asset panel is correct and leads to the appropriate section.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the updated link in the documentation.

# Test: Check if the link is valid and accessible.
curl -s -o /dev/null -w "%{http_code}" "https://galacean.antgroup.com/docs/assets/interface/" | grep -q "200" || echo "Invalid link: https://galacean.antgroup.com/docs/assets/interface/"

Length of output: 250

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 099e5fd and be4416d.

Files selected for processing (9)
  • docs/zh/core/engine.md (3 hunks)
  • docs/zh/graphics/2D/spriteAtlas.md (3 hunks)
  • docs/zh/graphics/2D/spriteRenderer.md (1 hunks)
  • docs/zh/graphics/camera/component.md (3 hunks)
  • docs/zh/graphics/renderer/renderer.md (1 hunks)
  • docs/zh/quick-start/overview.md (4 hunks)
  • docs/zh/quick-start/version.md (1 hunks)
  • docs/zh/xr/quickStart/develop.md (1 hunks)
  • docs/zh/xr/system/toolkit.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • docs/zh/graphics/2D/spriteRenderer.md
Files skipped from review as they are similar to previous changes (3)
  • docs/zh/graphics/camera/component.md
  • docs/zh/graphics/renderer/renderer.md
  • docs/zh/quick-start/version.md
Additional context used
Markdownlint
docs/zh/core/engine.md

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

(MD045, no-alt-text)


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

(MD045, no-alt-text)

docs/zh/xr/quickStart/develop.md

32-32: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

docs/zh/quick-start/overview.md

78-78: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

docs/zh/graphics/2D/spriteAtlas.md

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

(MD045, no-alt-text)

LanguageTool
docs/zh/quick-start/overview.md

[uncategorized] ~15-~15: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:快速"地"创建
Context: ...up.com/editor) 是一个在线 Web 互动创作平台。它可以帮助你快速的创建、编辑和导出一个互动项目。你可以通过 Galacean Editor 快速上...

(wb4)


[uncategorized] ~70-~70: 若非古汉语,则量词“二”可能使用错误,您的意思是否是:"两方"?
Context: ...,需要配套使用 1.3.y 版本的工具包。 ### 二方生态包 另外还有一些二方生态包,引入和使用方式和引擎工具包相同: | 包 | 解释 | API | |...

(wa5)

Additional comments not posted (24)
docs/zh/core/engine.md (7)

8-8: Improved generality in the description.

The removal of the specific count of functions makes the description more flexible for future updates.


28-28: Enhanced explanation of WebGLEngine.create.

The expanded explanation adds depth to the understanding of how the engine is set up.


30-50: Introduction of class diagram for WebGLEngineConfiguration.

The visual representation aids developers in understanding the relationships and properties associated with engine configuration.


52-59: Comprehensive instructions for rendering context.

The updated section provides clearer examples of how to adjust rendering options through code.

Tools
Markdownlint

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

(MD045, no-alt-text)


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

(MD045, no-alt-text)


60-65: Clear example of modifying engine configuration.

The example of how to disable canvas transparency is clear and useful for developers.


71-71: Additional configuration information.

The additional information is useful for developers seeking to understand the engine's attributes.


Line range hint 75-104: Improved readability of properties and methods sections.

The reformatting into clearer table formats makes it easier to read and understand the purpose of each property and method available in the Engine.

Tools
Markdownlint

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

(MD045, no-alt-text)


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

(MD045, no-alt-text)

docs/zh/xr/system/toolkit.md (6)

1-8: Introduction to XR toolkit.

The introductory paragraph provides a clear overview and contains useful links to other documentation pages.


10-16: Clear summary of XR components and managers.

The table format provides a concise summary of the components and managers in the XR toolkit.


18-28: Inheritance relationships diagram.

The mermaid diagram helps in understanding the structure and relationships of the XR components.


30-30: Context about XR components.

The note provides useful context about the implementation of the XR components.


32-48: Detailed documentation for XROrigin and TrackedComponent.

The detailed documentation provides clear explanations of the properties and their purposes.


49-105: Detailed documentation and code example for XR toolkit.

The detailed documentation and code example provide clear explanations and practical usage of the XR toolkit.

docs/zh/xr/quickStart/develop.md (8)

1-8: Introduction to XR quick start guide.

The introductory paragraph provides a clear overview of the guide's content.


10-17: Workflow diagram for developing XR interactions.

The mermaid diagram helps in understanding the workflow for developing XR interactions using the editor.


19-23: Instructions for creating a project and selecting WebXR backend.

The instructions are clear and provide useful links to other documentation pages.


25-33: Instructions for adding XR nodes.

The instructions and notes are clear and provide useful information for developers.

Tools
Markdownlint

32-32: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)


35-39: Instructions for previewing XR projects.

The instructions are clear and provide useful links to other documentation pages.


41-74: Instructions for adding XR capabilities.

The instructions are detailed and provide clear explanations of the properties and their purposes.


76-87: Note about entering XR context.

The note provides useful information for developers about the requirements for entering the XR context.


89-114: Code example for entering XR context.

The code example is clear and provides practical usage for developers.

docs/zh/quick-start/overview.md (1)

24-24: Verify updated link.

Ensure that the link to the editor homepage is correct and leads to the appropriate section.

Verification successful

Link verification successful.

The link to the editor homepage is valid and accessible.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the updated link in the documentation.

# Test: Check if the link is valid and accessible.
curl -s -o /dev/null -w "%{http_code}" "https://galacean.antgroup.com/editor" | grep -q "200" || echo "Invalid link: https://galacean.antgroup.com/editor"

Length of output: 91

docs/zh/graphics/2D/spriteAtlas.md (2)

75-76: LGTM!

The changes to specify the acceptable range for texture size limits are clear and accurate.


81-82: LGTM!

The warning about potential issues if the resulting atlas size exceeds the specified texture limits is clear and provides useful recommendations.


## 编辑器

[Galacean Editor](https://antg.antgroup.com/editor) 是一个在线 Web 互动创作平台。它可以帮助你快速的创建、编辑和导出一个互动项目。你可以通过 Galacean Editor 快速上传互动资产,创建和编辑材质、调整灯光、创建实体,从而创造出复杂的场景。
[Galacean Editor](https://antg.antgroup.com/editor) 是一个在线 Web 互动创作平台。它可以帮助你快速的创建、编辑和导出一个互动项目。你可以通过 Galacean Editor 快速上传资产,编辑材质、调整灯光、创建实体,从而创造出复杂的场景。
Copy link

Choose a reason for hiding this comment

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

Correct grammatical error.

The phrase "快速的创建" should be "快速地创建" to be grammatically correct.

- 它可以帮助你快速的创建、编辑和导出一个互动项目。
+ 它可以帮助你快速地创建、编辑和导出一个互动项目。
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
[Galacean Editor](https://antg.antgroup.com/editor) 是一个在线 Web 互动创作平台。它可以帮助你快速的创建、编辑和导出一个互动项目。你可以通过 Galacean Editor 快速上传资产,编辑材质、调整灯光、创建实体,从而创造出复杂的场景。
[Galacean Editor](https://antg.antgroup.com/editor) 是一个在线 Web 互动创作平台。它可以帮助你快速地创建、编辑和导出一个互动项目。你可以通过 Galacean Editor 快速上传资产,编辑材质、调整灯光、创建实体,从而创造出复杂的场景。
Tools
LanguageTool

[uncategorized] ~15-~15: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:快速"地"创建
Context: ...up.com/editor) 是一个在线 Web 互动创作平台。它可以帮助你快速的创建、编辑和导出一个互动项目。你可以通过 Galacean Editor 快速上...

(wb4)

```

> 在同一项目中,请保证引擎核心包的版本一致和工具包的大版本保持一致,以 1.0.x 版本的引擎为例,需要配套使用 1.0.y 版本的工具包。
### 二方生态包
Copy link

Choose a reason for hiding this comment

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

Correct terminology.

The term "二方生态包" should be "两方生态包" to be more accurate.

- ### 二方生态包
+ ### 两方生态包
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://mdn.alipayobjects.com/huamei_yo47yq/afts/img/A*dE71RKXvGAAAAAAAAAAAAAAADhuCAQ/original" style="zoom:50%;" />
Copy link

Choose a reason for hiding this comment

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

Add alternate text for the image.

The image should have alternate text to improve accessibility.

- <img src="https://mdn.alipayobjects.com/huamei_yo47yq/afts/img/A*dE71RKXvGAAAAAAAAAAAAAAADhuCAQ/original" style="zoom:50%;" />
+ <img src="https://mdn.alipayobjects.com/huamei_yo47yq/afts/img/A*dE71RKXvGAAAAAAAAAAAAAAADhuCAQ/original" alt="Atlas size warning" style="zoom:50%;" />
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://mdn.alipayobjects.com/huamei_yo47yq/afts/img/A*dE71RKXvGAAAAAAAAAAAAAAADhuCAQ/original" style="zoom:50%;" />
<img src="https://mdn.alipayobjects.com/huamei_yo47yq/afts/img/A*dE71RKXvGAAAAAAAAAAAAAAADhuCAQ/original" alt="Atlas size warning" style="zoom:50%;" />
Tools
Markdownlint

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

(MD045, no-alt-text)


## 最佳实践

由于 XR 调试的困难,我们建议绝大部份的工作和验证在 PC 预览与调试阶段完成,这样可以显著提升开发效率。
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
Collaborator Author

Choose a reason for hiding this comment

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

Done.

);
```

## ProCode
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
Collaborator Author

Choose a reason for hiding this comment

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

Done.

const image = new Image();
image.onload = () => {
// 创建追踪图片
const refImage = new XRReferenceImage("test", image, 0.08);
Copy link
Collaborator

Choose a reason for hiding this comment

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

0.08 是啥意思

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

```

我们可以追踪现实图片,并为他们标记坐标系:

<playground src="xr-ar-planeTracking.ts"></playground>
<playground src="xr-ar-imageTracking.ts"></playground>
Copy link
Collaborator

Choose a reason for hiding this comment

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

感觉 xr 放 playground 意义不大,给个项目二维码能让开发者直接体验会更加直观

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

可以直接扫码体验,我补充一下追踪的图片

@cptbtptpbcptdtptp cptbtptpbcptdtptp changed the base branch from dev/1.3 to main August 2, 2024 08:56
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: 1

Outside diff range, codebase verification and nitpick comments (12)
docs/zh/xr/quickStart/develop.md (7)

8-8: Clarify the introduction.

Consider rephrasing the introduction to make it clearer and more engaging.

- 本篇文档讲分别讲述在编辑器和 ProCode 情况下如何快速开发 XR 互动。
+ 本篇文档将分别讲述如何在编辑器和 ProCode 环境下快速开发 XR 互动。

74-74: Clarify image tracking debugging note.

Consider rephrasing the note about debugging image tracking for better clarity.

- 图片追踪无法在编辑器侧进行调试,需导出构建后用手机预览并调试。
+ 图片追踪无法在编辑器中进行调试,需要导出构建后在手机上预览并调试。

67-67: The link to the "资产面板" section is incorrect and returns a 404 error.

  • Please update the link to the correct URL for the "资产面板" section.
Analysis chain

Ensure link accuracy.

Verify that the link to the "资产面板" section is correct and up-to-date.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the link in the documentation.

# Test: Check if the link is accessible. Expect: Link should be valid and lead to the correct section.
curl -I https://galacean.antgroup.com/docs/assets/interface/

Length of output: 1318


37-37: Broken link detected.

The link to the "调试 XR 项目" section is currently broken and returns a 404 error. Please verify the correct URL for the "调试 XR 项目" section and update the link.

  • File: docs/zh/xr/quickStart/develop.md
  • Line: 37
Analysis chain

Ensure link accuracy.

Verify that the link to the "调试 XR 项目" section is correct and up-to-date.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the link in the documentation.

# Test: Check if the link is accessible. Expect: Link should be valid and lead to the correct section.
curl -I https://galacean.antgroup.com/docs/xr/quickStart/debug/

Length of output: 1430


114-114: Broken playground link.

The playground link for the AR interaction example is broken (404 error). Please verify the existence of the xr-ar-simple.ts file in the repository and update the URL if necessary.

  • Check if the file xr-ar-simple.ts exists in the repository.
  • Update the URL in the documentation if the file path is incorrect.
#!/bin/bash
# Description: Search for the xr-ar-simple.ts file in the repository to confirm its existence and determine the correct path if it exists.

# Find the xr-ar-simple.ts file in the repository
fd xr-ar-simple.ts
Analysis chain

Ensure playground link functionality.

Verify that the playground link for the AR interaction example is functional and relevant.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the functionality of the playground link in the documentation.

# Test: Check if the playground link is accessible. Expect: Link should be valid and lead to the correct example.
curl -I https://galacean.antgroup.com/playground/xr-ar-simple.ts

Length of output: 1439


21-21: Broken links in documentation.

The links to "首页" and "项目设置" in the documentation are returning 404 errors. Please update the links to point to the correct sections.

Analysis chain

Ensure link accuracy.

Verify that the links to the "首页" and "项目设置" sections are correct and up-to-date.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the links in the documentation.

# Test: Check if the links are accessible. Expect: Links should be valid and lead to the correct sections.
curl -I https://galacean.antgroup.com/docs/interface/intro/#%E9%A6%96%E9%A1%B5
curl -I https://galacean.antgroup.com/docs/interface/menu/#项目设置

Length of output: 2953


112-112: Ensure link accuracy.

The link to the "XR 管理器" section in docs/zh/xr/quickStart/develop.md is broken. It should be updated to point to the correct file:

  • Change /docs/xr/system/manager/ to /docs/zh/xr/system/manager.md
Analysis chain

Ensure link accuracy.

Verify that the link to the "XR 管理器" section is correct and up-to-date.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the link in the documentation.

# Test: Check if the link is accessible. Expect: Link should be valid and lead to the correct section.
curl -I https://galacean.antgroup.com/docs/xr/system/manager/

Length of output: 1515


Script:

#!/bin/bash
# Search for references to "XR 管理器" in the documentation to find the correct link.
rg "XR 管理器" docs/

Length of output: 314

docs/zh/quick-start/overview.md (5)

8-10: Clarify the introduction.

Consider rephrasing the introduction to make it clearer and more engaging.

- **Galacean Engine** 是一套 Web 为先、移动优先、开源共建的实时互动解决方案,采用组件化架构并用 [Typescript](https://www.typescriptlang.org/) 编写。它包含[渲染](/docs/graphics/renderer/renderer)、[物理](/docs/physics/overall)、[动画](/docs/animation/overview)、[交互](/docs/input/input)、[XR](/docs/xr/overall)等功能,并提供了具备完善工作流的可视化在线编辑器,帮助你在浏览器上创作绚丽的 2D/3D 互动应用。它主要由两部分组成:
+ **Galacean Engine** 是一套 Web 为先、移动优先、开源共建的实时互动解决方案,采用组件化架构并用 [Typescript](https://www.typescriptlang.org/) 编写。它包含[渲染](/docs/graphics/renderer/renderer)、[物理](/docs/physics/overall)、[动画](/docs/animation/overview)、[交互](/docs/input/input)、[XR](/docs/xr/overall)等功能,并提供了具备完善工作流的可视化在线编辑器,帮助你在浏览器上创作绚丽的 2D/3D 互动应用。Galacean Engine 主要由两部分组成:

59-63: Update broken documentation links.

The links for "framebuffer-picker" and "stats" documentation are broken. Please update them to the correct URLs.

  • https://galacean.antgroup.com/docs/input/framebuffer-picker/ returns a 404 error.
  • https://galacean.antgroup.com/docs/performance/stats/ returns a 404 error.
Analysis chain

Ensure link accuracy.

Verify that the links to the toolkit packages and their documentation are correct and up-to-date.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the links in the documentation.

# Test: Check if the links are accessible. Expect: Links should be valid and lead to the correct sections.
curl -I https://www.npmjs.com/package/@galacean/engine-toolkit-controls
curl -I https://galacean.antgroup.com/docs/input/framebuffer-picker/
curl -I https://galacean.antgroup.com/docs/performance/stats/

Length of output: 5907


83-85: Two links in the documentation are broken and need to be updated.

  • The link to CanIUse for WebGL compatibility redirects to an error page.
  • The link to the Galacean documentation for Alipay/Taobao mini-programs returns a 404 error.

Please update these links to ensure they direct users to the correct resources.

Analysis chain

Ensure link accuracy.

Verify that the links to the compatibility documentation are correct and up-to-date.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the links in the documentation.

# Test: Check if the links are accessible. Expect: Links should be valid and lead to the correct sections.
curl -I https://caniuse.com/?search=webgl
curl -I https://galacean.antgroup.com/docs/assets-build
curl -I https://github.com/deepkolos/platformize

Length of output: 6833


74-75: Ensure link accuracy.

The npm package links for @galacean/engine-spine and @galacean/engine-lottie are correct and accessible. However, the documentation links for both spine and lottie on galacean.antgroup.com are broken, returning a 404 error.

Please update these documentation links to ensure they are correct and accessible.

Analysis chain

Ensure link accuracy.

Verify that the links to the third-party ecosystem packages and their documentation are correct and up-to-date.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the links in the documentation.

# Test: Check if the links are accessible. Expect: Links should be valid and lead to the correct sections.
curl -I https://www.npmjs.com/package/@galacean/engine-spine
curl -I https://galacean.antgroup.com/docs/graphics/2D/spine/
curl -I https://www.npmjs.com/package/@galacean/engine-lottie
curl -I https://galacean.antgroup.com/docs/graphics/2D/lottie/

Length of output: 8787


34-41: Broken links in documentation.

The following links in the documentation are returning 404 errors and need to be corrected:

Please update these links to point to the correct documentation pages.

Analysis chain

Ensure link accuracy.

Verify that the links to the core packages and their documentation are correct and up-to-date.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the links in the documentation.

# Test: Check if the links are accessible. Expect: Links should be valid and lead to the correct sections.
curl -I https://www.npmjs.com/package/@galacean/engine
curl -I https://galacean.antgroup.com/docs/physics/overall
curl -I https://galacean.antgroup.com/docs/graphics/shader/lab
curl -I https://galacean.antgroup.com/docs/xr/overall

Length of output: 7544

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between be4416d and f618104.

Files selected for processing (7)
  • docs/zh/graphics/2D/2d.md (1 hunks)
  • docs/zh/graphics/shader/shaderLab/intro.md (1 hunks)
  • docs/zh/quick-start/overview.md (4 hunks)
  • docs/zh/xr/quickStart/debug.md (1 hunks)
  • docs/zh/xr/quickStart/develop.md (1 hunks)
  • docs/zh/xr/system/features.md (4 hunks)
  • examples/xr-ar-imageTracking.ts (1 hunks)
Files skipped from review due to trivial changes (3)
  • docs/zh/graphics/2D/2d.md
  • docs/zh/graphics/shader/shaderLab/intro.md
  • examples/xr-ar-imageTracking.ts
Files skipped from review as they are similar to previous changes (2)
  • docs/zh/xr/quickStart/debug.md
  • docs/zh/xr/system/features.md
Additional context used
Markdownlint
docs/zh/xr/quickStart/develop.md

32-32: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

docs/zh/quick-start/overview.md

78-78: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

LanguageTool
docs/zh/quick-start/overview.md

[uncategorized] ~70-~70: 若非古汉语,则量词“二”可能使用错误,您的意思是否是:"两方"?
Context: ...,需要配套使用 1.3.y 版本的工具包。 ### 二方生态包 另外还有一些二方生态包,引入和使用方式和引擎工具包相同: | 包 | 解释 | API | |...

(wa5)

Additional comments not posted (3)
docs/zh/xr/quickStart/develop.md (1)

89-107: Ensure code snippet accuracy.

Verify that the TypeScript code snippet for entering XR context is accurate and functional.

Verification successful

The TypeScript code snippet is accurate and functional.

The provided TypeScript code snippet for entering XR context is syntactically correct and follows the expected structure. No issues were found.

  • The code snippet correctly initializes xrManager and xrMode.
  • It properly checks if the XR mode is supported and sets up the onclick event for the button to enter the XR session.
  • The error handling is also correctly implemented.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the TypeScript code snippet in the documentation.

# Test: Check if the code snippet is syntactically correct. Expect: No syntax errors.
echo '
const xrManager = engine.xrManager;
const xrMode = XRSessionMode.AR;
engine.xrManager.sessionManager.isSupportedMode(xrMode).then(
  () => {
    htmlButton.onclick = () => {
      xrManager.enterXR(xrMode);
    };
  },
  (error) => {
    console.error(error);
  }
);
' | npx typescript --noEmit

Length of output: 375


Script:

#!/bin/bash
# Description: Verify the structure of the TypeScript code snippet in the documentation using ast-grep.

# Test: Check if the code snippet is syntactically correct using ast-grep.
echo '
const xrManager = engine.xrManager;
const xrMode = XRSessionMode.AR;
engine.xrManager.sessionManager.isSupportedMode(xrMode).then(
  () => {
    htmlButton.onclick = () => {
      xrManager.enterXR(xrMode);
    };
  },
  (error) => {
    console.error(error);
  }
);
' > temp.ts

ast-grep --lang typescript --pattern 'const xrManager = $_;' temp.ts && \
ast-grep --lang typescript --pattern 'const xrMode = $_;' temp.ts && \
ast-grep --lang typescript --pattern 'engine.xrManager.sessionManager.isSupportedMode($_).then($_, $_);' temp.ts && \
ast-grep --lang typescript --pattern 'htmlButton.onclick = $_ => { xrManager.enterXR($_); };' temp.ts && \
ast-grep --lang typescript --pattern 'console.error($_);' temp.ts

# Clean up
rm temp.ts

Length of output: 1247

docs/zh/quick-start/overview.md (2)

68-68: Correct terminology.

The term "二方生态包" should be "两方生态包" to be more accurate.

- ### 二方生态包
+ ### 两方生态包

Likely invalid or redundant comment.


15-15: Ensure link accuracy.

Verify that the link to the "Editor" is correct and up-to-date.

Verification successful

Link is correct and accessible.

The link to the "Editor" in the documentation is valid and leads to the correct section.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of the link in the documentation.

# Test: Check if the link is accessible. Expect: Link should be valid and lead to the correct section.
curl -I https://galacean.antgroup.com/editor

Length of output: 1896

Comment on lines +31 to +33
> 添加 XR 节点会自动创建并选择 `origin` 和 `camera`,因此场景内不应该存在其他 `Camera` 组件,除非是有意为之。

> 场景内允许添加多个 XR 节点,但在同一时刻,有且只有一个 XR 节点生效。
Copy link

Choose a reason for hiding this comment

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

Remove redundant blockquote blank lines.

There are unnecessary blank lines within the blockquote, which can be removed for better formatting.

> 添加 XR 节点会自动创建并选择 `origin` 和 `camera`,因此场景内不应该存在其他 `Camera` 组件,除非是有意为之。
-
> 场景内允许添加多个 XR 节点,但在同一时刻,有且只有一个 XR 节点生效。
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
> 添加 XR 节点会自动创建并选择 `origin``camera`,因此场景内不应该存在其他 `Camera` 组件,除非是有意为之。
> 场景内允许添加多个 XR 节点,但在同一时刻,有且只有一个 XR 节点生效。
> 添加 XR 节点会自动创建并选择 `origin``camera`,因此场景内不应该存在其他 `Camera` 组件,除非是有意为之。
> 场景内允许添加多个 XR 节点,但在同一时刻,有且只有一个 XR 节点生效。
Tools
Markdownlint

32-32: null
Blank line inside blockquote

(MD028, no-blanks-blockquote)

@cptbtptpbcptdtptp cptbtptpbcptdtptp merged commit 4e5803d into galacean:main 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