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 translateZNeg.vwf id = " + this.id );
- }
- this.createGeometry = function() {
- if ( this.parent.ttPoints ) {
- var pos = [];
- pos.push( this.parent.ttPositions[40][0] );
- pos.push( this.parent.ttPositions[40][1] ); // 0
- pos.push( this.parent.ttPositions[40][2] );
- pos.push( this.parent.ttPositions[46][0] );
- pos.push( this.parent.ttPositions[46][1] ); // 1
- pos.push( this.parent.ttPositions[46][2] );
-
- pos.push( this.parent.ttPositions[44][0] );
- pos.push( this.parent.ttPositions[44][1] ); // 2
- pos.push( this.parent.ttPositions[44][2] );
-
- pos.push( this.parent.ttPositions[42][0] );
- pos.push( this.parent.ttPositions[42][1] ); // 3
- pos.push( this.parent.ttPositions[42][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( "translateZNegitive", surface );
- }
- }
- this.deleteGeometry = function() {
- if ( this.translateZNegitive ) {
- this.children.delete( this.translateZNegitive );
- }
- } //@ sourceURL=translateZNeg.vwf
|