This project, built with p5.js, is an interactive visualizer for exploring the hierarchical structure of a book described in a JSON format. Users can navigate through chapters and paragraphs by expanding or collapsing nodes with a click.
You can explore a sample book structure directly in your browser. Click on titles to expand or collapse sections and interact with the hierarchy visually.
- Tree-like visualization of book contents (titles, chapters, paragraphs)
- Click to expand/collapse nodes
- Highlight nodes on mouse hover
- p5.js library (included via CDN or local import)
- A
book.jsonfile containing the book structure with fields liketitolo,riassunto,capitoli, andparagrafi
Example of the expected JSON format:
{
"titolo": "Book Title",
"riassunto": "General description",
"capitoli": [
{
"titolo": "Chapter 1",
"riassunto": "Chapter introduction",
"paragrafi": [
{
"titolo": "Paragraph 1.1",
"riassunto": "Paragraph content"
}
]
}
]
}