pois.js 702 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. var poiAlpha = {
  2. x: 252,
  3. y: 144,
  4. id: "Poi01",
  5. img: null,
  6. type: "GENERIC",
  7. pin: function(){
  8. },
  9. adapt: function(){
  10. },
  11. setIcon: function(filename){
  12. //small
  13. // this.img=loadImage(filename,
  14. // function(img){
  15. // img.resize(20,20);
  16. // });
  17. //big
  18. // this._img=loadImage(filename,
  19. // function(img){
  20. // img.resize(50,50);
  21. // });
  22. }
  23. };
  24. var pois=[];
  25. var poi=Object.create(poiAlpha);
  26. poi.x= 346;
  27. poi.y= 332;
  28. poi.id="First One";
  29. poi.setIcon('icona_testo.png');
  30. pois.push(poi);
  31. poi=Object.create(poiAlpha);
  32. poi.x= 746;
  33. poi.y= 432;
  34. poi.id="Two";
  35. poi.setIcon('icona_testo.png');
  36. pois.push(poi);