I am struggling to showcase a textured plane using Three.js within the context of Forge RCDB. Initially, I was able to render the plane; however, it appeared completely black instead of being textured... After making some adjustments, now nothing is showing up on the screen...
Below is my code snippet :
render () {
var viewer = NOP_VIEWER;
var scene = viewer.impl.scene;
var camera = viewer.autocamCamera;
var renderer = viewer.impl.renderer();
renderer.render( scene, camera );
}
In the function intended to display the textured plane :
new THREE.TextureLoader(texture).load(texture, this.render);
tex.wrapS = THREE.RepeatWrapping //ClampToEdgeWrapping //MirroredRepeatWrapping
tex.wrapT = THREE.RepeatWrapping //ClampToEdgeWrapping //MirroredRepeatWrapping
tex.mapping = THREE.UVMapping
Initially, I used loadTexture(). Although I managed to showcase my plane, it appeared entirely black without any texture applied.
Subsequently, I switched to THREE.TextureLoader().load(), which seems to be searching for the image on localhost. The image gets downloaded successfully as I can see it in the console.
However, I am now encountering the following errors :
Uncaught TypeError: scope.manager.itemStart is not a function
and :
Uncaught TypeError: renderer.render is not a function
Currently, the object isn't visible at all, not even in black.
Hence, I suspect there might be an issue related to the rendering process, but I'm having trouble pinpointing it...