From f6adc011f5468060bad0087f4a944cde49904984 Mon Sep 17 00:00:00 2001 From: Akseli Palen Date: Fri, 15 Dec 2023 04:55:05 +0200 Subject: [PATCH 1/4] improve Viewport:measureDilation docs --- lib/components/Viewport/measureDilation.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/components/Viewport/measureDilation.js b/lib/components/Viewport/measureDilation.js index b686d218..8c7b9756 100644 --- a/lib/components/Viewport/measureDilation.js +++ b/lib/components/Viewport/measureDilation.js @@ -5,6 +5,7 @@ module.exports = function (component) { // @Viewport:measureDilation(component) // // Measure dilation of the given component with respect to the viewport. + // In other words, get component's scale relative to the viewport. // // Parameters: // component From 2970e6056a6c7ee8dfb6bb4545744d1f7722f2b2 Mon Sep 17 00:00:00 2001 From: Akseli Palen Date: Fri, 15 Dec 2023 04:55:39 +0200 Subject: [PATCH 2/4] improve api v2 intro --- docs/api/index.md | 2 +- docs/api/v2/intro.js | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index 3cff1366..b5faeb31 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -3,6 +3,6 @@ Choose version: - [Tapspace v1.6.0 API Docs](https://taataa.github.io/tapspace/api/v1/) -- [Tapspace v2.0.0-alpha API Docs](v2/) +- [Tapspace v2.0.0 API Docs](v2/) Or go [back to introduction](../) diff --git a/docs/api/v2/intro.js b/docs/api/v2/intro.js index e8e10c63..ddf3e1fe 100644 --- a/docs/api/v2/intro.js +++ b/docs/api/v2/intro.js @@ -1,11 +1,16 @@ module.exports = ` -Welcome to Tapspace.js API documentation. -Build your zoomable application with the tools documented here. -For older versions, see [Tapspace.js API docs index](https://taataa.github.io/tapspace/api/) +Choose version: [v1](https://taataa.github.io/tapspace/api/) – [v2](#) -This document follows these naming conventions: \`ClassName\`, \`namespace\`, \`.CONSTANT\`, \`.classMethod()\`, \`:instanceProperty\`, \`:instanceMethod()\`, \`[optionalParameter]\`, and \`optionalProperty?\`. +**Welcome** to Tapspace.js API documentation. +Build your zoomable application with the classes and methods documented here. +This document is generated with [yamdog](https://github.com/axelpale/yamdog). -See also: [Introduction](https://taataa.github.io/tapspace/) – [Examples](https://taataa.github.io/tapspace/#examples) – [Tutorial](https://taataa.github.io/tapspace/tutorial/) - [Glossary](https://taataa.github.io/tapspace/glossary/v2/) - [GitHub](https://github.com/taataa/tapspace) +You might want to look [examples](https://taataa.github.io/tapspace/#examples) +and [tutorial](https://taataa.github.io/tapspace/tutorial/) to learn how to combine +classes and method calls to build your first zoomable applications. Rely on the API documentation +when you are ready to get wild. -This document is generated with [yamdog](https://github.com/axelpale/yamdog). +**Naming convention** of the document: \`ClassName\`, \`namespace\`, \`.CONSTANT\`, \`.classMethod()\`, \`:instanceProperty\`, \`:instanceMethod()\`, \`[optionalParameter]\`, and \`optionalProperty?\`. + +See also: [Introduction](https://taataa.github.io/tapspace/) – [Examples](https://taataa.github.io/tapspace/#examples) – [Tutorial](https://taataa.github.io/tapspace/tutorial/) - [Glossary](https://taataa.github.io/tapspace/glossary/v2/) - [GitHub](https://github.com/taataa/tapspace) ` From 2537ca3ada7e2e5d8ce7636b3babdc5aefb0b967 Mon Sep 17 00:00:00 2001 From: Akseli Palen Date: Fri, 15 Dec 2023 04:56:07 +0200 Subject: [PATCH 3/4] write general technical docs in README --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index cfb6aea0..00505c1a 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,27 @@ See [taataa.github.io/tapspace](http://taataa.github.io/tapspace) for: - [API Reference](https://taataa.github.io/tapspace/api/v2/) - [Developer's Cheat Sheet](http://taataa.github.io/tapspace/dev) +**In a nutshell**, Tapspace.js consists of component classes that each wrap an HTML element. +These classes allow the elements to be positioned freely on a transformable and infinite space. +A hierarchy of these components form a subtree in the browser DOM. +This subtree, which we call the *affine subtree*, has a tensor matrix backbone that +makes projecting points, vectors, and other geometry between the components +**extremely easy**. + +Most of the methods in Tapspace, like Viewport:translateBy, +take in tensor geometry objects, like Point, Distance, and Box. +The tensor aspect makes the geometries exist in all coordinate spaces at the same time, +practically freeing you from the need to think how to transit geometry from +an HTML element coordinate space into another coordinate space like onto the viewport or another element. +This comes handy with – and does enable – wild arrangements of components in various scales and angles, +and dynamic interaction driven with multitouch, mouse, or other input devices. + +Under the hood Tapspace.js uses CSS 2D transforms. In comparison with CSS 3D transforms, +2D offers unbeatable rendering speed, full browser compatibility, and ease of navigation. +Even CSS 2D transforms can slow down under thousands of elements and break in deep depths. +Large, deep, or infinite visualisations can use tapspace.loaders.TreeLoader +to **escape the limits of browser rendering engine and floating point arithmetics.** + ## Supporters We have developed Tapspace.js in collaboration with the following organizations. From 95f3b333e1d1a89763c900aee212b04aa02f290f Mon Sep 17 00:00:00 2001 From: Akseli Palen Date: Fri, 15 Dec 2023 04:56:29 +0200 Subject: [PATCH 4/4] render v2 docs --- docs/api/v2/index.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/api/v2/index.md b/docs/api/v2/index.md index 67e991bf..956033cf 100644 --- a/docs/api/v2/index.md +++ b/docs/api/v2/index.md @@ -2,15 +2,20 @@ # Tapspace API Documentation v2.0.0-alpha.22 -Welcome to Tapspace.js API documentation. -Build your zoomable application with the tools documented here. -For older versions, see [Tapspace.js API docs index](https://taataa.github.io/tapspace/api/) +Choose version: [v1](https://taataa.github.io/tapspace/api/) – [v2](#) -This document follows these naming conventions: `ClassName`, `namespace`, `.CONSTANT`, `.classMethod()`, `:instanceProperty`, `:instanceMethod()`, `[optionalParameter]`, and `optionalProperty?`. +**Welcome** to Tapspace.js API documentation. +Build your zoomable application with the classes and methods documented here. +This document is generated with [yamdog](https://github.com/axelpale/yamdog). -See also: [Introduction](https://taataa.github.io/tapspace/) – [Examples](https://taataa.github.io/tapspace/#examples) – [Tutorial](https://taataa.github.io/tapspace/tutorial/) - [Glossary](https://taataa.github.io/tapspace/glossary/v2/) - [GitHub](https://github.com/taataa/tapspace) +You might want to look [examples](https://taataa.github.io/tapspace/#examples) +and [tutorial](https://taataa.github.io/tapspace/tutorial/) to learn how to combine +classes and method calls to build your first zoomable applications. Rely on the API documentation +when you are ready to get wild. -This document is generated with [yamdog](https://github.com/axelpale/yamdog). +**Naming convention** of the document: `ClassName`, `namespace`, `.CONSTANT`, `.classMethod()`, `:instanceProperty`, `:instanceMethod()`, `[optionalParameter]`, and `optionalProperty?`. + +See also: [Introduction](https://taataa.github.io/tapspace/) – [Examples](https://taataa.github.io/tapspace/#examples) – [Tutorial](https://taataa.github.io/tapspace/tutorial/) - [Glossary](https://taataa.github.io/tapspace/glossary/v2/) - [GitHub](https://github.com/taataa/tapspace) @@ -4714,6 +4719,7 @@ Source: [measureAll.js](https://github.com/taataa/tapspace/blob/master/lib/compo ## [tapspace](#tapspace).[components](#tapspacecomponents).[Viewport](#tapspacecomponentsviewport):[measureDilation](#tapspacecomponentsviewportmeasuredilation)(component) Measure dilation of the given component with respect to the viewport. +In other words, get component's scale relative to the viewport.

Parameters: