Explorar o código

Added creation of meshes for CTM files in the editor.

alteredq %!s(int64=13) %!d(string=hai) anos
pai
achega
14f89de13d
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      editor/index.html

+ 6 - 1
editor/index.html

@@ -127,7 +127,12 @@
 						var loader = new THREE.CTMLoader();
 						loader.createModelClassic( file, function( geometry ) {
 
-							console.log( geometry );
+							var material = new THREE.MeshLambertMaterial();
+
+							var mesh = new THREE.Mesh( geometry, material );
+
+							signals.objectAdded.dispatch( mesh );
+							signals.objectSelected.dispatch( mesh );
 
 						} );