test_scene_nested.js 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. {
  2. "metadata":
  3. {
  4. "formatVersion": 3,
  5. "type" : "scene"
  6. },
  7. "urlBaseType" : "relativeToHTML",
  8. "objects":
  9. {
  10. "rootNode" : {
  11. "position" : [ 0, 0, 0 ],
  12. "rotation" : [ 0, 0, 0 ],
  13. "scale" : [ 1, 1, 1 ],
  14. "visible" : true,
  15. "children" : {
  16. "row1" : {
  17. "position" : [ 0, 0, 0 ],
  18. "rotation" : [ 0, 0, 0 ],
  19. "scale" : [ 1, 1, 1 ],
  20. "visible" : true,
  21. "children" : {
  22. "cube11" : {
  23. "geometry" : "cube",
  24. "materials": [ "lambert_green" ],
  25. "position" : [ 0, 0, 0 ],
  26. "rotation" : [ 0, 0, 0 ],
  27. "scale" : [ 1, 1, 1 ],
  28. "visible" : true
  29. },
  30. "cube12" : {
  31. "geometry" : "cube",
  32. "materials": [ "lambert_green" ],
  33. "position" : [ 10, 0, 0 ],
  34. "rotation" : [ 0, 0, 0 ],
  35. "scale" : [ 1, 1, 1 ],
  36. "visible" : true
  37. },
  38. "cube13" : {
  39. "geometry" : "cube",
  40. "materials": [ "lambert_green" ],
  41. "position" : [ 10, 10, 0 ],
  42. "rotation" : [ 0, 0, 0 ],
  43. "scale" : [ 1, 1, 1 ],
  44. "visible" : true
  45. },
  46. "cube14" : {
  47. "geometry" : "cube",
  48. "materials": [ "lambert_green" ],
  49. "position" : [ 0, 10, 0 ],
  50. "rotation" : [ 0, 0, 0 ],
  51. "scale" : [ 1, 1, 1 ],
  52. "visible" : true
  53. }
  54. }
  55. },
  56. "row2" : {
  57. "position" : [ 0, 0, 10 ],
  58. "rotation" : [ 0, 0, 0 ],
  59. "scale" : [ 1, 1, 1 ],
  60. "visible" : true,
  61. "children" : {
  62. "cube21" : {
  63. "geometry" : "cube",
  64. "materials": [ "lambert_red" ],
  65. "position" : [ 0, 0, 0 ],
  66. "rotation" : [ 0, 0, 0 ],
  67. "scale" : [ 1, 1, 1 ],
  68. "visible" : true
  69. },
  70. "cube22" : {
  71. "geometry" : "cube",
  72. "materials": [ "lambert_red" ],
  73. "position" : [ 10, 0, 0 ],
  74. "rotation" : [ 0, 0, 0 ],
  75. "scale" : [ 1, 1, 1 ],
  76. "visible" : true
  77. },
  78. "cube23" : {
  79. "geometry" : "cube",
  80. "materials": [ "lambert_red" ],
  81. "position" : [ 10, 10, 0 ],
  82. "rotation" : [ 0, 0, 0 ],
  83. "scale" : [ 1, 1, 1 ],
  84. "visible" : true
  85. },
  86. "cube24" : {
  87. "geometry" : "cube",
  88. "materials": [ "lambert_red" ],
  89. "position" : [ 0, 10, 0 ],
  90. "rotation" : [ 0, 0, 0 ],
  91. "scale" : [ 1, 1, 1 ],
  92. "visible" : true
  93. }
  94. }
  95. },
  96. "row3" : {
  97. "position" : [ 0, 0, 20 ],
  98. "rotation" : [ 0, 0, 0.4 ],
  99. "scale" : [ 1, 1, 1 ],
  100. "visible" : true,
  101. "children" : {
  102. "cube31" : {
  103. "geometry" : "cube",
  104. "materials": [ "lambert_blue" ],
  105. "position" : [ 0, 0, 0 ],
  106. "rotation" : [ 0, 0, 0 ],
  107. "scale" : [ 1, 1, 1 ],
  108. "visible" : true
  109. },
  110. "cube32" : {
  111. "geometry" : "cube",
  112. "materials": [ "lambert_blue" ],
  113. "position" : [ 10, 0, 0 ],
  114. "rotation" : [ 0, 0, 0 ],
  115. "scale" : [ 1, 1, 1 ],
  116. "visible" : true
  117. },
  118. "cube33" : {
  119. "geometry" : "cube",
  120. "materials": [ "lambert_blue" ],
  121. "position" : [ 10, 10, 0 ],
  122. "rotation" : [ 0, 0, 0 ],
  123. "scale" : [ 1, 1, 1 ],
  124. "visible" : true
  125. },
  126. "cube34" : {
  127. "geometry" : "cube",
  128. "materials": [ "lambert_blue" ],
  129. "position" : [ 0, 10, 0 ],
  130. "rotation" : [ 0, 0, 0 ],
  131. "scale" : [ 1, 1, 1 ],
  132. "visible" : true
  133. }
  134. }
  135. }
  136. }
  137. },
  138. "ground" : {
  139. "geometry" : "plane",
  140. "materials": [ "basic_gray" ],
  141. "position" : [ 0, -10, 0 ],
  142. "rotation" : [ 0, 0, 0 ],
  143. "scale" : [ 100, 100, 100 ],
  144. "visible" : true
  145. }
  146. },
  147. "geometries":
  148. {
  149. "cube": {
  150. "type" : "cube",
  151. "width" : 1,
  152. "height": 2,
  153. "depth" : 3,
  154. "segmentsWidth" : 1,
  155. "segmentsHeight" : 1,
  156. "segmentsDepth" : 1,
  157. "flipped" : false,
  158. "sides" : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
  159. },
  160. "plane": {
  161. "type" : "plane",
  162. "width" : 10,
  163. "height" : 10,
  164. "segmentsWidth" : 50,
  165. "segmentsHeight" : 50
  166. }
  167. },
  168. "materials":
  169. {
  170. "basic_gray": {
  171. "type": "MeshBasicMaterial",
  172. "parameters": { "color": 6710886, "wireframe": true }
  173. },
  174. "basic_white": {
  175. "type": "MeshBasicMaterial",
  176. "parameters": { "color": 16777215, "wireframe": true }
  177. },
  178. "faceted_white": {
  179. "type": "MeshLambertMaterial",
  180. "parameters": { "color": 16777215, "shading": "flat" }
  181. },
  182. "lambert_red": {
  183. "type": "MeshLambertMaterial",
  184. "parameters": { "color": 16711680 }
  185. },
  186. "lambert_green": {
  187. "type": "MeshLambertMaterial",
  188. "parameters": { "color": 30481, "blending": "AdditiveBlending", "transparent": true }
  189. },
  190. "lambert_blue": {
  191. "type": "MeshLambertMaterial",
  192. "parameters": { "color": 21930 }
  193. }
  194. },
  195. "cameras":
  196. {
  197. "cam1": {
  198. "type" : "perspective",
  199. "fov" : 50,
  200. "aspect": 1.33333,
  201. "near" : 1,
  202. "far" : 1000,
  203. "position": [0,0,100],
  204. "target" : [0,0,0]
  205. },
  206. "cam2": {
  207. "type" : "ortho",
  208. "left" : 0,
  209. "right" : 1024,
  210. "top" : 0,
  211. "bottom": 1024,
  212. "near" : 1,
  213. "far" : 1000,
  214. "position": [0,0,0],
  215. "target" : [0,0,0]
  216. }
  217. },
  218. "lights":
  219. {
  220. "light1": {
  221. "type" : "directional",
  222. "direction" : [0,1,1],
  223. "color" : 16777215,
  224. "intensity" : 0.8
  225. },
  226. "light2": {
  227. "type" : "point",
  228. "position": [0,0,0],
  229. "color" : 16777215
  230. }
  231. },
  232. "fogs":
  233. {
  234. "basic": {
  235. "type" : "linear",
  236. "color": [1,0,0],
  237. "near" : 1,
  238. "far" : 1000
  239. },
  240. "exponential": {
  241. "type" : "exp2",
  242. "color" : [1,1,1],
  243. "density" : 0.005
  244. },
  245. "black": {
  246. "type" : "exp2",
  247. "color" : [0,0,0],
  248. "density" : 0.005
  249. }
  250. },
  251. "defaults" :
  252. {
  253. "bgcolor" : [0,0,0],
  254. "bgalpha" : 1,
  255. "camera" : "cam1",
  256. "fog" : "black"
  257. }
  258. }