How to dynamically add a SyncedTransform to a loaded object

yeahā€¦ I didnā€™t know what they were for and didnā€™t fill them outā€¦ looked at the code and it was only using them if they were providedā€¦ the drop events were working without them so I thought i didnā€™t need them but maybe they are needed for the syncing to work between clients

by user 563549194137239552

I tried just supplying the URL of the local server but itā€™s giving an error

by user 563549194137239552

They are needed, maybe the comment on the listener component is not explicit enough about it

ahhā€¦ okā€¦ good to knowā€¦ do i need to implement some method in my code to handle the upload?

by user 563549194137239552

No but for local dev you might need to run the file server locally or allow cors on your glitch instance that youā€™re using

Iā€™m getting connection refused even on the machine where i am running the srver

by user 563549194137239552

Iā€™m not sure what I am supposed to do to run the file serverā€¦ is it different from just running the need app? Can I add a method to the needle app to make it a file server?

by user 563549194137239552

You need to have the @needle-tools/needle-tiny-storage installed and a fastify (or express, not sure if it supports both) server running and then set it up like so:

import storage from "@needle-tools/needle-tiny-storage";
storage.initFastify(fastify, { registerPlugins: true });

you can check what the glitch starter does there (in server.js line 45)

Coolā€¦ will check it out

by user 563549194137239552

OK. So using only the DropListener.ts in the NT distro, if I provide the backend URL for the glitch.io server as the main address of the Glitch app (https://fsstudio-review-poc.glitch.me) when I drag a GLB file into the main app, it does show up on another machine when both instances are using the glitch.io server and in the same room.

by user 563549194137239552