UNPKG

molstar

Version:

A comprehensive macromolecular library.

23 lines (20 loc) 822 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assign_size = void 0; exports.assign_size = ` #if defined(dSizeType_uniform) float size = uSize; #elif defined(dSizeType_attribute) float size = aSize; #elif defined(dSizeType_instance) float size = unpackRGBToInt(readFromTexture(tSize, aInstance, uSizeTexDim).rgb); #elif defined(dSizeType_group) float size = unpackRGBToInt(readFromTexture(tSize, group, uSizeTexDim).rgb); #elif defined(dSizeType_groupInstance) float size = unpackRGBToInt(readFromTexture(tSize, aInstance * float(uGroupCount) + group, uSizeTexDim).rgb); #endif #if defined(dSizeType_instance) || defined(dSizeType_group) || defined(dSizeType_groupInstance) size /= 100.0; // NOTE factor also set in TypeScript #endif size *= uSizeFactor; `;