Created
August 23, 2014 14:01
-
-
Save mraleph/cf898fda88e58e5128f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Dart_RaytracerDemo/web/SimpleRaytracer.dart b/Dart_RaytracerDemo/web/SimpleRaytracer.dart | |
index d02b6f7..458394b 100644 | |
--- a/Dart_RaytracerDemo/web/SimpleRaytracer.dart | |
+++ b/Dart_RaytracerDemo/web/SimpleRaytracer.dart | |
@@ -34,9 +34,9 @@ import "dart:async"; | |
import "missing.dart"; | |
class Vector3f { | |
- double x=0.0, y=0.0, z=0.0; | |
+ double x, y, z; | |
- Vector3f([this.x, this.y, this.z]); | |
+ Vector3f(this.x, this.y, this.z); | |
double Dot(Vector3f b) { | |
return (x * b.x + y * b.y + z * b.z); | |
@@ -228,7 +228,7 @@ import "missing.dart"; | |
// add some objects | |
// in the original tests it was 30 and not 300 | |
- for (int i = 0; i < 300; i++) { | |
+ for (int i = 0; i < 30; i++) { | |
double x = (random.NextDouble() * 10.0) - 5.0; // Range -5 to 5 | |
double y = (random.NextDouble() * 10.0) - 5.0; // Range -5 to 5 | |
double z = (random.NextDouble() * 10.0); // Range 0 to 10 | |
@@ -355,7 +355,7 @@ import "missing.dart"; | |
// Loop through the lights, adding contribution of each | |
for (Light light in lights) { | |
- Vector3f lightDir = new Vector3f(); | |
+ Vector3f lightDir; | |
double lightDistance; | |
// Find light direction and distance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment