All files / run/cloud_picture/infrastructure_layer/dependency/repo/scene GameObjectCPRepoDp.bs.js

100% Statements 56/56
100% Branches 0/0
100% Functions 23/23
100% Lines 56/56

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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186    31x 31x 31x     120x       120x 120x                       120x 120x                       140x       123x       65x 65x                       39x       67x       43x 43x                       77x       45x       17x 17x                       1x       19x       11x 11x                       1x       13x       11x 11x                       3x       13x       44x       44x       35x     31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x    
'use strict';
 
var CPRepo$Wonderjs = require("../../../data/container/CPRepo.bs.js");
var ListSt$Wonderjs = require("../../../../../../construct/domain_layer/library/structure/ListSt.bs.js");
var ImmutableSparseMap$Wonderjs = require("../../../../../../construct/domain_layer/library/structure/sparse_map/ImmutableSparseMap.bs.js");
 
function getMaxUID(param) {
  return CPRepo$Wonderjs.getGameObject(undefined).maxUID;
}
 
function setMaxUID(maxUID) {
  var init = CPRepo$Wonderjs.getGameObject(undefined);
  return CPRepo$Wonderjs.setGameObject({
              maxUID: maxUID,
              transformMap: init.transformMap,
              bsdfMaterialMap: init.bsdfMaterialMap,
              geometryMap: init.geometryMap,
              directionLightMap: init.directionLightMap,
              basicCameraViewMap: init.basicCameraViewMap,
              perspectiveCameraProjectionMap: init.perspectiveCameraProjectionMap
            });
}
 
function addTransform(gameObject, transform) {
  var gameObjectPO = CPRepo$Wonderjs.getGameObject(undefined);
  return CPRepo$Wonderjs.setGameObject({
              maxUID: gameObjectPO.maxUID,
              transformMap: ImmutableSparseMap$Wonderjs.set(gameObjectPO.transformMap, gameObject, transform),
              bsdfMaterialMap: gameObjectPO.bsdfMaterialMap,
              geometryMap: gameObjectPO.geometryMap,
              directionLightMap: gameObjectPO.directionLightMap,
              basicCameraViewMap: gameObjectPO.basicCameraViewMap,
              perspectiveCameraProjectionMap: gameObjectPO.perspectiveCameraProjectionMap
            });
}
 
function getTransform(gameObject) {
  return ImmutableSparseMap$Wonderjs.get(CPRepo$Wonderjs.getGameObject(undefined).transformMap, gameObject);
}
 
function hasTransform(gameObject) {
  return ImmutableSparseMap$Wonderjs.has(CPRepo$Wonderjs.getGameObject(undefined).transformMap, gameObject);
}
 
function addBSDFMaterial(gameObject, material) {
  var gameObjectPO = CPRepo$Wonderjs.getGameObject(undefined);
  return CPRepo$Wonderjs.setGameObject({
              maxUID: gameObjectPO.maxUID,
              transformMap: gameObjectPO.transformMap,
              bsdfMaterialMap: ImmutableSparseMap$Wonderjs.set(gameObjectPO.bsdfMaterialMap, gameObject, material),
              geometryMap: gameObjectPO.geometryMap,
              directionLightMap: gameObjectPO.directionLightMap,
              basicCameraViewMap: gameObjectPO.basicCameraViewMap,
              perspectiveCameraProjectionMap: gameObjectPO.perspectiveCameraProjectionMap
            });
}
 
function getBSDFMaterial(gameObject) {
  return ImmutableSparseMap$Wonderjs.get(CPRepo$Wonderjs.getGameObject(undefined).bsdfMaterialMap, gameObject);
}
 
function hasBSDFMaterial(gameObject) {
  return ImmutableSparseMap$Wonderjs.has(CPRepo$Wonderjs.getGameObject(undefined).bsdfMaterialMap, gameObject);
}
 
function addGeometry(gameObject, geometry) {
  var gameObjectPO = CPRepo$Wonderjs.getGameObject(undefined);
  return CPRepo$Wonderjs.setGameObject({
              maxUID: gameObjectPO.maxUID,
              transformMap: gameObjectPO.transformMap,
              bsdfMaterialMap: gameObjectPO.bsdfMaterialMap,
              geometryMap: ImmutableSparseMap$Wonderjs.set(gameObjectPO.geometryMap, gameObject, geometry),
              directionLightMap: gameObjectPO.directionLightMap,
              basicCameraViewMap: gameObjectPO.basicCameraViewMap,
              perspectiveCameraProjectionMap: gameObjectPO.perspectiveCameraProjectionMap
            });
}
 
function getGeometry(gameObject) {
  return ImmutableSparseMap$Wonderjs.get(CPRepo$Wonderjs.getGameObject(undefined).geometryMap, gameObject);
}
 
function hasGeometry(gameObject) {
  return ImmutableSparseMap$Wonderjs.has(CPRepo$Wonderjs.getGameObject(undefined).geometryMap, gameObject);
}
 
function addDirectionLight(gameObject, directionLight) {
  var gameObjectPO = CPRepo$Wonderjs.getGameObject(undefined);
  return CPRepo$Wonderjs.setGameObject({
              maxUID: gameObjectPO.maxUID,
              transformMap: gameObjectPO.transformMap,
              bsdfMaterialMap: gameObjectPO.bsdfMaterialMap,
              geometryMap: gameObjectPO.geometryMap,
              directionLightMap: ImmutableSparseMap$Wonderjs.set(gameObjectPO.directionLightMap, gameObject, directionLight),
              basicCameraViewMap: gameObjectPO.basicCameraViewMap,
              perspectiveCameraProjectionMap: gameObjectPO.perspectiveCameraProjectionMap
            });
}
 
function getDirectionLight(gameObject) {
  return ImmutableSparseMap$Wonderjs.get(CPRepo$Wonderjs.getGameObject(undefined).directionLightMap, gameObject);
}
 
function hasDirectionLight(gameObject) {
  return ImmutableSparseMap$Wonderjs.has(CPRepo$Wonderjs.getGameObject(undefined).directionLightMap, gameObject);
}
 
function addBasicCameraView(gameObject, basicCameraView) {
  var gameObjectPO = CPRepo$Wonderjs.getGameObject(undefined);
  return CPRepo$Wonderjs.setGameObject({
              maxUID: gameObjectPO.maxUID,
              transformMap: gameObjectPO.transformMap,
              bsdfMaterialMap: gameObjectPO.bsdfMaterialMap,
              geometryMap: gameObjectPO.geometryMap,
              directionLightMap: gameObjectPO.directionLightMap,
              basicCameraViewMap: ImmutableSparseMap$Wonderjs.set(gameObjectPO.basicCameraViewMap, gameObject, basicCameraView),
              perspectiveCameraProjectionMap: gameObjectPO.perspectiveCameraProjectionMap
            });
}
 
function getBasicCameraView(gameObject) {
  return ImmutableSparseMap$Wonderjs.get(CPRepo$Wonderjs.getGameObject(undefined).basicCameraViewMap, gameObject);
}
 
function hasBasicCameraView(gameObject) {
  return ImmutableSparseMap$Wonderjs.has(CPRepo$Wonderjs.getGameObject(undefined).basicCameraViewMap, gameObject);
}
 
function addPerspectiveCameraProjection(gameObject, perspectiveCameraProjection) {
  var gameObjectPO = CPRepo$Wonderjs.getGameObject(undefined);
  return CPRepo$Wonderjs.setGameObject({
              maxUID: gameObjectPO.maxUID,
              transformMap: gameObjectPO.transformMap,
              bsdfMaterialMap: gameObjectPO.bsdfMaterialMap,
              geometryMap: gameObjectPO.geometryMap,
              directionLightMap: gameObjectPO.directionLightMap,
              basicCameraViewMap: gameObjectPO.basicCameraViewMap,
              perspectiveCameraProjectionMap: ImmutableSparseMap$Wonderjs.set(gameObjectPO.perspectiveCameraProjectionMap, gameObject, perspectiveCameraProjection)
            });
}
 
function getPerspectiveCameraProjection(gameObject) {
  return ImmutableSparseMap$Wonderjs.get(CPRepo$Wonderjs.getGameObject(undefined).perspectiveCameraProjectionMap, gameObject);
}
 
function hasPerspectiveCameraProjection(gameObject) {
  return ImmutableSparseMap$Wonderjs.has(CPRepo$Wonderjs.getGameObject(undefined).perspectiveCameraProjectionMap, gameObject);
}
 
function getAllGeometryGameObjects(param) {
  return ListSt$Wonderjs.fromArray(ImmutableSparseMap$Wonderjs.getKeys(CPRepo$Wonderjs.getGameObject(undefined).geometryMap));
}
 
function getAllGameObjectGeometries(param) {
  return ListSt$Wonderjs.fromArray(ImmutableSparseMap$Wonderjs.getValues(CPRepo$Wonderjs.getGameObject(undefined).geometryMap));
}
 
function getAllGameObjectBSDFMaterials(param) {
  return ListSt$Wonderjs.fromArray(ImmutableSparseMap$Wonderjs.getValues(CPRepo$Wonderjs.getGameObject(undefined).bsdfMaterialMap));
}
 
exports.getMaxUID = getMaxUID;
exports.setMaxUID = setMaxUID;
exports.addTransform = addTransform;
exports.getTransform = getTransform;
exports.hasTransform = hasTransform;
exports.addBSDFMaterial = addBSDFMaterial;
exports.getBSDFMaterial = getBSDFMaterial;
exports.hasBSDFMaterial = hasBSDFMaterial;
exports.addGeometry = addGeometry;
exports.getGeometry = getGeometry;
exports.hasGeometry = hasGeometry;
exports.addDirectionLight = addDirectionLight;
exports.getDirectionLight = getDirectionLight;
exports.hasDirectionLight = hasDirectionLight;
exports.addBasicCameraView = addBasicCameraView;
exports.getBasicCameraView = getBasicCameraView;
exports.hasBasicCameraView = hasBasicCameraView;
exports.addPerspectiveCameraProjection = addPerspectiveCameraProjection;
exports.getPerspectiveCameraProjection = getPerspectiveCameraProjection;
exports.hasPerspectiveCameraProjection = hasPerspectiveCameraProjection;
exports.getAllGeometryGameObjects = getAllGeometryGameObjects;
exports.getAllGameObjectGeometries = getAllGameObjectGeometries;
exports.getAllGameObjectBSDFMaterials = getAllGameObjectBSDFMaterials;
/* CPRepo-Wonderjs Not a pure module */