Pacem2DElement
is the stage element for 2D drawings.
It must be associated with a Pacem2DAdapterElement
in orderr to work, since it is agnostic about the rendering process.
The adapter reference can be seamlessly switched between the two available implementations: one SVG-based and the other one WebGL-based.
The following example shows how the stage emitted events are powered with coordinate transformations:
Drag the square around and see the stage coordinates changing while moving, or just click the empty portions of the stage to pop a toast bringing the relevant stage coordinates.
Experimental/fun applications based on Pacem JS 2D drawings library:
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.