Commits

Justin Love committed 6b80890

Translucent solar noon; nil disk: modifier key help; 0.12

  • Participants
  • Parent commits 8ba57e4

Comments (0)

Files changed (3)

 <plist version="1.0">
 <dict>
 	<key>currentDocument</key>
-	<string>script/DisClock.js</string>
+	<string>index.html</string>
 	<key>documents</key>
 	<array>
 		<dict>
 					<key>filename</key>
 					<string>index.html</string>
 					<key>lastUsed</key>
-					<date>2008-03-10T01:49:55Z</date>
+					<date>2008-03-31T02:13:17Z</date>
+					<key>selected</key>
+					<true/>
 				</dict>
 				<dict>
 					<key>expanded</key>
 					<key>filename</key>
 					<string>../../../../Library/Widgets/Disk Clock.wdgt/index.html</string>
 					<key>lastUsed</key>
-					<date>2008-03-10T02:27:49Z</date>
+					<date>2008-03-31T02:13:17Z</date>
 				</dict>
 			</array>
 			<key>expanded</key>
 	<integer>199</integer>
 	<key>metaData</key>
 	<dict>
+		<key>../../../../Library/Widgets/Disk Clock.wdgt/index.html</key>
+		<dict>
+			<key>caret</key>
+			<dict>
+				<key>column</key>
+				<integer>2</integer>
+				<key>line</key>
+				<integer>44</integer>
+			</dict>
+			<key>firstVisibleColumn</key>
+			<integer>104</integer>
+			<key>firstVisibleLine</key>
+			<integer>15</integer>
+		</dict>
 		<key>../Deep Sleep/deepsleep.css</key>
 		<dict>
 			<key>caret</key>
 			<key>caret</key>
 			<dict>
 				<key>column</key>
-				<integer>2</integer>
+				<integer>4</integer>
 				<key>line</key>
-				<integer>41</integer>
+				<integer>33</integer>
 			</dict>
 			<key>firstVisibleColumn</key>
 			<integer>0</integer>
 			<key>firstVisibleLine</key>
-			<integer>21</integer>
+			<integer>15</integer>
 		</dict>
 		<key>script/DisClock.js</key>
 		<dict>
 			<key>caret</key>
 			<dict>
 				<key>column</key>
-				<integer>33</integer>
+				<integer>0</integer>
 				<key>line</key>
-				<integer>1347</integer>
+				<integer>1662</integer>
 			</dict>
 			<key>firstVisibleColumn</key>
 			<integer>0</integer>
 			<key>firstVisibleLine</key>
-			<integer>1292</integer>
+			<integer>1624</integer>
+		</dict>
+		<key>style/DisClock.css</key>
+		<dict>
+			<key>caret</key>
+			<dict>
+				<key>column</key>
+				<integer>0</integer>
+				<key>line</key>
+				<integer>82</integer>
+			</dict>
+			<key>firstVisibleColumn</key>
+			<integer>0</integer>
+			<key>firstVisibleLine</key>
+			<integer>61</integer>
 		</dict>
 	</dict>
 	<key>openDocuments</key>
 	<array>
 		<string>index.html</string>
 		<string>script/DisClock.js</string>
+		<string>../../../../Library/Widgets/Disk Clock.wdgt/index.html</string>
+		<string>style/DisClock.css</string>
 		<string>.hgignore</string>
 	</array>
 	<key>showFileHierarchyDrawer</key>
 	<key>CFBundleName</key>
 	<string>Disk Clock</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.11</string>
+	<string>0.12</string>
 	<key>CFBundleVersion</key>
-	<string>0.11</string>
+	<string>0.12</string>
 	<key>CloseBoxInsetX</key>
 	<integer>25</integer>
 	<key>CloseBoxInsetY</key>

script/DisClock.js

       this.cache();
     },
     render: function(context) {
+      // Solar noon marker
+      var width = (RADIANS / 180); // i.e., two degrees (each side, total four)
+      
+      var sky = '#3BB9FF';
       // [position, color, (position, color,...) position]
       this.drawVariableWedges(context, [
-        this.sunrise, '#3BB9FF',
+        this.sunrise, sky,
+        this.noon - width, 'red',
+        this.noon + width, sky,
         this.sunset, '#00F',
         this.nightBegin, '#424',
         this.nightEnd, '#00F',
           this.inBed, '#000', this.outBed], {alpha: 0.5});
       }
       
-      this.drawRing(context);
       
       // custom color the markers to show up better
       var darkness = '#BBB';
         }
       }});
       
-      // Solar noon marker
-      var width = (RADIANS / 180);
-      this.drawVariableWedges(context, [
-        this.noon - width, 'red', this.noon + width],
-        {alpha: 1 - (0.3 * this.scale)});
+      // Solar noon marker - translucent overlay so visible on markers
+      //   A simple marker color won't do, because the solar marker
+      //    can be smaller than regular markers
+      this.drawVariableWedges(context,
+        [this.noon - width, 'red', this.noon + width],
+        {alpha: 1 - (0.6 * this.scale)});
+
+      this.drawRing(context);
     },
     last: null
   });
     revs: function(ms) {return this.scale;},
     polarCollide: function(polar) {return false;}
   });
+  
+  var nil = create('Nil', 100, 1, 1, {
+    draw: function() {},
+    drawOverlay: function() {this.postDescription(0);},
+    postDescription: function(revs) {
+      postInfo({p: ["ALT: target", "CTRL: normal", "SHIFT: slow"]});
+    }
+  });
 
   var all = [
     pictun,
       }
     }
   }
+  publish('postInfo');
   
   // Various things call this to inform the system that it needs to run
   //   at animation speed.  (Otherwise there might be up to a day between
         return it;
       }
     }
-    return {disk: null, revs: 0};
+    return {disk: nil, revs: 0};
   }
   publish('over');