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: remove animation canvas entirely | move to animation package #1457

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

shanimal08
Copy link
Collaborator

@shanimal08 shanimal08 commented Jan 30, 2025

Description

  • most of the work was done in the new tari-tower repo @tari-project/tari-tower repo
    • implemented typescript, and converted Classes to modules where i could
    • fixed type errors
    • added load/remove tower functions which are exported along with setAnimationState and setAnimationProperties
    • built and published as a lib
  • added @tari-project/tari-tower package
  • removed old webgl build files
  • updated imports
  • added extra toggle loading state flag (to help in useMiningUiStateMachine.ts)
  • updated workflows so we can use the package

Motivation and Context

  • toggling visual mode previously just hid the canvas, this removes the element entirely + frees up some gpu after removing the WEBGL renderer

How Has This Been Tested?

GPU.mining.on.on.off.diff.mov
GPU.mining.off.on.off.diff.mov
animation.still.behaving.normally.mov

What process can a PR reviewer use to test or verify this change?

  • run with visual mode on vs off and see GPU stats

Breaking Changes

  • yes, after this is merged you will need to install @tari-labs/tari-tower for local development
  • nope, just npm ci after it's merged :3

- add tari-tower animation lib
- remove old build files
- update imports and uses
- implement complete canvas removal
- update workflows to include setting up npm credentials
@shanimal08 shanimal08 changed the title feat: rm canvas [wip] feat: remove animation canvas entirely | move to animation package Jan 30, 2025
@shanimal08 shanimal08 marked this pull request as ready for review January 31, 2025 15:21
@brianp
Copy link
Collaborator

brianp commented Feb 3, 2025

nestedblocks.mov

When i turned visual mode off, then on this happened. It doesn't correct itself. On the next floor the glitched level moves up with everything else.

When I turned it off and on again, it broke entirely and the tower never returned.

Universe log shows nothing noteworthy.

@shanimal08
Copy link
Collaborator Author

When i turned visual mode off, then on this happened. It doesn't correct itself. On the next floor the glitched level moves up with everything else.

how did you even manage this @brianp 😭

turned it off during mining right? did you switch back super quick after, or after some time?
had you won/failed during this

@brianp
Copy link
Collaborator

brianp commented Feb 3, 2025

I didn't switch it back super quick, as I was watching resources after I turned it off.
Mining is on.
This is reproducible for me after restart.

First on/off. Broken floor.
Second on/off. Missing tower.

I have since won blocks.

5th on/off the tower returned, but it's in an absolutely abysmal state. I won't take a video. It's shocking and scary.

@brianp
Copy link
Collaborator

brianp commented Feb 3, 2025

There's also a memory leak in here somewhere. I can very quickly go from the normal 800mb on the front end to 2GB by flicking visual mode on and off.

@shanimal08 shanimal08 marked this pull request as draft February 4, 2025 08:27
@peps
Copy link
Collaborator

peps commented Feb 4, 2025

When turning Visual Mode back on, I'm just seeing a white screen. I ran npm ci

CleanShot 2025-02-04 at 13 15 44@2x

@shanimal08
Copy link
Collaborator Author

When turning Visual Mode back on, I'm just seeing a white screen. I ran npm ci

ty @peps sorry i put this one back on draft because of issues on the tower side, so will un-draft and re-request when it's actually ready 😓

@shanimal08 shanimal08 added the on hold Issue is being held for progress later label Feb 6, 2025
@shanimal08 shanimal08 marked this pull request as ready for review February 7, 2025 14:03
@shanimal08 shanimal08 added a-blocktower-animations and removed on hold Issue is being held for progress later labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants