Commits

Diego Cantor committed 0bcc376

color picker memory fixed. lambertian sphere fixed in chatper 3

  • Participants
  • Parent commits d680c2f

Comments (0)

Files changed (11)

File 1727_01/ch1_Car.html

     },
     
     onBeforeShow: function (colpkr) {
-            $(this).ColorPickerSetColor(carColor);
+            $(colpkr).ColorPickerSetColor(carColor);
         }
     });
 

File 1727_03/ch3_Ambient_Test.html

     },
     
     onBeforeShow: function (colpkr) {
-			$(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+			$(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
 		}
 	})
 
     },
     
     onBeforeShow: function (colpkr) {
-			$(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+			$(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
 		}
 	})	
 	

File 1727_03/ch3_Nissan.html

     },
     
 onBeforeShow: function (colpkr) {
-        $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+        $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
     }
 })
 
     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+   $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
   }
  }) 
 </script>

File 1727_03/ch3_Positinal_Lighting.html

     },
     
 onBeforeShow: function (colpkr) {
-        $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+        $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
     }
 })
 
     },
     
 onBeforeShow: function (colpkr) {
-        $(this).ColorPickerSetColor('rgb(0.8,0.1,0.5)');
+        $(colpkr).ColorPickerSetColor('rgb(0.8,0.1,0.5)');
     }
 }) 
 

File 1727_03/ch3_Sphere_Goraud_Lambert.html

 
 <div id='bottom'>
 <table>
+<tr>
+<td>
+<table>
+  <caption>Light Direction</caption>
   <tr>
    <td>X:</td><td id='slider-x-value' width='30px' align='center'>0.0</td><td width='150px'><div id='slider-x'/></td>
-   <td colspan=2> Sphere Color (Material Diffuse Term:</td><td><div id='colorSelectorSphere' class='colorSelector'><div style='background-color:rgb(128,204,26)'></div></div></td>
+  </tr>
+  <tr>
+   <td>Y:</td> <td id='slider-y-value'  width='30px' align='center'>-1.0</td><td width='150px'><div id='slider-y'/></td>
   </tr>
   <tr>
    <td>Z:</td> <td id='slider-z-value'  width='30px' align='center'>-1.0</td><td width='150px'><div id='slider-z'/></td>
-   <td align='right'>Light Diffuse Term:</td><td id='slider-ld-value'  width='30px'>1.0</td><td width='150px' colspan='3'><div id='slider-ld'/></td>
   </tr>
  </table>
+</td>
+<td>
+   <table>
+   <tr>
+             <td colspan="2"> Sphere Color (Material Diffuse Term:</td>
+             <td>
+                  <div id='colorSelectorSphere' class='colorSelector'><div style='background-color:rgb(128,204,26)'></div></div>
+             </td>
+    </tr>
+    <tr>
+         <td align='right'>Light Diffuse Term:</td>
+         <td id='slider-ld-value'  width='30px'>1.0</td>
+         <td width='150px' colspan='3'><div id='slider-ld'/></td>
+     </tr>
+    </table>
+</td>
+</tr>
+</table>
 </div>
 <script>cview.run(cview.MODE_VIEW_AND_CONTROLS);</script>
 <script>
     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+   $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
   }
  })
 
 </script>
 </body>
-</html>
+</html>

File 1727_03/ch3_Sphere_Goraud_Phong.html

     },
     
     onBeforeShow: function (colpkr) {
-            $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+            $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
         }
     })
 
     },
     
     onBeforeShow: function (colpkr) {
-            $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+            $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
         }
     }) 
     
     },
     
     onBeforeShow: function (colpkr) {
-            $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+            $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
         }
     }) 
 </script>

File 1727_03/ch3_Sphere_Phong.html

     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+   $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
   }
  })
 
     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+   $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
   }
  }) 
  
     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+   $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
   }
  }) 
 

File 1727_03/ch3_Sphere_Phong_Positional.html

     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+   $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
   }
  })
 
     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+   $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
   }
  }) 
  
     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
+   $(colpkr).ColorPickerSetColor('rgb(0.5,0.8,0.1)');
   }
  }) 
 

File 1727_06/ch6_Blending.html

     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor(blendingColorHex);
+   $(colpkr).ColorPickerSetColor(blendingColorHex);
   }
  });
  
    $(el).ColorPickerHide();
    
  },
- color: '#00FFFF',
+ color: '#B606AE',
     onShow: function (colpkr) {
         $(colpkr).fadeIn(500);
         return false;
     },
     
 
-   onBeforeShow: function () {
-		$(this).ColorPickerSetColor(sphereColor);
+   onBeforeShow: function (colpkr) {
+		$(colpkr).ColorPickerSetColor(sphereColor);
 	}
 
  });
    $(el).ColorPickerHide();
    
  },
- color: '#B606AE',
+ color: '#00FFFF',
     onShow: function (colpkr) {
         $(colpkr).fadeIn(500);
         return false;
         updateObjectColor('cone', c );
     },
     
-    onBeforeShow: function () {
-		$(this).ColorPickerSetColor(coneColor);
+    onBeforeShow: function (colpkr) {
+		$(colpkr).ColorPickerSetColor(coneColor);
 	}
  });
 

File 1727_06/ch6_Culling.html

     },
     
     onBeforeShow: function (colpkr) {
-   $(this).ColorPickerSetColor('rgb(0.0,1.0,0.0)');
+   $(colpkr).ColorPickerSetColor('rgb(0.0,1.0,0.0)');
   }
  })
 

File 1727_09/ch9_Car_Showroom.html

     },
     
     onBeforeShow: function (colpkr) {
-            $(this).ColorPickerSetColor(carColor);
+            $(colpkr).ColorPickerSetColor(carColor);
         }
     });