
新建一个影片剪辑,然后把主场景所有的帧全选,右键选择剪切帧,注意,不能有被锁定的图层,然后到影片剪辑里右键选择粘贴帧。
最后把这个影片剪辑放到主场景,再通过使用滤镜给影片剪辑元件加发光描边。
关注公众号【快乐等于生活】 可以学习实用的FLASH软件及Animate软件 *** 作和代码开发
我们利用d3滤镜为d3元素增加光的效果
我们存一些全局变量
this.animateOption = null
this.defs = null
this.animateId = ""
this.feDropShadow = null
滤镜初始化
function create(option){
this.animateOption = option
this.defs = this.svg.append("defs")
let linearGradient = this.defs.append("filter")
.attr("id",this.animateOption.id)
.attr("x","-50%")
.attr("y","-50%")
.attr("width","200%")
.attr("height","200%")
this.feDropShadow = linearGradient.append("feDropShadow")
.attr("dx", "0")
.attr("dy","0")
.attr("stdDeviation","0")
.attr("flood-color",this.animateOption.floodColor)
}
启动滤镜
```javascript
function start(){
let multiplier = this.animateOption.speed
let xDiff= 0.01
let yDiff= 0.01
let that = this
function setBlur(x,y){
that.feDropShadow.attr("stdDeviation",x)
}
let flag = true
(function updateMotionBlur(){
更多参考 https://xiaozhuanlan.com/topic/8193652740
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)