test_scene.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. {
  2. "metadata": {
  3. "formatVersion": 3,
  4. "type" : "scene"
  5. },
  6. "urlBaseType" : "relativeToHTML",
  7. "objects": {
  8. "cube1" : {
  9. "geometry" : "cubeNormals",
  10. "materials": [ "lambert_red" ],
  11. "position" : [ 0, 0, 0 ],
  12. "rotation" : [ 0, -0.3, 0 ],
  13. "scale" : [ 1, 1, 1 ],
  14. "visible" : true,
  15. "properties" : {
  16. "rotating" : true
  17. }
  18. },
  19. "cube2" : {
  20. "geometry" : "cubeWire",
  21. "materials": [ "basic_white" ],
  22. "position" : [ 0, 0, 0 ],
  23. "rotation" : [ 0, -0.3, 0 ],
  24. "scale" : [ 2, 2, 2 ],
  25. "visible" : true
  26. },
  27. "cube3" : {
  28. "geometry" : "cube",
  29. "materials": [ "minecraft" ],
  30. "position" : [ -30, -5, 25 ],
  31. "rotation" : [ 0, 0.8, 0 ],
  32. "scale" : [ 1, 1, 1 ],
  33. "visible" : true
  34. },
  35. "sphere_lambert" : {
  36. "geometry" : "sphere",
  37. "materials": [ "lambert_green" ],
  38. "position" : [ -20, -5, 15 ],
  39. "rotation" : [ 0, 0, 0 ],
  40. "scale" : [ 1, 1, 1 ],
  41. "visible" : true
  42. },
  43. "sphere_refraction" : {
  44. "geometry" : "sphere",
  45. "materials": [ "basic_refraction" ],
  46. "position" : [ 50, 45, -50 ],
  47. "rotation" : [ 0, 0, 0 ],
  48. "scale" : [ 1, 1, 1 ],
  49. "visible" : true
  50. },
  51. "icosahedron" : {
  52. "geometry" : "icosahedron",
  53. "materials": [ "faceted_white" ],
  54. "position" : [ 20, 10, -60 ],
  55. "rotation" : [ 0, 0, 0 ],
  56. "scale" : [ 1, 1, 1 ],
  57. "visible" : true
  58. },
  59. "torus" : {
  60. "geometry" : "torus",
  61. "materials": [ "phong_orange" ],
  62. "position" : [ -20, 5, -50 ],
  63. "rotation" : [ 0, 0, 0 ],
  64. "scale" : [ 2, 2, 2 ],
  65. "visible" : true
  66. },
  67. "cone" : {
  68. "geometry" : "cone",
  69. "materials": [ "lambert_blue" ],
  70. "position" : [ -50, 15, -50 ],
  71. "rotation" : [ 0, 0, 0 ],
  72. "scale" : [ 1, 1, 1 ],
  73. "visible" : true
  74. },
  75. "cylinder" : {
  76. "geometry" : "cylinder",
  77. "materials": [ "lambert_blue" ],
  78. "position" : [ 50, 15, -50 ],
  79. "rotation" : [ 0, 0, 0 ],
  80. "scale" : [ 1, 1, 1 ],
  81. "visible" : true
  82. },
  83. "colorcube1" : {
  84. "geometry" : "colorcube",
  85. "materials": [],
  86. "position" : [ -10, -5, 30 ],
  87. "rotation" : [ 0, 0, 0 ],
  88. "scale" : [ 5, 5, 5 ],
  89. "visible" : true,
  90. "children" : {
  91. "colorcube2" : {
  92. "geometry" : "colorcube",
  93. "materials": [],
  94. "position" : [ 0, 2, 0 ],
  95. "rotation" : [ 0.1, 0.1, 0.1 ],
  96. "scale" : [ 0.5, 0.5, 0.5 ],
  97. "visible" : true,
  98. "children" : {
  99. "colorcube3" : {
  100. "geometry" : "colorcube",
  101. "materials": [],
  102. "position" : [ 0, 2, 0 ],
  103. "rotation" : [ 0.1, 0.1, 0.1 ],
  104. "scale" : [ 0.5, 0.5, 0.5 ],
  105. "visible" : true,
  106. "children" : {
  107. "colorcube4" : {
  108. "geometry" : "colorcube",
  109. "materials": [],
  110. "position" : [ 0, 2, 0 ],
  111. "rotation" : [ 0.1, 0.1, 0.1 ],
  112. "scale" : [ 0.5, 0.5, 0.5 ],
  113. "visible" : true
  114. }
  115. }
  116. }
  117. }
  118. }
  119. }
  120. },
  121. "veyron" : {
  122. "geometry" : "veyron",
  123. "materials": [ "face" ],
  124. "position" : [ 40, -1, 0 ],
  125. "rotation" : [ 0, 0.3, 0 ],
  126. "scale" : [ 0.25, 0.25, 0.25 ],
  127. "visible" : true
  128. },
  129. "walt" : {
  130. "geometry" : "WaltHead",
  131. "materials": [ "lambert_cube" ],
  132. "position" : [ -45, 10, 0 ],
  133. "rotation" : [ 0, 0, 0 ],
  134. "scale" : [ 0.5, 0.5, 0.5 ],
  135. "visible" : true
  136. },
  137. "quad_bg" : {
  138. "geometry" : "quad",
  139. "materials": [ "textured_bg" ],
  140. "position" : [ 0, 15, -90 ],
  141. "rotation" : [ 0, 0, 0 ],
  142. "scale" : [ 20, 20, 20 ],
  143. "visible" : true
  144. },
  145. "ground" : {
  146. "geometry" : "plane",
  147. "materials": [ "basic_gray" ],
  148. "position" : [ 0, -10, 0 ],
  149. "rotation" : [ -1.57, 0, 0 ],
  150. "scale" : [ 100, 100, 100 ],
  151. "visible" : true
  152. }
  153. },
  154. "geometries": {
  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" : {
  252. "formatVersion" : 3
  253. },
  254. "scale" : 1.0,
  255. "materials": [{
  256. "DbgColor" : 15658734,
  257. "DbgIndex" : 0,
  258. "DbgName" : "Material",
  259. "colorAmbient" : [0.0, 0.0, 0.0],
  260. "colorDiffuse" : [0.8, 0.8, 0.8],
  261. "colorSpecular" : [0.5, 0.5, 0.5],
  262. "specularCoef" : 50,
  263. "transparency" : 1.0,
  264. "vertexColors" : true
  265. }],
  266. "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],
  267. "morphTargets": [],
  268. "normals": [],
  269. "colors": [16777215,16769421,16769424,8454135,15195931,7299839,16586715,16711687,1056014,6029475,13762484,9044089,7962349,6772991,16774622,4144383,11973887,1966063,1056285,9081232,13696943,5002581],
  270. "uvs": [[]],
  271. "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]
  272. }
  273. },
  274. "materials": {
  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. "cube_reflection": {
  350. "url": [ "textures/cube/SwedishRoyalCastle/px.jpg",
  351. "textures/cube/SwedishRoyalCastle/nx.jpg",
  352. "textures/cube/SwedishRoyalCastle/py.jpg",
  353. "textures/cube/SwedishRoyalCastle/ny.jpg",
  354. "textures/cube/SwedishRoyalCastle/pz.jpg",
  355. "textures/cube/SwedishRoyalCastle/nz.jpg"
  356. ]
  357. },
  358. "cube_refraction": {
  359. "url": [ "textures/cube/SwedishRoyalCastle/px.jpg",
  360. "textures/cube/SwedishRoyalCastle/nx.jpg",
  361. "textures/cube/SwedishRoyalCastle/py.jpg",
  362. "textures/cube/SwedishRoyalCastle/ny.jpg",
  363. "textures/cube/SwedishRoyalCastle/nz.jpg",
  364. "textures/cube/SwedishRoyalCastle/pz.jpg"
  365. ],
  366. "mapping": "CubeRefractionMapping"
  367. },
  368. "texture_bg": {
  369. "url": "textures/cube/SwedishRoyalCastle/pz.jpg"
  370. },
  371. "texture_minecraft": {
  372. "url": "textures/minecraft/grass.png",
  373. "magFilter": "NearestFilter",
  374. "minFilter": "LinearMipMapLinearFilter"
  375. }
  376. },
  377. "cameras": {
  378. "cam1": {
  379. "type" : "perspective",
  380. "fov" : 50,
  381. "aspect": 1.33333,
  382. "near" : 1,
  383. "far" : 1000,
  384. "position": [0,0,100],
  385. "target" : [0,0,0]
  386. },
  387. "cam2": {
  388. "type" : "ortho",
  389. "left" : 0,
  390. "right" : 1024,
  391. "top" : 0,
  392. "bottom": 1024,
  393. "near" : 1,
  394. "far" : 1000,
  395. "position": [0,0,0],
  396. "target" : [0,0,0]
  397. }
  398. },
  399. "lights": {
  400. "light1": {
  401. "type" : "directional",
  402. "direction" : [0,1,1],
  403. "color" : 16777215,
  404. "intensity" : 0.8
  405. },
  406. "light2": {
  407. "type" : "point",
  408. "position": [0,0,0],
  409. "color" : 16777215
  410. }
  411. },
  412. "fogs": {
  413. "basic": {
  414. "type": "linear",
  415. "color": [1,0,0],
  416. "near": 1,
  417. "far": 1000
  418. },
  419. "exponential": {
  420. "type": "exp2",
  421. "color": [1,1,1],
  422. "density": 0.005
  423. },
  424. "black": {
  425. "type": "exp2",
  426. "color": [0,0,0],
  427. "density": 0.005
  428. }
  429. },
  430. "defaults": {
  431. "bgcolor": [0,0,0],
  432. "bgalpha": 1,
  433. "camera": "cam1",
  434. "fog": "black"
  435. }
  436. }