Forráskód Böngészése

fixes with latest heaps

ncannasse 6 éve
szülő
commit
177608385d

+ 1 - 1
libs/bullet/bullet/Native.hx

@@ -1,3 +1,3 @@
 package bullet;
 
-typedef Native = haxe.macro.MacroType<[webidl.Module.build({ idlFile : "bullet.idl", chopPrefix : "bt", autoGC : true, nativeLib : "bullet" })]>;
+typedef Native = haxe.macro.MacroType<[webidl.Module.build({ file : "bullet.idl", chopPrefix : "bt", autoGC : true, nativeLib : "bullet" })]>;

+ 19 - 0
libs/bullet/sample/.vscode/launch.json

@@ -0,0 +1,19 @@
+{
+	// Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
+	// Pointez pour afficher la description des attributs existants.
+	// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
+	"version": "0.2.0",
+	"configurations": [
+		{
+			"name": "HashLink (launch)",
+			"request": "launch",
+			"type": "hl",
+			"hxml": "sample.hxml",
+			"cwd": "${workspaceRoot}",
+			"preLaunchTask": {
+				"type": "haxe",
+				"args": "active configuration"
+			}
+		}
+	]
+}

+ 15 - 0
libs/bullet/sample/.vscode/tasks.json

@@ -0,0 +1,15 @@
+{
+// Consultez https://go.microsoft.com/fwlink/?LinkId=733558
+	// pour voir la documentation sur le format de tasks.json
+	"version": "2.0.0",
+	"tasks": [
+		{
+			"type": "haxe",
+			"args": "active configuration",
+			"group": {
+				"kind": "build",
+				"isDefault": true
+			}
+		}
+	]
+}

+ 5 - 11
libs/bullet/sample/Main.hx

@@ -17,12 +17,12 @@ class Main extends hxd.App {
 		floorMesh.material.color.setColor(0x800000);
 		bodies.push({ b : floor, m : floorMesh });
 
-		new h3d.scene.DirLight(new h3d.Vector(1, 2, -4), s3d);
+		new h3d.scene.fwd.DirLight(new h3d.Vector(1, 2, -4), s3d);
 
 		var shapes = [bullet.Shape.createSphere(0.5), bullet.Shape.createBox(1,1,1)];
 		var prims = [new h3d.prim.Sphere(0.5), new h3d.prim.Cube(1, 1, 1, true)];
 		prims[1].unindex();
-
+/*
 		var comp = bullet.Shape.createCompound([
 			{ shape : shapes[0], mass : 1, position : new h3d.col.Point(0, 0, 0), rotation : new h3d.Quat() },
 			{ shape : shapes[1], mass : 1, position : new h3d.col.Point(0, 0, 1), rotation : new h3d.Quat() }
@@ -30,7 +30,7 @@ class Main extends hxd.App {
 		shapes.push(comp.shape);
 		var c = new h3d.prim.Cube(1, 1, 2, true);
 		c.unindex();
-		prims.push(c);
+		prims.push(c);*/
 
 		for( p in prims )
 			p.addNormals();
@@ -39,7 +39,7 @@ class Main extends hxd.App {
 			var m = new h3d.scene.Mesh(prims[id], s3d);
 			m.x = Math.random() * 10;
 			m.y = Math.random() * 10;
-			m.z = 2 + Math.random() * 10;
+			m.z = 10 + Math.random() * 10;
 
 			var mt = new h3d.Matrix();
 			mt.identity();
@@ -53,17 +53,11 @@ class Main extends hxd.App {
 			bodies.push({ b : b, m : m });
 		}
 
-		for( b in bodies ) {
-			b.m.material.mainPass.enableLights = true;
-			b.m.material.shadows = true;
-		}
-
-
 		new h3d.scene.CameraController(80, s3d);
 	}
 
 	override function update(dt:Float) {
-		world.stepSimulation(dt / 60, 10);
+		world.stepSimulation(dt, 10);
 		for( b in bodies ) {
 			var pos = b.b.position;
 			var q = b.b.rotation;

+ 0 - 55
libs/bullet/sample/sample.hxproj

@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project version="2">
-  <!-- Output SWF options -->
-  <output>
-    <movie outputType="CustomBuild" />
-    <movie input="" />
-    <movie path="sample.hxml" />
-    <movie fps="0" />
-    <movie width="0" />
-    <movie height="0" />
-    <movie version="0" />
-    <movie minorVersion="0" />
-    <movie platform="Custom" />
-    <movie background="#000000" />
-  </output>
-  <!-- Other classes to be compiled into your SWF -->
-  <classpaths>
-    <class path="" />
-  </classpaths>
-  <!-- Build options -->
-  <build>
-    <option directives="" />
-    <option flashStrict="False" />
-    <option noInlineOnDebug="False" />
-    <option mainClass="Main" />
-    <option enabledebug="False" />
-    <option additional="-hl sample.hl" />
-  </build>
-  <!-- haxelib libraries -->
-  <haxelib>
-    <library name="heaps" />
-    <library name="hxbullet" />
-    <library name="hldx" />
-  </haxelib>
-  <!-- Class files to compile (other referenced classes will automatically be included) -->
-  <compileTargets>
-    <!-- example: <compile path="..." /> -->
-  </compileTargets>
-  <!-- Paths to exclude from the Project Explorer tree -->
-  <hiddenPaths>
-    <hidden path="obj" />
-  </hiddenPaths>
-  <!-- Executed before build -->
-  <preBuildCommand>haxe --connect 6000 sample.hxml</preBuildCommand>
-  <!-- Executed after build -->
-  <postBuildCommand alwaysRun="False" />
-  <!-- Other project options -->
-  <options>
-    <option showHiddenPaths="False" />
-    <option testMovie="Custom" />
-    <option testMovieCommand="hl sample.hl" />
-  </options>
-  <!-- Plugin storage -->
-  <storage />
-</project>

+ 0 - 53
libs/bullet/sample/sample_js.hxproj

@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project version="2">
-  <!-- Output SWF options -->
-  <output>
-    <movie outputType="Application" />
-    <movie input="" />
-    <movie path="sample.js" />
-    <movie fps="0" />
-    <movie width="0" />
-    <movie height="0" />
-    <movie version="0" />
-    <movie minorVersion="0" />
-    <movie platform="JavaScript" />
-    <movie background="#000000" />
-  </output>
-  <!-- Other classes to be compiled into your SWF -->
-  <classpaths>
-    <class path="." />
-  </classpaths>
-  <!-- Build options -->
-  <build>
-    <option directives="" />
-    <option flashStrict="False" />
-    <option noInlineOnDebug="False" />
-    <option mainClass="Main" />
-    <option enabledebug="False" />
-    <option additional="-lib heaps&#xA;-lib hxbullet&#xA;-D old-error-format&#xA;-dce full" />
-  </build>
-  <!-- haxelib libraries -->
-  <haxelib>
-    <!-- example: <library name="..." /> -->
-  </haxelib>
-  <!-- Class files to compile (other referenced classes will automatically be included) -->
-  <compileTargets>
-    <!-- example: <compile path="..." /> -->
-  </compileTargets>
-  <!-- Paths to exclude from the Project Explorer tree -->
-  <hiddenPaths>
-    <hidden path="obj" />
-  </hiddenPaths>
-  <!-- Executed before build -->
-  <preBuildCommand />
-  <!-- Executed after build -->
-  <postBuildCommand alwaysRun="False" />
-  <!-- Other project options -->
-  <options>
-    <option showHiddenPaths="False" />
-    <option testMovie="OpenDocument" />
-    <option testMovieCommand="sample.html" />
-  </options>
-  <!-- Plugin storage -->
-  <storage />
-</project>