test_scene.js 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  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" : [ 1, 1, 1 ],
  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" : [ 1.57, 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" : [ 0, 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. "radius" : 20,
  159. "subdivisions" : 2
  160. },
  161. "torus": {
  162. "type" : "torus",
  163. "radius" : 5,
  164. "tube" : 2,
  165. "segmentsR" : 16,
  166. "segmentsT" : 32
  167. },
  168. "cylinder": {
  169. "type" : "cylinder",
  170. "topRad" : 5,
  171. "botRad" : 5,
  172. "height" : 50,
  173. "radSegs" : 32,
  174. "heightSegs": 1
  175. },
  176. "cone": {
  177. "type" : "cylinder",
  178. "topRad" : 0,
  179. "botRad" : 5,
  180. "height" : 50,
  181. "radSegs" : 32,
  182. "heightSegs" : 1
  183. },
  184. "WaltHead": {
  185. "type": "bin_mesh",
  186. "url" : "obj/walt/WaltHead_bin.js"
  187. },
  188. "veyron": {
  189. "type": "bin_mesh",
  190. "url" : "obj/veyron/VeyronNoUv_bin.js"
  191. },
  192. "colorcube": {
  193. "type": "embedded_mesh",
  194. "id" : "cube_fvc"
  195. }
  196. },
  197. "embeds": {
  198. "cube_fvc": {
  199. "metadata" : { "formatVersion" : 3 },
  200. "scale" : 1.0,
  201. "materials": [ {
  202. "DbgColor" : 15658734,
  203. "DbgIndex" : 0,
  204. "DbgName" : "Material",
  205. "colorAmbient" : [0.0, 0.0, 0.0],
  206. "colorDiffuse" : [0.8, 0.8, 0.8],
  207. "colorSpecular" : [0.5, 0.5, 0.5],
  208. "specularCoef" : 50,
  209. "transparency" : 1.0,
  210. "vertexColors" : true
  211. }],
  212. "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],
  213. "morphTargets": [],
  214. "normals": [],
  215. "colors": [16777215,16769421,16769424,8454135,15195931,7299839,16586715,16711687,1056014,6029475,13762484,9044089,7962349,6772991,16774622,4144383,11973887,1966063,1056285,9081232,13696943,5002581],
  216. "uvs": [[]],
  217. "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],
  218. "edges" : []
  219. }
  220. },
  221. "materials":
  222. {
  223. "basic_gray": {
  224. "type": "MeshBasicMaterial",
  225. "parameters": { "color": 6710886, "wireframe": true }
  226. },
  227. "basic_white": {
  228. "type": "MeshBasicMaterial",
  229. "parameters": { "color": 16777215, "wireframe": true }
  230. },
  231. "faceted_white": {
  232. "type": "MeshLambertMaterial",
  233. "parameters": { "color": 16777215, "shading": "flat" }
  234. },
  235. "lambert_red": {
  236. "type": "MeshLambertMaterial",
  237. "parameters": { "color": 16711680 }
  238. },
  239. "lambert_green": {
  240. "type": "MeshLambertMaterial",
  241. "parameters": { "color": 30481, "blending": "AdditiveBlending", "transparent": true }
  242. },
  243. "lambert_blue": {
  244. "type": "MeshLambertMaterial",
  245. "parameters": { "color": 21930 }
  246. },
  247. "phong_orange": {
  248. "type": "MeshPhongMaterial",
  249. "parameters": { "color": 0, "specular": 11162880 }
  250. },
  251. "basic_refraction": {
  252. "type": "MeshBasicMaterial",
  253. "parameters": { "color": 16777215, "envMap": "cube_refraction", "refractionRatio": 0.95 }
  254. },
  255. "lambert_cube": {
  256. "type": "MeshLambertMaterial",
  257. "parameters": { "color": 16737792, "envMap": "cube_reflection", "combine": "MixOperation", "reflectivity": 0.3 }
  258. },
  259. "chrome": {
  260. "type": "MeshLambertMaterial",
  261. "parameters": { "color": 16777215, "envMap": "cube_reflection" }
  262. },
  263. "darkerchrome": {
  264. "type": "MeshLambertMaterial",
  265. "parameters": { "color": 2236962, "envMap": "cube_reflection" }
  266. },
  267. "glass": {
  268. "type": "MeshLambertMaterial",
  269. "parameters": { "color": 1052742, "envMap": "cube_reflection", "opacity": 0.25, "transparent": true }
  270. },
  271. "interior": {
  272. "type": "MeshLambertMaterial",
  273. "parameters": { "color": 328965 }
  274. },
  275. "backlights": {
  276. "type": "MeshLambertMaterial",
  277. "parameters": { "color": 16711680, "opacity": 0.5 }
  278. },
  279. "backsignals": {
  280. "type": "MeshLambertMaterial",
  281. "parameters": { "color": 16759552, "opacity": 0.5 }
  282. },
  283. "textured_bg": {
  284. "type": "MeshBasicMaterial",
  285. "parameters": { "color": 16777215, "map": "texture_bg" }
  286. },
  287. "minecraft": {
  288. "type": "MeshBasicMaterial",
  289. "parameters": { "color": 16777215, "map": "texture_minecraft" }
  290. },
  291. "face": {
  292. "type": "MeshFaceMaterial",
  293. "parameters": {}
  294. }
  295. },
  296. "textures":
  297. {
  298. "cube_reflection": {
  299. "url": [ "textures/cube/SwedishRoyalCastle/px.jpg",
  300. "textures/cube/SwedishRoyalCastle/nx.jpg",
  301. "textures/cube/SwedishRoyalCastle/py.jpg",
  302. "textures/cube/SwedishRoyalCastle/ny.jpg",
  303. "textures/cube/SwedishRoyalCastle/pz.jpg",
  304. "textures/cube/SwedishRoyalCastle/nz.jpg"
  305. ]
  306. },
  307. "cube_refraction": {
  308. "url": [ "textures/cube/SwedishRoyalCastle/px.jpg",
  309. "textures/cube/SwedishRoyalCastle/nx.jpg",
  310. "textures/cube/SwedishRoyalCastle/py.jpg",
  311. "textures/cube/SwedishRoyalCastle/ny.jpg",
  312. "textures/cube/SwedishRoyalCastle/nz.jpg",
  313. "textures/cube/SwedishRoyalCastle/pz.jpg"
  314. ],
  315. "mapping": "CubeRefractionMapping"
  316. },
  317. "texture_bg": {
  318. "url": "textures/cube/SwedishRoyalCastle/pz.jpg"
  319. },
  320. "texture_minecraft": {
  321. "url": "textures/minecraft/grass.png",
  322. "magFilter": "NearestFilter",
  323. "minFilter": "LinearMipMapLinearFilter"
  324. }
  325. },
  326. "cameras":
  327. {
  328. "cam1": {
  329. "type" : "perspective",
  330. "fov" : 50,
  331. "aspect": 1.33333,
  332. "near" : 1,
  333. "far" : 1000,
  334. "position": [0,0,100],
  335. "target" : [0,0,0]
  336. },
  337. "cam2": {
  338. "type" : "ortho",
  339. "left" : 0,
  340. "right" : 1024,
  341. "top" : 0,
  342. "bottom": 1024,
  343. "near" : 1,
  344. "far" : 1000,
  345. "position": [0,0,0],
  346. "target" : [0,0,0]
  347. }
  348. },
  349. "lights":
  350. {
  351. "light1": {
  352. "type" : "directional",
  353. "direction" : [0,1,1],
  354. "color" : 16777215,
  355. "intensity" : 0.8
  356. },
  357. "light2": {
  358. "type" : "point",
  359. "position": [0,0,0],
  360. "color" : 16777215
  361. }
  362. },
  363. "fogs":
  364. {
  365. "basic": {
  366. "type" : "linear",
  367. "color": [1,0,0],
  368. "near" : 1,
  369. "far" : 1000
  370. },
  371. "exponential": {
  372. "type" : "exp2",
  373. "color" : [1,1,1],
  374. "density" : 0.005
  375. },
  376. "black": {
  377. "type" : "exp2",
  378. "color" : [0,0,0],
  379. "density" : 0.005
  380. }
  381. },
  382. "defaults" :
  383. {
  384. "bgcolor" : [0,0,0],
  385. "bgalpha" : 1,
  386. "camera" : "cam1",
  387. "fog" : "black"
  388. }
  389. }