I’ve been using Three.JS within a PowerBI visual template in order to visualise meshes however everything I visualise appears to come in very skewed. I used a cube boilerplate that appears like this:
these are my settings:
this.target = options.element;
this.updateCount = 0;
this.scene = new THREE.Scene();
this.camera = new THREE.PerspectiveCamera(75,100,0.1,1000);
this.renderer = new THREE.WebGLRenderer({antialias:true});
this.renderer.setSize(window.innerHeight,window.innerWidth);
this.geometry = new THREE.BoxGeometry(1,1,1);
this.materials = new THREE.MeshBasicMaterial({color: 0x00ff00});
this.mesh = new THREE.Mesh(this.geometry, this.materials);
this.scene.add(this.mesh);
this.camera.position.z=3;
this.renderer.render(this.scene, this.camera);
new OrbitControls(this.camera,this.renderer.domElement);
Have tried an orthographic camera but couldn’t get things to visualise at all.
any assistance would be much appreciated
Regards