JSON Canvas Viewer
A front-end library that ships an extensible viewer for JSON Canvas, with easy integration with any existing frameworks and paradigms.
A front-end library that ships an extensible viewer for JSON Canvas, with easy integration with any existing frameworks and paradigms.
Work: Constructs interactive canvas elements and manages element interactions and rendering.
Work: Uses Pointeract to listen to interactions on the viewer and translate to DataManager method calls.
Work: Renders all groups, edges and labels that doesn't need interactivity.
Work: Initializes the canvas, manages states, and provides canvas control mathods.
Work: Controls lazy loading, provides start and dispose hooks, and manages modules.
Work: Controls main render loop and handles viewer resize
Work: Generates applies and caches color palette. Controls viewer theme toggling.
Above illustration of the architecture of JSON Canvas Viewer is an instance of itself, with modules Minimap, Controls, and MistouchPreventer loaded.
Obsidian ships a powerful tool called JSON Canvas, it enables me to think in a non-linear style, perfect for usages like complex state machines or dependency graphs. While it's sufficient for personal use, it's hard to share with others since there's no mature way to view it outside Obsidian.
JSON Canvas Viewer comes to solve this problem, it is a TypeScript-based viewer for JSON Canvas files that enables users to view and interact with canvases directly in a browser, or embed the viewer in websites with ease. It is built without a framework so it is easily embeddable into any framework.
.canvas) in a web browserMinimap for easy navigationControls displays zoom in/out and fullscreen buttonsMistouchPreventer prevents the canvas from intercepting page scroll.DebugPanel displays scale and position data.JSON Canvas Viewer currently can work seamlessly with the following techstacks / technologies (including but not limited to):
renderToStringFor more about JSON Canvas Viewer, please go to the GitHub Repo.
JSON Canvas Viewer is licensed under the MIT License.