diff --git a/examples/10_yoyo.html b/examples/10_yoyo.html
index 172b73a..61599ea 100644
--- a/examples/10_yoyo.html
+++ b/examples/10_yoyo.html
@@ -10,6 +10,11 @@
Demonstrating the yoyo() feature.
+
@@ -33,6 +38,8 @@
init();
animate();
+ var restart, stop, start, pause, resume
+
function init() {
var target1 = document.getElementById( 'target1' ),
tween1 = new TWEEN.Tween( target1.dataset )
@@ -78,6 +85,41 @@
updateBox( target4, object );
})
.start();
+
+ restart = function() {
+ tween1.stop().start()
+ tween2.stop().start()
+ tween3.stop().start()
+ tween4.stop().start()
+ }
+
+ stop = function() {
+ tween1.stop()
+ tween2.stop()
+ tween3.stop()
+ tween4.stop()
+ }
+
+ start = function() {
+ tween1.start()
+ tween2.start()
+ tween3.start()
+ tween4.start()
+ }
+
+ pause = function() {
+ tween1.pause()
+ tween2.pause()
+ tween3.pause()
+ tween4.pause()
+ }
+
+ resume = function() {
+ tween1.resume()
+ tween2.resume()
+ tween3.resume()
+ tween4.resume()
+ }
}
function animate( time ) {
@@ -123,10 +165,10 @@
background: #cfc;
}
#target3 {
- background: deeppink;
+ background: orange;
}
#target4 {
- background: cyan;
+ background: skyblue;
}