123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- ---
- extends:
- http://vwf.example.com/node3.vwf
- properties:
-
-
-
-
- spin-spinning:
- set: |
- if ( value && ! this["spin-spinning"] ) { // starting
- this["spin-spinning"] = true; // set the internal value
- this.spin(); // run the first step and schedule the next one
- } else if ( ! value && this["spin-spinning"] ) { // stopping
- this["spin-spinning"] = false; // set the internal value
- }
- value: false
-
-
-
-
- spin-rate: 1
-
-
-
-
- spin-axis: [ 0, 1, 0 ]
- methods:
-
-
-
-
-
-
-
- spin: |
- if ( this["spin-spinning"] ) { // if enabled
- var axis = this["spin-axis"];
- this.rotateBy( [ axis[0], axis[1], axis[2], this["spin-rate"], 0 ] );
- this.future( 0.05 ).spin(); // schedule the next step
- }
- scripts:
- - |
- this.pointerClick = function( pointerInfo ) {
- if ( pointerInfo.button == "left" ) {
- this["spin-spinning"] = ! this["spin-spinning"]; // ... toggle the enabled flag
- }
- }
|