Nicolas Cannasse 11 年之前
父節點
當前提交
34c9387fda
共有 4 個文件被更改,包括 5 次插入3 次删除
  1. 2 2
      h3d/shader/ColorAdd.hx
  2. 1 0
      samples/2d/demo.hxml
  3. 1 1
      samples/2d/demo.hxproj
  4. 1 0
      samples/basic/index.html

+ 2 - 2
h3d/shader/ColorAdd.hx

@@ -13,9 +13,9 @@ class ColorAdd extends hxsl.Shader {
 		
 	};
 	
-	public function new( ?color : Int ) {
+	public function new( color : Int = 0 ) {
 		super();
-		if( color != null ) this.color.setColor(color);
+		this.color.setColor(color);
 	}
 
 }

+ 1 - 0
samples/2d/demo.hxml

@@ -4,3 +4,4 @@
 -dce full
 -D resourcesPath=../res
 -D source-map-content
+--macro include('h2d')

+ 1 - 1
samples/2d/demo.hxproj

@@ -23,7 +23,7 @@
     <option flashStrict="False" />
     <option mainClass="Main" />
     <option enabledebug="False" />
-    <option additional="-lib heaps&#xA;-dce full&#xA;-D resourcesPath=../res&#xA;-D source-map-content" />
+    <option additional="-lib heaps&#xA;-dce full&#xA;-D resourcesPath=../res&#xA;-D source-map-content&#xA;--macro include('h2d')" />
   </build>
   <!-- haxelib libraries -->
   <haxelib>

+ 1 - 0
samples/basic/index.html

@@ -1,4 +1,5 @@
 <html>
+<head><meta charset="utf-8"/></head>
 <body style="margin:0;padding:0;background-color:black">
 	
 	<canvas id="webgl" style="width:100%;height:100%"></canvas>