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: Visualizer Threejs (stardust) #809

Merged
merged 144 commits into from
Dec 5, 2023
Merged

Conversation

msarcev
Copy link
Collaborator

@msarcev msarcev commented Oct 30, 2023

Description of change

Please write a summary of your changes and why you made them. Be sure to reference any related issues by adding fixes # (issue).

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • [] My code follows the contribution guidelines for this project
  • [] I have performed a self-review of my own code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes

msarcev and others added 30 commits May 24, 2023 11:11
msarcev and others added 13 commits October 19, 2023 13:54
…-out-tab

Feat: Pause stream when window is out of focus
Feat: Add a BPS tracker to Visualizer
* (Fix) Improve zooming logic (from 5BPS to 100+BPS) and emitter position consistency with different zoom values. Implement coefficient for low bps.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* (Fix) Improve zooming logic (from 5BPS to 100+BPS) and emitter position consistency with different zoom values. Another algorighm for placing low bps

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

---------

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
* Prettier revert. pt1.

* Prettier revert. pt2.

* ESlint fixes.

* Fixes after create PR. Remove more parts related to formatting.
* Test performance for render blocks.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Test performance when add in another way.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Remove blocks when they out of screen.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Refactoring

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Merged works. FPS awful.

* Trying with bufferBeometry

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* With both examples.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Example with better performance.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* feat: Implement Tangle mesh using 'Instancing' (+ Refactor components).
This makes the 'number of draw calls per render' constant and drastically improves performance

* feat: Reimplement block scaling based on child references

* chore: Rename states in store.ts

* feat: Keep blockIdToIndex up to date properly (remove old elements)

* fix: Scale the blocks properly

---------

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
Co-authored-by: Eugene Panteleymonchuk <[email protected]>
Also fixes eslint warnings after eslint update

 Conflicts:
	client/package-lock.json
	client/package.json
	client/src/app/routes/stardust/Visualizer.tsx
* feat: Implement useRenderEdges

* feat: Add removal of blocks edges when block is removed

* feat: Hide all instances of InstancedMesh initialy (scale 0)

* feat: Push useRenderEdges inside useRenderTangle (edge rendering DOESN'T work anymore because of timing issue of child no being in blockIdToIndex map yet)

* feat: Introduce a map of blockId to position, and use it to simplify the useRenderEdges code (no need to read positions from InstancedMesh)

* feat: Make edges rendering on demand (default disabled) controllable with checkbox in Wrapper
* Raycast get hovered id.

* alternative.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Works better. Hover if isRunning.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Trying to remove color when blur.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Move onHover to separate hook. Revert disabling shift.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Clear hovered spheres.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Add onClick. Fixed glitching behaviour.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* fix: Fix code after base branch merge

---------

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
Co-authored-by: Mario <[email protected]>
…#820)

* Refactoring: create useConfigStore.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Fix eslint.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Move isRenderEdges inside hook.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

---------

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
* feat: Remove the dynamic zoom as it's not needed (update the ZOOM_DEFAULT to a sensible value that works in all cases)

* Fix reset camera to 0.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

---------

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
Co-authored-by: Eugene Panteleymonchuk <[email protected]>
* Show block meta on click.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* Update position, change remove method.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

---------

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
 Conflicts:
	client/package-lock.json
	client/package.json
	client/src/app/routes/stardust/Visualizer.tsx
	client/src/helpers/hooks/useVisualizerState.tsx
	client/tsconfig.json
@begonaalvarezd begonaalvarezd linked an issue Dec 1, 2023 that may be closed by this pull request
3 tasks
@begonaalvarezd begonaalvarezd changed the base branch from dev to nova December 5, 2023 10:56
@begonaalvarezd begonaalvarezd changed the title Feat: Visualizer Threejs Feat: Visualizer Threejs (stardust) Dec 5, 2023
@msarcev msarcev changed the base branch from nova to dev December 5, 2023 15:36
@msarcev msarcev changed the base branch from dev to nova December 5, 2023 15:36
@begonaalvarezd begonaalvarezd marked this pull request as ready for review December 5, 2023 17:24
@begonaalvarezd begonaalvarezd linked an issue Dec 5, 2023 that may be closed by this pull request
3 tasks
@begonaalvarezd begonaalvarezd merged commit 6183de3 into nova Dec 5, 2023
1 check 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.

[Task]: Revert stardust visualizer changes [Epic]: Implement Visualiser with ThreeJS (stardust)
5 participants