aentity.vwf.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. return this.position || goog.vec.Vec3.create();
  20. rotation:
  21. set: |
  22. var rotation = this.translationFromValue( value ); // parse incoming value
  23. if(!rotation || !this.rotation){
  24. this.rotation = goog.vec.Vec3.create();
  25. } else if ( ! goog.vec.Vec3.equals( this.rotation || goog.vec.Vec3.create(), rotation ) ) {
  26. this.rotation = rotation;
  27. this.rotationChanged( rotation);
  28. }
  29. get: |
  30. return this.rotation || goog.vec.Vec3.create();
  31. scale:
  32. set: |
  33. var scale = this.translationFromValue( value ); // parse incoming value
  34. if(!scale || !this.scale){
  35. this.scale = goog.vec.Vec3.create();
  36. } else if ( ! goog.vec.Vec3.equals( this.scale || goog.vec.Vec3.create(), scale ) ) {
  37. this.scale = scale;
  38. this.scaleChanged( scale);
  39. }
  40. get: |
  41. return this.scale || goog.vec.Vec3.create();
  42. clickable:
  43. displayName:
  44. visible:
  45. edit:
  46. osc:
  47. ownedBy:
  48. class:
  49. events:
  50. positionChanged:
  51. rotationChanged:
  52. scaleChanged:
  53. sendOSC:
  54. intersectEvent:
  55. clearIntersectEvent:
  56. hitstartEvent:
  57. hitendEvent:
  58. clickEvent:
  59. methods:
  60. intersectEventMethod:
  61. clearIntersectEventMethod:
  62. hitstartEventMethod:
  63. hitendEventMethod:
  64. clickEventMethod:
  65. sendOSC:
  66. parameters:
  67. - msg
  68. setGizmoMode:
  69. parameters:
  70. - mode
  71. showCloseGizmo:
  72. lookAt:
  73. parameters:
  74. - nodeID
  75. worldRotation:
  76. worldPosition:
  77. translationFromValue:
  78. parameters:
  79. - propertyValue
  80. getChildByName:
  81. parameters:
  82. - name
  83. setOwner:
  84. parameters:
  85. - propertyValue
  86. updateMethod:
  87. parameters:
  88. - methodName
  89. - methodBody
  90. - params
  91. callMethod:
  92. parameters:
  93. - methodName
  94. - params
  95. scripts:
  96. - source: "http://vwf.example.com/aframe/aentity.js"