mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
40 lines
844 B
JavaScript
40 lines
844 B
JavaScript
![]() |
Test.Modules.BLOB = {
|
||
|
'add blob': function(containerId) {
|
||
|
var stage = new Kinetic.Stage({
|
||
|
container: containerId,
|
||
|
width: 578,
|
||
|
height: 200
|
||
|
});
|
||
|
var layer = new Kinetic.Layer();
|
||
|
|
||
|
var line = new Kinetic.Blob({
|
||
|
points: [{
|
||
|
x: 73,
|
||
|
y: 140
|
||
|
}, {
|
||
|
x: 340,
|
||
|
y: 23
|
||
|
}, {
|
||
|
x: 500,
|
||
|
y: 109
|
||
|
}, {
|
||
|
x: 300,
|
||
|
y: 170
|
||
|
}],
|
||
|
stroke: 'blue',
|
||
|
strokeWidth: 10,
|
||
|
lineCap: 'round',
|
||
|
lineJoin: 'round',
|
||
|
draggable: true,
|
||
|
fill: '#aaf',
|
||
|
tension: 0.8
|
||
|
});
|
||
|
|
||
|
|
||
|
layer.add(line);
|
||
|
stage.add(layer);
|
||
|
|
||
|
|
||
|
}
|
||
|
};
|