@@ -5,13 +5,13 @@ type sceneRepo = {getSceneGameObject: unit => sceneGameObject};
5
5
type gameObjectRepo = {
6
6
getTransform: gameObject => option (transform ),
7
7
getBSDFMaterial: gameObject => option (bsdfMaterial ),
8
- // getGeometry: gameObject => option(geometry),
8
+ getGeometry: gameObject => option (geometry ),
9
9
getDirectionLight: gameObject => option (directionLight ),
10
10
getBasicCameraView: gameObject => option (basicCameraView ),
11
11
getPerspectiveCameraProjection:
12
12
gameObject => option (perspectiveCameraProjection ),
13
13
getAllGeometryGameObjects: sceneGameObject => list (gameObject ),
14
- // getAllGameObjectGeometries: sceneGameObject => list(geometry),
14
+ getAllGameObjectGeometries: sceneGameObject => list (geometry ),
15
15
getAllGameObjectBSDFMaterials: sceneGameObject => list (bsdfMaterial ),
16
16
};
17
17
@@ -20,9 +20,11 @@ type transformRepo = {
20
20
getNormalMatrix: transform => normalMatrix ,
21
21
getLocalPosition: transform => position ,
22
22
getLocalRotation: transform => rotation ,
23
+ getLocalEulerAngles: transform => eulerAngles ,
23
24
getLocalScale: transform => scale ,
24
25
getPosition: transform => position ,
25
26
getRotation: transform => rotation ,
27
+ getEulerAngles: transform => eulerAngles ,
26
28
getScale: transform => scale ,
27
29
};
28
30
@@ -62,6 +64,18 @@ type bsdfMaterialRepo = {
62
64
getNormalMapImageId: bsdfMaterial => option (ImageRepoType . id ),
63
65
getTransmissionMapImageId: bsdfMaterial => option (ImageRepoType . id ),
64
66
getSpecularMapImageId: bsdfMaterial => option (ImageRepoType . id ),
67
+ isSame: (bsdfMaterial , bsdfMaterial ) => bool ,
68
+ getId: bsdfMaterial => int ,
69
+ };
70
+
71
+ type geometryRepo = {
72
+ getVertices: geometry => Js . Typed_array . Float32Array . t ,
73
+ getNormals: geometry => option (Js . Typed_array . Float32Array . t ),
74
+ getTexCoords: geometry => option (Js . Typed_array . Float32Array . t ),
75
+ getTangents: geometry => option (Js . Typed_array . Float32Array . t ),
76
+ getIndices: geometry => option (Js . Typed_array . Uint32Array . t ),
77
+ isSame: (geometry , geometry ) => bool ,
78
+ getId: geometry => int ,
65
79
};
66
80
67
81
type sceneGraphRepo = {
@@ -71,5 +85,6 @@ type sceneGraphRepo = {
71
85
basicCameraViewRepo,
72
86
perspectiveCameraProjectionRepo,
73
87
bsdfMaterialRepo,
88
+ geometryRepo,
74
89
gameObjectRepo,
75
90
};
0 commit comments