index.vwf.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 2012 United States Government, as represented by the Secretary of Defense, Under
  2. # Secretary of Defense (Personnel & Readiness).
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  5. # in compliance with the License. You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software distributed under the License
  10. # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  11. # or implied. See the License for the specific language governing permissions and limitations under
  12. # the License.
  13. ---
  14. extends: http://vwf.example.com/scene.vwf
  15. children:
  16. plane:
  17. extends: plane.vwf
  18. scripts:
  19. - |
  20. this.initialize = function() {
  21. var initNode = function( nd ) {
  22. if ( Object.getPrototypeOf( nd ).children ) {
  23. Object.getPrototypeOf( nd ).children.forEach( function( child ) {
  24. this.children.create( child.name, { extends: child.id }, function( newNode ) {
  25. initNode( newNode );
  26. } );
  27. }, nd );
  28. }
  29. };
  30. initNode( this );
  31. } //@ sourceURL=plane.initialize.vwf
  32. sceneCenter:
  33. extends: http://vwf.example.com/node3.vwf
  34. dir1:
  35. extends: http://vwf.example.com/directionallight.vwf
  36. properties:
  37. distance: 2000
  38. intensity: 0.9
  39. color: [ 255, 255, 255 ]
  40. position: [ 0, -1, 0 ]
  41. rotation: [ 0, 0, 1, 90 ]
  42. scripts:
  43. - |
  44. this.initialize = function(){
  45. this.camera.translation = [ 0, -30, 0 ];
  46. this.dir1.translation = [ 0, -100, 0 ];
  47. }