-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(architecture): add UpdateTextureArrayCPJobEntity
pass unit test;
- Loading branch information
Showing
46 changed files
with
2,316 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let getImageData = id => { | ||
OperateImageDoService.getData(id); | ||
}; |
3 changes: 3 additions & 0 deletions
3
src/construct/application_layer/dependency/ImageRepoDpApService.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let set = dp => { | ||
DpContainer.setImageRepoDp(dp); | ||
}; |
53 changes: 53 additions & 0 deletions
53
src/construct/application_layer/scene/BSDFMaterialApService.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
let getDiffuseColor = material => { | ||
OperateBSDFMaterialDoService.getDiffuseColor(material); | ||
}; | ||
|
||
let getSpecular = material => { | ||
OperateBSDFMaterialDoService.getSpecular(material); | ||
}; | ||
|
||
let getSpecularColor = material => { | ||
OperateBSDFMaterialDoService.getSpecularColor(material); | ||
}; | ||
|
||
let getRoughness = material => { | ||
OperateBSDFMaterialDoService.getRoughness(material); | ||
}; | ||
|
||
let getMetalness = material => { | ||
OperateBSDFMaterialDoService.getMetalness(material); | ||
}; | ||
|
||
let getTransmission = material => { | ||
OperateBSDFMaterialDoService.getTransmission(material); | ||
}; | ||
|
||
let getIOR = material => { | ||
OperateBSDFMaterialDoService.getIOR(material); | ||
}; | ||
|
||
let getDiffuseMapImageId = material => { | ||
OperateBSDFMaterialDoService.getDiffuseMapImageId(material); | ||
}; | ||
|
||
let getChannelRoughnessMetallicMapImageId = material => { | ||
OperateBSDFMaterialDoService.getChannelRoughnessMetallicMapImageId( | ||
material, | ||
); | ||
}; | ||
|
||
let getEmissionMapImageId = material => { | ||
OperateBSDFMaterialDoService.getEmissionMapImageId(material); | ||
}; | ||
|
||
let getNormalMapImageId = material => { | ||
OperateBSDFMaterialDoService.getNormalMapImageId(material); | ||
}; | ||
|
||
let getTransmissionMapImageId = material => { | ||
OperateBSDFMaterialDoService.getTransmissionMapImageId(material); | ||
}; | ||
|
||
let getSpecularMapImageId = material => { | ||
OperateBSDFMaterialDoService.getSpecularMapImageId(material); | ||
}; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
let load = LoadWebGPUDoService.load; | ||
let load = LoadWebGPUDoService.load; | ||
|
||
let getTextureArrayLayerSize = TextureArrayWebGPUDoService.getTextureArrayLayerSize; |
This file contains 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
3 changes: 3 additions & 0 deletions
3
src/construct/domain_layer/dependency/interface/engine/IImageRepoDp.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
open ImageRepoType; | ||
|
||
type imageRepo = {getData: id => option(data)}; |
This file contains 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
7 changes: 7 additions & 0 deletions
7
src/construct/domain_layer/dependency/interface/engine/ImageRepoType.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type id = string; | ||
|
||
type data = { | ||
width: int, | ||
height: int, | ||
data: Js.Typed_array.Uint8Array.t, | ||
}; |
This file contains 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
3 changes: 3 additions & 0 deletions
3
src/construct/domain_layer/domain/asset/image/service/OperateImageDoService.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let getData = id => { | ||
DpContainer.unsafeGetImageRepoDp().getData(id->ImageIdVO.value); | ||
}; |
9 changes: 9 additions & 0 deletions
9
src/construct/domain_layer/domain/asset/image/value_object/ImageIdVO.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type t = | ||
| ImageId(ImageRepoType.id); | ||
|
||
let create = value => ImageId(value); | ||
|
||
let value = id => | ||
switch (id) { | ||
| ImageId(value) => value | ||
}; |
9 changes: 9 additions & 0 deletions
9
src/construct/domain_layer/domain/scene/scene_graph/entity/BSDFMaterialEntity.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type t = | ||
| BSDFMaterial(SceneGraphType.bsdfMaterial); | ||
|
||
let create = index => BSDFMaterial(index); | ||
|
||
let value = bsdfMaterial => | ||
switch (bsdfMaterial) { | ||
| BSDFMaterial(index) => index | ||
}; |
80 changes: 80 additions & 0 deletions
80
...main_layer/domain/scene/scene_graph/service/bsdf_material/OperateBSDFMaterialDoService.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
let getDiffuseColor = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getDiffuseColor( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->Color3VO.create | ||
->DiffuseVO.create; | ||
|
||
let getSpecular = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getSpecular( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->SpecularVO.create; | ||
|
||
let getSpecularColor = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getSpecularColor( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->Color3VO.create | ||
->SpecularColorVO.create; | ||
|
||
let getRoughness = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getRoughness( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->RoughnessVO.create; | ||
|
||
let getMetalness = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getMetalness( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->MetalnessVO.create; | ||
|
||
let getTransmission = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getTransmission( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->TransmissionVO.create; | ||
|
||
let getIOR = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getIOR( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->IORVO.create; | ||
|
||
let getDiffuseMapImageId = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getDiffuseMapImageId( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->OptionSt.map(ImageIdVO.create); | ||
|
||
let getChannelRoughnessMetallicMapImageId = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp(). | ||
getChannelRoughnessMetallicMapImageId( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->OptionSt.map(ImageIdVO.create); | ||
|
||
let getEmissionMapImageId = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getEmissionMapImageId( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->OptionSt.map(ImageIdVO.create); | ||
|
||
let getNormalMapImageId = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getNormalMapImageId( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->OptionSt.map(ImageIdVO.create); | ||
|
||
let getTransmissionMapImageId = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getTransmissionMapImageId( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->OptionSt.map(ImageIdVO.create); | ||
|
||
let getSpecularMapImageId = material => | ||
DpContainer.unsafeGetBSDFMaterialRepoDp().getSpecularMapImageId( | ||
material->BSDFMaterialEntity.value, | ||
) | ||
->OptionSt.map(ImageIdVO.create); |
This file contains 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
This file contains 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
11 changes: 11 additions & 0 deletions
11
src/construct/domain_layer/domain/scene/scene_graph/value_object/DiffuseVO.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
type t = | ||
| Diffuse(Color3VO.t); | ||
|
||
let create = value => Diffuse(value); | ||
|
||
let value = color => | ||
switch (color) { | ||
| Diffuse(value) => value | ||
}; | ||
|
||
let getPrimitiveValue = color => color->value->Color3VO.value; |
9 changes: 9 additions & 0 deletions
9
src/construct/domain_layer/domain/scene/scene_graph/value_object/IORVO.re
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type t = | ||
| IOR(float); | ||
|
||
let create = value => IOR(value); | ||
|
||
let value = ior => | ||
switch (ior) { | ||
| IOR(value) => value | ||
}; |
Oops, something went wrong.