forked fromalgorithm-visualizer/tracers.js
- Notifications
You must be signed in to change notification settings - Fork0
📜Visualization Library for JavaScript
License
NotificationsYou must be signed in to change notification settings
sarangsurve/algorithm-visualizer--tracers.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository is part of the projectAlgorithm Visualizer.
tracers.js
is a visualization library for JavaScript.You can use it onalgorithm-visualizer.org or locally on your machine.
npm install algorithm-visualizer
// import visualization libraries {const{ Array2DTracer, Layout, LogTracer, Tracer, VerticalLayout}=require('algorithm-visualizer');// }// define tracer variables {constarray2dTracer=newArray2DTracer('Grid');constlogTracer=newLogTracer('Console');// }// define input variablesconstmessages=['Visualize','your','own','code','here!',];// highlight each line of messages recursivelyfunctionhighlight(line){if(line>=messages.length)return;constmessage=messages[line];// visualize {logTracer.println(message);array2dTracer.selectRow(line,0,message.length-1);Tracer.delay();array2dTracer.deselectRow(line,0,message.length-1);// }highlight(line+1);}(functionmain(){// visualize {Layout.setRoot(newVerticalLayout([array2dTracer,logTracer]));array2dTracer.set(messages);Tracer.delay();// }highlight(0);})();
Check out theAPI reference for more information.
Check out thecontributing guidelines.
About
📜Visualization Library for JavaScript
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Languages
- JavaScript50.2%
- TypeScript49.8%