skulpt / skulpt

Skulpt is a Javascript implementation of the Python programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mouse Movement in Turtle Graphics

TASKxMANAGER opened this issue · comments

I'm not sure I'm going about this the right way. I tried to implement a function to the graphics screen to listen for mouse movement without clicking. There is already a "mousemove" event in the turtle.js file and I though maybe I could do something like the following:
proto.$onmousemove = function(method) { this.getManager("mousemove").addHandler(method); }; proto.$onclick.minArgs = 1; proto.$onclick.co_varnames = ["method"];

I'm also wondering if this might be solved easier by using the mouse.x or mouse.y in processing.js but I didn't have much success with it. Just importing and printing mouseX or MouseY did not work for me.