UNPKG

wonder.js

Version:
27 lines (20 loc) 857 B
'use strict'; var TextureIndexService$Wonderjs = require("../../../../primitive/material/TextureIndexService.js"); function getMap(material, getTextureIndexFunc, textureIndices) { var textureIndex = getTextureIndexFunc(material, textureIndices); var match = TextureIndexService$Wonderjs.isTextureNotDefaultValue(textureIndex); if (match) { return textureIndex; } } function setMap(material, texture, setTextureIndexFunc, textureIndices) { return setTextureIndexFunc(material, texture, textureIndices); } function removeMap(material, setTextureIndexFunc, textureIndices) { var defaultTexture = TextureIndexService$Wonderjs.getDefaultTextureIndex(/* () */0); return setTextureIndexFunc(material, defaultTexture, textureIndices); } exports.getMap = getMap; exports.setMap = setMap; exports.removeMap = removeMap; /* No side effect */