diff --git a/thermion_dart/lib/thermion_dart/viewer/shared_types/entities.dart b/thermion_dart/lib/thermion_dart/viewer/shared_types/entities.dart index b59631ac..0de51188 100644 --- a/thermion_dart/lib/thermion_dart/viewer/shared_types/entities.dart +++ b/thermion_dart/lib/thermion_dart/viewer/shared_types/entities.dart @@ -8,6 +8,4 @@ export 'light_options.dart'; // a handle that can be safely passed back to the rendering layer to manipulate an Entity typedef ThermionEntity = int; -abstract class ThermionTexture { - -} + diff --git a/thermion_dart/lib/thermion_dart/viewer/shared_types/geometry.dart b/thermion_dart/lib/thermion_dart/viewer/shared_types/geometry.dart index 076b36c4..3417253e 100644 --- a/thermion_dart/lib/thermion_dart/viewer/shared_types/geometry.dart +++ b/thermion_dart/lib/thermion_dart/viewer/shared_types/geometry.dart @@ -8,7 +8,6 @@ class Geometry { final Float32List normals; final Float32List uvs; final PrimitiveType primitiveType; - final String? materialPath; Geometry( this.vertices, @@ -16,7 +15,6 @@ class Geometry { Float32List? normals, Float32List? uvs, this.primitiveType = PrimitiveType.TRIANGLES, - this.materialPath, }) : indices = Uint16List.fromList(indices), normals = normals ?? Float32List(0), uvs = uvs ?? Float32List(0) { diff --git a/thermion_dart/lib/thermion_dart/viewer/shared_types/light_options.dart b/thermion_dart/lib/thermion_dart/viewer/shared_types/light_options.dart index 1bbe3c84..09e5a1ee 100644 --- a/thermion_dart/lib/thermion_dart/viewer/shared_types/light_options.dart +++ b/thermion_dart/lib/thermion_dart/viewer/shared_types/light_options.dart @@ -53,4 +53,24 @@ DirectLight.point({ direction: Vector3.zero(), falloffRadius: falloffRadius, ); + +DirectLight.sun({ + double color = 6500, + double intensity = 100000, + bool castShadows = true, + Vector3? direction, + double sunAngularRadius = 0.545, + double sunHaloSize = 10.0, + double sunHaloFalloff = 80.0, +}) : this( + type: LightType.DIRECTIONAL, + color: color, + intensity: intensity, + castShadows: castShadows, + position: Vector3(0, 0, 0), + direction: direction ?? Vector3(0, -1, 0), + sunAngularRadius: sunAngularRadius, + sunHaloSize: sunHaloSize, + sunHaloFallof: sunHaloFalloff, +); } diff --git a/thermion_dart/lib/thermion_dart/viewer/shared_types/material.dart b/thermion_dart/lib/thermion_dart/viewer/shared_types/material.dart new file mode 100644 index 00000000..fad70382 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/viewer/shared_types/material.dart @@ -0,0 +1,9 @@ +abstract class MaterialInstance { + +} + +enum AlphaMode { + OPAQUE, + MASK, + BLEND +} \ No newline at end of file diff --git a/thermion_dart/lib/thermion_dart/viewer/shared_types/shared_types.dart b/thermion_dart/lib/thermion_dart/viewer/shared_types/shared_types.dart index c41d441e..ed30b00b 100644 --- a/thermion_dart/lib/thermion_dart/viewer/shared_types/shared_types.dart +++ b/thermion_dart/lib/thermion_dart/viewer/shared_types/shared_types.dart @@ -1,5 +1,7 @@ library shared_types; +export 'material.dart'; +export 'texture.dart'; export 'entities.dart'; export 'light.dart'; export 'shadow.dart'; diff --git a/thermion_dart/lib/thermion_dart/viewer/shared_types/texture.dart b/thermion_dart/lib/thermion_dart/viewer/shared_types/texture.dart new file mode 100644 index 00000000..1279e39d --- /dev/null +++ b/thermion_dart/lib/thermion_dart/viewer/shared_types/texture.dart @@ -0,0 +1,3 @@ +abstract class ThermionTexture { + +} \ No newline at end of file