Skip to content

Commit 6e77163

Browse files
committed
minor release v1.2.0 | added hidden sticks | setters api | bug fixes
1 parent d046561 commit 6e77163

30 files changed

+2073
-164
lines changed

CHANGELOG.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

7-
## [1.1.4] - 05-07-2019
8+
## v1.2.0 - 08-07-2019
9+
10+
### Added
11+
- Hidden Sticks with hidden parameter to Stick class
12+
- Setters API for easy use of Point and Stick constructors
13+
- Method chaining for Point and Stick
14+
- with setters api we can create customized Entity easily. `entity.addPoint(0, 0).pin().setRadius()`
15+
16+
### Fixed
17+
18+
- clamp function wrong parameter bug
19+
- fixed development webpack environment
20+
21+
## v1.1.4 05-07-2019
22+
823
### Fixed
24+
925
- independent internal rendering engine
1026
- multiple instance of verly.js was causing global var collisions (WIDTH, HEIGHT, CTX)
27+
1128
### Changed
29+
1230
- Entity.js Class now expects two arguments (iteration, verlyInstance) because previously we used global variables to keep track of WIDTH, HEIGHT and ctx which was casing some problems
1331
- When extending Entity class we have to do super(iteration, verlyInstance)
14-
- Point.js Class's render, constrain, update methods now expects verlyInstance and ctx variables to be passed.
32+
- Point.js Class's render, constrain, update methods now expects verlyInstance and ctx variables to be passed.

dist/verly.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/verly.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Entity.html

Lines changed: 114 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ <h5>Parameters:</h5>
587587
<h4 class="name" id="addStick">
588588

589589
<span class="code-name">
590-
addStick<span class="signature">(p1, p2, length)</span><span class="type-signature"></span>
590+
addStick<span class="signature">(p1, p2<span class="signature-attributes">opt</span>, length<span class="signature-attributes">opt</span>, stiffness<span class="signature-attributes">opt</span>, ishidden<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span>
591591
</span>
592592
</h4>
593593

@@ -620,6 +620,8 @@ <h5>Parameters:</h5>
620620
<th>Type</th>
621621

622622

623+
<th>Attributes</th>
624+
623625

624626

625627

@@ -639,7 +641,7 @@ <h5>Parameters:</h5>
639641
<td class="type">
640642

641643

642-
<span class="param-type">Number</span>
644+
<span class="param-type">number</span>
643645
|
644646

645647
<span class="param-type"><a href="Stick.html">Stick</a></span>
@@ -649,6 +651,14 @@ <h5>Parameters:</h5>
649651
</td>
650652

651653

654+
<td class="attributes">
655+
656+
657+
658+
659+
660+
</td>
661+
652662

653663

654664

@@ -667,13 +677,23 @@ <h5>Parameters:</h5>
667677
<td class="type">
668678

669679

670-
<span class="param-type">Number</span>
680+
<span class="param-type">number</span>
671681

672682

673683

674684
</td>
675685

676686

687+
<td class="attributes">
688+
689+
&lt;optional><br>
690+
691+
692+
693+
694+
695+
</td>
696+
677697

678698

679699

@@ -692,13 +712,93 @@ <h5>Parameters:</h5>
692712
<td class="type">
693713

694714

695-
<span class="param-type">Number</span>
715+
<span class="param-type">number</span>
696716

697717

698718

699719
</td>
700720

701721

722+
<td class="attributes">
723+
724+
&lt;optional><br>
725+
726+
727+
728+
729+
730+
</td>
731+
732+
733+
734+
735+
<td class="description last"></td>
736+
</tr>
737+
738+
739+
740+
741+
742+
<tr class="deep-level-0">
743+
744+
<td class="name"><code>stiffness</code></td>
745+
746+
747+
<td class="type">
748+
749+
750+
<span class="param-type">number</span>
751+
752+
753+
754+
</td>
755+
756+
757+
<td class="attributes">
758+
759+
&lt;optional><br>
760+
761+
762+
763+
764+
765+
</td>
766+
767+
768+
769+
770+
<td class="description last"></td>
771+
</tr>
772+
773+
774+
775+
776+
777+
<tr class="deep-level-0">
778+
779+
<td class="name"><code>ishidden</code></td>
780+
781+
782+
<td class="type">
783+
784+
785+
<span class="param-type">boolean</span>
786+
787+
788+
789+
</td>
790+
791+
792+
<td class="attributes">
793+
794+
&lt;optional><br>
795+
796+
797+
798+
799+
800+
</td>
801+
702802

703803

704804

@@ -749,7 +849,7 @@ <h5>Parameters:</h5>
749849
<p class="tag-source">
750850
<a href="Entity.js.html" class="button">View Source</a>
751851
<span>
752-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line111">line 111</a>
852+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line113">line 113</a>
753853
</span>
754854
</p>
755855

@@ -1124,7 +1224,7 @@ <h4 class="name" id="render">
11241224
<p class="tag-source">
11251225
<a href="Entity.js.html" class="button">View Source</a>
11261226
<span>
1127-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line188">line 188</a>
1227+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line191">line 191</a>
11281228
</span>
11291229
</p>
11301230

@@ -1213,7 +1313,7 @@ <h4 class="name" id="renderPointIndex">
12131313
<p class="tag-source">
12141314
<a href="Entity.js.html" class="button">View Source</a>
12151315
<span>
1216-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line176">line 176</a>
1316+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line179">line 179</a>
12171317
</span>
12181318
</p>
12191319

@@ -1302,7 +1402,7 @@ <h4 class="name" id="renderPoints">
13021402
<p class="tag-source">
13031403
<a href="Entity.js.html" class="button">View Source</a>
13041404
<span>
1305-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line160">line 160</a>
1405+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line163">line 163</a>
13061406
</span>
13071407
</p>
13081408

@@ -1391,7 +1491,7 @@ <h4 class="name" id="renderSticks">
13911491
<p class="tag-source">
13921492
<a href="Entity.js.html" class="button">View Source</a>
13931493
<span>
1394-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line168">line 168</a>
1494+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line171">line 171</a>
13951495
</span>
13961496
</p>
13971497

@@ -1930,7 +2030,7 @@ <h4 class="name" id="update">
19302030
<p class="tag-source">
19312031
<a href="Entity.js.html" class="button">View Source</a>
19322032
<span>
1933-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line149">line 149</a>
2033+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line152">line 152</a>
19342034
</span>
19352035
</p>
19362036

@@ -2019,7 +2119,7 @@ <h4 class="name" id="updateConstraints">
20192119
<p class="tag-source">
20202120
<a href="Entity.js.html" class="button">View Source</a>
20212121
<span>
2022-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line141">line 141</a>
2122+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line144">line 144</a>
20232123
</span>
20242124
</p>
20252125

@@ -2108,7 +2208,7 @@ <h4 class="name" id="updatePoints">
21082208
<p class="tag-source">
21092209
<a href="Entity.js.html" class="button">View Source</a>
21102210
<span>
2111-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line123">line 123</a>
2211+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line126">line 126</a>
21122212
</span>
21132213
</p>
21142214

@@ -2259,7 +2359,7 @@ <h5>Parameters:</h5>
22592359
<p class="tag-source">
22602360
<a href="Entity.js.html" class="button">View Source</a>
22612361
<span>
2262-
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line133">line 133</a>
2362+
<a href="Entity.js.html">Entity.js</a>, <a href="Entity.js.html#line136">line 136</a>
22632363
</span>
22642364
</p>
22652365

@@ -2308,7 +2408,7 @@ <h5>Parameters:</h5>
23082408

23092409
<footer class="footer">
23102410
<div class="content has-text-centered">
2311-
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> on Mon Jul 08 2019 18:43:58 GMT+0530 (India Standard Time)</p>
2411+
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> on Mon Jul 08 2019 20:31:06 GMT+0530 (India Standard Time)</p>
23122412
<p class="sidebar-created-by">
23132413
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
23142414
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers</a>

docs/Entity.js.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,21 @@ <h1>Entity.js</h1>
168168

169169
/**
170170
* adds a stick inbetween two points
171-
* @param {Number|Stick} p1
172-
* @param {Number} p2
173-
* @param {Number} length
171+
* @param {number|Stick} p1
172+
* @param {number=} p2
173+
* @param {number=} length
174+
* @param {number=} stiffness
175+
* @param {boolean=} ishidden
174176
*/
175-
addStick(p1, p2, length) {
176-
// let s;
177-
// return s;
177+
addStick(p1, p2, length, stiffness, ishidden) {
178+
let stick;
178179
if (p1 instanceof Stick) {
179-
this.sticks.push(p1);
180+
stick = p1;
180181
} else {
181-
this.sticks.push(new Stick(this.points[p1], this.points[p2], length));
182+
stick = new Stick(this.points[p1], this.points[p2], length, stiffness, ishidden);
182183
}
184+
this.sticks.push(stick);
185+
return stick;
183186
}
184187

185188
/**
@@ -269,7 +272,7 @@ <h1>Entity.js</h1>
269272

270273
<footer class="footer">
271274
<div class="content has-text-centered">
272-
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> on Mon Jul 08 2019 18:43:58 GMT+0530 (India Standard Time)</p>
275+
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> on Mon Jul 08 2019 20:31:06 GMT+0530 (India Standard Time)</p>
273276
<p class="sidebar-created-by">
274277
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
275278
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers</a>

0 commit comments

Comments
 (0)