mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Prebuilt module for commit 5854c25dd5
This commit is contained in:
parent
27cc10d485
commit
d879be09dc
7 changed files with 70 additions and 18 deletions
|
@ -169,6 +169,8 @@ contribute to the code.
|
|||
matrix (#972).
|
||||
- Allow `Item#position` to be selected via `Item#position.selected` (#980).
|
||||
- Add `tolerance` argument to `Path#join(path, tolerance)`.
|
||||
- Add `Curve#getOffsetAtTime(time)`, as the reverse of
|
||||
`Curve#getTimeAt(offset)`.
|
||||
|
||||
### Fixed
|
||||
- Fix calculations of `Item#strokeBounds` for all possible combinations of
|
||||
|
|
12
dist/docs/assets/js/paper.js
vendored
12
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sun Jun 12 17:07:43 2016 +0200
|
||||
* Date: Sun Jun 12 18:32:05 2016 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -6380,6 +6380,10 @@ statics: {
|
|||
|
||||
getParameterAt: '#getTimeAt',
|
||||
|
||||
getOffsetAtTime: function(t) {
|
||||
return this.getPartLength(0, t);
|
||||
},
|
||||
|
||||
getLocationOf: function() {
|
||||
return this.getLocationAtTime(this.getTimeOf(Point.read(arguments)));
|
||||
},
|
||||
|
@ -6417,7 +6421,7 @@ new function() {
|
|||
this[name + 'At'] = function(location, _isTime) {
|
||||
var values = this.getValues();
|
||||
return Curve[name](values, _isTime ? location
|
||||
: Curve.getTimeAt(values, location, 0));
|
||||
: Curve.getTimeAt(values, location));
|
||||
};
|
||||
|
||||
this[name + 'AtTime'] = function(time) {
|
||||
|
@ -7218,8 +7222,8 @@ var CurveLocation = Base.extend({
|
|||
|
||||
function isInRange(angle, min, max) {
|
||||
return min < max
|
||||
? angle > min && angle < max
|
||||
: angle > min && angle <= 180 || angle >= -180 && angle < max;
|
||||
? angle > min && angle < max
|
||||
: angle > min || angle < max;
|
||||
}
|
||||
|
||||
var v2 = c2.getTangentAtTime(t1Inside ? t1 : tMin),
|
||||
|
|
38
dist/docs/classes/Curve.html
vendored
38
dist/docs/classes/Curve.html
vendored
|
@ -1470,6 +1470,44 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="getoffsetattime-time" class="member">
|
||||
<div class="member-link">
|
||||
<a name="getoffsetattime-time" href="#getoffsetattime-time"><tt><b>getOffsetAtTime</b>(time)</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Calculates the curve offset at the specified curve-time parameter on the curve.</p>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>time:</tt>
|
||||
<tt>Number</tt>
|
||||
— the curve-time parameter on the curve
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<li>
|
||||
<tt><tt>Number</tt></tt> — the curve offset at the specified the location
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
12
dist/paper-core.js
vendored
12
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sun Jun 12 17:07:43 2016 +0200
|
||||
* Date: Sun Jun 12 18:32:05 2016 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -6380,6 +6380,10 @@ statics: {
|
|||
|
||||
getParameterAt: '#getTimeAt',
|
||||
|
||||
getOffsetAtTime: function(t) {
|
||||
return this.getPartLength(0, t);
|
||||
},
|
||||
|
||||
getLocationOf: function() {
|
||||
return this.getLocationAtTime(this.getTimeOf(Point.read(arguments)));
|
||||
},
|
||||
|
@ -6417,7 +6421,7 @@ new function() {
|
|||
this[name + 'At'] = function(location, _isTime) {
|
||||
var values = this.getValues();
|
||||
return Curve[name](values, _isTime ? location
|
||||
: Curve.getTimeAt(values, location, 0));
|
||||
: Curve.getTimeAt(values, location));
|
||||
};
|
||||
|
||||
this[name + 'AtTime'] = function(time) {
|
||||
|
@ -7218,8 +7222,8 @@ var CurveLocation = Base.extend({
|
|||
|
||||
function isInRange(angle, min, max) {
|
||||
return min < max
|
||||
? angle > min && angle < max
|
||||
: angle > min && angle <= 180 || angle >= -180 && angle < max;
|
||||
? angle > min && angle < max
|
||||
: angle > min || angle < max;
|
||||
}
|
||||
|
||||
var v2 = c2.getTangentAtTime(t1Inside ? t1 : tMin),
|
||||
|
|
6
dist/paper-core.min.js
vendored
6
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
12
dist/paper-full.js
vendored
12
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sun Jun 12 17:07:43 2016 +0200
|
||||
* Date: Sun Jun 12 18:32:05 2016 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -6380,6 +6380,10 @@ statics: {
|
|||
|
||||
getParameterAt: '#getTimeAt',
|
||||
|
||||
getOffsetAtTime: function(t) {
|
||||
return this.getPartLength(0, t);
|
||||
},
|
||||
|
||||
getLocationOf: function() {
|
||||
return this.getLocationAtTime(this.getTimeOf(Point.read(arguments)));
|
||||
},
|
||||
|
@ -6417,7 +6421,7 @@ new function() {
|
|||
this[name + 'At'] = function(location, _isTime) {
|
||||
var values = this.getValues();
|
||||
return Curve[name](values, _isTime ? location
|
||||
: Curve.getTimeAt(values, location, 0));
|
||||
: Curve.getTimeAt(values, location));
|
||||
};
|
||||
|
||||
this[name + 'AtTime'] = function(time) {
|
||||
|
@ -7218,8 +7222,8 @@ var CurveLocation = Base.extend({
|
|||
|
||||
function isInRange(angle, min, max) {
|
||||
return min < max
|
||||
? angle > min && angle < max
|
||||
: angle > min && angle <= 180 || angle >= -180 && angle < max;
|
||||
? angle > min && angle < max
|
||||
: angle > min || angle < max;
|
||||
}
|
||||
|
||||
var v2 = c2.getTangentAtTime(t1Inside ? t1 : tMin),
|
||||
|
|
6
dist/paper-full.min.js
vendored
6
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue