distances

<script src="./point_src/distances"></script>

Track the distances between given points.

const d = new Distances;
d.addPoints(...points);

const near = d.closest(Point.mouse.position)


class MainStage extends Stage {
    // canvas = document.getElementById('playspace');
    canvas = 'playspace'

    mounted(){
        let p = this.point = new MyPoint(300,200)
        this.dragging.add(p)
    }

    draw(ctx){
        this.clear(ctx)
        this.point.pen.indicator(ctx)
    }
}


stage = MainStage.go()
copy
Meta Data
filepath_exists True
path distances
filepath distances.js
clean_files ()

Method List

comment.html|safe
comment.html|safe
  • method_kind

    method_name

    (
    param_name = param.default_value ,
    )
    from class_name
    comment.html|safe
    comment.html|safe