point.js

<script src="./point_src/point.js"></script>

Meta Data
dependencies ()
unused_keys ('title',)
unknown_keys ('categories', 'doc_loader', 'files', 'doc_imports', 'doc_content', 'doc_readme')
categories ['primary', 'point']
doc_loader ['loadDocInfo']
files ['', 'relative-xy.js', 'pointcast.js']
doc_imports ['point']
doc_content ['point/*.md']
doc_readme ['point/readme.md']
filepath_exists True
path point.js
filepath point.js
clean_files ('relative-xy.js', 'pointcast.js')

The entire library is focused upon the single 2D Point.

Getting Started

A Point accepts many properties, or an object.

Default properties:

// accepts: (x, y, radius, rotation)
new Point(100, 200, 20, 90)

Or array of the same four attributes

// accepts: (x, y, radius, rotation)
new Point([100, 200, 20, 90])

The same properties may be applied through an object:

new Point({
    x: 100
    , y: 200
    , radius: 20
    , rotation: 90
})

Anything can be applied to the point instance directly:

let point = new Point

point.x = 100
point.y = 200
point.radius = 20
point.rotation = 90

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

lerp()

Point

The lerp() method accepts a Point and a float. The float value 0 to 1 is a represents a percent amount along the distance to the other point.

point.lerp(other, .5)