@@ -653,13 +653,13 @@ function Material(ambient, diffuse, specular,shininess,emission) {
653653 this . shininess = ( shininess == null ) ? 0 : Math . min ( Math . max ( 0 , shininess ) , 128 ) ;
654654 /** Ambient reflection of this material.<p>
655655 * Ambient reflection indicates how much an object reflects
656- * ambient lights (lights that color pixels
657- * the same way regardless of direction or distance)
658- * in the red, green, and blue components.
656+ * ambient colors, those that color pixels the same way regardless
657+ * of direction or distance.
659658 * Because every part of an object will be shaded the same way by ambient
660- * light, an object with just ambient reflection will not look much like a 3D object.
661- * Ambient reflection
662- * depends on the color of ambient lights.<p>
659+ * light, an object with just ambient reflection will not look much like a 3D object.<p>
660+ * This value is a 3-element array giving the red, green, and blue
661+ * components of the ambient reflection; the final ambient color depends
662+ * on the ambient color of the scene.
663663 * (0,0,0) means no ambient reflection,
664664 * and (1,1,1) means total ambient reflection.<p>
665665 * Setting ambient and diffuse reflection to the same value usually defines an object's
@@ -669,14 +669,14 @@ function Material(ambient, diffuse, specular,shininess,emission) {
669669 */
670670 this . ambient = ambient ? ambient . slice ( 0 , 3 ) : [ 0.2 , 0.2 , 0.2 ] ;
671671 /**
672- * Diffuse reflection of this material.<p>
673- * Diffuse reflection indicates how much an object reflects
674- * diffuse lights (lights that point
675- * directly on the object) in the red, green, and blue components.
676- * Because different parts of an object are shaded differently depending
672+ * Diffuse reflection of this material. Diffuse reflection is the color that a material
673+ * reflects equally in all directions. Because different parts of an object are shaded
674+ * differently depending
677675 * on how directly they face diffuse lights, diffuse reflection can contribute
678- * much of the 3D effect of that object. Diffuse reflection
679- * depends on the color of diffuse lights.<p>
676+ * much of the 3D effect of that object.<p>
677+ * This value is a 4-element array giving the red, green, blue, and
678+ * alpha components of the diffuse reflection; the final diffuse color depends
679+ * on the reflected colors of lights that shine on the material.
680680 * (0,0,0,1) means no diffuse reflection,
681681 * and (1,1,1,1) means total diffuse reflection.<p>
682682 * Setting ambient and diffuse reflection to the same value usually defines an object's
@@ -688,12 +688,14 @@ function Material(ambient, diffuse, specular,shininess,emission) {
688688 */
689689 this . diffuse = diffuse ? diffuse . slice ( 0 , diffuse . length ) : [ 0.8 , 0.8 , 0.8 , 1.0 ] ;
690690 /** Specular highlight reflection of this material.
691- * Specular reflection makes an object shiny, and it depends
692- * on lights that give off specular highlights as well as on the color
693- * of those highlights. Similar to diffuse reflection, specular reflection
691+ * Similar to diffuse reflection, specular reflection
694692 * is affected by how directly each part of an object faces
695693 * a light that gives off specular highlights, but unlike diffuse light,
696694 * specular light doesn't scatter very much to other parts of an object.
695+ * Specular reflection can make an object shiny.
696+ * This value is a 3-element array giving the red, green, and blue
697+ * components of the ambient reflection; the final specular color depends
698+ * on the specular color of lights that shine on the material.
697699 * (0,0,0) means no specular reflection,
698700 * and (1,1,1) means total specular reflection.<p>
699701*/
@@ -705,6 +707,8 @@ function Material(ambient, diffuse, specular,shininess,emission) {
705707* same way regardless of lighting (this property won't be used in the
706708* default shader if [Scene3D.disableLighting()]{@link glutil.Scene3D#disableLighting}
707709* is called, disabling lighting calculations).<p>
710+ * This value is a 3-element array giving the red, green, and blue
711+ * components.
708712* For each of the three color components, positive values add to that component,
709713* while negative values subtract from it. (0,0,0) means no additive color.
710714 */
@@ -1373,9 +1377,7 @@ Scene3D.prototype.createBuffer=function(){
13731377 * see {@link glmath.GLMath.mat4perspective}.
13741378 * @param {number } fov Y-axis field of view, in degrees. Should be less
13751379* than 180 degrees. (The smaller
1376- * this number, the bigger close objects appear to be. As a result,
1377- * zoom can be implemented by multiplying field of view by an
1378- * additional factor.)
1380+ * this number, the bigger close objects appear to be.)
13791381* @param {number } aspect The ratio of width to height of the viewport, usually
13801382* the scene's aspect ratio (getAspect()).
13811383* @param {number } near The distance from the camera to
@@ -1401,7 +1403,7 @@ Scene3D.prototype.setPerspective=function(fov, aspect, near, far){
14011403 * plane and the top to the bottom.<p>
14021404 * If the view rectangle's aspect ratio doesn't match the desired aspect
14031405 * ratio, the view rectangle will be centered on the 3D scene's viewport
1404- * or otherwise moved so as to keep the entire view rectangle visible without stretching
1406+ * or otherwise moved and scaled so as to keep the entire view rectangle visible without stretching
14051407 * or squishing it.
14061408 * <p>
14071409 * For considerations when choosing the "near" and "far" parameters,
@@ -1438,7 +1440,7 @@ Scene3D.prototype.setOrthoAspect=function(left, right, bottom, top, near, far, a
14381440 * The near and far clipping planes will be set to -1 and 1, respectively.<p>
14391441 * If the view rectangle's aspect ratio doesn't match the desired aspect
14401442 * ratio, the view rectangle will be centered on the 3D scene's viewport
1441- * or otherwise moved so as to keep the entire view rectangle visible without stretching
1443+ * or otherwise moved and scaled so as to keep the entire view rectangle visible without stretching
14421444 * or squishing it.
14431445 * @param {number } left Leftmost coordinate of the view rectangle.
14441446 * @param {number } right Rightmost coordinate of the view rectangle.
@@ -1640,8 +1642,9 @@ Scene3D.prototype.setViewMatrix=function(matrix){
16401642* the point in world space that the camera is looking at. May be null or omitted,
16411643* in which case the default is the coordinates (0,0,0).
16421644* @param {Array<number> } [up] A 3-element vector specifying
1643- * the up-vector direction. May be null or omitted, in which case
1644- * the default is a vector pointing positive on the Y axis. This
1645+ * the direction from the center of the camera to its top. This parameter may
1646+ * be null or omitted, in which case the default is the vector (0, 1, 0),
1647+ * the vector that results when the camera is held upright. This
16451648* vector must not point in the same or opposite direction as
16461649* the camera's view direction. (For best results, rotate the vector (0, 1, 0)
16471650* so it points perpendicular to the camera's view direction.)
0 commit comments