1 /** 2 @namespace 3 4 If a parameter's type is followed by square braces, it means the 5 parameter has a default value, therefore setting that parameter is 6 optional. 7 */ 8 c3dl.effects = {}; 9 10 /** 11 @private 12 @constant 13 */ 14 c3dl.effects.STD_EFFECT = 0; 15 16 17 c3dl.effects.SOLID_COLOR = 0; 18 /** 19 Gooch shading is a type of Non-photorealistic rendering (NPR) which is often used 20 in technical illustrations since it properly conveys the shape of objects. 21 22 Warm and cool colors are used to indicate the surface normals and therefore 23 the curvature of the object.<br /><br /> 24 25 <b>Parameters</b><br /> 26 warmColor {Array} [0.5, 0.5, 0.0] Fragments closer to active light are colored using the warm color.<br /> 27 coolColor {Array} [0.0, 0.0, 1.0] Fragments farther from the active light are colored using the cool color.<br /> 28 surfaceColor {Array} [0.1, 0.1, 0.1] Base surface color.<br /> 29 30 @constant 31 */ 32 c3dl.effects.GOOCH = 0; 33 34 35 /** 36 The cartoon effect renders objects as if they were cartoons. 37 This effect only uses some light information.For positional lights, 38 the position is taken into account. For directional lights, the 39 direction is taken into account and for spotlights, the position, 40 direction and cutoff are taken into account.<br /> 41 <br /> 42 43 <b>Parameters</b><br /> 44 qMap {String} Path of a quantization map.<br /> 45 46 @constant 47 */ 48 c3dl.effects.CARTOON = 0; 49 50 /** 51 Renders objects using sepia color tones. Once the final colors are calculated 52 for each fragment, they will be converted to greyscale, and finally multiplied 53 by the sepia tone.<br /> 54 <br /> 55 56 <b>Parameters</b><br /> 57 color {Array} [1.2, 1.0, 0.8] Sepia tone. 58 @constant 59 */ 60 c3dl.effects.SEPIA = 0; 61 62 /** 63 The greyscale effect renders objects using shades of grey. The method which is used to 64 convert the colors to greyscale closely matches the NTSC standard to convert colors to 65 greyscale. NTC uses (Red * 0.33 + Green * 0.5 + Blue * 0.17).<br /> 66 <br /> 67 68 <b>Parameters</b><br /> 69 color {Array} [0.3, 0.6, 0.1] Values closely match the NTSC standard values to convert color 70 to greyscale values. <br /> 71 72 @constant 73 */ 74 c3dl.effects.GREYSCALE = 0; 75 76 /** 77 This constant is an effect and therefore does not need to be 78 instantiated. If a geometric object is not explicitly assigned an effect, 79 it will be rendered using this instance effect which is closely matches 80 the fixed function pipepline shaders. Use this if an object was assigned 81 an effect, but should then be set back to standard rendering.<br /> 82 <br /> 83 This can be passed directly to an object's setEffect.<br /> 84 <br /> 85 86 <b>Parameters</b><br /> 87 none 88 89 @constant 90 */ 91 c3dl.effects.STANDARD = 1; 92