소스 검색

adjusted camera

Nicolas Cannasse 10 년 전
부모
커밋
51c5b7ed76
4개의 변경된 파일7개의 추가작업 그리고 8개의 파일을 삭제
  1. 3 3
      samples/shadows/Main.hx
  2. 1 2
      samples/shadows/shadows.hxml
  3. 1 1
      samples/shadows/shadows.hxproj
  4. 2 2
      samples/skin/Main.hx

+ 3 - 3
samples/shadows/Main.hx

@@ -29,8 +29,8 @@ class Main extends hxd.App {
 			p.material.shadows = true;
 			p.material.color.setColor(Std.random(0x1000000));
 		}
-		s3d.camera.zNear = 2;
-		s3d.camera.zFar = 15;
+		s3d.camera.zNear = 6;
+		s3d.camera.zFar = 30;
 		s3d.lightSystem.ambientLight.set(0.5, 0.5, 0.5);
 
 		dir = new h3d.scene.DirLight(new h3d.Vector(-0.3, -0.2, -1), s3d);
@@ -41,7 +41,7 @@ class Main extends hxd.App {
 	}
 
 	override function update( dt : Float ) {
-		s3d.camera.pos.set(6, 6, 3);
+		s3d.camera.pos.set(12, 12, 6);
 		time += dt * 0.01;
 		dir.direction.set(Math.cos(time), Math.sin(time) * 2, -1);
 	}

+ 1 - 2
samples/shadows/shadows.hxml

@@ -14,5 +14,4 @@
 -dce full
 -main Main
 -lib heaps
--lib nme
---remap flash:nme
+-lib hxsdl

+ 1 - 1
samples/shadows/shadows.hxproj

@@ -24,7 +24,7 @@
     <option noInlineOnDebug="False" />
     <option mainClass="Main" />
     <option enabledebug="False" />
-    <option additional="-lib heaps&#xA;-dce full&#xA;&#xA;--next&#xA;-swf shadows.swf&#xA;-lib heaps&#xA;-dce full&#xA;-swf-version 11.8&#xA;-swf-header 1024:768:60&#xA;-main Main&#xA;&#xA;--next&#xA;-cpp bin&#xA;-dce full&#xA;-main Main&#xA;-lib heaps&#xA;-lib nme&#xA;--remap flash:nme" />
+    <option additional="-lib heaps&#xA;-dce full&#xA;&#xA;--next&#xA;-swf shadows.swf&#xA;-lib heaps&#xA;-dce full&#xA;-swf-version 11.8&#xA;-swf-header 1024:768:60&#xA;-main Main&#xA;&#xA;--next&#xA;-cpp bin&#xA;-dce full&#xA;-main Main&#xA;-lib heaps&#xA;-lib hxsdl" />
   </build>
   <!-- haxelib libraries -->
   <haxelib>

+ 2 - 2
samples/skin/Main.hx

@@ -7,7 +7,7 @@ class Main extends hxd.App {
 		var obj = prim.makeObject(loadTexture);
 		obj.scale(0.1);
 		s3d.addChild(obj);
-		s3d.camera.pos.set( -2, -3, 2);
+		s3d.camera.pos.set( -3, -5, 3);
 		s3d.camera.target.z += 1;
 
 		obj.playAnimation(prim.loadAnimation());
@@ -35,7 +35,7 @@ class Main extends hxd.App {
 	}
 
 	static function main() {
-		hxd.Res.initEmbed({ createHMD : true });
+		hxd.Res.initEmbed();
 		new Main();
 	}