Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: Add tweens component #758

Merged
merged 15 commits into from
Oct 3, 2023
Merged

feat: Add tweens component #758

merged 15 commits into from
Oct 3, 2023

Conversation

cyaiox
Copy link
Contributor

@cyaiox cyaiox commented Oct 2, 2023

This PR adds the tween action component, allowing the users to define:

  • move the item
  • rotate the item
  • scale the item

image

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 2, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: e3fbe4f
Status: ✅  Deploy successful!
Preview URL: https://1c34e54c.js-sdk-toolchain.pages.dev
Branch Preview URL: https://feat-add-tweens-component.js-sdk-toolchain.pages.dev

View logs

@cyaiox cyaiox force-pushed the feat/add-tweens-component branch from f008dd1 to 09828dc Compare October 2, 2023 17:46
@cyaiox cyaiox requested a review from cazala October 2, 2023 17:52
// actions that may only be available under certain circumstances
const conditionalActions: Partial<Record<string, () => boolean>> = useMemo(
() => ({
[ActionType.PLAY_ANIMATION]: () => hasAnimations,
[ActionType.SET_STATE]: () => hasStates
[ActionType.SET_STATE]: () => hasStates,
[ActionType.START_TWEEN]: () => hasTweens
Copy link
Member

Choose a reason for hiding this comment

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

mm I think the start_tween should not be conditional? You can always use the start tween on an entity. Also, the hasTweens will always be false for a brand new entity, so you would never be able to add tween actions to it. This seems to have slipped from the original version with the Tweens component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, updated!

@cyaiox cyaiox requested a review from cazala October 3, 2023 03:01
@cyaiox cyaiox marked this pull request as ready for review October 3, 2023 14:40
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

Test this pull request

  • The @dcl/sdk package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/add-tweens-component/dcl-sdk-7.3.18-6396549282.commit-5d10649.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/add-tweens-component/dcl-sdk-commands-7.3.18-6396549282.commit-5d10649.tgz"
    npx $SDK_COMMANDS init
  • The @dcl/inspector package can be tested by visiting this url

    • Or by installing it via NPM
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/add-tweens-component/@dcl/inspector/dcl-inspector-7.3.18-6396549282.commit-5d10649.tgz"
  • The /changerealm command to test test in-world

    /changerealm https://sdk-team-cdn.decentraland.org/ipfs/feat/add-tweens-component-e2e
    
  • You can preview this build entering:
    https://playground.decentraland.org/?sdk-branch=feat/add-tweens-component

@cyaiox cyaiox enabled auto-merge (squash) October 3, 2023 14:53
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (4aae119) 72.53% compared to head (e3fbe4f) 72.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #758      +/-   ##
==========================================
- Coverage   72.53%   72.36%   -0.18%     
==========================================
  Files         367      372       +5     
  Lines       12369    12399      +30     
  Branches     1693     1698       +5     
==========================================
  Hits         8972     8972              
- Misses       3210     3235      +25     
- Partials      187      192       +5     
Files Coverage Δ
...tityInspector/ActionInspector/TweenAction/index.ts 0.00% <0.00%> (ø)
...src/components/EntityInspector/RangeField/index.ts 0.00% <0.00%> (ø)
...tityInspector/ActionInspector/TweenAction/types.ts 0.00% <0.00%> (ø)
...src/components/EntityInspector/RangeField/types.ts 0.00% <0.00%> (ø)
...tityInspector/ActionInspector/TweenAction/utils.ts 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cyaiox cyaiox merged commit 8ae1869 into main Oct 3, 2023
8 of 10 checks passed
@cyaiox cyaiox deleted the feat/add-tweens-component branch October 3, 2023 17:59
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.

2 participants