Sha256: 86061340733527239c2243db621823a00e9e8b5254f4ffd75bd0918d4b6e6e3d
Contents?: true
Size: 1.78 KB
Versions: 2
Compression:
Stored size: 1.78 KB
Contents
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1389617752.336986:@value"¶{I" class:ETI"BundledAsset; FI"logical_path; TI"%Shaders/Builtin/Functions/hue.js; TI" pathname; TI"^/Users/bogumil/www/engines/cesium/app/assets/javascripts/Shaders/Builtin/Functions/hue.js; FI"content_type; TI"application/javascript; TI" mtime; TI"2014-01-13T10:29:06+01:00; TI"length; Ti¸I"digest; TI"%a76d873be6d59a1afeb83b07fb101fcf; FI"source; TI"¸ //This file is automatically rebuilt by the Cesium build process. /*global define*/ define(function() { "use strict"; return "/**\n\ * Adjusts the hue of a color.\n\ * \n\ * @name czm_hue\n\ * @glslFunction\n\ * \n\ * @param {vec3} rgb The color.\n\ * @param {float} adjustment The amount to adjust the hue of the color in radians.\n\ *\n\ * @returns {float} The color with the hue adjusted.\n\ *\n\ * @example\n\ * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n\ */\n\ vec3 czm_hue(vec3 rgb, float adjustment)\n\ {\n\ const mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n\ 0.595716, -0.274453, -0.321263,\n\ 0.211456, -0.522591, 0.311135);\n\ const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n\ 1.0, -0.2721, -0.6474,\n\ 1.0, -1.107, 1.7046);\n\ \n\ vec3 yiq = toYIQ * rgb;\n\ float hue = atan(yiq.z, yiq.y) + adjustment;\n\ float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n\ \n\ vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\n\ return toRGB * color;\n\ }\n\ "; }); ; TI"required_assets_digest; TI"%d43131caf2da5a2ebf2251a51949cd13; FI" _version; TI"%6776f581a4329e299531e1d52aa59832; F
Version data entries
2 entries across 2 versions & 1 rubygems