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 #56

Merged
merged 19 commits into from
Dec 20, 2023
Merged

Merge origin/main into origin/dev #56

merged 19 commits into from
Dec 20, 2023

Conversation

yiiqii
Copy link
Collaborator

@yiiqii yiiqii commented Dec 19, 2023

Summary by CodeRabbit

  • Bug Fixes

    • Resolved rendering issues related to the differential algorithm.
  • Documentation

    • Enhanced the Chinese README with images and a new header.
    • Updated the main README with new visual elements.
  • New Features

    • Improved handling of visual effects in the core composition module.
  • Refactor

    • Optimized conditional logic in the sprite rendering process.
    • Streamlined the initialization process in the demo application.

yiiqii and others added 18 commits December 18, 2023 09:43
* docs: add product preview

* docs: add product preview assets

* chore: add meta for svg file

* chore: modify svg link

* chore: svg 内联图片有问题,直接用图片

* chore: 添加 preview 图片尺寸

* docs: 调整 slogan 位置
build: 替换 pnpm-lock 中的 registry
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.25.3 to 0.25.4.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](TypeStrong/typedoc@v0.25.3...v0.25.4)

---
updated-dependencies:
- dependency-name: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [hammerjs](https://github.com/hammerjs/hammer.js) and [@types/hammerjs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/hammerjs). These dependencies needed to be updated together.

Updates `hammerjs` from 2.0.6 to 2.0.8
- [Changelog](https://github.com/hammerjs/hammer.js/blob/master/CHANGELOG.md)
- [Commits](hammerjs/hammer.js@v2.0.6...v2.0.8)

Updates `@types/hammerjs` from 2.0.41 to 2.0.45
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/hammerjs)

---
updated-dependencies:
- dependency-name: hammerjs
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: "@types/hammerjs"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [rimraf](https://github.com/isaacs/rimraf) from 3.0.2 to 5.0.5.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](isaacs/rimraf@v3.0.2...v5.0.5)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) from 4.2.0 to 4.2.2.
- [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases)
- [Commits](aleclarson/vite-tsconfig-paths@v4.2.0...v4.2.2)

---
updated-dependencies:
- dependency-name: vite-tsconfig-paths
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-conventional) from 13.2.0 to 18.4.3.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v18.4.3/@commitlint/config-conventional)

---
updated-dependencies:
- dependency-name: "@commitlint/config-conventional"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…0.25.4

build(deps-dev): bump typedoc from 0.25.3 to 0.25.4
…-and-types/hammerjs-2.0.8

build(deps-dev): bump hammerjs and @types/hammerjs
….0.5

build(deps-dev): bump rimraf from 3.0.2 to 5.0.5
…onfig-paths-4.2.2

build(deps-dev): bump vite-tsconfig-paths from 4.2.0 to 4.2.2
…nt/config-conventional-18.4.3

build(deps-dev): bump @commitlint/config-conventional from 13.2.0 to 18.4.3
* fix: render sprite incorrectly caused by diff algorithm when config reusable

* fix: 蒙版在预合成上的穿透问题

* chore: 更换 demo 页链接

* fix: 修复重复引用预合成的贴图提前销毁问题

* chore: 优化代码格式
…n/rimraf-5.0.5

Revert "build(deps-dev): bump rimraf from 3.0.2 to 5.0.5"
Copy link
Contributor

coderabbitai bot commented Dec 19, 2023

Walkthrough

The recent updates encompass bug fixes in the rendering process, documentation enhancements with visual content, and codebase optimizations in the effects core and web demo components. The changes streamline the handling of masks in compositions, improve conditional logic in sprite mesh management, and simplify the demo's player creation process.

Changes

File Path Summary
CHANGELOG.md Fixed rendering bugs caused by the diff algorithm and pre-comp. Associated with pull request #53.
README*.md Added visual content such as images and headers to enhance visual appeal.
packages/effects-core/src/composition-source-manager.ts
packages/effects-core/src/plugins/sprite/sprite-mesh.ts
Refactored mask handling and conditional logic.
web-packages/demo/src/single.ts Streamlined player creation and temporarily disabled env property.

🐇✨
To the code that we mend and mesh,
A rabbit's paw makes it fresh.
With each commit, we leap and dash,
In the digital fields, our dreams we stash. 🌟🌿

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

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 e493738 and 0e2d537.
Files ignored due to filter (12)
  • package.json
  • 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
  • pnpm-lock.yaml
Files selected for processing (6)
  • CHANGELOG.md (1 hunks)
  • README-zh_CN.md (1 hunks)
  • README.md (1 hunks)
  • packages/effects-core/src/composition-source-manager.ts (6 hunks)
  • packages/effects-core/src/plugins/sprite/sprite-mesh.ts (1 hunks)
  • web-packages/demo/src/single.ts (2 hunks)
Files skipped from review due to trivial changes (2)
  • README-zh_CN.md
  • README.md
Additional comments: 6
CHANGELOG.md (1)
packages/effects-core/src/composition-source-manager.ts (2)
  • 42-42: Initialization of the mask property in the constructor is a good practice to avoid it being undefined at any point in the class lifecycle.

  • 242-250: The processMask method correctly sets the mask on the renderer based on the maskMode. This is a logical way to handle conditional masking.

packages/effects-core/src/plugins/sprite/sprite-mesh.ts (1)
  • 200-210: The reorganization of the conditional logic in updateItem improves readability and makes the early return pattern clearer when selfData.visible is false and init is not set.
web-packages/demo/src/single.ts (2)
  • 13-13: Directly awaiting player.loadScene(json) without an intermediate variable simplifies the code and maintains readability.

  • 24-24: Verify if the commenting out of the env property is intentional. If this property is no longer needed, consider removing the line entirely to avoid commented-out code lingering in the codebase.

Comment on lines +105 to 108
let mask = this.mask++;

if (isNaN(mask)) {
mask = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider incrementing mask after the isNaN check to ensure it's only incremented when it has a valid number value.

- let mask = this.mask++;
+ let mask = this.mask;
  if (isNaN(mask)) {
    mask = 0;
  } else {
+   this.mask++;
  }

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
let mask = this.mask++;
if (isNaN(mask)) {
mask = 0;
let mask = this.mask;
if (isNaN(mask)) {
mask = 0;
} else {
this.mask++;
}

RGCHN
RGCHN previously approved these changes Dec 20, 2023
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: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 0e2d537 and dae9252.
Files selected for processing (1)
  • web-packages/demo/src/single.ts (2 hunks)
Additional comments: 2
web-packages/demo/src/single.ts (2)
  • 10-16: The introduction of await for player.loadScene(json) within the async IIFE and the error handling with console.error are correctly implemented.

  • 24-24: Verify that commenting out the env property in the createPlayer function's configuration object is intentional and does not affect the expected behavior of the player.

@liuxi150 liuxi150 merged commit 145168f into dev Dec 20, 2023
3 checks passed
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.

3 participants