{"id":0,"registry":{"0":{"submorphs":[{"__isSmartRef__":true,"id":1}],"scripts":[],"id":"CCF113DD-6DBA-4004-8830-D97BD0AA9949","shape":{"__isSmartRef__":true,"id":11},"droppingEnabled":true,"halosEnabled":true,"showsHalos":false,"name":"WanderingEye","partsBinMetaInfo":{"__isSmartRef__":true,"id":12},"eventHandler":{"__isSmartRef__":true,"id":15},"layout":{"__isSmartRef__":true,"id":16},"derivationIds":[5320,"BAC2565C-DB7A-4B3F-B09B-8F670540817E"],"_ClipMode":"visible","__serializedExpressions__":["_Position","distanceToDragEvent"],"isBeingDragged":false,"_Rotation":0,"_Scale":1,"__LivelyClassName__":"lively.morphic.Morph","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)","distanceToDragEvent":"lively.pt(53.0,-11.6)"},"1":{"submorphs":[],"scripts":[{"__isSmartRef__":true,"id":2}],"id":"9A76CB8A-CB5D-49CA-8AF7-1459B5873BBE","shape":{"__isSmartRef__":true,"id":3},"droppingEnabled":true,"halosEnabled":true,"showsHalos":false,"name":"Ellipse","partsBinMetaInfo":{"__isSmartRef__":true,"id":4},"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":5},"layout":{"__isSmartRef__":true,"id":6},"derivationIds":[5321,"515D1244-21B5-48D4-99A3-C09BFEB1611D"],"_ClipMode":"visible","__serializedExpressions__":["_Position"],"eventsAreIgnored":true,"_Rotation":0,"_Scale":1,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":7},"__LivelyClassName__":"lively.morphic.Morph","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.4,1.0)"},"2":{"suspended":false,"target":{"__isSmartRef__":true,"id":1},"selector":"pupilFollowMouse","args":[],"stopped":false,"tickTime":100,"__LivelyClassName__":"lively.morphic.TargetScript","__SourceModuleName__":"Global.lively.morphic.Core"},"3":{"_BorderWidth":0,"_BorderRadius":0,"_Opacity":1,"_BorderStyle":"solid","__serializedExpressions__":["position","_Extent","_Fill","_BorderColor","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Ellipse","__SourceModuleName__":"Global.lively.morphic.Shapes","position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(11.2,11.2)","_Fill":"Color.rgb(39,11,0)","_BorderColor":"Color.rgb(255,255,255)","_Padding":"lively.rect(0,0,0,0)"},"4":{"partsSpaceName":"PartsBin/NewWorld","migrationLevel":1,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"5":{"morph":{"__isSmartRef__":true,"id":1},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"6":{},"7":{"pupilFollowMouse":{"__isSmartRef__":true,"id":8}},"8":{"varMapping":{"__isSmartRef__":true,"id":9},"source":"function pupilFollowMouse() {\n    var eye = this.owner;\n    var eyeR = Math.min(eye.bounds().width, eye.bounds().height)/2;\n    var pupilR = Math.min(this.bounds().width, this.bounds().height)/2;\n    var mousePt = this.world().firstHand().getPosition();\n    var eyePt = eye.worldPoint(eye.innerBounds().center());\n    var relMousePt = mousePt.subPt(eyePt);\n    var pupilR = (eyeR-pupilR) / (1 + (200/Math.max(mousePt.r(), 1)));\n    var pupilPt = Point.polar([pupilR, mousePt.dist(eyePt)].min(), relMousePt.theta());\n    this.align(this.bounds().center(), eye.innerBounds().center().addPt(pupilPt));\n}","funcProperties":{"__isSmartRef__":true,"id":10},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"9":{"this":{"__isSmartRef__":true,"id":1}},"10":{"user":"ohshima","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jul 16 2013 10:37:14 GMT-0800 (UTC)\")"},"11":{"_BorderWidth":0,"_BorderRadius":0,"_Opacity":1,"_BorderStyle":"solid","__serializedExpressions__":["position","_Extent","_Fill","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Ellipse","__SourceModuleName__":"Global.lively.morphic.Shapes","position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(26.0,22.0)","_Fill":"Color.rgb(255,255,255)","_Padding":"lively.rect(0,0,0,0)"},"12":{"partsSpaceName":"PartsBin/Fun/","migrationLevel":8,"partName":"WanderingEye","comment":"An image of an eye with stepping behavior so the pupil follows the mouse location","changes":[{"__isSmartRef__":true,"id":13},{"__isSmartRef__":true,"id":14}],"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Wed Sep 05 2012 15:01:35 GMT-0800 (UTC)\")"},"13":{"author":"ohshima","message":"no comment","id":"B1ADE5EA-8308-475B-8F50-6ABFF2508B5D","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jul 16 2013 10:37:22 GMT-0800 (UTC)\")"},"14":{"__serializedExpressions__":["date"],"author":"Dan","message":"made the pupil ignore events so you can drag the eye directly","id":"9CF35399-E85A-4CAC-9B15-05C790FDC59F","date":"new Date(\"Thu Jul 18 2013 08:37:53 GMT-0800 (UTC)\")"},"15":{"morph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"16":{},"isSimplifiedRegistry":true}}