All files / run/external_layer/api/dependency SceneGraphRepoDpCPAPI.bs.js

96.92% Statements 63/65
100% Branches 0/0
92.86% Functions 26/28
96.92% Lines 63/65

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162    15x 15x 15x 15x     129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x 129x               17x             2x                           69x     69x     69x     69x     69x     69x           44x     44x     44x     44x     44x     44x             44x     44x     44x     176x               88x     44x     88x                 2x     44x     44x     35x           15x    
'use strict';
 
var Curry = require("bs-platform/lib/js/curry.js");
var ListSt$Wonderjs = require("../../../../construct/domain_layer/library/structure/ListSt.bs.js");
var OptionSt$Wonderjs = require("../../../../construct/domain_layer/library/structure/OptionSt.bs.js");
var SceneGraphRepoDpRunAPI$Wonderjs = require("../../../../construct/external_layer/api/dependency/SceneGraphRepoDpRunAPI.bs.js");
 
function set(param) {
  var geometryRepo = param.geometryRepo;
  var getIndices = geometryRepo.getIndices;
  var getTangents = geometryRepo.getTangents;
  var getTexCoords = geometryRepo.getTexCoords;
  var getNormals = geometryRepo.getNormals;
  var bsdfMaterialRepo = param.bsdfMaterialRepo;
  var getSpecularMapImageWrapData = bsdfMaterialRepo.getSpecularMapImageWrapData;
  var getTransmissionMapImageWrapData = bsdfMaterialRepo.getTransmissionMapImageWrapData;
  var getNormalMapImageWrapData = bsdfMaterialRepo.getNormalMapImageWrapData;
  var getEmissionMapImageWrapData = bsdfMaterialRepo.getEmissionMapImageWrapData;
  var getChannelRoughnessMetallicMapImageWrapData = bsdfMaterialRepo.getChannelRoughnessMetallicMapImageWrapData;
  var getDiffuseMapImageWrapData = bsdfMaterialRepo.getDiffuseMapImageWrapData;
  var getSpecularMapImageId = bsdfMaterialRepo.getSpecularMapImageId;
  var getTransmissionMapImageId = bsdfMaterialRepo.getTransmissionMapImageId;
  var getNormalMapImageId = bsdfMaterialRepo.getNormalMapImageId;
  var getEmissionMapImageId = bsdfMaterialRepo.getEmissionMapImageId;
  var getChannelRoughnessMetallicMapImageId = bsdfMaterialRepo.getChannelRoughnessMetallicMapImageId;
  var getDiffuseMapImageId = bsdfMaterialRepo.getDiffuseMapImageId;
  var basicCameraViewRepo = param.basicCameraViewRepo;
  var getActiveBasicCameraView = basicCameraViewRepo.getActiveBasicCameraView;
  var directionLightRepo = param.directionLightRepo;
  var getAllLights = directionLightRepo.getAllLights;
  var gameObjectRepo = param.gameObjectRepo;
  var getAllGameObjectBSDFMaterials = gameObjectRepo.getAllGameObjectBSDFMaterials;
  var getAllGameObjectGeometries = gameObjectRepo.getAllGameObjectGeometries;
  var getAllGeometryGameObjects = gameObjectRepo.getAllGeometryGameObjects;
  var getGeometry = gameObjectRepo.getGeometry;
  var getBSDFMaterial = gameObjectRepo.getBSDFMaterial;
  var getPerspectiveCameraProjection = gameObjectRepo.getPerspectiveCameraProjection;
  var getBasicCameraView = gameObjectRepo.getBasicCameraView;
  var getDirectionLight = gameObjectRepo.getDirectionLight;
  var getTransform = gameObjectRepo.getTransform;
  return SceneGraphRepoDpRunAPI$Wonderjs.set({
              sceneRepo: param.sceneRepo,
              transformRepo: param.transformRepo,
              directionLightRepo: {
                getColor: directionLightRepo.getColor,
                getIntensity: directionLightRepo.getIntensity,
                getDirection: directionLightRepo.getDirection,
                getAllLights: (function (sceneGameObject) {
                    return ListSt$Wonderjs.fromArray(Curry._1(getAllLights, sceneGameObject));
                  })
              },
              basicCameraViewRepo: {
                getGameObject: basicCameraViewRepo.getGameObject,
                getViewWorldToCameraMatrix: basicCameraViewRepo.getViewWorldToCameraMatrix,
                getActiveBasicCameraView: (function (gameObject) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getActiveBasicCameraView, gameObject));
                  })
              },
              perspectiveCameraProjectionRepo: param.perspectiveCameraProjectionRepo,
              bsdfMaterialRepo: {
                getDiffuseColor: bsdfMaterialRepo.getDiffuseColor,
                getEmissionColor: bsdfMaterialRepo.getEmissionColor,
                getSpecular: bsdfMaterialRepo.getSpecular,
                getSpecularColor: bsdfMaterialRepo.getSpecularColor,
                getRoughness: bsdfMaterialRepo.getRoughness,
                getMetalness: bsdfMaterialRepo.getMetalness,
                getTransmission: bsdfMaterialRepo.getTransmission,
                getIOR: bsdfMaterialRepo.getIOR,
                getDiffuseMapImageId: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getDiffuseMapImageId, bsdfMaterial));
                  }),
                getChannelRoughnessMetallicMapImageId: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getChannelRoughnessMetallicMapImageId, bsdfMaterial));
                  }),
                getEmissionMapImageId: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getEmissionMapImageId, bsdfMaterial));
                  }),
                getNormalMapImageId: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getNormalMapImageId, bsdfMaterial));
                  }),
                getTransmissionMapImageId: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getTransmissionMapImageId, bsdfMaterial));
                  }),
                getSpecularMapImageId: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getSpecularMapImageId, bsdfMaterial));
                  }),
                getAlphaCutoff: bsdfMaterialRepo.getAlphaCutoff,
                isSame: bsdfMaterialRepo.isSame,
                getId: bsdfMaterialRepo.getId,
                getDiffuseMapImageWrapData: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getDiffuseMapImageWrapData, bsdfMaterial));
                  }),
                getChannelRoughnessMetallicMapImageWrapData: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getChannelRoughnessMetallicMapImageWrapData, bsdfMaterial));
                  }),
                getEmissionMapImageWrapData: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getEmissionMapImageWrapData, bsdfMaterial));
                  }),
                getNormalMapImageWrapData: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getNormalMapImageWrapData, bsdfMaterial));
                  }),
                getTransmissionMapImageWrapData: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getTransmissionMapImageWrapData, bsdfMaterial));
                  }),
                getSpecularMapImageWrapData: (function (bsdfMaterial) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getSpecularMapImageWrapData, bsdfMaterial));
                  }),
                isDoubleSide: bsdfMaterialRepo.isDoubleSide
              },
              geometryRepo: {
                getVertices: geometryRepo.getVertices,
                getNormals: (function (geometry) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getNormals, geometry));
                  }),
                getTexCoords: (function (geometry) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getTexCoords, geometry));
                  }),
                getTangents: (function (geometry) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getTangents, geometry));
                  }),
                getIndices: (function (geometry) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getIndices, geometry));
                  }),
                isFlipTexCoordY: geometryRepo.isFlipTexCoordY,
                isSame: geometryRepo.isSame,
                getId: geometryRepo.getId
              },
              gameObjectRepo: {
                getTransform: (function (gameObject) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getTransform, gameObject));
                  }),
                getBSDFMaterial: (function (gameObject) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getBSDFMaterial, gameObject));
                  }),
                getGeometry: (function (gameObject) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getGeometry, gameObject));
                  }),
                getDirectionLight: (function (gameObject) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getDirectionLight, gameObject));
                  }),
                getBasicCameraView: (function (gameObject) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getBasicCameraView, gameObject));
                  }),
                getPerspectiveCameraProjection: (function (gameObject) {
                    return OptionSt$Wonderjs.fromNullable(Curry._1(getPerspectiveCameraProjection, gameObject));
                  }),
                getAllGeometryGameObjects: (function (sceneGameObject) {
                    return ListSt$Wonderjs.fromArray(Curry._1(getAllGeometryGameObjects, sceneGameObject));
                  }),
                getAllGameObjectGeometries: (function (sceneGameObject) {
                    return ListSt$Wonderjs.fromArray(Curry._1(getAllGameObjectGeometries, sceneGameObject));
                  }),
                getAllGameObjectBSDFMaterials: (function (sceneGameObject) {
                    return ListSt$Wonderjs.fromArray(Curry._1(getAllGameObjectBSDFMaterials, sceneGameObject));
                  })
              }
            });
}
 
exports.set = set;
/* No side effect */