Now you are aware of the most important APIs of iinkTS let’s dive into OffScreen Interactivity specificities.

Integration fully based on iinkTS

GetStarted

You can see below an example fully based on iinkTS: It uses iinkTS ink capture, rendering and model. To use this integration option, all you need is to call iinkTS Editor load method with the INTERACTIVEINK mode (See also Editing).

This instantiates an InteractiveInkEditor object that defines and instantiates all the objects used by the offscreen interactivity.

View demo Get source code

We provide a set of ready-to-use menus:

All you have to do is configure whether you want to show or hide these menus:

View demo Get source code

Configuration customization

While the InteractiveInkEditor object comes with a default configuration you can easily customize it, by providing your own options on creation:

View demo Get source code

For more details, you can also refer to the configuration reference page

Styling

You can modify the following styling properties:

editor.updateSymbolsStyle([stroke1.id], {  width: 42, color: "#808080" , fill: "#ffff00" , opacity: 50 })
editor.updateTextFontStyle([text.id],{ fontSize: 20, fontWeight: "bold" })
const options = {
  configuration: {
    rendering: {
      guides: {
        gap: 25,
        type: "line"
      }
    }
  }
}

Integration based on another canvas rendering

You can also use your own framework for ink capture, rendering and model and use the IIRecognizer to send strokes updates to our recognition Engine and receive all server updates.

We have developed a React app example based on a tldraw canvas to illustrate such a custom integration:

View demo Get source code

This example is based on the following main objects:

Please refer to this callflow for a more detailed description of these objects and how they interact with iinkTS and tldraw:

Converter
Converter
TLDraw
TLDraw
IIRecognizer
OIRecognizer
Synchronizer
Synchronizer
Gesture
Gesture
User
User
draw shape/draw
draw shape/draw
store changes event
store changes event
shape/draw on empty space
shape/draw on empty space
addStroke
addStroke
shape/draw on shape/draw
shape/draw on shape/draw
apply gesture
apply gesture
Select or remove shape & remove shape/draw
Select or remove shape & remove shape/draw
remove shape/draw
remove shape/draw
addStroke
addStroke
up-to-date display
up-to-date display
shape/draw on shape/geo or shape/text
shape/draw on shape/geo or shape/text
contextLessGesture
contextLessGesture
addStroke
addStroke
return undefine
return undefine
shape/draw on shape/geo or shape/text
shape/draw on shape/geo or shape/text
contextLessGesture
contextLessGesture
addStroke
addStroke
apply gesture
apply gesture
Select or remove shape & remove shape/draw
Select or remove shape & remove shape/draw
return gesture
return gesture
remove shape/draw
remove shape/draw
remove shape/draw
remove shape/draw
up-to-date display
up-to-date display
update shape/draw
update shape/draw
replaceStroke
replaceStroke
store changes event
store changes event
return none
return none
return
return
remove shape/draw
remove shape/draw
eraseStroke
eraseStroke
store changes event
store changes event
return
return
convert
convert
convert
convert
return undefine
return undefine
eraseStrokes
eraseStrokes
remove shape/draw create shape/geo or shape/text
remove shape/draw create shape/geo or shape/text
remove shape/draw
remove shape/draw
return gesture
return gesture
SDK to craft infinite canvas experiences for the web
SDK to craft infinit…
object layer to be developed for integration
object layer to be developed for integration
object provided by iink-TS
object provided by i…
remove shape/draw
remove shape/draw
Text is not SVG - cannot display