index.vwf.json 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. {
  2. "extends": "proxy/aframe/ascene.vwf",
  3. "properties": {
  4. "transparent": true
  5. },
  6. "methods": {
  7. "initialize": {
  8. "body": " var runBox = vwf.find(\"\", \"/sphere/box2\")[0];\n console.log(runBox);\n vwf.callMethod(runBox, \"run\");\n",
  9. "type": "application/javascript"
  10. }
  11. },
  12. "children": {
  13. "assetBG": {
  14. "extends": "proxy/aframe/a-asset-image-item.vwf",
  15. "properties": {
  16. "itemID": "bg",
  17. "itemSrc": "/defaults/assets/bg.jpg"
  18. }
  19. },
  20. "assetSky": {
  21. "extends": "proxy/aframe/a-asset-image-item.vwf",
  22. "properties": {
  23. "itemID": "sky",
  24. "itemSrc": "/defaults/assets/skyes/sky3.jpg"
  25. }
  26. },
  27. "assetBG2": {
  28. "extends": "proxy/aframe/a-asset-image-item.vwf",
  29. "properties": {
  30. "itemID": "bg2",
  31. "itemSrc": "/defaults/assets/checker.jpg"
  32. }
  33. },
  34. "assetPlaneObj": {
  35. "extends": "proxy/aframe/a-asset-item.vwf",
  36. "properties": {
  37. "itemID": "plane-obj",
  38. "itemSrc": "/defaults/assets/models/plane/PUSHILIN_Plane.obj"
  39. }
  40. },
  41. "assetPlaneMtl": {
  42. "extends": "proxy/aframe/a-asset-item.vwf",
  43. "properties": {
  44. "itemID": "plane-mtl",
  45. "itemSrc": "/defaults/assets/models/plane/PUSHILIN_Plane.mtl"
  46. }
  47. },
  48. "myLight": {
  49. "extends": "proxy/aframe/alight.vwf",
  50. "properties": {
  51. "type": "directional",
  52. "intensity": "0.5",
  53. "position": [
  54. 0.5,
  55. 2,
  56. 1
  57. ],
  58. "castShadow": true
  59. }
  60. },
  61. "myLight2": {
  62. "extends": "proxy/aframe/alight.vwf",
  63. "properties": {
  64. "type": "ambient",
  65. "intensity": "0.5"
  66. }
  67. },
  68. "model": {
  69. "extends": "proxy/aframe/aobjmodel.vwf",
  70. "properties": {
  71. "src": "#plane-obj",
  72. "mtl": "#plane-mtl",
  73. "position": [
  74. -1.2000000476837158,
  75. 1.7000000476837158,
  76. -2.5
  77. ],
  78. "rotation": [
  79. 0,
  80. -45,
  81. 0
  82. ],
  83. "scale": [
  84. 0.5,
  85. 0.5,
  86. 0.5
  87. ]
  88. },
  89. "children": {
  90. "shadow": {
  91. "extends": "proxy/aframe/shadowComponent.vwf",
  92. "properties": {
  93. "cast": true
  94. }
  95. }
  96. }
  97. },
  98. "spaceText": {
  99. "extends": "proxy/aframe/atext.vwf",
  100. "properties": {
  101. "value": "Virtual World Framework & A-Frame",
  102. "color": "#ddd",
  103. "position": [
  104. -2,
  105. 2.5,
  106. -2
  107. ]
  108. }
  109. },
  110. "spaceText2": {
  111. "extends": "proxy/aframe/atext.vwf",
  112. "properties": {
  113. "value": "Project by Krestianstvo.org",
  114. "color": "#aaa",
  115. "position": [
  116. 1,
  117. 3,
  118. -4
  119. ]
  120. }
  121. },
  122. "boxAnim": {
  123. "extends": "proxy/aframe/abox.vwf",
  124. "properties": {
  125. "position": [
  126. 0,
  127. 0,
  128. -3
  129. ],
  130. "rotation": [
  131. 0,
  132. 0,
  133. 0
  134. ],
  135. "depth": "2",
  136. "height": "1",
  137. "width": "1",
  138. "class": "hit"
  139. },
  140. "methods": {
  141. "hitstartEventMethod": {
  142. "body": " this.material.opacity = 0.7\n",
  143. "type": "application/javascript"
  144. },
  145. "hitendEventMethod": {
  146. "body": " this.material.opacity = 1.0\n",
  147. "type": "application/javascript"
  148. }
  149. },
  150. "children": {
  151. "aabb-collider-listener": {
  152. "extends": "proxy/aframe/app-aabb-collider-listener-component.vwf",
  153. "type": "component"
  154. },
  155. "material": {
  156. "extends": "proxy/aframe/aMaterialComponent.vwf",
  157. "properties": {
  158. "color": "#3c7249"
  159. }
  160. }
  161. }
  162. },
  163. "box": {
  164. "extends": "proxy/aframe/abox.vwf",
  165. "properties": {
  166. "position": [
  167. -1,
  168. 0.5,
  169. -3
  170. ],
  171. "rotation": [
  172. 0,
  173. -30,
  174. 0
  175. ],
  176. "depth": "2",
  177. "height": "1",
  178. "width": "1",
  179. "class": "clickable intersectable"
  180. },
  181. "methods": {
  182. "clickEventMethod": {
  183. "body": " let genColor = this.generateColor();\n this.material.color = genColor\n",
  184. "type": "application/javascript"
  185. },
  186. "intersectEventMethod": {
  187. "parameters": ["point"],
  188. "body": " this.material.opacity = 0.7; \n console.log(point) \n",
  189. "type": "application/javascript"
  190. },
  191. "clearIntersectEventMethod": {
  192. "body": " this.material.opacity = 1.0\n",
  193. "type": "application/javascript"
  194. },
  195. "generateColor": {
  196. "body": " var letters = '0123456789ABCDEF';\n var color = '#';\n for (var i = 0; i < 6; i++) {\n color += letters[Math.floor(this.random() * 16)];\n } return color\n",
  197. "type": "application/javascript"
  198. }
  199. },
  200. "events": {
  201. "clickEvent": {}
  202. },
  203. "children": {
  204. "material": {
  205. "extends": "proxy/aframe/aMaterialComponent.vwf",
  206. "properties": {
  207. "color": "#3c7249",
  208. "transparent": true
  209. }
  210. },
  211. "raycaster-listener": {
  212. "extends": "proxy/aframe/app-raycaster-listener-component.vwf",
  213. "type": "component"
  214. },
  215. "cursor-listener": {
  216. "extends": "proxy/aframe/app-cursor-listener-component.vwf",
  217. "type": "component"
  218. },
  219. "shadow": {
  220. "extends": "proxy/aframe/shadowComponent.vwf",
  221. "properties": {
  222. "cast": true,
  223. "receive": true
  224. }
  225. }
  226. }
  227. },
  228. "sphere": {
  229. "extends": "proxy/aframe/asphere.vwf",
  230. "properties": {
  231. "position": [
  232. 1,
  233. 1.25,
  234. -4
  235. ],
  236. "radius": "1"
  237. },
  238. "children": {
  239. "material": {
  240. "extends": "proxy/aframe/aMaterialComponent.vwf",
  241. "properties": {
  242. "color": "#e0e014",
  243. "wireframe": true
  244. }
  245. },
  246. "box2": {
  247. "extends": "proxy/aframe/abox.vwf",
  248. "properties": {
  249. "position": [
  250. 2,
  251. -0.75,
  252. 0.948116660118103
  253. ],
  254. "depth": "1"
  255. },
  256. "methods": {
  257. "run": {
  258. "body": " var time = this.time;\n let pos = this.position; //AFRAME.utils.coordinates.parse(this.position);\n this.position = [pos.x, pos.y, Math.sin(time)]\n this.future( 0.01 ).run();\n",
  259. "type": "application/javascript"
  260. }
  261. },
  262. "children": {
  263. "material": {
  264. "extends": "proxy/aframe/aMaterialComponent.vwf",
  265. "properties": {
  266. "color": "#2167a5",
  267. "src": "#bg"
  268. }
  269. },
  270. "shadow": {
  271. "extends": "proxy/aframe/shadowComponent.vwf",
  272. "properties": {
  273. "cast": true
  274. }
  275. },
  276. "interpolation": {
  277. "extends": "proxy/aframe/interpolation-component.vwf",
  278. "properties": {
  279. "enabled": true,
  280. "deltaPos": 0.001,
  281. "deltaRot": 0.1
  282. }
  283. }
  284. }
  285. }
  286. }
  287. },
  288. "sky": {
  289. "extends": "proxy/aframe/asky.vwf",
  290. "children": {
  291. "material": {
  292. "extends": "proxy/aframe/aMaterialComponent.vwf",
  293. "properties": {
  294. "src": "#sky",
  295. "side": "back",
  296. "fog": false,
  297. "shader": "flat"
  298. }
  299. }
  300. }
  301. },
  302. "groundPlane": {
  303. "extends": "proxy/aframe/aplane.vwf",
  304. "properties": {
  305. "height": "50",
  306. "width": "50",
  307. "rotation": [
  308. -90,
  309. 0,
  310. 0
  311. ]
  312. },
  313. "children": {
  314. "material": {
  315. "extends": "proxy/aframe/aMaterialComponent.vwf",
  316. "properties": {
  317. "repeat": "10 10",
  318. "color": "white",
  319. "src": "#bg2"
  320. }
  321. },
  322. "shadow": {
  323. "extends": "proxy/aframe/shadowComponent.vwf",
  324. "properties": {
  325. "receive": true
  326. }
  327. }
  328. }
  329. }
  330. }
  331. }