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

refactor: quick start doc #2162

Closed
wants to merge 2 commits into from
Closed

Conversation

eyworldwide
Copy link
Member

@eyworldwide eyworldwide commented Jul 9, 2024

Please check if the PR fulfills these requirements

  • Rewrite quick start doc. Rename core-concept.md to quick-start.md, because it's easy to understand.
  • Rewrite inspector interface doc.
  • Made minor modifications to other documents.

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

Docs update.

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

No.

Summary by CodeRabbit

  • New Features

    • Introduced a quick start guide for using the engine, featuring a rotating duck example.
    • Added a section on retrieving scene objects using the engine's scene manager.
  • Enhancements

    • Updated various documentation sections to improve clarity and provide detailed examples:
      • Flappy Bird tutorial label changed to "Basics."
      • Detailed descriptions for WebGLEngine, WebCanvas, and MeshRenderer.
      • Additional details on the camera's role, PrimitiveMesh, and BlinnPhongMaterial.
  • Documentation

    • Restructured and refined the inspector panel documentation for better readability and understanding.
    • Clarified the role of scripts in linking engine capabilities with game logic.

@eyworldwide eyworldwide added the documentation Improvements or additions to documentation label Jul 9, 2024
Copy link

coderabbitai bot commented Jul 9, 2024

Walkthrough

The provided changes chiefly enhance documentation clarity and usability. Key updates include restructuring existing sections, refining entity descriptions, adding new content for quick tutorials, and reorganizing material for better comprehension. No functional changes to core exports or APIs were made, merely improvements for user understanding and easier navigation throughout the documentation.

Changes

Files Change Summary
docs/basics/flappy-bird.md Updated Flappy Bird tutorial label from Basics/GettingStarted to Basics.
docs/basics/quick-start.md Added a new quick start guide for using an engine, including creating a project and scripting a rotating 3D model.
docs/core/canvas.md Clarified the creation of WebCanvas instances in WebGLEngine.
docs/core/engine.md Expanded WebGLEngine.create functionality to support WebGL 1.0 and WebGL 2.0.
docs/core/math.md Added color value descriptions in addition to geometric operations and relationships.
docs/core/scene.md Explained how to retrieve scene objects using the engine's scene manager.
docs/graphics/camera/camera.md Enhanced explanation of a camera’s role in rendering content on the canvas.
docs/graphics/mesh/primitiveMesh.md Emphasized the convenience of PrimitiveMesh in creating common mesh objects.
docs/graphics/renderer/meshRenderer.md Clarified that MeshRenderer uses mesh objects as geometric data sources for rendering.
docs/graphics/shader/blinnPhong.md Highlighted the efficient rendering algorithm of BlinnPhongMaterial.
docs/script/class.md Redefined scripts as links between engine capabilities and game logic for extended engine functionality.
docs/interface/inspector.md Restructured content for a clearer, more organized overview of the inspector panel, including refined terminology.

Poem

In fields of code, where engines hum,
Enhancements bloom, documentation's drum.
Clarity's light through terms refined,
Guides the way for an optimized mind.
Scripts and scenes, a clearer view,
For every dev, old and new. 🐇💻


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 Configration 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 a31be29 and 5819cba.

Files selected for processing (11)
  • docs/basics/flappy-bird.md (1 hunks)
  • docs/basics/quick-start.md (1 hunks)
  • docs/core/canvas.md (1 hunks)
  • docs/core/engine.md (1 hunks)
  • docs/core/math.md (1 hunks)
  • docs/core/scene.md (1 hunks)
  • docs/graphics/camera/camera.md (1 hunks)
  • docs/graphics/mesh/primitiveMesh.md (1 hunks)
  • docs/graphics/renderer/meshRenderer.md (1 hunks)
  • docs/graphics/shader/blinnPhong.md (1 hunks)
  • docs/script/class.md (1 hunks)
Files skipped from review due to trivial changes (6)
  • docs/basics/flappy-bird.md
  • docs/core/canvas.md
  • docs/core/scene.md
  • docs/graphics/camera/camera.md
  • docs/graphics/shader/blinnPhong.md
  • docs/script/class.md
Additional context used
LanguageTool
docs/graphics/mesh/primitiveMesh.md

[typographical] ~9-~9: Niet-gecombineerd symbool: “[” lijkt te ontbreken
Context: ...label: Graphics/Mesh --- PrimitiveMesh提供了创建立方体、球体等网...

(UNPAIRED_BRACKETS)

Markdownlint
docs/basics/quick-start.md

71-71: null
Spaces inside link text

(MD039, no-space-in-links)

Additional comments not posted (13)
docs/graphics/renderer/meshRenderer.md (1)

9-9: LGTM! The update clarifies the use of mesh objects.

The updated description of the MeshRenderer component enhances clarity by specifying that it uses mesh objects (e.g., cubes) as the geometric data source.

docs/graphics/mesh/primitiveMesh.md (1)

9-9: LGTM! The update emphasizes the convenience of PrimitiveMesh.

The updated description of the PrimitiveMesh component effectively highlights its convenience for creating basic mesh objects like cubes and spheres.

Tools
LanguageTool

[typographical] ~9-~9: Niet-gecombineerd symbool: “[” lijkt te ontbreken
Context: ...label: Graphics/Mesh --- PrimitiveMesh提供了创建立方体、球体等网...

(UNPAIRED_BRACKETS)

docs/core/engine.md (1)

28-28: LGTM! The update expands the description of WebGLEngine.create.

The expanded description of the WebGLEngine.create method effectively clarifies its support for WebGL 1.0 and 2.0 and additional controls for canvas behaviors.

docs/basics/quick-start.md (9)

1-6: LGTM! The metadata is correctly defined.

The metadata section provides essential information about the document, including order, title, type, and label.


8-8: Introduction is clear and engaging.

The introduction effectively sets the stage for the quick start guide by using a rotating duck example.


10-18: Project creation steps are well-explained.

The steps for creating a new project are clear and easy to follow, accompanied by helpful images.


20-32: Scene building concepts are clearly defined.

The explanation of basic concepts like scenes, entities, components, and assets is thorough and easy to understand.


33-41: Asset addition steps are clear and concise.

The steps for adding a 3D model to the scene are well-explained and supported by images.


43-51: Transformation steps are detailed and user-friendly.

The instructions for adjusting the duck's transformation are clear and supported by images, making it easy for users to follow along.


53-57: Lighting adjustment instructions are clear.

The steps for adjusting the lighting in the scene are well-explained and supported by images.


61-93: Scripting steps are comprehensive and clear.

The instructions for creating and attaching a script to the duck entity are detailed and easy to follow, with helpful images and code snippets.

Tools
Markdownlint

71-71: null
Spaces inside link text

(MD039, no-space-in-links)


96-102: Exporting steps are clear and complete.

The steps for exporting the project are well-explained and supported by images, ensuring users can follow along easily.

docs/core/math.md (1)

8-8: Approved: Added description of color values in rendering scenes.

The additional information about the color class and its usage in rendering scenes is clear and useful.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5819cba and 7a75a67.

Files selected for processing (1)
  • docs/interface/inspector.md (3 hunks)
Additional context used
LanguageTool
docs/interface/inspector.md

[uncategorized] ~68-~68: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:精确"地"找到
Context: ...的过滤器,直接选择即可。 资产选择器中还提供了一个搜索框,你可以使用它来更精确的找到对应的资产。 <div style="display: flex; gap...

(wb4)

Additional comments not posted (3)
docs/interface/inspector.md (3)

9-9: LGTM!

The description of the inspector panel's location and usage is clear and concise.


11-11: LGTM!

The heading for inspector types is appropriate and clear.


37-37: Terminology update approved.

The change from "属性" to "控件" enhances clarity by specifying controls.


资产选择浮窗中还提供了一个搜索框,你可以使用它来更精确的找到对应的资产。
资产选择器中还提供了一个搜索框,你可以使用它来更精确的找到对应的资产。
Copy link

Choose a reason for hiding this comment

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

Fix the grammatical issue.

The phrase "更精确的找到" should be "更精确地找到" for grammatical correctness.

- 你可以使用它来更精确的找到对应的资产。
+ 你可以使用它来更精确地找到对应的资产。
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
资产选择器中还提供了一个搜索框,你可以使用它来更精确的找到对应的资产
资产选择器中还提供了一个搜索框,你可以使用它来更精确地找到对应的资产
Tools
LanguageTool

[uncategorized] ~68-~68: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:精确"地"找到
Context: ...的过滤器,直接选择即可。 资产选择器中还提供了一个搜索框,你可以使用它来更精确的找到对应的资产。 <div style="display: flex; gap...

(wb4)

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

```typescript
const scene = engine.sceneManager.activeScene;
```

Copy link
Collaborator

Choose a reason for hiding this comment

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

这个方法已经废弃了。

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