Part of the Khronos Group
Results 1 to 3 of 3

Thread: I can't see anything

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    3

    I can't see anything

    Hello to all

    I am a french beginner with a bad English

    I try to show a file dae in a html file, via three.js and ColladaLoader.
    Unfortunately I see only an empty page, not even an error message.
    I probably forgot something.
    I used OpenCollada export under max 2012.
    I'm using Firefox

    Thank you so much for your help

    Here's the code:
    HTML Code:
       <head>
    	<meta charset="utf-8" />  
    		<script type='text/javascript' src="js/three.js"></script>
    		<script type='text/javascript' src="js/ColladaLoader.js"></script>
        </head>
    	<body>
     <div id="container"></div>
      
      <script type="text/javascript">
      
    	var renderer, scene, camera, mesh, result-scene;
    
    init();
    
    function init(){
        // on initialise le moteur de rendu
        //renderer = new THREE.WebGLRenderer();
    
        // si WebGL ne fonctionne pas sur votre navigateur vous pouvez utiliser le moteur de rendu Canvas à la place
        renderer = new THREE.CanvasRenderer();
        renderer.setSize( window.innerWidth, window.innerHeight );
        document.getElementById('container').appendChild(renderer.domElement);
    
        // on initialise la scène
        scene = new THREE.Scene();
    
        // on initialise la camera que l’on place ensuite sur la scène
        camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 1, 10000 );
        camera.position.set(0, 0, 1000);
        scene.add(camera);
        
    	var loader = new THREE.ColladaLoader();
    	//loader.options.convertUpAxis = true;
    	loader.load( 'diabolo.dae',function colladaReady( collada ) {
    
    	model = collada.scene;
    	model_geometry = collada.scene.children[ 0 ].geometry;
    	model_material = collada.scene.children[ 0 ].material;
    
    	model.scale.set(10.0, 10.0, 10.0);
    	model.updateMatrix();
    	});
    }
      </script>
      </body>

  2. #2
    Junior Member
    Join Date
    Jan 2014
    Posts
    3
    It works exporting .dae from Blender

  3. #3
    Junior Member
    Join Date
    Feb 2014
    Posts
    1
    Can javaScript create rich interactivity? Can JavaScript create a rich interactive site like animations that when rolled over play out, or an interactive object that can be drug around the screen like a type of video game of sorts? or is Javascript limited to just hover buttons and photo gallery's thing like that?
    ____________________________
    supplier garden ~ gardening ~ garden supply
    Last edited by andrikaa; 03-01-2014 at 08:27 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •