Source code:
<div>
<div id="output"></div>
<canvas id="mycanvas" style="width:100%; height:200px;"></canvas>
</div>
fire.require(
function(){
var prj1 = new fire.cad.project.Project("mycanvas");
var url = "http://www.unisky.it/assets/images/servizi/feltre_orto.png";
var raster = prj1.addRasterLayer("Bati", url);
// Sposta il raster al centro
raster.position = view.center;
// Scala il raster del 50%
raster.scale(0.5);
raster.onMouseEnter = function(event){
this.rotate(2);
}
raster.onMouseLeave = function(event){
this.rotate(2);
}
}, {
modules : [fire.Modules.CAD]
,mode : fire.Mode.BUILD
,otherScripts: []
,relative: "../lib/fire/"
}
);