@gush/candybar
Advanced tools
Comparing version 0.0.0-alpha25 to 0.0.0-alpha26
@@ -564,2 +564,24 @@ 'use strict'; | ||
var Segment = function Segment(p1, p2) { | ||
classCallCheck(this, Segment); | ||
this.p1 = p1; | ||
this.p2 = p2; | ||
// alias | ||
this.a = this.p1; | ||
this.b = this.p2; | ||
// | ||
this.points = [this.p1, this.p2]; | ||
var tl = new Point(Math.min(p1.x, p2.x), Math.min(p1.y, p2.y)); | ||
var br = new Point(Math.max(p1.x, p2.x), Math.max(p1.y, p2.y)); | ||
var _tl$delta = tl.delta(br), | ||
_tl$delta2 = slicedToArray(_tl$delta, 2), | ||
dx = _tl$delta2[0], | ||
dy = _tl$delta2[1]; | ||
this.bounds = new Bounds(tl.x, tl.y, dx, dy); | ||
}; | ||
var Velocity = function () { | ||
@@ -619,2 +641,3 @@ function Velocity(vx, vy) { | ||
Pointer: Pointer, | ||
Segment: Segment, | ||
Velocity: Velocity, | ||
@@ -621,0 +644,0 @@ utils: utils |
{ | ||
"name": "@gush/candybar", | ||
"version": "0.0.0-alpha25", | ||
"version": "0.0.0-alpha26", | ||
"description": "🍫", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,2 +0,2 @@ | ||
# Candybar 🍫 | ||
# Candybar 🍫 [![Build Status](https://travis-ci.org/gushers/candybar.svg?branch=master)](https://travis-ci.org/gushers/candybar) | ||
@@ -3,0 +3,0 @@ A simple `<canvas>` rendering engine and collection of classes and utils. And by "engine" I mean about as advanced as a broken scooter 🛴 |
365604
11
581