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 layer = prj1.addLayer("Points");
var tool = new fire.cad.tool.Tool();
tool.onMouseDrag = function(event){
var pt = event.middlePoint;
var radius = event.delta.length / 2;
var geom = new fire.gear.geom.Point(
new fire.gear.geom.Coordinate(event.point.x, event.point.y)
);
layer.addChild(geom);
geom.p_geom.fillColor = new fire.cad.Color(1, 0, 0, 0.5);
geom.p_geom.radius = radius;
}
}, {
modules : [fire.Modules.CAD]
,mode : fire.Mode.BUILD
,otherScripts: []
,relative: "../lib/fire/"
}
);