wonder.js
Version:
19 lines (15 loc) • 1.04 kB
JavaScript
;
var Contract$WonderLog = require("wonder-log/lib/js/src/Contract.js");
var StateDataMain$Wonderjs = require("../../../state/main/data/StateDataMain.js");
var ArrayMapService$Wonderjs = require("../../../atom/ArrayMapService.js");
var IsDebugMainService$Wonderjs = require("../../../state/main/state/IsDebugMainService.js");
function addMaterialWithoutDuplicate(shaderIndex, material, record) {
var materialsMap = record[/* materialsMap */3];
ArrayMapService$Wonderjs.addValueWithoutDuplicate(shaderIndex, material, materialsMap);
return Contract$WonderLog.ensureCheck((function (param) {
var materialsMap = param[/* materialsMap */3];
return ArrayMapService$Wonderjs.checkDuplicate("material should only use the same shaderIndex once", shaderIndex, material, materialsMap);
}), IsDebugMainService$Wonderjs.getIsDebug(StateDataMain$Wonderjs.stateData), record);
}
exports.addMaterialWithoutDuplicate = addMaterialWithoutDuplicate;
/* Contract-WonderLog Not a pure module */