mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 08:48:57 +08:00
remove logs, update perf test
This commit is contained in:
parent
f645b22c4a
commit
2ccc9a7fdd
@ -589,7 +589,7 @@
|
||||
var bottomOffsetX = this.getWidth() - bottomRight.x();
|
||||
var bottomOffsetY = this.getHeight() - bottomRight.y();
|
||||
|
||||
console.log(topOffsetX, topOffsetY, bottomOffsetX, bottomOffsetY);
|
||||
// console.log(topOffsetX, topOffsetY, bottomOffsetX, bottomOffsetY);
|
||||
|
||||
bottomRight.move({
|
||||
x: -topOffsetX,
|
||||
|
@ -39,7 +39,7 @@ $(function() {
|
||||
var colorIndex = 0;
|
||||
|
||||
circles = [];
|
||||
for (var n = 0; n < 1500; n++) {
|
||||
for (var n = 0; n < 2500; n++) {
|
||||
(function() {
|
||||
var color = colors[colorIndex++];
|
||||
if (colorIndex >= colors.length) {
|
||||
@ -81,7 +81,10 @@ function animate(lastTime) {
|
||||
|
||||
function make_shape(color) {
|
||||
return new Konva.Rect({
|
||||
fill: color,
|
||||
fillLinearGradientStartPoint: { x: -50, y: -50 },
|
||||
fillLinearGradientEndPoint: { x: 50, y: 50 },
|
||||
fillLinearGradientColorStops: [0, 'black', 1, color],
|
||||
// fill: color,
|
||||
width: 10,
|
||||
height: 10
|
||||
});
|
||||
@ -94,11 +97,8 @@ function make_stage() {
|
||||
height: height
|
||||
});
|
||||
|
||||
if (VERSION === 'new') {
|
||||
console.log('create fast layer');
|
||||
circlesLayer = new Konva.FastLayer();
|
||||
} else {
|
||||
console.log('create normal layer');
|
||||
circlesLayer = new Konva.Layer();
|
||||
}
|
||||
// circlesLayer = new Konva.FastLayer();
|
||||
circlesLayer = new Konva.Layer({
|
||||
hitGraphEnabled: false
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user