test_scene.js 9.5 KB

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