PageRenderTime 24ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/client/scripts/data/materials.js

https://bitbucket.org/Fenchurch/isoel
JavaScript | 109 lines | 101 code | 6 blank | 2 comment | 0 complexity | 00884dbfe057e5010e35a3426c4d23fb MD5 | raw file
Possible License(s): GPL-2.0, WTFPL, MIT, BSD-3-Clause, Apache-2.0, 0BSD
  1. // Filename: views/gamefield/entity.view.js
  2. define([
  3. 'jquery',
  4. 'underscore',
  5. 'backbone',
  6. 'three',
  7. // Pull in the Collection module from above
  8. 'text!templates/projects/list.html'
  9. ], function($, _, Backbone, three, projectListTemplate){
  10. var material = Backbone.Model.extend({
  11. material: new THREE.MeshLambertMaterial( { color: 0xff0000, shading: THREE.FlatShading, overdraw: true, wireframe:false } )
  12. });
  13. var entity = Backbone.Collection.extend({
  14. hidden: new THREE.MeshLambertMaterial(
  15. { color: 0xFF0000,
  16. shading: THREE.FlatShading,
  17. overdraw: true,
  18. wireframe:false,
  19. opacity:0.0
  20. } ),
  21. red: new THREE.MeshLambertMaterial(
  22. { color: 0xFF0000,
  23. shading: THREE.FlatShading,
  24. overdraw: true,
  25. wireframe:false,
  26. opacity:0.7
  27. } ),
  28. manpower: new THREE.MeshLambertMaterial(
  29. { color: 0x55FF55,
  30. shading: THREE.FlatShading,
  31. overdraw: true,
  32. wireframe:false,
  33. opacity:0.7
  34. } ),
  35. industry: new THREE.MeshLambertMaterial(
  36. { color: 0x525252,
  37. shading: THREE.FlatShading,
  38. overdraw: true,
  39. wireframe:false,
  40. opacity:0.7
  41. } ),
  42. pollution: new THREE.MeshLambertMaterial(
  43. { color: 0x52FFFF,
  44. shading: THREE.FlatShading,
  45. overdraw: true,
  46. wireframe:false,
  47. opacity:0.7
  48. } ),
  49. gandalf: new THREE.MeshLambertMaterial(
  50. { color: 0xAEAEAE,
  51. shading: THREE.FlatShading,
  52. overdraw: true,
  53. wireframe:false,
  54. opacity:1
  55. } ),
  56. tiles: {
  57. dirt: new THREE.MeshLambertMaterial(
  58. { color: 0xDBBD81,
  59. shading: THREE.FlatShading,
  60. overdraw: true,
  61. wireframe:false
  62. } ),
  63. water: new THREE.MeshLambertMaterial(
  64. { color: 0x3333AA,
  65. shading: THREE.FlatShading,
  66. overdraw: true,
  67. wireframe:false
  68. } ),
  69. rock: new THREE.MeshLambertMaterial(
  70. { color: 0x939393,
  71. shading: THREE.FlatShading,
  72. overdraw: true,
  73. wireframe:false
  74. } ),
  75. flora: new THREE.MeshLambertMaterial(
  76. { color: 0x33AEAE,
  77. shading: THREE.FlatShading,
  78. overdraw: true,
  79. wireframe:false
  80. } ),
  81. ice: new THREE.MeshLambertMaterial(
  82. { color: 0xFAFAFA,
  83. shading: THREE.FlatShading,
  84. overdraw: true,
  85. wireframe:false
  86. } ),
  87. urban: new THREE.MeshLambertMaterial(
  88. { color: 0x00FF34,
  89. shading: THREE.FlatShading,
  90. overdraw: true,
  91. wireframe:true
  92. } ),
  93. clouds: new THREE.MeshLambertMaterial(
  94. { color: 0xFAFAFA,
  95. shading: THREE.FlatShading,
  96. overdraw: true,
  97. wireframe:false ,
  98. opacity:0.3
  99. } ),
  100. }
  101. });
  102. return new entity();
  103. });