refactor: Dart types
This commit is contained in:
@@ -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 {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
abstract class MaterialInstance {
|
||||
|
||||
}
|
||||
|
||||
enum AlphaMode {
|
||||
OPAQUE,
|
||||
MASK,
|
||||
BLEND
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
library shared_types;
|
||||
|
||||
export 'material.dart';
|
||||
export 'texture.dart';
|
||||
export 'entities.dart';
|
||||
export 'light.dart';
|
||||
export 'shadow.dart';
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
abstract class ThermionTexture {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user