我想在我的画布上放置可拖动区域,人们可以拖动图像,并且我希望在可放置区域添加一种发光的脉动效果,因此人们很容易选择在哪里他们可以拖动的对象。创建一个脉冲发光效果HTML5 canvas kineticJS
我发现了一些像HTML5 canvas create outer glow effect of shape这样的东西,但它不像脉冲那样动画。
所以像这个矩形例如:
var stage = new Kinetic.Stage({
container: 'container',
width: 578,
height: 200
});
var layer = new Kinetic.Layer();
var rect = new Kinetic.Rect({
x: 239,
y: 75,
width: 100,
height: 50,
fill: 'white',
stroke: 'black',
strokeWidth: 4
});
// add the shape to the layer
layer.add(rect);
// add the layer to the stage
stage.add(layer);
但不是黑色的,我希望有一个脉冲金行程。
想法?
这样吗? http://stackoverflow.com/questions/4910963/how-to-create-a-pulse-effect-using-web-kit-animation-outward-rings – crowjonah
@crowjonah是那样的,但在画布上没有css – Evan