Some time ago I saw a needle example where screens displayed in real time the content of a threeJs camera placed at a particular location.
However, I no longer see this example, has this functionality been removed?
Hi, you could just use the RenderTexture (either assign in Unity or create it at runtime) and assign it to the camera. The texture can then be added to any material. That would be the easiest solution where you dont have to deal with blitting etc
I tried to add it like it :
const renderTexture = new RenderTexture()
GameObject.addComponent(this.context.mainCamera, renderTexture)
const planeGeometry = new THREE.PlaneGeometry(5, 5);
const planeMaterial = new THREE.MeshBasicMaterial({ map: renderTexture });
const plane = new THREE.Mesh(planeGeometry, planeMaterial);
this.context.scene.add(plane)
But I got error and I don’t find examples on the Needle Documentation
Yes I succeed
I don’t have Environnement Sphere, so I got a black background on my display, how can I change it ? (different color or make it transparent ?)