source: other-projects/nz-flag-design/trunk/render-3d/weather/weather.js@ 29475

Last change on this file since 29475 was 29475, checked in by davidb, 9 years ago

Initial set of files

File size: 618 bytes
Line 
1
2 function weatherSystem(scene){
3
4 this.scene = scene;
5 this.s = false;
6 this.type = null;
7
8 this.set = function(weather){
9 this.s = true;
10 this.type = weather;
11 weather.init();
12 this.scene.add(this.getWeather());
13 }
14
15 this.getWeather = function(){
16 return this.type.system();
17 }
18
19 this.update = function(){
20 this.type.update();
21 }
22
23 this.swap = function(w){
24 if(this.type != w){
25 if(this.type !== null) this.scene.remove(this.getWeather());
26 this.set(w);
27 }
28 }
29
30
31
32 this.isSet = function(){
33 return this.s;
34 }
35 }
36
37
38
39
40
41
42
Note: See TracBrowser for help on using the repository browser.