index.vwf.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. light1:
  10. extends: http://vwf.example.com/aframe/alight.vwf
  11. properties:
  12. type: "ambient"
  13. color: "#BBB"
  14. light2:
  15. extends: http://vwf.example.com/aframe/alight.vwf
  16. properties:
  17. type: "directional"
  18. color: "#FFF"
  19. intensity: 0.6
  20. position: "-0.5 1 1"
  21. arcamera:
  22. extends: http://vwf.example.com/aframe/abox.vwf
  23. properties:
  24. position: "0 0 0"
  25. rotation: "0 0 0"
  26. opacity: 0.5
  27. depth: 0.3
  28. width: 0.3
  29. height: 0.5
  30. children:
  31. camera:
  32. extends: http://vwf.example.com/aframe/acamera.vwf
  33. type: "ar"
  34. properties:
  35. look-controls-enabled: false
  36. wasd-controls-enabled: false
  37. user-height: 0
  38. aranchor:
  39. extends: http://vwf.example.com/aframe/a-arjs-anchor.vwf
  40. properties:
  41. position: "0 0 -5"
  42. hit-testing-enabled: true
  43. changeMatrixMode: "modelViewMatrix"
  44. preset: "hiro"
  45. children:
  46. model:
  47. extends: http://vwf.example.com/aframe/aobjmodel.vwf
  48. properties:
  49. src: "#nwtree-obj"
  50. mtl: "#nwtree-mtl"
  51. position: "0 0.5 0"
  52. rotation: "0 -45 0"
  53. scale: "2 2 2"
  54. children:
  55. interpolation:
  56. extends: http://vwf.example.com/aframe/interpolation-component.vwf
  57. properties:
  58. enabled: true
  59. methods:
  60. run:
  61. body: |
  62. var time = vwf.now;
  63. let rot = this.rotation; //AFRAME.utils.coordinates.parse(this.rotation);
  64. this.rotation = [rot[0], rot[1]+2, rot[2]];
  65. this.future( 0.05 ).run();
  66. aranchor2:
  67. extends: http://vwf.example.com/aframe/a-arjs-anchor.vwf
  68. properties:
  69. position: "-5 0 -5"
  70. hit-testing-enabled: true
  71. changeMatrixMode: "modelViewMatrix"
  72. preset: "kanji"
  73. children:
  74. alltext:
  75. extends: http://vwf.example.com/aframe/aentity.vwf
  76. properties:
  77. position: [0,-1,0]
  78. rotation: [-15,0,0]
  79. children:
  80. spaceText:
  81. extends: http://vwf.example.com/aframe/atext.vwf
  82. properties:
  83. value: "Happy New Year 2019!"
  84. color: "#00ffa5"
  85. position: [-2,1,0]
  86. rotation: "0 0 15"
  87. scale: "4 4 4"
  88. side: "double"
  89. spaceText2:
  90. extends: http://vwf.example.com/aframe/atext.vwf
  91. properties:
  92. value: "Project by Krestianstvo.org"
  93. color: "#98b099"
  94. position: [0,0.5,0]
  95. scale: "2 2 2"
  96. side: "double"
  97. methods:
  98. initialize:
  99. body: |
  100. var runModel = vwf_view.kernel.find("", "/aranchor/model")[0];
  101. vwf_view.kernel.callMethod(runModel, "run");