plane.vwf.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/node3.vwf
  15. implements:
  16. - http://vwf.example.com/sway-on-click.vwf
  17. source: seymourplane_triangulate.dae
  18. type: model/vnd.collada+xml
  19. properties:
  20. rotation: [ 0, 0, 1, -90 ]
  21. # sway-on-click configuration parameters
  22. sway-axis: [ 1, 0, 0 ]
  23. children:
  24. plane:
  25. extends: http://vwf.example.com/node3.vwf
  26. children:
  27. prop:
  28. extends: http://vwf.example.com/node3.vwf
  29. # # 1: Uncomment to apply the spin-on-click behavior to the prop
  30. # # ... located in public/types/spin-on-click.vwf.yaml
  31. properties:
  32. spin-rate: 23
  33. implements:
  34. - http://vwf.example.com/spin-on-click.vwf
  35. # # 2: Uncomment to enable/disable sway and rotate the prop on click
  36. scripts:
  37. - |
  38. this.pointerClick = function() {
  39. if ( this["sway-swaying"] ) {
  40. this["sway-swaying"] = false;
  41. this.plane.prop["spin-spinning"] = false;
  42. } else {
  43. this["sway-swaying"] = true;
  44. this.plane.prop["spin-spinning"] = true;
  45. }
  46. }