FBX model doesn't show, what should I do?

Hey there!
I’m new to three.js and I want to display a .FBX model but it doesn’t show it

Console: https://gyazo.com/8586dc659cd93053d23f662d907b28ef

    <html>
    	<head>
    		<title>My first three.js app</title>
    		<style>
    			body { margin: 0; }
    			canvas { width: 100%; height: 100% }
    		</style>
    	</head>
    	<body>
    		<script src="js/three.js"></script>
    		<script src="js/FBXLoader.js"></script>
    		<script src="js/inflate.min.js"></script>
    		<script>
    			var scene = new THREE.Scene();
    			var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 1000 );

    			var renderer = new THREE.WebGLRenderer();
    			renderer.setSize( window.innerWidth, window.innerHeight );
    			document.body.appendChild( renderer.domElement );

          var loader = new THREE.FBXLoader();

          loader.load(
    				'cube.fbx',
    				 function( object ) {
    					 scene.add( object );
    				 }
    			)

    			camera.position.z = 5;

    			var animate = function () {
    				requestAnimationFrame( animate );
    				renderer.render( scene, camera );
    			};
    			animate();
    		</script>
    	</body>
    </html>

Try to add some lights to your scene and see if it solves your problem. Something like:

var ambientLight = new THREE.AmbientLight( 0xcccccc, 0.4 );
scene.add( ambientLight );

var pointLight = new THREE.PointLight( 0xffffff, 0.8 );
camera.add( pointLight );
scene.add( camera );

Its still black :confused:

Can you please share the FBX in this thread?

It’s just a basic cube from Blender

cube.fbx (25.4 KB)

If you are able to import a model from three.js and not able to make your cube visible - Thats what happened to me a few times - its probably a size issue. Scale your object big enough.

Your object loads in the three.js editor just fine:

However, it will be easier to see if you set the scaling to 1. By default, it has a scale of 100 (which should not be necessary).

image

Okay thanks I will try that