-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js.map
1 lines (1 loc) · 45.2 KB
/
index.js.map
1
{"version":3,"file":"index.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGA,4BAmDIA,yBAnDJ,CACEC,KADF,CAEIC,SAFJ;EAAA,IAGMC,OAHN,yBAGMA,OAHN;EAAA,IAIMC,UAJN,yBAIMA,UAJN;EAAA,IAKMC,WALN,yBAKMA,WALN;EAAA,IAMMC,WANN,yBAMMA,WANN;EAAA,IAOMC,OAPN,yBAOMA,OAPN;EAAA,IAQMC,OARN,yBAQMA,OARN;EAAA,IASMC,OATN,yBASMA,OATN;EAAA,IAUMC,QAVN,yBAUMA,QAVN;EAAA,qBAmDIV,yBAnDJ,CAaEW,OAbF;EAAA,IAeMC,KAfN,kBAcIC,KAdJ,CAeMD,KAfN;EAAA,IAkBME,gBAlBN,kBAiBIC,KAjBJ,CAkBMD,gBAlBN;EAAA,IAsBIE,KAtBJ,GAmDIhB,yBAnDJ,CAqBEiB,IArBF,CAsBID,KAtBJ;EAAA,kBAmDIhB,yBAnDJ,CAwBEkB,IAxBF;EAAA,IA0BMC,GA1BN,eAyBIC,IAzBJ,CA0BMD,GA1BN;EAAA,qCA4BIE,MA5BJ;EAAA,IA6BMC,QA7BN,sBA6BMA,QA7BN;EAAA,IA8BMC,GA9BN,sBA8BMA,GA9BN;EAAA,IA+BMC,QA/BN,sBA+BMA,QA/BN;EAAA,IAgCMC,WAhCN,sBAgCMA,WAhCN;EAAA,IAiCMC,WAjCN,sBAiCMA,WAjCN;EAAA,IAkCMC,kBA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