aentity.vwf.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. clickable:
  33. displayName:
  34. visible:
  35. edit:
  36. osc:
  37. events:
  38. positionChanged:
  39. rotationChanged:
  40. methods:
  41. setGizmoMode:
  42. parameters:
  43. - mode
  44. showCloseGizmo:
  45. lookAt:
  46. parameters:
  47. - nodeID
  48. worldRotation:
  49. worldPosition:
  50. translationFromValue:
  51. parameters:
  52. - propertyValue
  53. getChildByName:
  54. - name
  55. scripts:
  56. - source: "http://vwf.example.com/aframe/aentity.js"