test_scene.js 10 KB

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