Skip to content

Commit

Permalink
Trying to simplify the tween object, as described
Browse files Browse the repository at this point in the history
#39

Also fixing #40

Minor documentation changes
  • Loading branch information
thednp committed Oct 3, 2016
1 parent 56883c7 commit 901edb1
Show file tree
Hide file tree
Showing 23 changed files with 48 additions and 63 deletions.
2 changes: 1 addition & 1 deletion api.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ <h3>Chaining Tweens</h3>
<!-- highlighter -->
<script src="./assets/js/prism.js" type="text/javascript"></script>

<!--<script src="http://cdn.jsdelivr.net/kute.js/1.0.0/kute.full.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->

<script src="./src/kute.min.js"></script> <!-- KUTE.js core -->
<script src="./assets/js/scripts.js"></script> <!-- some stuff -->
Expand Down
18 changes: 2 additions & 16 deletions assets/js/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,23 +259,9 @@ easings.addEventListener('click',function(e){
var es = e.target.innerHTML, g = window;
easingSelectButton.innerHTML = es;
tweenEasingElements[1].innerHTML = es;
if (es === 'gravity') {
tweenEasing2._e = g.gravity({elasticity:200,bounciness:600});
} else if (es === 'forceWithGravity') {
tweenEasing2._e = g.forceWithGravity({elasticity:100,bounciness:600});
} else if (es === 'spring') {
tweenEasing2._e = g.spring({friction:100,frequency:600});
} else if (es === 'bounce') {
tweenEasing2._e = g.bounce({friction:100,frequency:600});
} else if (es === 'bezier') {
tweenEasing2._e = g.bezier({points: [{"x":0,"y":0,"cp":[{"x":0.483,"y":0.445}]},{"x":1,"y":1,"cp":[{"x":0.009,"y":0.997}]}] });
} else if (es === 'multiPointBezier') {
tweenEasing2._e = g.bezier({points: [{"x":0,"y":0,"cp":[{"x":0.387,"y":0.007}]},{"x":0.509,"y":0.48,"cp":[{"x":0.069,"y":0.874},{"x":0.928,"y":0.139}]},{"x":1,"y":1,"cp":[{"x":0.639,"y":0.988}]}] });
} else {
tweenEasing2._e = g.Easing[es] || g.Easing.linear;
}
tweenEasing2._e = KUTE.pe(es) || g.Easing.linear;
}
},false);
}, false);

startEasingTween.addEventListener('click', function(e) {
e.preventDefault();
Expand Down
6 changes: 3 additions & 3 deletions assets/js/kute-bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
* Licensed under MIT-License
*/

(function (factory) {
(function (root,factory) {
if (typeof define === 'function' && define.amd) {
define(["./kute.js"], function(KUTE){ factory(KUTE); return KUTE; });
} else if(typeof module == "object" && typeof require == "function") {
var KUTE = require("./kute.js");
module.exports = factory(KUTE);
} else if ( typeof window.KUTE !== 'undefined' ) {
} else if ( typeof root.KUTE !== 'undefined' ) {
factory(KUTE);
} else {
throw new Error("Box Shadow Plugin require KUTE.js.");
}
}( function (KUTE) {
}(this, function (KUTE) {
'use strict';

// filter unsupported browsers
Expand Down
2 changes: 1 addition & 1 deletion attr.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ <h3>Suffixed Attributes</h3>
<!-- highlighter -->
<script src="./assets/js/prism.js" type="text/javascript"></script>

<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.0/kute.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->
<script src="./src/kute.min.js"></script> <!-- KUTE.js core -->
<script src="./src/kute-attr.min.js"></script> <!-- KUTE.js Attributes Plugin -->
<script src="./assets/js/scripts.js"></script> <!-- global scripts stuff -->
Expand Down
2 changes: 1 addition & 1 deletion css.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ <h3>Background Position</h3>
<!-- highlighter -->
<script src="./assets/js/prism.js" type="text/javascript"></script>

<!--<script src="http://cdn.jsdelivr.net/kute.js/0.9.2/kute.full.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->
<script src="./src/kute.min.js"></script> <!-- KUTE.js core -->
<script src="./src/kute-css.min.js"></script> <!-- KUTE.js CSS Plugin -->
<script src="./assets/js/scripts.js"></script> <!-- global scripts stuff -->
Expand Down
2 changes: 1 addition & 1 deletion easing.html
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ <h3>Physics Based Functions</h3>
<!-- highlighter -->
<script src="./assets/js/prism.js" type="text/javascript"></script>

<!--<script src="http://cdn.jsdelivr.net/kute.js/1.0.0/kute.full.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->

<script src="./src/kute.min.js"></script> <!-- KUTE.js core -->
<script src="./src/kute-bezier.min.js"></script> <!-- KUTE.js Bezier Easing -->
Expand Down
2 changes: 1 addition & 1 deletion examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ <h3>Easing Functions</h3>
<!-- highlighter -->
<script src="./assets/js/prism.js" type="text/javascript"></script>

<!--<script src="http://cdn.jsdelivr.net/kute.js/0.9.2/kute.full.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->
<script src="./src/kute.min.js"></script> <!-- KUTE.js core -->
<script src="./assets/js/scripts.js"></script> <!-- global scripts stuff -->
<script src="./assets/js/examples.js"></script> <!-- examples stuff -->
Expand Down
16 changes: 8 additions & 8 deletions extend.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ <h3>Basic Plugin Template</h3>
* Licensed under MIT-License
*/

(function (factory) {
(function (root,factory) {
if (typeof define === 'function' && define.amd) {
define(["./kute.js"], function(KUTE){ factory(KUTE); return KUTE; });
} else if(typeof module == "object" && typeof require == "function") {
var KUTE = require("./kute.js");
module.exports = factory(KUTE);
} else if ( typeof window.KUTE !== 'undefined' ) {
} else if ( typeof root.KUTE !== 'undefined' ) {
factory(KUTE);
} else {
throw new Error("pluginName require KUTE.js.");
}
}( function (KUTE) {
}(this, function (KUTE) {
// your code goes here

// in this function body
Expand Down Expand Up @@ -311,10 +311,10 @@ <h3>Utility Methods</h3>
<li><kbd class="bg-lime">KUTE.truC(color)</kbd> a function that returns an <code>{r: 150, g: 150, b: 0}</code> color object ready to tween; if the color value is a <a href="http://www.w3schools.com/colors/colors_names.asp" target="_blank">web safe color</a>, the IE9+ browsers will be able to return the rgb object we need.</li>
<li><kbd class="bg-lime">KUTE.htr(hex)</kbd> a function that accepts HEX formatted colors and returns an <code>{r: 150, g: 150, b: 0}</code> color object;</li>
<li><kbd class="bg-lime">KUTE.rth(r,g,b)</kbd> a function that accepts numeric values for red, blue and green and returns a HEX format <code>#006699</code> color string.</li>
<li><kbd class="bg-lime">Interpolate.number</kbd> is most essential interpolation tool when developing plugins for various properties not supported in the core.</li>
<li><kbd class="bg-lime">Interpolate.unit</kbd> is used mainly for box model properties, text properties, and generally anything that's a string based valued. Like <code>width: 250px</code></li>
<li><kbd class="bg-lime">Interpolate.color</kbd> is a very fast interpolation function for colors, as used in the above example.</li>
<li><kbd class="bg-lime">Interpolate.array</kbd> and <kbd class="bg-lime">Interpolate.coords</kbd> are SVG Plugin only, but you can have a look anytime when you're out of ideas.</li>
<li><kbd class="bg-lime">KUTE.Interpolate.number</kbd> is most essential interpolation tool when developing plugins for various properties not supported in the core.</li>
<li><kbd class="bg-lime">KUTE.Interpolate.unit</kbd> is used mainly for box model properties, text properties, and generally anything that's a string based valued. Like <code>width: 250px</code></li>
<li><kbd class="bg-lime">KUTE.Interpolate.color</kbd> is a very fast interpolation function for colors, as used in the above example.</li>
<li><kbd class="bg-lime">KUTE.Interpolate.array</kbd> and <kbd class="bg-lime">KUTE.Interpolate.coords</kbd> are SVG Plugin only, but you can have a look anytime when you're out of ideas.</li>
</ul>

<ul id="share" class="nav">
Expand Down Expand Up @@ -345,7 +345,7 @@ <h3>Utility Methods</h3>
<!-- highlighter -->
<script src="./assets/js/prism.js" type="text/javascript"></script>

<!--<script src="http://cdn.jsdelivr.net/kute.js/1.0.0/kute.full.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->

<script src="./src/kute.min.js"></script> <!-- KUTE.js core -->
<script src="./assets/js/scripts.js"></script> <!-- some stuff -->
Expand Down
2 changes: 1 addition & 1 deletion features.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ <h3>Developer Friendly</h3>
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->

<!--<script src="http://cdn.jsdelivr.net/kute.js/0.9.2/kute.full.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->

<script src="./src/kute.min.js"></script> <!-- KUTE.js core -->
<script src="./assets/js/scripts.js"></script> <!-- some stuff -->
Expand Down
2 changes: 1 addition & 1 deletion options.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ <h3>Other</h3>
<!-- highlighter -->
<script src="./assets/js/prism.js" type="text/javascript"></script>

<!--<script src="http://cdn.jsdelivr.net/kute.js/1.0.0/kute.full.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->

<script src="./src/kute.min.js"></script> <!-- KUTE.js core -->
<script src="./assets/js/scripts.js"></script> <!-- some stuff -->
Expand Down
3 changes: 1 addition & 2 deletions performance.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,14 @@
<!-- JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/0.9.5/kute.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->

<!--[if !IE ]><!-->
<script type="text/javascript" src="https://cdn.jsdelivr.net/bootstrap.native/1.0.1/bootstrap-native.min.js"></script>

<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.2/TweenMax.min.js"></script>
<script src="./assets/js/tween.min.js"></script>
<script src="./src/kute.min.js"></script>
<!--<script src="./../kute.js"></script>-->
<script src="./assets/js/perf.js"></script>
<!--<![endif]-->
</body>
Expand Down
2 changes: 1 addition & 1 deletion properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ <h3>Did We Miss Any Important Property?</h3>
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->

<!--<script src="http://cdn.jsdelivr.net/kute.js/0.9.2/kute.full.min.js"></script> KUTE CDN -->
<!--<script src="http://cdn.jsdelivr.net/kute.js/1.5.9/kute.min.js"></script> KUTE CDN -->

<script src="./src/kute.min.js"></script> <!-- some stuff -->
<script src="./assets/js/scripts.js"></script> <!-- some stuff -->
Expand Down
2 changes: 1 addition & 1 deletion src/kute-attr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 901edb1

Please sign in to comment.