wonder.js
Version:
22 lines (18 loc) • 1.17 kB
JavaScript
;
var Caml_array = require("bs-platform/lib/js/caml_array.js");
var BufferService$Wonderjs = require("../../../../primitive/buffer/BufferService.js");
var BufferSettingService$Wonderjs = require("../../../../record/main/setting/BufferSettingService.js");
var IndexComponentService$Wonderjs = require("../../../../primitive/component/IndexComponentService.js");
var RecordCubemapTextureMainService$Wonderjs = require("./RecordCubemapTextureMainService.js");
function create(state) {
var cubemapTextureRecord = RecordCubemapTextureMainService$Wonderjs.getRecord(state);
var match = IndexComponentService$Wonderjs.generateIndex(cubemapTextureRecord[/* index */0], cubemapTextureRecord[/* disposedIndexArray */27]);
var newrecord = Caml_array.caml_array_dup(cubemapTextureRecord);
state[/* cubemapTextureRecord */20] = (newrecord[/* index */0] = match[1], newrecord);
return BufferService$Wonderjs.checkNotExceedMaxCount(BufferSettingService$Wonderjs.getCubemapTextureCount(state[/* settingRecord */0]), /* tuple */[
state,
match[0]
]);
}
exports.create = create;
/* BufferService-Wonderjs Not a pure module */