test_scene.js 12 KB

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