123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360 |
- var poiAlpha = {
- pin_width: 100,
- id: "Poi01",
- img: null,
- type: "GENERIC",
- cat: 'FF',
- pin: function(){
- },
- isFixed: function(){
- return (this.cat=='FI'||this.cat=='UD');
- },
- isOverlappedToPoi: function(poi){
- var rec1 = [poi.x,poi.y,poi.x+this.pin_width,poi.y+this.pin_width];
- var rec2 = [this.x,this.y,this.x+this.pin_width,this.y+this.pin_width];
- return this.isOverlapped(rec1);
- },
- isOverlapped: function(rec1){
- var rec2 = [this.x,this.y,this.x+this.pin_width,this.y+this.pin_width];
- // check if either rectangle is actually a line
- if (rec1[0] == rec1[2] || rec1[1] == rec1[3] ||
- rec2[0] == rec2[2] || rec2[1] == rec2[3]) {
- // the line cannot have positive overlap
- return false;
- }
- return !(rec1[2] <= rec2[0] || // left
- rec1[3] <= rec2[1] || // bottom
- rec1[0] >= rec2[2] || // right
- rec1[1] >= rec2[3]); // top
- }
- };
- var pois=[];
- //Types
- // - "I": immagine
- // - "T": Testo/html
- // - "V": Video
- //Cat(egories):
- // - "FI": FIume (Position Fixed)
- // - "FL": FLora
- // - "FI": FAuna
- // - "UD": UDatinos (Position Fixed)
- var poi=Object.create(poiAlpha);
- //-----------
- // FIUME
- //-----------
-
- //0
- poi.x = 346;
- poi.y = 332;
- poi.id = "First One";
- poi.type = 'I'; //looking for "asset/I_0.jpg"
- poi.cat = 'FI'
- pois.push(poi);
- //1
- poi=Object.create(poiAlpha);
- poi.x= 746;
- poi.y= 432;
- poi.id="Two";
- poi.type = 'V'; //looking for "asset/V_1.mp4"
- poi.cat = 'FI'
- pois.push(poi);
- //2
- poi=Object.create(poiAlpha);
- poi.x= 700;
- poi.y= 402;
- poi.id="Two";
- poi.type = 'T'; //looking for "asset/T_2.html"
- poi.cat = 'FI'
- pois.push(poi);
-
- //3
- poi=Object.create(poiAlpha);
- poi.x = 246;
- poi.y = 532;
- poi.id = "3";
- poi.type = 'I';
- poi.cat = 'FI'
- pois.push(poi);
- //4
- poi=Object.create(poiAlpha);
- poi.x = 646;
- poi.y = 532;
- poi.id = "4";
- poi.type = 'I';
- poi.cat = 'FI'
- pois.push(poi);
- //-----------
- // FLORA
- //-----------
- //5
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "5";
- poi.type = 'I';
- poi.cat = 'FL'
- pois.push(poi);
- //6
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "6";
- poi.type = 'I';
- poi.cat = 'FL'
- pois.push(poi);
- //7
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "7";
- poi.type = 'I';
- poi.cat = 'FL'
- pois.push(poi);
- //8
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "8";
- poi.type = 'I';
- poi.cat = 'FL'
- pois.push(poi);
- //9
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "9";
- poi.type = 'I';
- poi.cat = 'FL'
- pois.push(poi);
- //10
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "10";
- poi.type = 'V';
- poi.cat = 'FL'
- pois.push(poi);
- //11
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "11";
- poi.type = 'V';
- poi.cat = 'FL'
- pois.push(poi);
- //12
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "12";
- poi.type = 'I';
- poi.cat = 'FL'
- pois.push(poi);
- //13
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "13";
- poi.type = 'V';
- poi.cat = 'FL'
- pois.push(poi);
- //14
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "14";
- poi.type = 'T';
- poi.cat = 'FL'
- pois.push(poi);
- //-----------
- // FAUNA
- //-----------
- //15
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "5";
- poi.type = 'I';
- poi.cat = 'FA'
- pois.push(poi);
- //16
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "6";
- poi.type = 'I';
- poi.cat = 'FA'
- pois.push(poi);
- //17
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "7";
- poi.type = 'I';
- poi.cat = 'FA'
- pois.push(poi);
- //18
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "8";
- poi.type = 'I';
- poi.cat = 'FA'
- pois.push(poi);
- //19
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "9";
- poi.type = 'I';
- poi.cat = 'FA'
- pois.push(poi);
- //20
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "10";
- poi.type = 'V';
- poi.cat = 'FA'
- pois.push(poi);
- //21
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "11";
- poi.type = 'V';
- poi.cat = 'FA'
- pois.push(poi);
- //22
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "12";
- poi.type = 'I';
- poi.cat = 'FA'
- pois.push(poi);
- //23
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "13";
- poi.type = 'V';
- poi.cat = 'FA'
- pois.push(poi);
- //24
- poi=Object.create(poiAlpha);
- poi.x = -1;
- poi.y = -1;
- poi.id = "14";
- poi.type = 'T';
- poi.cat = 'FA'
- pois.push(poi);
- //-----------
- // UDATINOS
- //-----------
-
- //25
- poi=Object.create(poiAlpha);
- poi.x = 1146;
- poi.y = 543;
- poi.id = "First One";
- poi.type = 'I'; //looking for "asset/I_0.jpg"
- poi.cat = 'UD'
- pois.push(poi);
- //26
- poi=Object.create(poiAlpha);
- poi.x= 789;
- poi.y= 100;
- poi.id="Two";
- poi.type = 'V'; //looking for "asset/V_1.mp4"
- poi.cat = 'UD'
- pois.push(poi);
- //27
- poi=Object.create(poiAlpha);
- poi.x= 1053;
- poi.y= 438;
- poi.id="Two";
- poi.type = 'T'; //looking for "asset/T_2.html"
- poi.cat = 'UD'
- pois.push(poi);
-
- //28
- poi=Object.create(poiAlpha);
- poi.x = 26;
- poi.y = 411;
- poi.id = "3";
- poi.type = 'I';
- poi.cat = 'UD'
- pois.push(poi);
- //29
- poi=Object.create(poiAlpha);
- poi.x =180;
- poi.y = 701;
- poi.id = "4";
- poi.type = 'I';
- poi.cat = 'UD'
- pois.push(poi);
- //30
- poi.x = 316;
- poi.y = 532;
- poi.id = "First One";
- poi.type = 'I'; //looking for "asset/I_0.jpg"
- poi.cat = 'UD'
- pois.push(poi);
- //31
- poi=Object.create(poiAlpha);
- poi.x= 710;
- poi.y= 236;
- poi.id="Two";
- poi.type = 'V'; //looking for "asset/V_1.mp4"
- poi.cat = 'UD'
- pois.push(poi);
- //32
- poi=Object.create(poiAlpha);
- poi.x= 301;
- poi.y= 323;
- poi.id="Two";
- poi.type = 'T'; //looking for "asset/T_2.html"
- poi.cat = 'UD'
- pois.push(poi);
-
- //33
- poi=Object.create(poiAlpha);
- poi.x = 506;
- poi.y = 562;
- poi.id = "3";
- poi.type = 'I';
- poi.cat = 'UD'
- pois.push(poi);
- //34
- poi=Object.create(poiAlpha);
- poi.x = 616;
- poi.y = 232;
- poi.id = "4";
- poi.type = 'I';
- poi.cat = 'UD'
- pois.push(poi);
|