index.vwf.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # A-Frame & VWF simple scene
  2. # Copyright 2017 Krestianstvo.org project
  3. ---
  4. extends: http://vwf.example.com/aframe/ascene.vwf
  5. properties:
  6. transparent: true
  7. children:
  8. arcamera:
  9. extends: http://vwf.example.com/aframe/acamera.vwf
  10. properties:
  11. look-controls-enabled: false
  12. wasd-controls-enabled: false
  13. user-height: 0
  14. aranchor:
  15. extends: http://vwf.example.com/aframe/a-arjs-anchor.vwf
  16. properties:
  17. hit-testing-enabled: true
  18. changeMatrixMode: "cameraTransformMatrix"
  19. children:
  20. sphere:
  21. extends: http://vwf.example.com/aframe/asphere.vwf
  22. properties:
  23. position: "0 0 0"
  24. radius: 1
  25. children:
  26. material:
  27. extends: http://vwf.example.com/aframe/aMaterialComponent.vwf
  28. properties:
  29. color: "#e0e014"
  30. wireframe: true
  31. box2:
  32. extends: http://vwf.example.com/aframe/abox.vwf
  33. properties:
  34. position: "0 0.5 0"
  35. depth: 1
  36. children:
  37. material:
  38. extends: http://vwf.example.com/aframe/aMaterialComponent.vwf
  39. properties:
  40. color: "#2167a5"
  41. interpolation:
  42. extends: http://vwf.example.com/aframe/interpolation-component.vwf
  43. properties:
  44. enabled: true
  45. methods:
  46. run:
  47. body: |
  48. var time = vwf.now;
  49. let rot = this.rotation; //AFRAME.utils.coordinates.parse(this.rotation);
  50. this.rotation = [rot[0], rot[1], Math.sin(time)*100];
  51. this.future( 0.05 ).run(); // schedule the next step
  52. methods:
  53. initialize:
  54. body: |
  55. let runBox = vwf_view.kernel.find("", "/aranchor/sphere/box2")[0];
  56. vwf_view.kernel.callMethod(runBox, "run");