index.vwf.yaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # A-Frame & VWF simple scene in AR
  2. # Copyright 2018 Krestianstvo.org project
  3. ---
  4. extends: http://vwf.example.com/aframe/ascene.vwf
  5. properties:
  6. transparent: true
  7. assets: "assets.json"
  8. children:
  9. arcamera:
  10. extends: http://vwf.example.com/aframe/abox.vwf
  11. properties:
  12. position: "0 0 0"
  13. rotation: "0 0 0"
  14. opacity: 0.5
  15. depth: 0.3
  16. width: 0.3
  17. height: 0.5
  18. children:
  19. camera:
  20. extends: http://vwf.example.com/aframe/acamera.vwf
  21. properties:
  22. look-controls-enabled: false
  23. wasd-controls-enabled: false
  24. user-height: 0
  25. aranchor:
  26. extends: http://vwf.example.com/aframe/a-arjs-anchor.vwf
  27. properties:
  28. position: "0 0 -5"
  29. hit-testing-enabled: true
  30. changeMatrixMode: "modelViewMatrix"
  31. preset: "hiro"
  32. children:
  33. model:
  34. extends: http://vwf.example.com/aframe/aobjmodel.vwf
  35. properties:
  36. src: "#nwtree-obj"
  37. mtl: "#nwtree-mtl"
  38. position: "0 0.5 0"
  39. rotation: "0 -45 0"
  40. scale: "2 2 2"
  41. children:
  42. interpolation:
  43. extends: http://vwf.example.com/aframe/interpolation-component.vwf
  44. properties:
  45. enabled: true
  46. methods:
  47. run:
  48. body: |
  49. var time = vwf.now;
  50. let rot = this.rotation; //AFRAME.utils.coordinates.parse(this.rotation);
  51. this.rotation = [rot[0], rot[1]+2, rot[2]];
  52. this.future( 0.05 ).run(); // schedule the next step
  53. aranchor2:
  54. extends: http://vwf.example.com/aframe/a-arjs-anchor.vwf
  55. properties:
  56. position: "-5 0 -5"
  57. hit-testing-enabled: true
  58. changeMatrixMode: "modelViewMatrix"
  59. preset: "kanji"
  60. children:
  61. alltext:
  62. extends: http://vwf.example.com/aframe/aentity.vwf
  63. properties:
  64. position: [0,-1,0]
  65. rotation: [-15,0,0]
  66. children:
  67. spaceText:
  68. extends: http://vwf.example.com/aframe/atext.vwf
  69. properties:
  70. value: "Happy New Year 2019!"
  71. color: "#00ffa5"
  72. position: [-2,1,0]
  73. rotation: "0 0 15"
  74. scale: "4 4 4"
  75. side: "double"
  76. spaceText2:
  77. extends: http://vwf.example.com/aframe/atext.vwf
  78. properties:
  79. value: "Project by Krestianstvo.org"
  80. color: "#98b099"
  81. position: [0,0.5,0]
  82. scale: "2 2 2"
  83. side: "double"
  84. methods:
  85. initialize:
  86. body: |
  87. var runModel = vwf_view.kernel.find("", "/aranchor/model")[0];
  88. vwf_view.kernel.callMethod(runModel, "run");