All files / engine/Source/Scene Cesium3DTileColorBlendMode.js

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53                                                    1x                                                    
/**
 * Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from
 * the original feature, e.g. glTF material or per-point color in the tile.
 * <p>
 * When <code>REPLACE</code> or <code>MIX</code> are used and the source color is a glTF material, the technique must assign the
 * <code>_3DTILESDIFFUSE</code> semantic to the diffuse color parameter. Otherwise only <code>HIGHLIGHT</code> is supported.
 * </p>
 * <p>
 * A feature whose color evaluates to white (1.0, 1.0, 1.0) is always rendered without color blending, regardless of the
 * tileset's color blend mode.
 * </p>
 * <pre><code>
 * "techniques": {
 *   "technique0": {
 *     "parameters": {
 *       "diffuse": {
 *         "semantic": "_3DTILESDIFFUSE",
 *         "type": 35666
 *       }
 *     }
 *   }
 * }
 * </code></pre>
 *
 * @enum {number}
 */
const Cesium3DTileColorBlendMode = {
  /**
   * Multiplies the source color by the feature color.
   *
   * @type {number}
   * @constant
   */
  HIGHLIGHT: 0,
 
  /**
   * Replaces the source color with the feature color.
   *
   * @type {number}
   * @constant
   */
  REPLACE: 1,
 
  /**
   * Blends the source color and feature color together.
   *
   * @type {number}
   * @constant
   */
  MIX: 2,
};
export default Object.freeze(Cesium3DTileColorBlendMode);