Hello @Adwait Naik ,
welcome to this moderated Azure community forum.
Microsoft Azure Digital Twins as an environment for keeping the latest state of digital twins.
Using custom logic in Azure Functions or Logic Apps data can be ingested into the environment.
The true value are the relationships helping event to travel through the environment, from twin to twin (again using custom logic).
By default, Microsoft offers 3D Scenes Studio to visualize the twin environment but you can your own visualization like WebXR.
WebXR works withi the browser and needs to be triggered with telemetry/digital twin updates.
Luckily, the ADT environment exposes any Digital Twin changes via 'endpoints'.
Routing event notifications from Azure Digital Twins to downstream services or connected compute resources is a two-step process: create endpoints, then create event routes to send data to those endpoints.
So you need to create an endpoint (eg. to EventGrid, EventHub, or Service bus) and route message towards it:
Next, to update the WebXR logic in the browser, I recommend using WebSockets or SignalR.
An Azure Function forwards the message then.
So you need a service like Azure Web PubSub or Azure SignalR Service.
These services can route messages to logic running in browsers when there is client code running in that browser.
An example of a SignalR client is shown here.
Finally, your flow will probably look like:
Azure Digital Twins environment ->
Route to Digital Twins change events (Event Hub) endpoint ->
Event Hub receiving and publishing events ->
Azure Function subscribed to change events, outputting them to a SignalR service ->
SignalR service sends all incoming messages to clients running in browsers ->
Client logic in browser manipulates your WebXR model with incoming event
Yes, there are multiple (little) steps needed to get this working but this must be doable for a regular developer.
Success!
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.