car.vwf.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. ## The component representation of a 3D car
  14. ##
  15. ## @name car.vwf
  16. ## @namespace
  17. ---
  18. extends: http://vwf.example.com/node3.vwf
  19. properties:
  20. ## Attached to camera boolean value
  21. ##
  22. ## @name car.vwf#attachedToCamera
  23. ## @property
  24. attachedToCamera:
  25. set: |
  26. this.attachedToCamera = function( value ) {
  27. if ( vwf ) {
  28. if ( value ) {
  29. this.camera.attachNodeID = this.find("//pick_up_truck02")[0].id;
  30. } else {
  31. this.camera.attachNodeID = '';
  32. }
  33. }
  34. this.attachedToCamera = value;
  35. }
  36. value: false
  37. scripts:
  38. - |
  39. var car = this;
  40. this.pointerClick = function() {
  41. this.attachedToCamera = !this.attachedToCamera;
  42. }