UNPKG

wonder.js

Version:
28 lines (24 loc) 1.26 kB
'use strict'; var Caml_array = require("bs-platform/lib/js/caml_array.js"); var ShaderIndicesService$Wonderjs = require("../../../../primitive/material/ShaderIndicesService.js"); var RecordBasicMaterialMainService$Wonderjs = require("./RecordBasicMaterialMainService.js"); function setShaderIndex(materialIndex, shaderIndex, state) { var record = RecordBasicMaterialMainService$Wonderjs.getRecord(state); var newrecord = Caml_array.caml_array_dup(state); newrecord[/* basicMaterialRecord */15] = /* record */[ /* index */record[/* index */0], /* buffer */record[/* buffer */1], /* shaderIndices */ShaderIndicesService$Wonderjs.setShaderIndex(materialIndex, shaderIndex, record[/* shaderIndices */2]), /* colors */record[/* colors */3], /* isDepthTests */record[/* isDepthTests */4], /* alphas */record[/* alphas */5], /* defaultColor */record[/* defaultColor */6], /* gameObjectsMap */record[/* gameObjectsMap */7], /* disposedIndexArray */record[/* disposedIndexArray */8], /* nameMap */record[/* nameMap */9], /* materialArrayForWorkerInit */record[/* materialArrayForWorkerInit */10] ]; return newrecord; } exports.setShaderIndex = setShaderIndex; /* ShaderIndicesService-Wonderjs Not a pure module */