i'm trying to add a ThreeJS video mesh to a matterport space
here is my code:
const video = document.createElement("video");
video.src=".......";
video.onloadeddata = function(){
video.play();
}
const videoTextire = new THREE.VideoTexture(video);
videoTextire.needsUpdate = true;
const videoMaterial = new THREE.MeshBasicMaterial({
map: videoTextire,
side: THREE.FrontSide,
tonrMapped: false,
});
videoMaterial.needsUpdate = true;
const screen = new THREE.PlaneGeometry(10,10);
const videoScreen = new THREE.Mesh(screen, videoMaterial);
now, i have an already initialized matterport space, how can i inject this "videoScreen" into the space?
i know that matterport use ThreeJs under the hood, but how can i add my object?
i tried to create ad object, such as:
const [sceneObject]= await sdk.Scene.createObjects(1);
var node = sceneObject.addNode();
but i don't know how to continue