# Copyright 2012 United States Government, as represented by the Secretary of Defense, Under # Secretary of Defense (Personnel & Readiness). # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed under the License # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express # or implied. See the License for the specific language governing permissions and limitations under # the License. ## The component representation of an editable node3 behavior ## ## @name node3edit.vwf ## @namespace --- extends: http://vwf.example.com/node3.vwf implements: - http://vwf.example.com/planarDrag.vwf methods: createGeometry: deleteGeometry: scripts: - | this.initialize = function() { //console.info( "initialize translateYNeg.vwf id = " + this.id ); } this.createGeometry = function() { if ( this.parent.ttPoints ) { var pos = []; pos.push( this.parent.ttPositions[52][0] ); pos.push( this.parent.ttPositions[52][1] ); // 0 pos.push( this.parent.ttPositions[52][2] ); pos.push( this.parent.ttPositions[53][0] ); pos.push( this.parent.ttPositions[53][1] ); // 1 pos.push( this.parent.ttPositions[53][2] ); pos.push( this.parent.ttPositions[54][0] ); pos.push( this.parent.ttPositions[54][1] ); // 2 pos.push( this.parent.ttPositions[54][2] ); pos.push( this.parent.ttPositions[55][0] ); pos.push( this.parent.ttPositions[55][1] ); // 3 pos.push( this.parent.ttPositions[55][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( "translateYNegitive", surface ); } } this.deleteGeometry = function() { if ( this.translateYNegitive ) { this.children.delete( this.translateYNegitive ); } } //@ sourceURL=translateYNeg.vwf