I'm currently troubleshooting an issue with my project. I have a three.js sphere ("HTML1" on Desktop) with controls (THREE.OrbitControls) that is functioning properly on both my computer and tablet. My goal is to control this sphere through my iPad, so I created a blank scene on an HTML file ("HTML2") running on my iPad. This blank three.js sphere also has control functions that I want to send to a server (socket.io), which will then relay them to the Desktop Sphere ("HTML1").
However, I am encountering an issue with my server. It is receiving data from the Tablet but not sending it to the Desktop (or the Desktop is not receiving it).
io.on('connection', function(socket){
socket.on('cameraControls', function(controls){
socket.emit('sendControls', function(controls) {
console.log('Controls');
});
});
console.log('a user connected');
});
The data sent from the iPad ("HTML2") (loaded in the render function):
socket.emit('cameraControls', function(controls){});
The data received by the Desktop Sphere (also loaded in the render function):
socket.on('sendControls', function(controls){
//this.controls = controls;
console.log("got EVENT");
});
I am seeking advice on this issue as this is my first time working with socket.io. There are no errors in the Terminal or the Console Log, so I am unsure of where I am going wrong.