aentity.vwf.yaml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # https://aframe.io/docs/0.5.0/core/entity.html
  2. ---
  3. extends: http://vwf.example.com/aframe/node.vwf
  4. type: "a-entity"
  5. implements:
  6. - http://vwf.example.com/animation/animation.vwf
  7. - http://vwf.example.com/animation/animationNode.vwf
  8. properties:
  9. position:
  10. set: |
  11. var position = this.translationFromValue( value ); // parse incoming value
  12. if(!position || !this.position){
  13. this.position = goog.vec.Vec3.create();
  14. } else if ( ! goog.vec.Vec3.equals( this.position || goog.vec.Vec3.create(), position ) ) {
  15. this.position = position;
  16. this.positionChanged( position);
  17. }
  18. get: |
  19. if (this.position.hasOwnProperty('x')) {
  20. return goog.vec.Vec3.createFromValues(this.position.x, this.position.y, this.position.z);
  21. } else {
  22. return this.position || goog.vec.Vec3.create();
  23. }
  24. rotation:
  25. set: |
  26. var rotation = this.translationFromValue( value ); // parse incoming value
  27. if(!rotation || !this.rotation){
  28. this.rotation = goog.vec.Vec3.create();
  29. } else if ( ! goog.vec.Vec3.equals( this.rotation || goog.vec.Vec3.create(), rotation ) ) {
  30. this.rotation = rotation;
  31. this.rotationChanged( rotation);
  32. }
  33. get: |
  34. if (this.rotation.hasOwnProperty('x')) {
  35. return goog.vec.Vec3.createFromValues(this.rotation.x, this.rotation.y, this.rotation.z);
  36. } else {
  37. return this.rotation || goog.vec.Vec3.create();
  38. }
  39. scale:
  40. set: |
  41. var scale = this.translationFromValue( value ); // parse incoming value
  42. if(!scale || !this.scale){
  43. this.scale = goog.vec.Vec3.create();
  44. } else if ( ! goog.vec.Vec3.equals( this.scale || goog.vec.Vec3.create(), scale ) ) {
  45. this.scale = scale;
  46. this.scaleChanged( scale);
  47. }
  48. get: |
  49. if (this.scale.hasOwnProperty('x')) {
  50. return goog.vec.Vec3.createFromValues(this.scale.x, this.scale.y, this.scale.z);
  51. } else {
  52. return this.scale || goog.vec.Vec3.create();
  53. }
  54. clickable:
  55. displayName:
  56. visible:
  57. edit:
  58. osc:
  59. ownedBy:
  60. events:
  61. positionChanged:
  62. rotationChanged:
  63. scaleChanged:
  64. sendOSC:
  65. intersectEvent:
  66. clearIntersectEvent:
  67. methods:
  68. intersectEventMethod:
  69. clearIntersectEventMethod:
  70. sendOSC:
  71. parameters:
  72. - msg
  73. setGizmoMode:
  74. parameters:
  75. - mode
  76. showCloseGizmo:
  77. lookAt:
  78. parameters:
  79. - nodeID
  80. worldRotation:
  81. worldPosition:
  82. translationFromValue:
  83. parameters:
  84. - propertyValue
  85. getChildByName:
  86. - name
  87. scripts:
  88. - source: "http://vwf.example.com/aframe/aentity.js"