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

Merge origin/main into origin/dev #40

Merged
merged 52 commits into from
Dec 14, 2023
Merged

Merge origin/main into origin/dev #40

merged 52 commits into from
Dec 14, 2023

Conversation

yiiqii
Copy link
Collaborator

@yiiqii yiiqii commented Dec 14, 2023

Summary by CodeRabbit

  • New Features

    • Introduced a Chinese version of the README for Chinese-speaking users.
    • Added a new "Usage" section in the README to demonstrate library utilization.
    • Created a "Documentation" section with links to detailed documentation.
  • Bug Fixes

    • Fixed an error related to delay and disappearance in pre-comp items.
  • Documentation

    • Added a new "developing.md" file with comprehensive development and building instructions.
    • Updated the README with rephrased introduction and removed specific development instructions.
    • Included a link to the Changelog for tracking changes.
  • Refactor

    • Removed the contentVisible property and adjusted visibility logic in the particle effects code.

yiiqii and others added 30 commits November 27, 2023 11:22
build: support CHANGELOG generation script
fix: add id and transform setting from pre-composition item
fix: hitTest bug in pre-composition
Merge origin/main into origin/feat/1.1
chore: auto tigger bot review for specific branches
fix: errors about visible and transform when setting
liuxi150 and others added 22 commits December 7, 2023 19:02
fix: solve pre composition problem in 3D plugin
test: fix unit and case test problems
Merge origin/feat/1.1 into origin/main
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
docs: update the README and provide the Chinese version
fix: error about delay and disappear in pre-comp item
Copy link
Contributor

coderabbitai bot commented Dec 14, 2023

Walkthrough

The project has undergone a series of updates to enhance functionality and documentation. A bug related to delays and visibility in a pre-comp item has been fixed. The documentation is now available in Chinese, and the English README has been improved for clarity and usefulness. Development instructions have been consolidated into a new file, and code changes suggest adjustments in the visual effects timing and visibility handling.

Changes

File(s) Change Summary
CHANGELOG.md Added fix for delay and disappearance in pre-comp item (PR #38).
README-zh_CN.md Created Chinese README with project intro, install guide, examples, and docs.
README.md Reformatted intro, added Changelog, removed dev/testing instructions, added usage and docs sections.
docs/developing.md New file with instructions for building and testing the project.
packages/.../comp-vfx-item.ts
packages/.../particle-vfx-item.ts
packages/.../vfx-item.ts
Adjusted visual effects timing and visibility logic in CompVFXItem and related classes.

🐇✨✍️
A hop of code, a leap of docs,
Bugs squashed in the digital box.
Chinese words now join the fray,
With clearer guides to light the way. 🌟📚

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 X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

@yiiqii yiiqii merged commit bf1d08d into dev Dec 14, 2023
2 checks passed
@yiiqii yiiqii deleted the fix/merge-issue branch December 14, 2023 07:38
Copy link
Contributor

@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.

Review Status

Actionable comments generated: 1

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between a6b9292 and 3d6cefe.
Files ignored due to filter (10)
  • packages/effects-core/package.json
  • packages/effects-helper/package.json
  • packages/effects-threejs/package.json
  • packages/effects-webgl/package.json
  • packages/effects/package.json
  • plugin-packages/alipay-downgrade/package.json
  • plugin-packages/editor-gizmo/package.json
  • plugin-packages/model/package.json
  • plugin-packages/orientation-transformer/package.json
  • plugin-packages/spine/package.json
Files selected for processing (7)
  • CHANGELOG.md (1 hunks)
  • README-zh_CN.md (1 hunks)
  • README.md (1 hunks)
  • docs/developing.md (1 hunks)
  • packages/effects-core/src/comp-vfx-item.ts (1 hunks)
  • packages/effects-core/src/plugins/particle/particle-vfx-item.ts (2 hunks)
  • packages/effects-core/src/vfx-item.ts (2 hunks)
Files skipped from review due to trivial changes (4)
  • CHANGELOG.md
  • README-zh_CN.md
  • README.md
  • docs/developing.md
Additional comments: 4
packages/effects-core/src/comp-vfx-item.ts (2)
  • 88-94: The addition of the delay property to the CompVFXItem constructor is consistent with the PR's objective to modify the behavior of visual effects. Ensure that the delay property is properly documented and that its usage is correctly implemented throughout the class.

  • 88-94: Verify that the delay property is being used where necessary, such as in update calculations or any other time-sensitive logic within the CompVFXItem class.

packages/effects-core/src/vfx-item.ts (2)
  • 402-412: The addition of a conditional block to handle the visibility of elements when a CompVFXItem is destroyed seems to be implemented correctly. However, it's important to ensure that this new behavior is documented and that any other parts of the code that depend on the visibility of CompVFXItem instances are updated to handle this new logic.

  • 685-690: Explicitly setting _contentVisible to false during the reset process is in line with the summary provided. This change ensures that the content visibility is correctly reset, which is crucial for the proper functioning of the visual effects when items are reused or disposed of. Ensure that this change does not conflict with any other parts of the codebase that might rely on the previous state of _contentVisible after a reset.

Comment on lines 37 to 43
override onItemUpdate (dt: number, lifetime: number) {
if (this.content) {
let hide = !this.visible;
let hide = !this.contentVisible;

const parentItem = this.parentId && this.composition?.getItemByID(this.parentId);

if (!hide && parentItem) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There seems to be a logic error in the onItemUpdate method. The hide variable is set to false if parentData.visible is false, which seems counterintuitive. If the parent is not visible, it would make sense for hide to be true.

if (parentData) {
  this.content.setParentTransform(parentData.transform);
- if (!parentData.visible) {
-   hide = false;
+ if (parentData.visible === false) {
+   hide = true;
  }
}

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.

Suggested change
override onItemUpdate (dt: number, lifetime: number) {
if (this.content) {
let hide = !this.visible;
let hide = !this.contentVisible;
const parentItem = this.parentId && this.composition?.getItemByID(this.parentId);
if (!hide && parentItem) {
override onItemUpdate (dt: number, lifetime: number) {
if (this.content) {
let hide = !this.contentVisible;
const parentItem = this.parentId && this.composition?.getItemByID(this.parentId);
if (parentItem) {
this.content.setParentTransform(parentItem.transform);
if (parentItem.visible === false) {
hide = true;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants