-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js.map
1 lines (1 loc) · 36.5 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 refresh: {\n level: {\n CACHE,\n },\n webgl: {\n drawTextureCache,\n },\n },\n math: {\n matrix: {\n calRectPoint,\n },\n },\n util: {\n isNil,\n },\n mode: {\n CANVAS,\n WEBGL,\n },\n inject,\n} = karas;\n\nfunction convertCoords2Gl(x, y, z, w, cx, cy, tz) {\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (cy - y) / cy;\n }\n if(tz) {\n z /= -tz;\n }\n if(w === 1) {\n return { x, y, z, w };\n }\n return { x: x * w, y: y * w, z: z * w, w };\n}\n\nclass $ extends karas.Geom {\n constructor(tagName, props) {\n super(tagName, props);\n this.fill = props.fill;\n this.list = props.list;\n }\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break) {\n return res;\n }\n let root = this.__root;\n if(renderMode !== root.__renderMode) {\n return res;\n }\n let index = this.index, tx = this.tx, ty = this.ty, fill = this.fill, list = this.list;\n // 第一次需要查看fill,渲染第一帧\n if(index === undefined) {\n if(fill === 'both' || fill === 'backwards') {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n // 防止空的\n if(item.number) {\n index = i;\n tx = 0;\n ty = 0;\n break;\n }\n }\n }\n else {\n return;\n }\n }\n this.lastIndex = index;\n let item = list[index];\n if(!item.loading) {\n item.loading = true;\n inject.measureImg(item.url, res => {\n if(res.success) {\n item.cache = res;\n if(index === this.lastIndex && !this.isDestroyed) {\n this.render(renderMode, ctx, dx, dy);\n }\n }\n });\n }\n let cache = item.cache;\n if(cache) {\n this.lastTx = tx;\n this.lastTy = ty;\n let w = cache.width / item.column, h = cache.height / item.row;\n let sx = tx * w, sy = ty * h;\n if(renderMode === CANVAS) {\n ctx.drawImage(item.cache.source, sx, sy, w, h, this.x, this.y, this.width, this.height);\n this.host.emit('frame');\n }\n else if(renderMode === WEBGL) {\n let gl = ctx;\n let env = this.env;\n let cx = env.width * 0.5, cy = env.height * 0.5;\n let texture = item.texture;\n if(!texture) {\n texture = item.texture = gl.createTexture();\n gl.activeTexture(gl['TEXTURE0']);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, cache.source);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n }\n else {\n gl.activeTexture(gl['TEXTURE0']);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n }\n if(texture) {\n gl.useProgram(gl.program);\n let m = this.matrixEvent, opacity = this.opacity;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 }\n = calRectPoint(this.x + dx, this.y + this.height + dy,\n this.x + this.width + dx, this.y + dy, m);\n let z = Math.max(Math.abs(z1), Math.abs(z2));\n z = Math.max(z, Math.abs(z3));\n z = Math.max(z, Math.abs(z4));\n if(z) {\n z = Math.max(z, Math.sqrt(cx * cx + cy * cy));\n }\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, z);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, z);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, z);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, z);\n x4 = t.x; y4 = t.y; z4 = t.z;\n let vtPoint = new Float32Array([\n x1, y1, z1, w1,\n x4, y4, z4, w4,\n x2, y2, z2, w2,\n x4, y4, z4, w4,\n x2, y2, z2, w2,\n x3, y3, z3, w3,\n ]);\n let tx1 = sx / cache.width, ty1 = (cache.height - sy - h) / cache.height;\n let tx2 = (sx + w) / cache.width, ty2 = (cache.height - sy) / cache.height;\n let vtTex = new Float32Array([\n tx1, ty1, tx1, ty2, tx2, ty1,\n tx1, ty2, tx2, ty1, tx2, ty2,\n ]);\n let vtOpacity = new Float32Array([\n opacity, opacity, opacity, opacity, opacity, opacity,\n ]);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtPoint, gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtTex, gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtOpacity, gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n this.host.emit('frame');\n }\n }\n }\n }\n}\n\nclass FrameAnimate extends karas.Component {\n constructor(props) {\n super(props);\n let {\n duration = 1000,\n direction,\n delay = 0,\n playbackRate = 1,\n iterations = Infinity,\n fill = 'both',\n } = this.props;\n this.duration = duration;\n this.direction = direction;\n this.playbackRate = playbackRate;\n this.iterations = iterations;\n this.delay = delay;\n this.fill = fill;\n this.__timeCount = 0;\n let { list = [] } = this.props;\n if(list.length) {\n let count = 0, total = 0;\n list.forEach((item, i) => {\n let { row = 1, column = 1, number = row * column } = item;\n item.row = row;\n item.column = column;\n item.number = number;\n total += number;\n item.index = i;\n });\n // 计算每个所占时长\n let per = this.duration / total;\n list.forEach(item => {\n item.begin = count;\n item.end = count += per * item.number;\n });\n // 反向也需要\n count = 0;\n list.reverse().forEach(item => {\n item.begin2 = count;\n item.end2 = count += per * item.number;\n });\n list.reverse();\n }\n this.list = list;\n }\n\n componentDidMount() {\n let { list = [], autoPlay = true } = this.props;\n if(list.length) {\n let fake = this.ref.fake, root = this.root;\n let cb = this.cb = diff => {\n let currentTime = this.__timeCount += diff * this.playbackRate;\n currentTime -= this.delay;\n if(currentTime < 0) {\n return;\n }\n let playCount = Math.floor(currentTime / this.duration);\n if(playCount >= this.iterations) {\n this.pause();\n let fill = this.fill;\n if(fill !== 'both' && fill !== 'forwards') {\n fake.index = undefined;\n root.__addUpdate(fake, [], CACHE, false, false, null, null);\n return;\n }\n }\n currentTime -= playCount * this.duration;\n let alternate = false;\n if(this.direction === 'alternate') {\n alternate = playCount % 2 === 1;\n }\n if(alternate) {\n for(let i = 0; i < list.length; i++) {\n let item = list[i];\n if(currentTime >= item.begin2 && currentTime < item.end2) {\n let percent = (currentTime - item.begin2) / (item.end2 - item.begin2);\n let per = 1 / item.number;\n let n = Math.floor(percent / per);\n if(n > item.number) {\n n = item.number - 1;\n }\n let x = n % item.column;\n let y = Math.floor(n / item.column);\n x = item.column - x - 1;\n y = item.row - y - 1;\n fake.index = i;\n fake.tx = x;\n fake.ty = y;\n root.__addUpdate(fake, [], CACHE, false, false, null, null);\n break;\n }\n }\n }\n else {\n for(let i = 0; i < list.length; i++) {\n let item = list[i];\n if(currentTime >= item.begin && currentTime < item.end) {\n let percent = (currentTime - item.begin) / (item.end - item.begin);\n let per = 1 / item.number;\n let n = Math.floor(percent / per);\n if(n > item.number) {\n n = item.number - 1;\n }\n let x = n % item.column;\n let y = Math.floor(n / item.column);\n fake.index = i;\n fake.tx = x;\n fake.ty = y;\n root.__addUpdate(fake, [], CACHE, false, false, null, null);\n break;\n }\n }\n }\n };\n if(autoPlay) {\n fake.frameAnimate(cb);\n }\n }\n }\n\n componentWillUnmount() {\n let { list = [] } = this.props;\n let root = this.__root, renderMode = root.__renderMode;\n if(renderMode === WEBGL) {\n list.forEach(item => {\n if(item.texture) {\n root.ctx.deleteTexture(item.texture);\n }\n });\n }\n }\n\n render() {\n return <div>\n <$ ref=\"fake\" style={{\n width: '100%',\n height: '100%',\n fill: 'none',\n stroke: 0,\n }} fill={this.fill} list={this.list} direction={this.direction}\n delay={this.delay} duration={this.duration} iterations={this.iterations}/>\n </div>;\n }\n\n play() {\n this.__timeCount = 0;\n this.pause();\n this.resume();\n }\n\n pause() {\n this.ref.fake.removeFrameAnimate(this.cb);\n }\n\n pauseTo(n = 0) {\n this.__timeCount = n;\n this.cb(0);\n }\n\n pauseToFrame(n = 0) {\n let { list = [] } = this.props;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n let { row = 1, column = 1, number = row * column } = item;\n if(n < number) {\n this.__timeCount = item.begin + (item.end - item.begin) * n;\n let x = n % column;\n let y = Math.floor(n / column);\n let fake = this.ref.fake;\n if(fake.index !== i || fake.lastTx !== x || fake.lastTy !== y) {\n fake.index = fake.lastIndex = i;\n fake.tx = x;\n fake.ty = y;\n this.root.__addUpdate(fake, [], CACHE, false, false, null, null);\n }\n break;\n }\n }\n }\n\n stop() {\n this.pause();\n this.__timeCount = 0;\n let fake = this.ref.fake;\n fake.index = undefined;\n this.root.__addUpdate(fake, [], CACHE, false, false, null, null);\n }\n\n resume() {\n this.ref.fake.frameAnimate(this.cb);\n }\n\n get duration() {\n return this.__duration;\n }\n\n set duration(v) {\n v = parseFloat(v) || 1000;\n if(v <= 0) {\n v = 1;\n }\n this.__duration = v;\n }\n\n get playbackRate() {\n return this.__playbackRate;\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n this.__playbackRate = v;\n }\n\n get direction() {\n return this.__direction;\n }\n\n set direction(v) {\n this.__direction = v;\n }\n\n get iterations() {\n return this.__iterations;\n }\n\n set iterations(v) {\n if(v !== Infinity) {\n v = parseInt(v) || 1;\n }\n if(v <= 0) {\n v = 1;\n }\n this.__iterations = v;\n }\n\n get delay() {\n return this.__delay;\n }\n\n set delay(v) {\n this.__delay = parseInt(v) || 0;\n }\n\n get fill() {\n return this.__fill;\n }\n\n set fill(v) {\n this.__fill = v;\n }\n\n get list() {\n return this.__list;\n }\n\n set list(v) {\n this.__list = v;\n }\n}\n\nFrameAnimate.version = version;\n\nexport default FrameAnimate;\n"],"names":["karas","refresh","CACHE","level","webgl","drawTextureCache","calRectPoint","math","matrix","util","isNil","mode","CANVAS","WEBGL","inject","convertCoords2Gl","x","y","z","w","cx","cy","tz","$","tagName","props","fill","list","renderMode","ctx","dx","dy","res","root","__root","__renderMode","index","tx","ty","undefined","i","len","length","item","number","lastIndex","loading","measureImg","url","success","cache","isDestroyed","render","lastTx","lastTy","width","column","h","height","row","sx","sy","drawImage","source","host","emit","gl","env","texture","createTexture","activeTexture","bindTexture","TEXTURE_2D","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","RGBA","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","useProgram","program","m","matrixEvent","opacity","x1","y1","z1","w1","x2","y2","z2","w2","x3","y3","z3","w3","x4","y4","z4","w4","Math","max","abs","sqrt","t","vtPoint","Float32Array","tx1","ty1","tx2","ty2","vtTex","vtOpacity","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","Geom","FrameAnimate","duration","direction","delay","playbackRate","iterations","Infinity","__timeCount","count","total","forEach","per","begin","end","reverse","begin2","end2","autoPlay","fake","ref","cb","diff","currentTime","playCount","floor","pause","__addUpdate","alternate","percent","n","frameAnimate","deleteTexture","stroke","resume","removeFrameAnimate","__duration","v","parseFloat","__playbackRate","__direction","__iterations","parseInt","__delay","__fill","__list","Component","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBIA,MAAAA,cAAAA,GAAAA,yBAtBJ,CACEC,OADF,CAAA;EAAA,IAGMC,KAHN,GAAA,cAAA,CAEIC,KAFJ,CAGMD,KAHN,CAAA;EAAA,IAAA,cAAA,CAKIE,KALJ,CAMMC,gBANN,CAAA;EAAA,QAWMC,YAXN,GAsBIN,yBAtBJ,CASEO,IATF,CAUIC,MAVJ,CAWMF,YAXN,CAAA;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