Skip to content

Commit

Permalink
fixed shadows sample, added hl templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Oct 30, 2016
1 parent ea715e3 commit 0c5978a
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
5 changes: 3 additions & 2 deletions samples/Shadows.hx
Expand Up @@ -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 ) {
Expand All @@ -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;
}
Expand Down
6 changes: 6 additions & 0 deletions samples/templates/__name_hl.hxml
@@ -0,0 +1,6 @@
-lib heaps
-cp ../..
-hl ::name::.hl
-lib hlsdl
-main ::main::
::params::
56 changes: 56 additions & 0 deletions 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>

0 comments on commit 0c5978a

Please sign in to comment.