UNPKG

wonder.js

Version:
20 lines (16 loc) 917 B
'use strict'; var BindTextureRenderService$Wonderjs = require("../BindTextureRenderService.js"); var UpdateAllTextureRenderService$Wonderjs = require("../allTexture/UpdateAllTextureRenderService.js"); var OperateAllTextureRenderService$Wonderjs = require("../allTexture/OperateAllTextureRenderService.js"); function bindAndUpdate(gl, texture, state) { var match = OperateAllTextureRenderService$Wonderjs.getActivableTextureUnit(state); return UpdateAllTextureRenderService$Wonderjs.handleUpdate(gl, /* tuple */[ texture, /* Cubemap */2 ], BindTextureRenderService$Wonderjs.bind(gl, match[0], /* tuple */[ texture, /* Cubemap */2 ], OperateAllTextureRenderService$Wonderjs.setActivedTextureUnitIndex(match[1], state))); } exports.bindAndUpdate = bindAndUpdate; /* BindTextureRenderService-Wonderjs Not a pure module */