1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- ---
- extends: http://vwf.example.com/node3.vwf
- implements:
- - http://vwf.example.com/planarDrag.vwf
- methods:
- createGeometry:
- deleteGeometry:
- scripts:
- - |
- this.initialize = function() {
- //console.info( "initialize translateYPos.vwf id = " + this.id );
- }
- this.createGeometry = function() {
- if ( this.parent.ttPoints ) {
- var pos = [];
- pos.push( this.parent.ttPositions[48][0] );
- pos.push( this.parent.ttPositions[48][1] ); // 0
- pos.push( this.parent.ttPositions[48][2] );
- pos.push( this.parent.ttPositions[49][0] );
- pos.push( this.parent.ttPositions[49][1] ); // 1
- pos.push( this.parent.ttPositions[49][2] );
-
- pos.push( this.parent.ttPositions[50][0] );
- pos.push( this.parent.ttPositions[50][1] ); // 2
- pos.push( this.parent.ttPositions[50][2] );
-
- pos.push( this.parent.ttPositions[51][0] );
- pos.push( this.parent.ttPositions[51][1] ); // 3
- pos.push( this.parent.ttPositions[51][2] );
-
- var surface = {
- "extends": "http://vwf.example.com/node3.vwf",
- "type": "mesh/definition",
- "children": {
- "material": {
- "extends": "http://vwf.example.com/material.vwf",
- "properties": {
- "transparent": true,
- "opacity": 0.25,
- },
- },
- },
- "properties": {
- "meshDefinition": { "positions": pos, "faces": [ 0, 3, 1, 1, 3, 2 ], "color": [ 255, 255, 255 ], },
- },
- };
-
- this.children.create( "translateYPositive", surface );
- }
- }
- this.deleteGeometry = function() {
- if ( this.translateYPositive ) {
- this.children.delete( this.translateYPositive );
- }
- } //@ sourceURL=translateYPos.vwf
|