File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ var GLMath={
3737 * each of two other vectors. If both vectors are unit length
3838 * (via {@link glmath.GLMath.vec3norm}), the sine of
3939 * the angle between them is equal to the length of their
40- * cross product.<p>
40+ * cross product. <small>(More formally, the length of the cross
41+ * product equals |<b>a</b>| * |<b>b</b>| * sin θ
42+ * where |<b>x</b>| is the length of vector <b>x</b>.)</small><p>
4143 * The cross product (<b>c</b>) of vectors <b>a</b> and <b>b</b> is found as
4244 * follows:<pre>
4345 * <b>c</b>.x = <b>a</b>.y * <b>b</b>.z - <b>a</b>.z * <b>b</b>.y
@@ -59,6 +61,9 @@ return [a[1]*b[2]-a[2]*b[1],
5961 * If both vectors are unit length
6062 * (via {@link glmath.GLMath.vec3norm}), the cosine
6163 * of the angle between them is equal to their dot product.
64+ * <small>(More formally, the dot
65+ * product equals |<b>a</b>| * |<b>b</b>| * cos θ
66+ * where |<b>x</b>| is the length of vector <b>x</b>.)</small>
6267 * @param {Array<number> } a The first vector.
6368 * @param {Array<number> } b The second vector.
6469 * @return {number } A number representing the dot product.
Original file line number Diff line number Diff line change @@ -516,8 +516,17 @@ LightSource.prototype.setParams=function(params){
516516function Lights ( ) {
517517 this . lights = [ new LightSource ( ) ] ;
518518 /**
519- * Ambient color for the scene. In the absence of
520- * other lighting effects, all objects will be given this color.
519+ * Ambient color for the scene. This is the color of the light
520+ * that shines on every part of every object equally and in
521+ * every direction. In the absence of
522+ * other lighting effects, all objects will be given this color.<p>
523+ * <small>Ambient light is an efficient simulation of the
524+ * real-world effect of light bouncing back and forth between
525+ * many different objects in an area. One example of this
526+ * phenomenon is sunlight reaching an indoor room without
527+ * directly hitting it, such that the sunlight reflects off the walls
528+ * and so illuminates most of the room pretty much uniformly.
529+ * Ambient lights simulate this phenomenon.</small>
521530 * @default
522531 */
523532 this . sceneAmbient = [ 0.2 , 0.2 , 0.2 ] ;
You can’t perform that action at this time.
0 commit comments