-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.es.js.map
1 lines (1 loc) · 45.2 KB
/
index.es.js.map
1
{"version":3,"file":"index.es.js","sources":["src/index.js"],"sourcesContent":["import karas from 'karas';\nimport { version } from '../package.json';\n\nconst {\n enums: {\n STYLE_KEY: {\n DISPLAY,\n VISIBILITY,\n TRANSLATE_X,\n TRANSLATE_Y,\n OPACITY,\n SCALE_X,\n SCALE_Y,\n ROTATE_Z,\n },\n },\n refresh: {\n level: {\n CACHE,\n },\n webgl: {\n drawTextureCache,\n },\n },\n util: {\n isNil,\n },\n math: {\n geom: {\n d2r,\n },\n matrix: {\n identity,\n isE,\n multiply,\n multiplyTfo,\n tfoMultiply,\n multiplyTranslateX,\n multiplyTranslateY,\n multiplyRotateZ,\n multiplyScaleX,\n multiplyScaleY,\n },\n },\n mode: {\n CANVAS,\n WEBGL,\n },\n style: {\n css,\n },\n animate,\n Img,\n inject,\n} = karas;\n\nclass $ extends karas.Geom {\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n let dataList = this.dataList;\n if(!dataList || !dataList.length) {\n return res;\n }\n let root = this.__root;\n if(renderMode !== root.__renderMode) {\n return res;\n }\n let ani = this.ani, delay = this.delay, animation = this.animation, currentTime = this.currentTime,\n duration = this.duration, iterations = this.iterations;\n if(ani && currentTime >= delay) {\n let t = currentTime - delay;\n let playCount = Math.min(iterations - 1, Math.floor(currentTime / duration));\n if(playCount >= iterations) {\n return res;\n }\n t -= duration * playCount;\n let i = animate.Animation.binarySearch(0, animation.length - 1, t, animation);\n let notSameFrame = this.lastFrameIndex !== i;\n this.lastFrameIndex = i;\n let frame = animation[i];\n let total;\n if(i >= animation.length - 1) {\n total = animation[i].time;\n }\n else {\n total = animation[i + 1].time - frame.time;\n }\n let percent = (t - frame.time) / total;\n animate.Animation.calIntermediateStyle(frame, percent, ani, notSameFrame);\n }\n else {\n ani = null;\n }\n let { __x1: x1, __y1: y1, __computedStyle } = this;\n let op = __computedStyle[OPACITY];\n if(__computedStyle[DISPLAY] === 'none'\n || __computedStyle[VISIBILITY] === 'hidden'\n || op <= 0) {\n return res;\n }\n let globalAlpha;\n if(renderMode === CANVAS) {\n globalAlpha = ctx.globalAlpha;\n }\n let env = this.env;\n let cacheList = [], lastPage, cx = env.width * 0.5, cy = env.height * 0.5;\n let me = this.domParent.matrixEvent;\n dataList.forEach(item => {\n if(item.loaded) {\n let opacity = op * item.opacity;\n // 计算位置\n let x = item.nowX + x1 + dx - item.x;\n let y = item.nowY + y1 + dy - item.y;\n let m = identity();\n let img = inject.IMG[item.url];\n let tfo = [item.x + img.width * 0.5, item.y + img.height * 0.5];\n m = tfoMultiply(tfo[0], tfo[1], m);\n // 移动一半使得图形中心为计算位置的原点,还有平移位置\n m = multiplyTranslateX(m, x - img.width * 0.5);\n m = multiplyTranslateY(m, y - img.height * 0.5);\n // 如果有path,需要设置且保存当时的位置\n if(ani) {\n let cs;\n if(item.hasOwnProperty('ani')) {\n cs = item.ani;\n }\n else {\n cs = item.ani = css.cloneStyle(ani.__currentStyle);\n }\n if(cs.hasOwnProperty(TRANSLATE_X)) {\n let tx = cs[TRANSLATE_X].v;\n m = multiplyTranslateX(m, tx);\n }\n if(cs.hasOwnProperty(TRANSLATE_Y)) {\n let ty = cs[TRANSLATE_Y].v;\n m = multiplyTranslateY(m, ty);\n }\n if(cs.hasOwnProperty(OPACITY)) {\n opacity *= cs[OPACITY];\n }\n if(cs.hasOwnProperty(SCALE_X)) {\n m = multiplyScaleX(m, cs[SCALE_X].v);\n }\n if(cs.hasOwnProperty(SCALE_Y)) {\n m = multiplyScaleY(m, cs[SCALE_Y].v);\n }\n if(cs.hasOwnProperty(ROTATE_Z)) {\n m = multiplyRotateZ(m, d2r(cs[ROTATE_Z].v));\n }\n }\n // 保持方向角度于起点一致性,可以指定angle偏移\n if(!isNil(item.angle)) {\n let r = d2r(item.deg + item.angle);\n m = multiplyRotateZ(m, r);\n }\n if(item.sc && item.sc !== 1) {\n m = multiplyScaleX(m, item.sc);\n m = multiplyScaleY(m, item.sc);\n }\n if(img.width !== item.width) {\n m = multiplyScaleX(m, item.width / img.width);\n }\n if(img.height !== item.height) {\n m = multiplyScaleY(m, item.height / img.height);\n }\n if(renderMode === CANVAS) {\n m = multiplyTfo(m, -tfo[0], -tfo[1]);\n if(!isE(me)) {\n m = multiply(me, m);\n }\n ctx.globalAlpha = opacity;\n // canvas处理方式不一样,render的dx和dy包含了total的偏移计算考虑,可以无感知\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.drawImage(item.source, item.x, item.y);\n }\n else if(renderMode === WEBGL) {\n let cache = item.cache;\n if(!cache) {\n item.cache = true;\n Img.toWebglCache(ctx, root, item.url, item.x, item.y, function(res) {\n cache = item.cache = res;\n if(cache.count === 1) {\n let { ctx, width, height, x, y } = cache;\n ctx.drawImage(item.source, x, y, width, height);\n cache.update();\n }\n });\n }\n if(cache && cache !== true) {\n m = multiplyTfo(m, -tfo[0], -tfo[1]);\n if(!isE(me)) {\n m = multiply(me, m);\n }\n if(!cache.__available && cache.__enabled) {\n cache.__available = true;\n }\n if(cache.__available) {\n if(lastPage && lastPage !== cache.__page) {\n drawTextureCache(ctx, cacheList.splice(0), cx, cy, dx, dy);\n }\n lastPage = cache.__page;\n cacheList.push({ cache, opacity, matrix: m });\n }\n }\n }\n }\n });\n if(renderMode === CANVAS) {\n ctx.globalAlpha = globalAlpha;\n }\n else if(renderMode === WEBGL) {\n drawTextureCache(ctx, cacheList, cx, cy, dx, dy);\n }\n }\n}\n\nlet uuid = 0;\n\nclass ParticleLaunch extends karas.Component {\n constructor(props) {\n super(props);\n this.count = 0;\n this.time = 0;\n this.playbackRate = props.playbackRate || 1;\n this.interval = props.interval || 300;\n this.intervalNum = props.intervalNum || 1;\n this.num = props.num || 0;\n this.__duration = props.duration || 1000;\n this.__easing = props.easing;\n }\n\n componentWillUnmount() {\n (this.dataList || []).forEach(item => {\n item.cache && item.cache.release && item.cache.release();\n });\n }\n\n componentDidMount() {\n let { props, root: { renderMode } } = this;\n let { list = [], initNum = 0, delay = 0, duration = 1000, iterations = Infinity, easing, autoPlay, animation } = props;\n let dataList = this.dataList = [];\n let i = 0, length = list.length;\n let lastTime = 0, count = 0;\n let fake = this.ref.fake;\n let currentTime = 0, maxTime = 0;\n let hasStart;\n // 分析path,类似waa\n if(Array.isArray(animation) && animation.length > 1) {\n // 偷懒省略animation某个帧时,cloneStyle不报错\n let ani = {\n __currentStyle: css.normalize({\n translateX: 0,\n translateY: 0,\n scale: 1,\n rotateZ: 0,\n opacity: 1,\n }),\n };\n let pathAni = animate.Animation.parse(animation, duration, easing, ani);\n let keys = animate.Animation.unify(pathAni, ani);\n animate.Animation.calTransition(pathAni, keys, ani);\n fake.ani = ani;\n fake.animation = pathAni;\n fake.currentTime = 0;\n fake.delay = delay;\n fake.iterations = iterations;\n fake.duration = duration;\n }\n let cb = this.cb = diff => {\n fake.dataList = null;\n diff *= this.playbackRate;\n currentTime += diff;\n fake.currentTime = currentTime;\n if(delay > 0) {\n delay -= diff;\n }\n if(delay <= 0) {\n diff += delay;\n this.time += diff;\n delay = 0;\n // 如果有初始粒子\n if(initNum > 0) {\n lastTime = this.time;\n while(initNum-- > 0) {\n i++;\n i %= length;\n count++;\n let o = this.genItem(list[i], duration);\n maxTime = Math.max(maxTime, currentTime + o.duration);\n dataList.push(o);\n }\n }\n // 已有的每个粒子时间增加计算位置,结束的则消失\n for(let j = dataList.length - 1; j >= 0; j--) {\n let item = dataList[j];\n item.time += diff;\n if(item.time >= item.duration) {\n let remove = dataList.splice(j, 1);\n // webgl需释放纹理\n if(renderMode === WEBGL && remove.length) {\n remove.forEach(item => {\n item.cache && item.cache.release && item.cache.release();\n });\n }\n }\n else if(item.source) {\n let { x, y, tx, ty, dx, dy, time, duration, easing, blink, fade, scale, direction } = item;\n let percent = time / duration;\n if(easing) {\n percent = easing(percent);\n }\n if(direction === 'reverse') {\n item.nowX = tx - dx * percent;\n item.nowY = ty - dy * percent;\n }\n else {\n item.nowX = x + dx * percent;\n item.nowY = y + dy * percent;\n }\n let opacity = 1;\n if(blink) {\n let num = Math.floor(time / blink.duration);\n let diff = time % blink.duration;\n let easing = blink.easing;\n let percent = diff / blink.duration;\n if(easing) {\n let timeFunction = animate.easing.getEasing(easing);\n if(timeFunction !== animate.easing.linear) {\n percent = timeFunction(percent);\n }\n }\n // 偶数from2to,奇数to2from\n if(num % 2 === 0) {\n opacity *= blink.from + percent * (blink.to - blink.from);\n }\n else {\n opacity *= blink.to - percent * (blink.to - blink.from);\n }\n }\n if(fade) {\n let p = time / fade.duration;\n p = Math.max(0, p);\n p = Math.min(1, p);\n let easing = fade.easing;\n if(easing) {\n let timeFunction = animate.easing.getEasing(easing);\n if(timeFunction !== animate.easing.linear) {\n p = timeFunction(p);\n }\n }\n let alpha = fade.from + (fade.to - fade.from) * p;\n alpha = Math.max(0, alpha);\n alpha = Math.min(1, alpha);\n opacity *= alpha;\n }\n item.opacity = opacity;\n let sc = 1;\n if(scale) {\n let p = time / scale.duration;\n p = Math.max(0, p);\n p = Math.min(1, p);\n let easing = scale.easing;\n if(easing) {\n let timeFunction = animate.easing.getEasing(easing);\n if(timeFunction !== animate.easing.linear) {\n p = timeFunction(p);\n }\n }\n let s = scale.from + (scale.to - scale.from) * p;\n sc *= s;\n }\n item.sc = sc;\n item.loaded = true;\n hasStart = true;\n }\n }\n // 开始后每次都刷新,即便数据已空,要变成空白初始状态\n if(hasStart && currentTime >= delay) {\n fake.dataList = dataList;\n fake.refresh(CACHE);\n this.props.onFrame?.();\n this.emit('frame');\n }\n // 数量完了动画也执行完了停止\n if(count >= this.num && currentTime >= maxTime) {\n fake.removeFrameAnimate(cb);\n this.props.onFinish?.();\n this.emit('finish');\n return;\n }\n // 每隔interval开始生成这一阶段的粒子数据\n if(this.time >= lastTime + this.interval && count < this.num) {\n lastTime = this.time;\n for(let j = 0; j < this.intervalNum; j++) {\n i++;\n i %= length;\n count++;\n let o = this.genItem(list[i], duration);\n maxTime = Math.max(maxTime, currentTime + o.duration);\n dataList.push(o);\n if(count >= this.num) {\n break;\n }\n }\n }\n }\n };\n if(autoPlay !== false) {\n fake.frameAnimate(cb);\n }\n }\n\n genItem(item, dur) {\n let { width, height } = this;\n let o = {\n id: uuid++,\n time: 0,\n url: item.url,\n dur,\n };\n if(Array.isArray(item.x)) {\n o.x = (item.x[0] + Math.random() * (item.x[1] - item.x[0])) * width;\n }\n else {\n o.x = item.x * width;\n }\n if(Array.isArray(item.y)) {\n o.y = (item.y[0] + Math.random() * (item.y[1] - item.y[0])) * height;\n }\n else {\n o.y = item.y * height;\n }\n if(Array.isArray(item.duration)) {\n o.duration = (item.duration[0] + Math.random() * (item.duration[1] - item.duration[0]));\n }\n else {\n o.duration = item.duration || dur;\n }\n if(Array.isArray(item.width)) {\n o.width = item.width[0] + Math.random() * (item.width[1] - item.width[0]);\n }\n else if(!isNil(item.width)) {\n o.width = item.width;\n }\n if(Array.isArray(item.height)) {\n o.height = item.height[0] + Math.random() * (item.height[1] - item.height[0]);\n }\n else if(!isNil(item.height)) {\n o.height = item.height;\n }\n let opacity = 1;\n if(Array.isArray(item.opacity)) {\n opacity = item.opacity[0] + Math.random() * (item.opacity[1] - item.opacity[0]);\n }\n else if(item.opacity !== null && item.opacity !== undefined) {\n opacity = parseFloat(item.opacity);\n }\n o.opacity = opacity;\n let deg = 0;\n if(Array.isArray(item.deg)) {\n deg = item.deg[0] + Math.random() * (item.deg[1] - item.deg[0]);\n }\n else if(item.deg) {\n deg = item.deg;\n }\n o.deg = deg;\n let angle = parseFloat(item.angle);\n if(item.angle === true) {\n angle = 0;\n }\n if(!isNaN(angle)) {\n o.angle = angle;\n }\n let distance = 0;\n if(Array.isArray(item.distance)) {\n distance = (item.distance[0] + Math.random() * (item.distance[1] - item.distance[0])) * width;\n }\n else if(item.distance) {\n distance = item.distance * width;\n }\n o.distance = distance;\n o.direction = item.direction;\n let deg2 = deg;\n if(deg >= 270) {\n deg = 360 - deg;\n deg = d2r(deg);\n o.tx = o.x + distance * Math.cos(deg);\n o.ty = o.y - distance * Math.sin(deg);\n }\n else if(deg >= 180) {\n deg = deg - 180;\n deg = d2r(deg);\n o.tx = o.x - distance * Math.cos(deg);\n o.ty = o.y - distance * Math.sin(deg);\n }\n else if(deg >= 90) {\n deg = 180 - deg;\n deg = d2r(deg);\n o.tx = o.x - distance * Math.cos(deg);\n o.ty = o.y + distance * Math.sin(deg);\n }\n else {\n deg = d2r(deg);\n o.tx = o.x + distance * Math.cos(deg);\n o.ty = o.y + distance * Math.sin(deg);\n }\n o.deg = deg2;\n o.dx = o.tx - o.x;\n o.dy = o.ty - o.y;\n ['blink', 'fade', 'scale'].forEach(k => {\n if(item[k]) {\n let { from, to, duration, easing } = item[k];\n if(Array.isArray(duration)) {\n duration = duration[0] + Math.random() * (duration[1] - duration[0]);\n }\n if(Array.isArray(from)) {\n from = from[0] + Math.random() * (from[1] - from[0]);\n }\n if(Array.isArray(to)) {\n to = to[0] + Math.random() * (to[1] - to[0]);\n }\n o[k] = {\n from,\n to,\n duration,\n easing,\n };\n }\n });\n if(item.easing) {\n o.easing = animate.easing.getEasing(item.easing);\n }\n if(item.url) {\n inject.measureImg(item.url, function(res) {\n if(res.success) {\n o.source = res.source;\n o.sourceWidth = res.width;\n o.sourceHeight = res.height;\n if(!(isNil(o.width) && isNil(o.height))) {\n if(isNil(o.width)) {\n o.width = res.width / res.height * o.height;\n }\n else if(isNil(o.height)) {\n o.height = o.width * res.height / res.width;\n }\n }\n else {\n o.width = res.width;\n o.height = res.height;\n }\n }\n });\n }\n return o;\n }\n\n pause() {\n this.ref.fake.removeFrameAnimate(this.cb);\n }\n\n resume() {\n this.ref.fake.frameAnimate(this.cb);\n }\n\n play() {\n this.count = 0;\n this.time = 0;\n this.ref.fake.removeFrameAnimate(this.cb);\n this.ref.fake.frameAnimate(this.cb);\n }\n\n get playbackRate() {\n return this.__playbackRate;\n }\n\n set playbackRate(v) {\n this.__playbackRate = parseFloat(v) || 1;\n }\n\n get interval() {\n return this.__interval;\n }\n\n get intervalNum() {\n return this.__intervalNum;\n }\n\n set intervalNum(v) {\n this.__intervalNum = parseInt(v) || 1;\n }\n\n set interval(v) {\n this.__interval = parseInt(v) || 300;\n }\n\n get num() {\n return this.__num;\n }\n\n set num(v) {\n if(v === Infinity || /infinity/i.test(v)) {\n this.__num = Infinity;\n }\n else {\n this.__num = parseInt(v) || 0;\n }\n }\n\n get duration() {\n return this.__duration;\n }\n\n get easing() {\n return this.__easing;\n }\n\n render() {\n return <div>\n <$ ref=\"fake\" style={{\n width: '100%',\n height: '100%',\n fill: 'none',\n stroke: 0,\n }}/>\n </div>;\n }\n}\n\nParticleLaunch.version = version;\n\nexport default ParticleLaunch;\n"],"names":["karas","enums","STYLE_KEY","DISPLAY","VISIBILITY","TRANSLATE_X","TRANSLATE_Y","OPACITY","SCALE_X","SCALE_Y","ROTATE_Z","refresh","CACHE","level","drawTextureCache","webgl","isNil","util","math","d2r","geom","matrix","identity","isE","multiply","multiplyTfo","tfoMultiply","multiplyTranslateX","multiplyTranslateY","multiplyRotateZ","multiplyScaleX","multiplyScaleY","mode","CANVAS","WEBGL","css","style","animate","Img","inject","$","renderMode","ctx","dx","dy","res","dataList","length","root","__root","__renderMode","ani","delay","animation","currentTime","duration","iterations","t","playCount","Math","min","floor","i","Animation","binarySearch","notSameFrame","lastFrameIndex","frame","total","time","percent","calIntermediateStyle","x1","__x1","y1","__y1","__computedStyle","op","globalAlpha","env","cacheList","lastPage","cx","width","cy","height","me","domParent","matrixEvent","forEach","item","loaded","opacity","x","nowX","y","nowY","m","img","IMG","url","tfo","cs","hasOwnProperty","cloneStyle","__currentStyle","tx","v","ty","angle","r","deg","sc","setTransform","drawImage","source","cache","toWebglCache","count","update","__available","__enabled","__page","splice","push","Geom","uuid","ParticleLaunch","props","playbackRate","interval","intervalNum","num","__duration","__easing","easing","release","list","initNum","Infinity","autoPlay","lastTime","fake","ref","maxTime","hasStart","Array","isArray","normalize","translateX","translateY","scale","rotateZ","pathAni","parse","keys","unify","calTransition","cb","diff","o","genItem","max","j","remove","blink","fade","direction","timeFunction","getEasing","linear","from","to","p","alpha","s","onFrame","emit","removeFrameAnimate","onFinish","frameAnimate","dur","id","random","undefined","parseFloat","isNaN","distance","deg2","cos","sin","k","measureImg","success","sourceWidth","sourceHeight","__playbackRate","__interval","parseInt","__intervalNum","__num","test","fill","stroke","Component","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,4BAmDIA,KAnDJ,CACEC,KADF,CAEIC,SAFJ;AAAA,IAGMC,OAHN,yBAGMA,OAHN;AAAA,IAIMC,UAJN,yBAIMA,UAJN;AAAA,IAKMC,WALN,yBAKMA,WALN;AAAA,IAMMC,WANN,yBAMMA,WANN;AAAA,IAOMC,OAPN,yBAOMA,OAPN;AAAA,IAQMC,OARN,yBAQMA,OARN;AAAA,IASMC,OATN,yBASMA,OATN;AAAA,IAUMC,QAVN,yBAUMA,QAVN;AAAA,qBAmDIV,KAnDJ,CAaEW,OAbF;AAAA,IAeMC,KAfN,kBAcIC,KAdJ,CAeMD,KAfN;AAAA,IAkBME,gBAlBN,kBAiBIC,KAjBJ,CAkBMD,gBAlBN;AAAA,IAsBIE,KAtBJ,GAmDIhB,KAnDJ,CAqBEiB,IArBF,CAsBID,KAtBJ;AAAA,kBAmDIhB,KAnDJ,CAwBEkB,IAxBF;AAAA,IA0BMC,GA1BN,eAyBIC,IAzBJ,CA0BMD,GA1BN;AAAA,qCA4BIE,MA5BJ;AAAA,IA6BMC,QA7BN,sBA6BMA,QA7BN;AAAA,IA8BMC,GA9BN,sBA8BMA,GA9BN;AAAA,IA+BMC,QA/BN,sBA+BMA,QA/BN;AAAA,IAgCMC,WAhCN,sBAgCMA,WAhCN;AAAA,IAiCMC,WAjCN,sBAiCMA,WAjCN;AAAA,IAkCMC,kBAlCN,sB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