build/module/lib/geometries/gridPrimitive.js
/**
 * Decorates the vertex with aPosition, aNormal, and aColor attributes,
 * but only if these functions are provided in the options.
 * @hidden
 */
Decorates the vertex with aPosition, aNormal, and aColor attributes,
but only if these functions are provided in the options.
@hidden
Decorates the vertex with aPosition aNormal and aColor attributes but only if these functions are provided in the options . @hidden
function transformVertex(vertex, u, v, options) {
    var aPosition = isDefined(options.aPosition) ? options.aPosition : void 0;
    var aNormal = isDefined(options.aNormal) ? options.aNormal : void 0;
    var aColor = isDefined(options.aColor) ? options.aColor : void 0;
    var aCoords = isDefined(options.aCoords) ? options.aCoords : void 0;
    if (isFunction(aCoords)) {
        var coords = aCoords(u, v);
        vertex.attributes[GraphicsProgramSymbols.ATTRIBUTE_COORDS] = Vector2.vector(coords.u, coords.v);
    }
    if (isFunction(aPosition)) {
        vertex.attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION] = Vector3.copy(aPosition(u, v));
    }
    if (isFunction(aNormal)) {
        vertex.attributes[GraphicsProgramSymbols.ATTRIBUTE_NORMAL] = Vector3.copy(aNormal(u, v));
    }
    if (isFunction(aColor)) {
        vertex.attributes[GraphicsProgramSymbols.ATTRIBUTE_COLOR] = Color.copy(aColor(u, v));
    }
}
function transformVertex ( vertex , u , v , options ) { var aPosition = isDefined ( options . aPosition ) ? options . aPosition : void 0 ; var aNormal = isDefined ( options . aNormal ) ? options . aNormal : void 0 ; var aColor = isDefined ( options . aColor ) ? options . aColor : void 0 ; var aCoords = isDefined ( options . aCoords ) ? options . aCoords : void 0 ; if ( isFunction ( aCoords ) ) { var coords = aCoords ( u , v ) ; vertex . attributes [ GraphicsProgramSymbols . ATTRIBUTE_COORDS ] = Vector2 . vector ( coords . u , coords . v ) ; } if ( isFunction ( aPosition ) ) { vertex . attributes [ GraphicsProgramSymbols . ATTRIBUTE_POSITION ] = Vector3 . copy ( aPosition ( u , v ) ) ; } if ( isFunction ( aNormal ) ) { vertex . attributes [ GraphicsProgramSymbols . ATTRIBUTE_NORMAL ] = Vector3 . copy ( aNormal ( u , v ) ) ; } if ( isFunction ( aColor ) ) { vertex . attributes [ GraphicsProgramSymbols . ATTRIBUTE_COLOR ] = Color . copy ( aColor ( u , v ) ) ; } }
Decorates the vertex with aPosition, aNormal, and aColor attributes,
 but only if these functions are provided in the options.
Decorates the vertex with aPosition aNormal and aColor attributes but only if these functions are provided in the options .