1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- ---
- extends:
- http://vwf.example.com/node3.vwf
- properties:
-
-
-
-
-
- translate-vector: [ 0, 1, 0 ]
-
-
-
-
- translate_value: 0
- methods:
-
-
-
-
-
-
- move:
- scripts:
- - |
- var initialPosition;
- this.initialize = function() {
- }
- this.pointerDown = function( pointerInfo, pickInfo ) {
- initialPosition = this.translation;
- this.move( true );
- this["translate_value"] = 1;
- }
- this.pointerUp = function( pointerInfo, pickInfo ) {
- this.move( false );
- this["translate_value"] = 0;
- }
- this.move = function( down ){
- if ( down ){
- var newPos = [
- initialPosition[0] + this["translate-vector"][0],
- initialPosition[1] + this["translate-vector"][1],
- initialPosition[2] + this["translate-vector"][2],
- ];
- this.translation = newPos;
- } else {
- this.translation = initialPosition;
- }
- } //@ sourceURL=translate-on-down.vwf
|