Added :d to mouse shapes
This commit is contained in:
@@ -113,7 +113,6 @@ function Lisp (lib = {}, includes = []) {
|
||||
|
||||
const interpret = async function (input, context) {
|
||||
if (!input) { console.warn('Lisp', 'error', context.scope); return null }
|
||||
|
||||
if (context === undefined) {
|
||||
return interpret(input, new Context(lib))
|
||||
} else if (input instanceof Array) {
|
||||
|
||||
@@ -126,13 +126,13 @@ function Ronin () {
|
||||
a: { x: this.mouseOrigin.x, y: this.mouseOrigin.y },
|
||||
b: { x: pos.x, y: pos.y }
|
||||
}
|
||||
const distance = Math.sqrt(((line.a.x - line.b.x) * (line.a.x - line.b.x)) + ((line.a.y - line.b.y) * (line.a.y - line.b.y)))
|
||||
const d = Math.sqrt(((line.a.x - line.b.x) * (line.a.x - line.b.x)) + ((line.a.y - line.b.y) * (line.a.y - line.b.y)))
|
||||
const circle = {
|
||||
cx: this.mouseOrigin.x,
|
||||
cy: this.mouseOrigin.y,
|
||||
r: distance
|
||||
r: d
|
||||
}
|
||||
return { x, y, line, rect, pos, circle, type, 'is-down': type !== 'mouse-up' ? true : null }
|
||||
return { x, y, d, line, rect, pos, circle, type, 'is-down': type !== 'mouse-up' ? true : null }
|
||||
}
|
||||
|
||||
// Zoom
|
||||
|
||||
Reference in New Issue
Block a user