![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@dj256/tuiomanager
Advanced tools
This fork includes some breaking changes to the [original TUIOManager](https://github.com/AtelierIHMTable/TUIOManager). TUIO events are now dispatched directly into the DOM, making the use of widgets obsolete whilst also simplifying the API.
This fork includes some breaking changes to the original TUIOManager. TUIO events are now dispatched directly into the DOM, making the use of widgets obsolete whilst also simplifying the API.
npm install @dj256/tuiomanager
<script src="https://cdn.jsdelivr.net/npm/@dj256/tuiomanager"></script>
In order to have TUIO events dispatched into the DOM, you need to initialize the TUIOManager:
import { TUIOManager } from '@dj256/tuiomanager';
TUIOManager.start();
<script>
TUIOManager.start();
</script>
You can configure the TUIOManager by passing an object to the start
method:
TUIOManager.start({ ...options });
The following options are available:
anchor
: HTMLElement
- The element that will be used as the origin for the TUIO coordinates. This is very important
as TUIO events are dispatched by matching the coordinates of the event with the elements on the page. If your
surface covers the whole page, you can leave this field empty. TUIOManager will the use the window's dimensions as
a reference.showInteractions
: boolean
- Whether to show the interactions on the page. Defaults to false
.showTagIds
: boolean
- Whether to show the tag IDs on the page. Defaults to false
.socketIOUrl
: string
- The URL of the socket.io server. Defaults to http://localhost:9000
.Once the TUIOManager is initialized, you can listen to TUIO events on any DOM element:
const element = document.getElementById('myElement');
element.addEventListener('tuiotouchdown', (event) => {
console.log(event.detail);
});
TUIOManager uses custom events, so you will need to access the event details through event.detail
.
All events are dispatched both on the elements that are at the event coordinates (uses document.elementsFromPoint
) and
on the document
object. It is recommended to listen to tuiotouchmove
, tuiotouchup
, tuiotagmove
and tuiotagup
events directly from the document
object. Thus, if you are implementing a dragging system, you will still receive the
events even if the touch event or tag moves outside boundaries of the element being dragged.
tuiotouchdown
Dispatched when a new touch is detected.
x
: The x coordinate of the touch eventy
: The y coordinate of the touch eventid
: The touch event ID
tuiotouchmove
Dispatched when the position of a touch changes.
x
: The x coordinate of the touch eventy
: The y coordinate of the touch eventid
: The touch event ID
tuiotouchup
Dispatched when a touch is deleted.
x
: The x coordinate of the touch eventy
: The y coordinate of the touch eventid
: The touch event ID
tuiotagdown
Dispatched when a tag is placed on the surface.
x
: The x coordinate of the tag eventy
: The y coordinate of the tag eventangle
: The angle of the tagid
: The ID of the tag
tuiotagmove
Dispatched when the position of a tag changes. This event is also dispatched when the angle of the tag changes.
x
: The x coordinate of the tag eventy
: The y coordinate of the tag eventangle
: The angle of the tagid
: The ID of the tag
tuiotagup
Dispatched when a tag is removed from the surface.
x
: The x coordinate of the tag eventy
: The y coordinate of the tag eventangle
: The angle of the tagid
: The ID of the tag
When designing applications that allow multiple simultaneous touches or tags, you can make use of the id
field of the
events to keep track of the different touches or tags. Each new touch has a unique ID, and a tag will always have the
same ID. This means that you can use the same event listener for all touches or tags, and use the id
field to
distinguish between them.
You can find some examples in the examples
folder. To test them, you can simply open the index.html
file in your
browser. If you want to play around with the examples' code and see live edits, you can use lite-server
like so:
# Install lite-server if you haven't already
npm install -g lite-server
cd examples/simple-drag
lite-server
FAQs
This fork includes some breaking changes to the [original TUIOManager](https://github.com/AtelierIHMTable/TUIOManager). TUIO events are now dispatched directly into the DOM, making the use of widgets obsolete whilst also simplifying the API.
The npm package @dj256/tuiomanager receives a total of 1 weekly downloads. As such, @dj256/tuiomanager popularity was classified as not popular.
We found that @dj256/tuiomanager demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.