/client/scripts/data/materials.js
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
- // Filename: views/gamefield/entity.view.js
- define([
- 'jquery',
- 'underscore',
- 'backbone',
- 'three',
- // Pull in the Collection module from above
- 'text!templates/projects/list.html'
- ], function($, _, Backbone, three, projectListTemplate){
- var material = Backbone.Model.extend({
- material: new THREE.MeshLambertMaterial( { color: 0xff0000, shading: THREE.FlatShading, overdraw: true, wireframe:false } )
- });
- var entity = Backbone.Collection.extend({
- hidden: new THREE.MeshLambertMaterial(
- { color: 0xFF0000,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false,
- opacity:0.0
- } ),
- red: new THREE.MeshLambertMaterial(
- { color: 0xFF0000,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false,
- opacity:0.7
- } ),
- manpower: new THREE.MeshLambertMaterial(
- { color: 0x55FF55,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false,
- opacity:0.7
- } ),
- industry: new THREE.MeshLambertMaterial(
- { color: 0x525252,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false,
- opacity:0.7
- } ),
- pollution: new THREE.MeshLambertMaterial(
- { color: 0x52FFFF,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false,
- opacity:0.7
- } ),
- gandalf: new THREE.MeshLambertMaterial(
- { color: 0xAEAEAE,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false,
- opacity:1
- } ),
- tiles: {
- dirt: new THREE.MeshLambertMaterial(
- { color: 0xDBBD81,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false
- } ),
- water: new THREE.MeshLambertMaterial(
- { color: 0x3333AA,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false
- } ),
- rock: new THREE.MeshLambertMaterial(
- { color: 0x939393,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false
- } ),
- flora: new THREE.MeshLambertMaterial(
- { color: 0x33AEAE,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false
- } ),
- ice: new THREE.MeshLambertMaterial(
- { color: 0xFAFAFA,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false
- } ),
- urban: new THREE.MeshLambertMaterial(
- { color: 0x00FF34,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:true
- } ),
- clouds: new THREE.MeshLambertMaterial(
- { color: 0xFAFAFA,
- shading: THREE.FlatShading,
- overdraw: true,
- wireframe:false ,
- opacity:0.3
- } ),
- }
- });
- return new entity();
- });