test_scene.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. {
  2. "metadata": {
  3. "formatVersion": 3.1,
  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. "children" : {
  35. }
  36. },
  37. "sphere_lambert" : {
  38. "geometry" : "sphere",
  39. "materials": [ "lambert_green" ],
  40. "position" : [ -20, -5, 15 ],
  41. "rotation" : [ 0, 0, 0 ],
  42. "scale" : [ 1, 1, 1 ],
  43. "visible" : true
  44. },
  45. "sphere_refraction" : {
  46. "geometry" : "sphere",
  47. "materials": [ "basic_refraction" ],
  48. "position" : [ 50, 45, -50 ],
  49. "rotation" : [ 0, 0, 0 ],
  50. "scale" : [ 1, 1, 1 ],
  51. "visible" : true
  52. },
  53. "icosahedron" : {
  54. "geometry" : "icosahedron",
  55. "materials": [ "faceted_white" ],
  56. "position" : [ 20, 10, -60 ],
  57. "rotation" : [ 0, 0, 0 ],
  58. "scale" : [ 1, 1, 1 ],
  59. "visible" : true
  60. },
  61. "torus" : {
  62. "geometry" : "torus",
  63. "materials": [ "phong_orange" ],
  64. "position" : [ -20, 5, -50 ],
  65. "rotation" : [ 0, 0, 0 ],
  66. "scale" : [ 2, 2, 2 ],
  67. "visible" : true
  68. },
  69. "cone" : {
  70. "geometry" : "cone",
  71. "materials": [ "lambert_blue" ],
  72. "position" : [ -50, 15, -50 ],
  73. "rotation" : [ 0, 0, 0 ],
  74. "scale" : [ 1, 1, 1 ],
  75. "visible" : true
  76. },
  77. "cylinder" : {
  78. "geometry" : "cylinder",
  79. "materials": [ "lambert_blue" ],
  80. "position" : [ 50, 15, -50 ],
  81. "rotation" : [ 0, 0, 0 ],
  82. "scale" : [ 1, 1, 1 ],
  83. "visible" : true
  84. },
  85. "colorcube1" : {
  86. "geometry" : "colorcube",
  87. "materials": [],
  88. "position" : [ -10, -5, 30 ],
  89. "rotation" : [ 0, 0, 0 ],
  90. "scale" : [ 5, 5, 5 ],
  91. "visible" : true,
  92. "children" : {
  93. "colorcube2" : {
  94. "geometry" : "colorcube",
  95. "materials": [],
  96. "position" : [ 0, 2, 0 ],
  97. "rotation" : [ 0.1, 0.1, 0.1 ],
  98. "scale" : [ 0.5, 0.5, 0.5 ],
  99. "visible" : true,
  100. "children" : {
  101. "colorcube3" : {
  102. "geometry" : "colorcube",
  103. "materials": [],
  104. "position" : [ 0, 2, 0 ],
  105. "rotation" : [ 0.1, 0.1, 0.1 ],
  106. "scale" : [ 0.5, 0.5, 0.5 ],
  107. "visible" : true,
  108. "children" : {
  109. "colorcube4" : {
  110. "geometry" : "colorcube",
  111. "materials": [],
  112. "position" : [ 0, 2, 0 ],
  113. "rotation" : [ 0.1, 0.1, 0.1 ],
  114. "scale" : [ 0.5, 0.5, 0.5 ],
  115. "visible" : true
  116. }
  117. }
  118. }
  119. }
  120. }
  121. }
  122. },
  123. "veyron" : {
  124. "geometry" : "veyron",
  125. "materials": [ "face" ],
  126. "position" : [ 40, -1, 0 ],
  127. "rotation" : [ 0, 0.3, 0 ],
  128. "scale" : [ 0.25, 0.25, 0.25 ],
  129. "visible" : true
  130. },
  131. "walt" : {
  132. "geometry" : "WaltHead",
  133. "materials": [ "lambert_cube" ],
  134. "position" : [ -75, 10, -30 ],
  135. "rotation" : [ 0, 0.5, 0 ],
  136. "scale" : [ 0.5, 0.5, 0.5 ],
  137. "visible" : true
  138. },
  139. "ben" : {
  140. "geometry" : "ben",
  141. "materials": [ "phong_ben" ],
  142. "position" : [ -45, -10, 0 ],
  143. "rotation" : [ 0, 0.5, 0 ],
  144. "scale" : [ 55, 55, 55 ],
  145. "visible" : true
  146. },
  147. "hand" : {
  148. "geometry" : "hand",
  149. "materials": [ "phong_hand" ],
  150. "position" : [ -28, -1, 29 ],
  151. "rotation" : [ 0, 0.5, 0 ],
  152. "scale" : [ 12, 12, 12 ],
  153. "visible" : true
  154. },
  155. "ninja" : {
  156. "geometry" : "NinjaLo",
  157. "materials": [ "phong_normal" ],
  158. "position" : [ 75, 10, -30 ],
  159. "rotation" : [ 0, -0.5, 0 ],
  160. "scale" : [ 1.25, 1.25, 1.25 ],
  161. "visible" : true
  162. },
  163. "quad_bg" : {
  164. "geometry" : "quad",
  165. "materials": [ "textured_bg" ],
  166. "position" : [ 0, 15, -90 ],
  167. "rotation" : [ 0, 0, 0 ],
  168. "scale" : [ 20, 20, 20 ],
  169. "visible" : true
  170. },
  171. "ground" : {
  172. "geometry" : "plane",
  173. "materials": [ "basic_gray" ],
  174. "position" : [ 0, -10, 0 ],
  175. "rotation" : [ -1.57, 0, 0 ],
  176. "scale" : [ 100, 100, 100 ],
  177. "visible" : true
  178. }
  179. },
  180. "geometries": {
  181. "cube": {
  182. "type" : "cube",
  183. "width" : 10,
  184. "height": 10,
  185. "depth" : 10,
  186. "segmentsWidth" : 1,
  187. "segmentsHeight" : 1,
  188. "segmentsDepth" : 1,
  189. "flipped" : false,
  190. "sides" : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
  191. },
  192. "cubeNormals": {
  193. "type" : "cube",
  194. "width" : 10,
  195. "height": 10,
  196. "depth" : 10,
  197. "segmentsWidth" : 1,
  198. "segmentsHeight" : 1,
  199. "segmentsDepth" : 1,
  200. "flipped" : false,
  201. "sides" : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
  202. },
  203. "cubeWire": {
  204. "type" : "cube",
  205. "width" : 10,
  206. "height": 10,
  207. "depth" : 10,
  208. "segmentsWidth" : 1,
  209. "segmentsHeight" : 1,
  210. "segmentsDepth" : 1,
  211. "flipped" : false,
  212. "sides" : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
  213. },
  214. "plane": {
  215. "type" : "plane",
  216. "width" : 10,
  217. "height" : 10,
  218. "segmentsWidth" : 50,
  219. "segmentsHeight" : 50
  220. },
  221. "quad": {
  222. "type" : "plane",
  223. "width" : 10,
  224. "height" : 10,
  225. "segmentsWidth" : 1,
  226. "segmentsHeight" : 1
  227. },
  228. "sphere": {
  229. "type" : "sphere",
  230. "radius" : 5,
  231. "segmentsWidth" : 32,
  232. "segmentsHeight" : 16
  233. },
  234. "icosahedron": {
  235. "type" : "icosahedron",
  236. "radius" : 20,
  237. "subdivisions" : 2
  238. },
  239. "torus": {
  240. "type" : "torus",
  241. "radius" : 5,
  242. "tube" : 2,
  243. "segmentsR" : 16,
  244. "segmentsT" : 32
  245. },
  246. "cylinder": {
  247. "type" : "cylinder",
  248. "topRad" : 5,
  249. "botRad" : 5,
  250. "height" : 50,
  251. "radSegs" : 32,
  252. "heightSegs": 1
  253. },
  254. "cone": {
  255. "type" : "cylinder",
  256. "topRad" : 0,
  257. "botRad" : 5,
  258. "height" : 50,
  259. "radSegs" : 32,
  260. "heightSegs" : 1
  261. },
  262. "WaltHead": {
  263. "type": "binary",
  264. "url" : "obj/walt/WaltHead_bin.js"
  265. },
  266. "NinjaLo": {
  267. "type": "binary",
  268. "url" : "obj/ninja/NinjaLo_bin.js"
  269. },
  270. "veyron": {
  271. "type": "binary",
  272. "url" : "obj/veyron/VeyronNoUv_bin.js"
  273. },
  274. "ben": {
  275. "type": "ctm",
  276. "url" : "models/ctm/ben.ctm",
  277. "useWorkers" : true,
  278. "useBuffers" : true
  279. },
  280. "hand": {
  281. "type": "utf8",
  282. "url" : "models/utf8/hand.utf8",
  283. "scale" : 0.815141,
  284. "offsetX" : -0.371823,
  285. "offsetY" : -0.011920,
  286. "offsetZ" : -0.416061
  287. },
  288. "colorcube": {
  289. "type": "embedded",
  290. "id" : "cube_fvc"
  291. }
  292. },
  293. "embeds": {
  294. "cube_fvc": {
  295. "metadata" : {
  296. "formatVersion" : 3
  297. },
  298. "scale" : 1.0,
  299. "materials": [{
  300. "DbgColor" : 15658734,
  301. "DbgIndex" : 0,
  302. "DbgName" : "Material",
  303. "colorAmbient" : [0.0, 0.0, 0.0],
  304. "colorDiffuse" : [0.8, 0.8, 0.8],
  305. "colorSpecular" : [0.5, 0.5, 0.5],
  306. "specularCoef" : 50,
  307. "transparency" : 1.0,
  308. "vertexColors" : true
  309. }],
  310. "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],
  311. "morphTargets": [],
  312. "normals": [],
  313. "colors": [16777215,16769421,16769424,8454135,15195931,7299839,16586715,16711687,1056014,6029475,13762484,9044089,7962349,6772991,16774622,4144383,11973887,1966063,1056285,9081232,13696943,5002581],
  314. "uvs": [[]],
  315. "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]
  316. }
  317. },
  318. "materials": {
  319. "basic_gray": {
  320. "type": "MeshBasicMaterial",
  321. "parameters": { "color": 6710886, "wireframe": true }
  322. },
  323. "basic_white": {
  324. "type": "MeshBasicMaterial",
  325. "parameters": { "color": 16777215, "wireframe": true }
  326. },
  327. "faceted_white": {
  328. "type": "MeshLambertMaterial",
  329. "parameters": { "color": 16777215, "shading": "flat" }
  330. },
  331. "phong_red": {
  332. "type": "MeshPhongMaterial",
  333. "parameters": { "color": 16711680, "specular": 16711680, "shininess": 25, "bumpMap": "texture_bump", "bumpScale": -0.75 }
  334. },
  335. "phong_ben": {
  336. "type": "MeshPhongMaterial",
  337. "parameters": { "color": 1118481, "ambient": 1118481, "specular": 5601245, "shininess": 12, "bumpMap": "texture_bump_repeat", "bumpScale": 0.125 }
  338. },
  339. "phong_hand": {
  340. "type": "MeshPhongMaterial",
  341. "parameters": { "color": 14531481, "ambient": 14531481, "specular": 2236962, "shininess": 40, "wrapAround": true, "wrapRGB": [ 0.15, 0.02, 0.01 ] }
  342. },
  343. "phong_normal": {
  344. "type": "MeshPhongMaterial",
  345. "parameters": { "color": 0, "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 }
  346. },
  347. "lambert_green": {
  348. "type": "MeshLambertMaterial",
  349. "parameters": { "color": 30481, "blending": "AdditiveBlending", "transparent": true }
  350. },
  351. "lambert_blue": {
  352. "type": "MeshLambertMaterial",
  353. "parameters": { "color": 21930 }
  354. },
  355. "phong_orange": {
  356. "type": "MeshPhongMaterial",
  357. "parameters": { "color": 0, "specular": 11162880 }
  358. },
  359. "basic_refraction": {
  360. "type": "MeshBasicMaterial",
  361. "parameters": { "color": 16777215, "envMap": "cube_refraction", "refractionRatio": 0.95 }
  362. },
  363. "lambert_cube": {
  364. "type": "MeshLambertMaterial",
  365. "parameters": { "color": 16737792, "envMap": "cube_reflection", "combine": "MixOperation", "reflectivity": 0.3 }
  366. },
  367. "chrome": {
  368. "type": "MeshLambertMaterial",
  369. "parameters": { "color": 16777215, "envMap": "cube_reflection" }
  370. },
  371. "darkerchrome": {
  372. "type": "MeshLambertMaterial",
  373. "parameters": { "color": 2236962, "envMap": "cube_reflection" }
  374. },
  375. "glass": {
  376. "type": "MeshLambertMaterial",
  377. "parameters": { "color": 1052742, "envMap": "cube_reflection", "opacity": 0.25, "transparent": true }
  378. },
  379. "interior": {
  380. "type": "MeshLambertMaterial",
  381. "parameters": { "color": 328965 }
  382. },
  383. "backlights": {
  384. "type": "MeshLambertMaterial",
  385. "parameters": { "color": 16711680, "opacity": 0.5 }
  386. },
  387. "backsignals": {
  388. "type": "MeshLambertMaterial",
  389. "parameters": { "color": 16759552, "opacity": 0.5 }
  390. },
  391. "textured_bg": {
  392. "type": "MeshBasicMaterial",
  393. "parameters": { "color": 16777215, "map": "texture_bg" }
  394. },
  395. "minecraft": {
  396. "type": "MeshBasicMaterial",
  397. "parameters": { "color": 16777215, "map": "texture_minecraft" }
  398. },
  399. "face": {
  400. "type": "MeshFaceMaterial",
  401. "parameters": {}
  402. }
  403. },
  404. "textures": {
  405. "cube_reflection": {
  406. "url": [ "textures/cube/SwedishRoyalCastle/px.jpg",
  407. "textures/cube/SwedishRoyalCastle/nx.jpg",
  408. "textures/cube/SwedishRoyalCastle/py.jpg",
  409. "textures/cube/SwedishRoyalCastle/ny.jpg",
  410. "textures/cube/SwedishRoyalCastle/pz.jpg",
  411. "textures/cube/SwedishRoyalCastle/nz.jpg"
  412. ]
  413. },
  414. "cube_refraction": {
  415. "url": [ "textures/cube/SwedishRoyalCastle/px.jpg",
  416. "textures/cube/SwedishRoyalCastle/nx.jpg",
  417. "textures/cube/SwedishRoyalCastle/py.jpg",
  418. "textures/cube/SwedishRoyalCastle/ny.jpg",
  419. "textures/cube/SwedishRoyalCastle/nz.jpg",
  420. "textures/cube/SwedishRoyalCastle/pz.jpg"
  421. ],
  422. "mapping": "CubeRefractionMapping"
  423. },
  424. "texture_bg": {
  425. "url": "textures/cube/SwedishRoyalCastle/pz.jpg",
  426. "anisotropy": 4
  427. },
  428. "texture_bump": {
  429. "url": "textures/water.jpg",
  430. "anisotropy": 4
  431. },
  432. "texture_bump_repeat": {
  433. "url": "textures/water.jpg",
  434. "repeat" : [ 20, 20 ],
  435. "anisotropy": 4
  436. },
  437. "texture_normal": {
  438. "url": "textures/normal/ninja/normal.jpg",
  439. "anisotropy": 4
  440. },
  441. "texture_ao": {
  442. "url": "textures/normal/ninja/ao.jpg",
  443. "anisotropy": 4
  444. },
  445. "texture_displacement": {
  446. "url": "textures/normal/ninja/displacement.jpg",
  447. "anisotropy": 4
  448. },
  449. "texture_minecraft": {
  450. "url": "textures/minecraft/grass.png",
  451. "magFilter": "NearestFilter",
  452. "minFilter": "LinearMipMapLinearFilter"
  453. }
  454. },
  455. "cameras": {
  456. "cam1": {
  457. "type" : "perspective",
  458. "fov" : 50,
  459. "aspect": 1.33333,
  460. "near" : 1,
  461. "far" : 1000,
  462. "position": [0,0,100],
  463. "target" : [0,0,0]
  464. },
  465. "cam2": {
  466. "type" : "ortho",
  467. "left" : 0,
  468. "right" : 1024,
  469. "top" : 0,
  470. "bottom": 1024,
  471. "near" : 1,
  472. "far" : 1000,
  473. "position": [0,0,0],
  474. "target" : [0,0,0]
  475. }
  476. },
  477. "lights": {
  478. "light1": {
  479. "type" : "directional",
  480. "direction" : [0,1,1],
  481. "color" : 16777215,
  482. "intensity" : 1
  483. },
  484. "light2": {
  485. "type" : "point",
  486. "position": [0,0,0],
  487. "color" : 16777215,
  488. "intensity" : 1.25
  489. }
  490. },
  491. "fogs": {
  492. "basic": {
  493. "type": "linear",
  494. "color": [1,0,0],
  495. "near": 1,
  496. "far": 1000
  497. },
  498. "exponential": {
  499. "type": "exp2",
  500. "color": [1,1,1],
  501. "density": 0.005
  502. },
  503. "black": {
  504. "type": "exp2",
  505. "color": [0,0,0],
  506. "density": 0.005
  507. }
  508. },
  509. "defaults": {
  510. "bgcolor": [0,0,0],
  511. "bgalpha": 1,
  512. "camera": "cam1",
  513. "fog": "black"
  514. }
  515. }