test_scene.js 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. {
  2. "metadata":
  3. {
  4. "formatVersion": 3,
  5. "type" : "scene"
  6. },
  7. "urlBaseType" : "relativeToHTML",
  8. "objects":
  9. {
  10. "cube1" : {
  11. "geometry" : "cube",
  12. "materials": [ "lambert_red" ],
  13. "position" : [ 0, 0, 0 ],
  14. "rotation" : [ 0, -0.3, 0 ],
  15. "scale" : [ 1, 1, 1 ],
  16. "visible" : true
  17. },
  18. "cube2" : {
  19. "geometry" : "cube",
  20. "materials": [ "basic_white" ],
  21. "position" : [ 0, 0, 0 ],
  22. "rotation" : [ 0, -0.3, 0 ],
  23. "scale" : [ 2, 2, 2 ],
  24. "visible" : true
  25. },
  26. "cube3" : {
  27. "geometry" : "cube",
  28. "materials": [ "minecraft" ],
  29. "position" : [ -30, -5, 25 ],
  30. "rotation" : [ 0, 0.8, 0 ],
  31. "scale" : [ 1, 1, 1 ],
  32. "visible" : true
  33. },
  34. "sphere_lambert" : {
  35. "geometry" : "sphere",
  36. "materials": [ "lambert_green" ],
  37. "position" : [ -20, -5, 15 ],
  38. "rotation" : [ 0, 0, 0 ],
  39. "scale" : [ 1, 1, 1 ],
  40. "visible" : true
  41. },
  42. "sphere_refraction" : {
  43. "geometry" : "sphere",
  44. "materials": [ "basic_refraction" ],
  45. "position" : [ 50, 45, -50 ],
  46. "rotation" : [ 0, 0, 0 ],
  47. "scale" : [ 1, 1, 1 ],
  48. "visible" : true
  49. },
  50. "icosahedron" : {
  51. "geometry" : "icosahedron",
  52. "materials": [ "faceted_white" ],
  53. "position" : [ 20, 10, -60 ],
  54. "rotation" : [ 0, 0, 0 ],
  55. "scale" : [ 20, 20, 20 ],
  56. "visible" : true
  57. },
  58. "torus" : {
  59. "geometry" : "torus",
  60. "materials": [ "phong_orange" ],
  61. "position" : [ -20, 5, -50 ],
  62. "rotation" : [ 0, 0, 0 ],
  63. "scale" : [ 2, 2, 2 ],
  64. "visible" : true
  65. },
  66. "cone" : {
  67. "geometry" : "cone",
  68. "materials": [ "lambert_blue" ],
  69. "position" : [ -50, 15, -50 ],
  70. "rotation" : [ 0, 0, 0 ],
  71. "scale" : [ 1, 1, 1 ],
  72. "visible" : true
  73. },
  74. "cylinder" : {
  75. "geometry" : "cylinder",
  76. "materials": [ "lambert_blue" ],
  77. "position" : [ 50, 15, -50 ],
  78. "rotation" : [ 0, 0, 0 ],
  79. "scale" : [ 1, 1, 1 ],
  80. "visible" : true
  81. },
  82. "colorcube" : {
  83. "geometry" : "colorcube",
  84. "materials": [ ],
  85. "position" : [ -10, -5, 30 ],
  86. "rotation" : [ 1.57, 0, 0 ],
  87. "scale" : [ 5, 5, 5 ],
  88. "visible" : true
  89. },
  90. "veyron" : {
  91. "geometry" : "veyron",
  92. "materials": [ "face" ],
  93. "position" : [ 40, -1, 0 ],
  94. "rotation" : [ 0, 0.3, 0 ],
  95. "scale" : [ 0.25, 0.25, 0.25 ],
  96. "visible" : true
  97. },
  98. "walt" : {
  99. "geometry" : "WaltHead",
  100. "materials": [ "lambert_cube" ],
  101. "position" : [ -45, 10, 0 ],
  102. "rotation" : [ 0, 0, 0 ],
  103. "scale" : [ 0.5, 0.5, 0.5 ],
  104. "visible" : true
  105. },
  106. "quad_bg" : {
  107. "geometry" : "quad",
  108. "materials": [ "textured_bg" ],
  109. "position" : [ 0, 15, -90 ],
  110. "rotation" : [ 0, 0, 0 ],
  111. "scale" : [ 20, 20, 20 ],
  112. "visible" : true
  113. },
  114. "ground" : {
  115. "geometry" : "plane",
  116. "materials": [ "basic_gray" ],
  117. "position" : [ 0, -10, 0 ],
  118. "rotation" : [ 1.57, 0, 0 ],
  119. "scale" : [ 100, 100, 100 ],
  120. "visible" : true
  121. }
  122. },
  123. "geometries":
  124. {
  125. "cube": {
  126. "type" : "cube",
  127. "width" : 10,
  128. "height": 10,
  129. "depth" : 10,
  130. "segmentsWidth" : 1,
  131. "segmentsHeight" : 1,
  132. "segmentsDepth" : 1,
  133. "flipped" : false,
  134. "sides" : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
  135. },
  136. "plane": {
  137. "type" : "plane",
  138. "width" : 10,
  139. "height" : 10,
  140. "segmentsWidth" : 50,
  141. "segmentsHeight" : 50
  142. },
  143. "quad": {
  144. "type" : "plane",
  145. "width" : 10,
  146. "height" : 10,
  147. "segmentsWidth" : 1,
  148. "segmentsHeight" : 1
  149. },
  150. "sphere": {
  151. "type" : "sphere",
  152. "radius" : 5,
  153. "segmentsWidth" : 32,
  154. "segmentsHeight" : 16
  155. },
  156. "icosahedron": {
  157. "type" : "icosahedron",
  158. "subdivisions" : 2
  159. },
  160. "torus": {
  161. "type" : "torus",
  162. "radius" : 5,
  163. "tube" : 2,
  164. "segmentsR" : 16,
  165. "segmentsT" : 32
  166. },
  167. "cylinder": {
  168. "type" : "cylinder",
  169. "topRad" : 5,
  170. "botRad" : 5,
  171. "height" : 50,
  172. "radSegs" : 32,
  173. "heightSegs": 1
  174. },
  175. "cone": {
  176. "type" : "cylinder",
  177. "topRad" : 0,
  178. "botRad" : 5,
  179. "height" : 50,
  180. "radSegs" : 32,
  181. "heightSegs" : 1
  182. },
  183. "WaltHead": {
  184. "type": "bin_mesh",
  185. "url" : "obj/walt/WaltHead_bin.js"
  186. },
  187. "veyron": {
  188. "type": "bin_mesh",
  189. "url" : "obj/veyron/VeyronNoUv_bin.js"
  190. },
  191. "colorcube": {
  192. "type": "embedded_mesh",
  193. "id" : "cube_fvc"
  194. }
  195. },
  196. "embeds": {
  197. "cube_fvc": {
  198. "metadata" : { "formatVersion" : 3 },
  199. "scale" : 1.0,
  200. "materials": [ {
  201. "DbgColor" : 15658734,
  202. "DbgIndex" : 0,
  203. "DbgName" : "Material",
  204. "colorAmbient" : [0.0, 0.0, 0.0],
  205. "colorDiffuse" : [0.8, 0.8, 0.8],
  206. "colorSpecular" : [0.5, 0.5, 0.5],
  207. "specularCoef" : 50,
  208. "transparency" : 1.0,
  209. "vertexColors" : true
  210. }],
  211. "vertices": [1.000000,-1.000000,-1.000000,1.000000,-1.000000,1.000000,-1.000000,-1.000000,1.000000,-1.000000,-1.000000,-1.000000,1.000000,1.000000,-1.000000,0.999999,1.000000,1.000001,-1.000000,1.000000,1.000000,-1.000000,1.000000,-1.000000],
  212. "morphTargets": [],
  213. "normals": [],
  214. "colors": [16777215,16769421,16769424,8454135,15195931,7299839,16586715,16711687,1056014,6029475,13762484,9044089,7962349,6772991,16774622,4144383,11973887,1966063,1056285,9081232,13696943,5002581],
  215. "uvs": [[]],
  216. "faces": [131,0,1,2,3,0,0,1,2,3,131,4,7,6,5,0,4,5,6,7,131,0,4,5,1,0,0,8,9,10,131,1,5,6,2,0,0,11,12,13,131,2,6,7,3,0,14,15,16,17,131,4,0,3,7,0,18,19,20,21],
  217. "edges" : []
  218. }
  219. },
  220. "materials":
  221. {
  222. "basic_gray": {
  223. "type": "MeshBasicMaterial",
  224. "parameters": { "color": 6710886, "wireframe": true }
  225. },
  226. "basic_white": {
  227. "type": "MeshBasicMaterial",
  228. "parameters": { "color": 16777215, "wireframe": true }
  229. },
  230. "faceted_white": {
  231. "type": "MeshLambertMaterial",
  232. "parameters": { "color": 16777215, "shading": "flat" }
  233. },
  234. "lambert_red": {
  235. "type": "MeshLambertMaterial",
  236. "parameters": { "color": 16711680 }
  237. },
  238. "lambert_green": {
  239. "type": "MeshLambertMaterial",
  240. "parameters": { "color": 30481, "blending": "AdditiveBlending", "transparent": true }
  241. },
  242. "lambert_blue": {
  243. "type": "MeshLambertMaterial",
  244. "parameters": { "color": 21930 }
  245. },
  246. "phong_orange": {
  247. "type": "MeshPhongMaterial",
  248. "parameters": { "color": 0, "specular": 11162880 }
  249. },
  250. "basic_refraction": {
  251. "type": "MeshBasicMaterial",
  252. "parameters": { "color": 16777215, "envMap": "cube_refraction", "refractionRatio": 0.95 }
  253. },
  254. "lambert_cube": {
  255. "type": "MeshLambertMaterial",
  256. "parameters": { "color": 16737792, "envMap": "cube_reflection", "combine": "MixOperation", "reflectivity": 0.3 }
  257. },
  258. "chrome": {
  259. "type": "MeshLambertMaterial",
  260. "parameters": { "color": 16777215, "envMap": "cube_reflection" }
  261. },
  262. "darkerchrome": {
  263. "type": "MeshLambertMaterial",
  264. "parameters": { "color": 2236962, "envMap": "cube_reflection" }
  265. },
  266. "glass": {
  267. "type": "MeshLambertMaterial",
  268. "parameters": { "color": 1052742, "envMap": "cube_reflection", "opacity": 0.25, "transparent": true }
  269. },
  270. "interior": {
  271. "type": "MeshLambertMaterial",
  272. "parameters": { "color": 328965 }
  273. },
  274. "backlights": {
  275. "type": "MeshLambertMaterial",
  276. "parameters": { "color": 16711680, "opacity": 0.5 }
  277. },
  278. "backsignals": {
  279. "type": "MeshLambertMaterial",
  280. "parameters": { "color": 16759552, "opacity": 0.5 }
  281. },
  282. "textured_bg": {
  283. "type": "MeshBasicMaterial",
  284. "parameters": { "color": 16777215, "map": "texture_bg" }
  285. },
  286. "minecraft": {
  287. "type": "MeshBasicMaterial",
  288. "parameters": { "color": 16777215, "map": "texture_minecraft" }
  289. },
  290. "face": {
  291. "type": "MeshFaceMaterial",
  292. "parameters": {}
  293. }
  294. },
  295. "textures":
  296. {
  297. "cube_reflection": {
  298. "url": [ "textures/cube/SwedishRoyalCastle/px.jpg",
  299. "textures/cube/SwedishRoyalCastle/nx.jpg",
  300. "textures/cube/SwedishRoyalCastle/py.jpg",
  301. "textures/cube/SwedishRoyalCastle/ny.jpg",
  302. "textures/cube/SwedishRoyalCastle/pz.jpg",
  303. "textures/cube/SwedishRoyalCastle/nz.jpg"
  304. ]
  305. },
  306. "cube_refraction": {
  307. "url": [ "textures/cube/SwedishRoyalCastle/px.jpg",
  308. "textures/cube/SwedishRoyalCastle/nx.jpg",
  309. "textures/cube/SwedishRoyalCastle/py.jpg",
  310. "textures/cube/SwedishRoyalCastle/ny.jpg",
  311. "textures/cube/SwedishRoyalCastle/nz.jpg",
  312. "textures/cube/SwedishRoyalCastle/pz.jpg"
  313. ],
  314. "mapping": "CubeRefractionMapping"
  315. },
  316. "texture_bg": {
  317. "url": "textures/cube/SwedishRoyalCastle/pz.jpg"
  318. },
  319. "texture_minecraft": {
  320. "url": "textures/minecraft/grass.png",
  321. "magFilter": "NearestFilter",
  322. "minFilter": "LinearMipMapLinearFilter"
  323. }
  324. },
  325. "cameras":
  326. {
  327. "cam1": {
  328. "type" : "perspective",
  329. "fov" : 50,
  330. "aspect": 1.33333,
  331. "near" : 1,
  332. "far" : 1000,
  333. "position": [0,0,100],
  334. "target" : [0,0,0]
  335. },
  336. "cam2": {
  337. "type" : "ortho",
  338. "left" : 0,
  339. "right" : 1024,
  340. "top" : 0,
  341. "bottom": 1024,
  342. "near" : 1,
  343. "far" : 1000,
  344. "position": [0,0,0],
  345. "target" : [0,0,0]
  346. }
  347. },
  348. "lights":
  349. {
  350. "light1": {
  351. "type" : "directional",
  352. "direction" : [0,1,1],
  353. "color" : 16777215,
  354. "intensity" : 0.8
  355. },
  356. "light2": {
  357. "type" : "point",
  358. "position": [0,0,0],
  359. "color" : 16777215
  360. }
  361. },
  362. "fogs":
  363. {
  364. "basic": {
  365. "type" : "linear",
  366. "color": [1,0,0],
  367. "near" : 1,
  368. "far" : 1000
  369. },
  370. "exponential": {
  371. "type" : "exp2",
  372. "color" : [1,1,1],
  373. "density" : 0.005
  374. },
  375. "black": {
  376. "type" : "exp2",
  377. "color" : [0,0,0],
  378. "density" : 0.005
  379. }
  380. },
  381. "defaults" :
  382. {
  383. "bgcolor" : [0,0,0],
  384. "bgalpha" : 1,
  385. "camera" : "cam1",
  386. "fog" : "black"
  387. }
  388. }