Browse Source

fixed shadows sample, added hl templates

Nicolas Cannasse 9 năm trước cách đây
mục cha
commit
0c5978a71a
3 tập tin đã thay đổi với 65 bổ sung2 xóa
  1. 3 2
      samples/Shadows.hx
  2. 6 0
      samples/templates/__name_hl.hxml
  3. 56 0
      samples/templates/__name_hl.hxproj

+ 3 - 2
samples/Shadows.hx

@@ -16,7 +16,7 @@ class Shadows extends hxd.App {
 		m.material.mainPass.enableLights = true;
 		m.material.shadows = true;
 
-		var sphere = new h3d.prim.Sphere(32,24);
+		var sphere = new h3d.prim.Sphere(1, 32, 24);
 		sphere.addNormals();
 		spheres  = [];
 		for( i in 0...15 ) {
@@ -34,8 +34,9 @@ class Shadows extends hxd.App {
 		s3d.lightSystem.ambientLight.set(0.5, 0.5, 0.5);
 
 		dir = new h3d.scene.DirLight(new h3d.Vector(-0.3, -0.2, -1), s3d);
+		dir.enableSpecular = true;
 		s3d.lightSystem.shadowLight = dir;
-		
+
 		shadow = cast(s3d.renderer.getPass("shadow"), h3d.pass.ShadowMap);
 		shadow.blur.passes = 3;
 	}

+ 6 - 0
samples/templates/__name_hl.hxml

@@ -0,0 +1,6 @@
+-lib heaps
+-cp ../..
+-hl ::name::.hl
+-lib hlsdl
+-main ::main::
+::params::

+ 56 - 0
samples/templates/__name_hl.hxproj

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project version="2">
+  <!-- Output SWF options -->
+  <output>
+    <movie outputType="CustomBuild" />
+    <movie input="" />
+    <movie path="::name::.hl" />
+    <movie fps="60" />
+    <movie width="1280" />
+    <movie height="800" />
+    <movie version="14" />
+    <movie minorVersion="0" />
+    <movie platform="Flash Player" />
+    <movie background="#FFFFFF" />
+  </output>
+  <!-- Other classes to be compiled into your SWF -->
+  <classpaths>
+    <class path="..\.." />
+  </classpaths>
+  <!-- Build options -->
+  <build>
+    <option directives="" />
+    <option flashStrict="True" />
+    <option noInlineOnDebug="False" />
+    <option mainClass="::main::" />
+    <option enabledebug="False" />
+    <option additional="::params.split("\n").join("&#xA;")::" />
+  </build>
+  <!-- haxelib libraries -->
+  <haxelib>
+    <library name="heaps" />
+  </haxelib>
+  <!-- Class files to compile (other referenced classes will automatically be included) -->
+  <compileTargets>
+    <!-- example: <compile path="..." /> -->
+  </compileTargets>
+  <!-- Assets to embed into the output SWF -->
+  <library>
+    <!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
+  </library>
+  <!-- Paths to exclude from the Project Explorer tree -->
+  <hiddenPaths>
+  </hiddenPaths>
+  <!-- Executed before build -->
+  <preBuildCommand>haxe ::name::_hl.hxml</preBuildCommand>
+  <!-- Executed after build -->
+  <postBuildCommand alwaysRun="False" />
+  <!-- Other project options -->
+  <options>
+    <option showHiddenPaths="False" />
+    <option testMovie="Custom" />
+    <option testMovieCommand="hl ::name::.hl" />
+  </options>
+  <!-- Plugin storage -->
+  <storage />
+</project>