UNPKG

wonder.js

Version:
36 lines (31 loc) 1.26 kB
'use strict'; var Log$WonderLog = require("wonder-log/lib/js/src/Log.js"); var SendGLSLDataService$Wonderjs = require("./SendGLSLDataService.js"); function getSendNoCachableDataByType(type_) { switch (type_) { case "mat3" : return SendGLSLDataService$Wonderjs.sendMatrix3; case "mat4" : return SendGLSLDataService$Wonderjs.sendMatrix4; default: return Log$WonderLog.fatal(Log$WonderLog.buildFatalMessage("getSendNoCachableDataByType", "unknown type:" + (String(type_) + ""), "", "", "")); } } function getSendCachableDataByType(type_) { switch (type_) { case "float" : return SendGLSLDataService$Wonderjs.sendFloat; case "float3" : return SendGLSLDataService$Wonderjs.sendFloat3; case "sampler2D" : case "samplerCube" : return SendGLSLDataService$Wonderjs.sendInt; case "vec3" : return SendGLSLDataService$Wonderjs.sendVec3; default: return Log$WonderLog.fatal(Log$WonderLog.buildFatalMessage("getSendCachableDataByType", "unknown type:" + (String(type_) + ""), "", "", "")); } } exports.getSendNoCachableDataByType = getSendNoCachableDataByType; exports.getSendCachableDataByType = getSendCachableDataByType; /* Log-WonderLog Not a pure module */