¨Ï¥Î¥Øªº
²£¥Í¥ú·½·Ó®g¦bª«¥óªº®ÄªG
»¡©ú
- Light ÂoÃ誺®ÄªG¬O²£¥Í¥ú·½·Ó®g¦bª«¥ó¤W, ¤]´N¬O¦bª«¥ó¤W¼ÒÀÀ¥ú½u·Ó®gªº®ÄªG¡C
- ¦bª«¥ó¥[¤J Light ÂoÃè«á, ¥²¶·¦b©I¥s Light ÂoÃ誺¤èªk, ¤è¯à¨ÏÂoÃ誺®ÄªGµo´§¥X¨Ó¡C
Light ÂoÃ誺¤èªk²¦C¦p¤U¡G
¤èªk | »¡©ú | AddAmbient | ¥[¤J¥]³òªº¥ú·½¡]Àô¹Ò¥ú¡^ | AddCone | ¥[¤JÀ@§Î¥ú·½¡]Ãþ¦ü¤â¹qµ©©Î·Ó®g¡^ | AddPoint | ¥[¤JÂI¥ú·½ | ChangColor | §ïÅÜ¥úªºÃC¦â | ChangStrength | §ïÅÜ¥ú·½ªº±j«× | Clear | ²M°£©Ò¦³ªº¥ú·½ | MoveLight | ²¾°Ê¥ú·½ |
»yªkµ²ºc- <HTML¼ÐÅÒSTYLE="filter: Light">
½Æ»s¥N½X ª«¥ó.style.filter="Light"
ª«¥ó.style.filters.Light.¤èªk(¤èªkªº°Ñ¼Æ)
¥Ü½d±Nª«¥ó¥[¤W¥ú·½·Ó®gªºLightÂoÃè®ÄªG, ¡C- filter=" Light "
- filters.Light.AddCone(0, 250, 1, 255, 0, 255, 255, 100, 50, 25)
½Æ»s¥N½X ±Nª«¥ó¥[¤W¥ú·½·Ó®gªºLightÂoÃ誺±´·Ó¿O®ÄªG, ¦ì¸m¡u0, 255, 1¡v¡BÃC¦â¡u255, 255, 100¡v¡B±j«×¡u50¡v¡B·Ó®g½d³ò¡u25¡v«×¡C- filters.Light.MoveLight(1, 60, 50, 0, 1)
½Æ»s¥N½X ²¾°Êª«¥ó¤W¯Á¤Þ½s¸¹¡u0¡vªº¥ú·½·Ó®g¦ì¸m¥H¡u1¡vµ´¹ï¦ì¸m¤è¦¡²¾¨ì¡u60, 50, 0¡v¡C
½d¨Ò¾Ç²ß ¬°¹Ï¤ù¥[¤WÂù¦â±´·Ó¿O®ÄªG
·íºô¶¤å¥ó¸ü¤J®É¡]onLoad¡^©I¥s¡uiniLight¡v¨ç¼Æ¥ý±N¦WºÙ°Ñ·Ó¡umypic¡vªº¹Ï¤ùª«¥ó¥[¤W2 Ó Light ÂoÃ誺¡uAddCone¡vÀ@§Î¥ú·½®ÄªG, ±µµÛ©I¥s¡uMoveRight¡v¨ç¼Æ±N«Ø¥ßªºÀ@§Î¥ú·½¨Ï¥Î Light ÂoÃè¡uMoveLight¡v¤èªkº¥¦¸²¾°Ê¦V¹Ï¤ùª«¥ó¨â°¼·Ó®g, ·íÀ@§Î¥ú·½·Ó®g¨ì¹Ï¤ùª«¥óªº¨â°¼Ãä½t®É, ©I¥s¡uMoveLeft¡v¨ç¼Æ¨Ï¥Î Light ÂoÃè¡uMoveLight¡v¤èªk±NÀ@§Î¥ú·½·Ó®g¤è¦Vº¥¦¸²¾¦^¹Ï¤ùª«¥óªº¤¤¥¡¡C
½d¨Òì©l½X- <html><head><title>css_Light</title>
- <script language="JavaScript">
- Count=0, flag=0
- function iniLight(){
- document.mypic.style.filter="Light"
- document.mypic.filters.Light.AddAmbient(255, 255, 255, 35)
- document.mypic.filters.Light.AddCone(400, 250, 1, 0, 0, 250, 0, 0, 10, 10)
- document.mypic.filters.Light.AddCone(0, 250, 1, 400, 0, 0, 255, 0, 10, 10)
- MoveRight()
- }
- function MoveRight() {
- if(flag==0){
- document.mypic.filters.Light.MoveLight(1, 5, 0, 0, 0)
- document.mypic.filters.Light.MoveLight(2, -5, 0, 0, 0)
- Count++
- if (Count <= 70) {
- setTimeout("MoveRight()", 5)
- } else {
- flag=1
- MoveLeft()
- }
- }
- }
- function MoveLeft() {
- if(flag==1){
- document.mypic.filters.Light.MoveLight(1, -5, 0, 0, 0)
- document.mypic.filters.Light.MoveLight(2, 5, 0, 0, 0)
- Count--;
- if (Count >= 0) {
- setTimeout("MoveLeft()", 1000)
- } else {
- Count = 0
- flag=0
- MoveRight()
- }
- }
- }
- </script>
- </head>
- <bod onload="iniLight()">
- <img name="mypic" src="img/s011.jpg">
- </bod ></html>
½Æ»s¥N½XJavaScript ºë½o½d¨ÒÃã¨å | |
¤£ºÞ±z¬O³]p°ÊºAºô¶¡A©Î¬On¥Î³Ì·sªº Ajax §Þ³N¡AJavascript ³£¦û¤F¬Û·í¦Y«ªº¨¤¦â. ¦ý¬O´Nºâ¾Ç¹L Javascript¡A¤]¤£¤@©w³£·|°O±o¦U¦¡¦U¼Ëªº»yªk¡A¦]¦¹¤@¥»ÀH®É¥i¥H¬d¾\ªº½d¨ÒÃã¨å´N«D±`»Ýn¡C
1.²©öªºJavascript »yªk¤Jªù¤Î°ò¦Æ[©À¡AÀ°§U±z§Ö³t¤F¸ÑJavaScriptªº¨Ï¥Î¤è¦¡¡C
2.·f°t¹Ï¤å¸Ñ»¡¤Îºë¬ü½d¨Ò¥Ü½d¡AÅý±z¤£¦ý¬Ý±oÀ´¡AÁٯన¤Wª¾¹Dn«ç»ò¥Î¡A¬O±z¦b³]pºô¶®É³Ì¤è«Kªº°Ñ¦Ò®Ñ¡C
3.³Ì«á¥[¤J 10 Óºë¿ïºî¦X½d¨Ò¡AÅý±z¤F¸Ñ³o¨Ç»yªk¬O¦p¦ó¹ê»Ú¹B¥Î¦bºô¶¤¤¡C
4.²M·¡¼Ð¥Ü¾A¥Îªº¦UºØÂsÄý¾¹ºØÃþ»Pª©¥»¡A²Å¦X¹ê»Ú»Ý¨D¡C
5.¥úºÐ¤¤¦¬¿ý§¹¾ãªº½d¨Òºô¶ÀɮסA¤è«K±zª½±µ¨ú¥Î©Mקï¦A¹B¥Î¡C |
|