-
Notifications
You must be signed in to change notification settings - Fork 22
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
Refactoring: move "running" and "show edges" flags to useConfigStore. #820
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Eugene Panteleymonchuk <[email protected]>
Signed-off-by: Eugene Panteleymonchuk <[email protected]>
Looks good. One thing: |
Signed-off-by: Eugene Panteleymonchuk <[email protected]>
msarcev
approved these changes
Nov 9, 2023
begonaalvarezd
pushed a commit
that referenced
this pull request
Dec 5, 2023
* chore: Add folder for PoCs * poc: Vivagraph with forceDirected layout, positioned with "ancor" points * poc(viva-ancor-nodes): Make ancor nodes and links invisible * feat: D3 forced graph PoC * fix: remomve link and node styling * feat: Add vivagraph PoC with custom layout [WiP] * feat: Make layout more compact with 5 points on Y [WiP] * feat: poc d3, d3-dag, d3-force * fix: add column placement algoritam to vivagraph layout + add circles instead of squares * fix: add camera transition * refactoring: create wrapper for different visualizers and experiments with them. * refactoring: vivagraph move to isolated layout. * refactoring: selected feed info to separate layout. * refactoring: stats panel move to components. * refactoring: add wrapper for comparing solutions. * feat: test another type of visualizer. pt.5. * feat: optimization view. pt.5. Found way how to do chart that we potentially need. * feat: optimization view. pt.5. Alternative version * feat: optimization using mock data. * feat: Apply optimization. Experiments with variables. * feat: Apply optimization. Optimization based on distance. * feat: Apply optimization. Optimization based on distance. pt2. * feat: Remove blinking from vivagraph. * feat: Generate grid for y axis. * feat: Generate y coordinate based on previous values. * feat: Generate y coordinate based on previous values. * feat: Generate y coordinate based on previous values. Reagraph. pt1. * feat: Generate y coordinate based on previous values. Checkpoint. * feat: Generate y coordinate based on previous values. Checkpoint 2. Kanva. * feat: Generate y coordinate based on previous values. Checkpoint 3. Kanva. * Separete it to different places of business logic. * Remove nodes if limit. * Shift graph when run. * Add lines. * Optimization. * Different dots colors. * Removing lines. * Increase number of nodes. * Disable zoom on start. * Webgl experiments again. As our performance quite bad. * Konva. Set size of wrapper properly. * Konva. Init in separate hook. * Konva. Add wrapper * Change size of node depends on link. * --- CHECKPOINT - shift graph depends on time. * colors same as Lars sent * usePlaceNodes added. * Change ui. Test with high loading failed. * Works rescale but need to play with numbers. * web worker works * The problem was in webpack. * The problem was in webpack. 2 * Batch data and do updates when we collect data * Collect nodes in web worker. 1. * Add node to chart. * Generate coordinate on web worker end * Remove nodes when limit reached. * Updating nodes with animation. * Rescale if node Y more than limit. * Refactoring. pt1. * Refactoring. pt2. * Refactoring. pt2. Clear zoom, remove drag, storeIds. * Refactoring. pt3. Shift in webworker (not finished) * Split shift change and update nodes. * Send all data from worker include shift. * Shift works properly and depends on batch. * Data shift depends on time. Data batch depends on time too. * Have limit of data based on shift. * Remove shift if limit. * Benchmarks and performance testing. * Get width and height of stage. * Listener to change width. * Set stage width to worker. * Remove if node out of screeen. * Change threshold and shift. * Set initial position Y, Work with scale. * On hover effect. * Fix: on init Y coordinate in nodes was 0; * Pass height to worker. * Feature: dynamic zoom. * Feature: y threshold depends on loading. * Refactoring * Node dropped factor formula failed. * Node dropped factor. Store all values for current tick. * Node dropped factor. Completed formula. * Node dropped factor. Completed pass to UI. * Dynamic color. * Fix bug with node dropped factor. * feat: Add Visualizer setup with threejs * PoC. Subscribe to attack. * Control ui by Drawer. * Replay attack with mocked data. * feat: Introduce CanvasContext (wrapper) * feat: Switch from mesh to instancedMesh (performance) * Checkpoint * Fixes after join three.js solution. * Move useUpdateListener to common modules. * Pass handler from component to hook. * Subscribe Three.js to new blocks using hook. * Move common functions to shared folder. Remove unused. * feat: Add PoC setup with Emitter * Merge Emitter and fix MR conflicts. * Finished cleaning. * Add change size depends on parents/chidlren. * Zoom (not completed), Y position. * Zoom still now work. * Fixed zoom. * Zoom dynamic. * Checkpoint * useElementSize. * Change zoom dynamic works. * remove unused hooks * feat: Cleanup and tweak some constants * Feat: Refactor Visualizer components and improve Block removal (#798) * (refactoring) move onNewBlock to top level; * (refactoring) Change methods in VisualizerInstance to prevent rerender. * (feat) Remove nodes out of screen. * (feat) Revert viewport. * (feat) Experiment with viewport. * (feat) Experiment with viewport. PoC works. * (feat) When node out of screen - remove it. * chore: Remove ununsed imports in Emitter --------- Co-authored-by: Mario Sarcevic <[email protected]> * Feat: Reimplement play/pause in Visualizer (#801) * (feat) Implement (re-connect) the pause button. On pause renderer should stop and useUpdateListener should stop listening for new blocks. Signed-off-by: Eugene Panteleymonchuk <[email protected]> * (feat) Implement (re-connect) the pause button. Update for vivagraph to have common interfaces and logic. Signed-off-by: Eugene Panteleymonchuk <[email protected]> --------- Signed-off-by: Eugene Panteleymonchuk <[email protected]> * (Fix) Improve behaviour when changing tabs. Current plan is to stop the stream (pause) and have it paused when you come back to tab. Signed-off-by: Eugene Panteleymonchuk <[email protected]> * (Feat) Implement a BPS tracker to be able to track the tangle speed reliably Signed-off-by: Eugene Panteleymonchuk <[email protected]> * Feat: Dynamic placement of nodes based on current BPS (#808) * (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]> * Fix: Address eslint warnings and revert some formatting changes (#815) * Prettier revert. pt1. * Prettier revert. pt2. * ESlint fixes. * Fixes after create PR. Remove more parts related to formatting. * Feat: Improve Visualizer performance (#816) * 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]> * Feat: Add render edges of tangle (#817) * 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 * Feat: highlight sphere on hover and set state on click. (#819) * 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]> * Refactoring: move "running" and "show edges" flags to useConfigStore. (#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 dynamic zoom (#823) * 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]> * Feat: Show block metadata on click (#832) * 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]> * chore: Remove unused code (past visualizer implementations). Move BSPCounter. * chore: Revert changes to stardust Visualizer * chore: Revert unneeded minor changes * chore: Move Visualizer Wrapper and related components to visualizer-three. Split the scss for stardust/nova visualizers * chore: Revert minor unneeded changes * chore: Remove test code about replay attack websocket * chore: Revert small change in stardust/Visualizer.tsx --------- Signed-off-by: Eugene Panteleymonchuk <[email protected]> Co-authored-by: Branko Bosnic <[email protected]> Co-authored-by: Eugene Panteleymonchuk <[email protected]> Co-authored-by: Eugene Panteleymonchuk <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Move "running" and "show edges" flags to useConfigStore.
Type of change
Choose a type of change, and delete any options that are not relevant.
How the change has been tested
Make sure that everything works as before.
Change checklist
Add an
x
to the boxes that are relevant to your changes, and delete any items that are not.