-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js.map
1 lines (1 loc) · 111 KB
/
index.js.map
1
{"version":3,"file":"index.js","sources":["src/parser.js","src/util.js","src/render.js","src/index.js"],"sourcesContent":["import karas from 'karas';\n\nconst { inject, math } = karas;\n\nfunction parseAndLoadTex(tex, cb, props = {}) {\n let src = props.imagePath || tex.imagePath;\n let texHash = {};\n inject.measureImg(src, function() {\n tex.SubTexture.forEach(item => {\n let { name, x, y, width, height, frameX = 0, frameY = 0, frameWidth = width, frameHeight = height } = item;\n texHash[name] = {\n name,\n x,\n y,\n width,\n height,\n frameX,\n frameY,\n frameWidth,\n frameHeight,\n source: inject.IMG[src].source,\n };\n });\n cb(texHash);\n });\n}\n\nfunction parseSke(ske, texHash, props = {}) {\n let {\n frameRate: globalFrameRate,\n armature,\n } = ske;\n let currentArmature = armature[0];\n if(props.armature) {\n for(let i = 0, len = armature.length; i < len; i++) {\n let item = armature[i];\n if(item.name === props.armature) {\n currentArmature = item;\n break;\n }\n }\n if(!currentArmature) {\n throw new Error('Can not find armature: ' + props.armature);\n }\n }\n if(!currentArmature) {\n console.warn('No armature data');\n return;\n }\n let {\n name,\n bone,\n slot,\n skin,\n frameRate,\n animation,\n defaultActions,\n canvas,\n } = currentArmature;\n let boneHash = parseBone(bone);\n let slotHash = parseSlot(slot);\n let skinHash = parseSkin(skin, texHash, props);\n let animationHash = parseAnimation(animation, frameRate || globalFrameRate || 60, boneHash);\n return {\n name,\n bone,\n boneHash,\n slot,\n slotHash,\n skin: skin[0].slot,\n skinHash,\n animationHash,\n defaultActions,\n canvas,\n };\n}\n\nfunction parseSlot(data) {\n let hash = {};\n data.forEach(item => {\n hash[item.name] = item;\n });\n return hash;\n}\n\nfunction parseBone(data) {\n let hash = {};\n // bone数据形成tree结构,符合dom格式,第一个一定是root\n let root = data[0];\n root.children = [];\n hash[root.name] = root;\n data.forEach((item, i) => {\n let { name, parent, transform = {} } = item;\n if(parent) {\n hash[parent].children.push(item);\n }\n hash[name] = item;\n item.children = [];\n item.index = i;\n // 静态变换样式,可能某个骨骼没动画\n let matrix = math.matrix.identity();\n if(transform.x || transform.y) {\n let m = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, transform.x || 0, transform.y || 0, 0, 1];\n matrix = math.matrix.multiply(matrix, m);\n }\n if(transform.skX) {\n let d = math.geom.d2r(transform.skX);\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n let m = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = math.matrix.multiply(matrix, m);\n }\n if(transform.scX !== undefined || transform.scY !== undefined) {\n let m = [transform.scX === undefined ? 1 : transform.scX, 0, 0, 0, 0, transform.scY === undefined ? 1 : transform.scY, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = karas.math.matrix.multiply(matrix, m);\n }\n item.matrix = matrix;\n });\n return hash;\n}\n\nfunction parseSkin(data, texHash, props) {\n let hash = {};\n data[0].slot.forEach(item => {\n let { name: slotName, display } = item;\n hash[slotName] = item;\n display.forEach(item => {\n let { type, name, path } = item;\n // mesh网格分析三角形\n if(type === 'mesh') {\n let { vertices, triangles, uvs, weights, bonePose } = item;\n let weightHash;\n let bonePoseHash;\n // 有权重则绑定骨骼,坐标系为世界;\n // 没有权重时,完全属于父骨骼,类似普通贴图行为\n if(weights) {\n // 权重格式化hash\n weightHash = {};\n for(let i = 0, len = weights.length, verticesIndex = 0; i < len; i++) {\n let num = weights[i];\n let list = [];\n for(let j = i + 1; j < i + 1 + num * 2; j += 2) {\n let index = weights[j];\n let value = weights[j + 1];\n list.push({\n index,\n value,\n });\n }\n weightHash[verticesIndex++] = list;\n i += num * 2;\n }\n // 骨骼初始pose格式化和世界坐标\n bonePoseHash = {};\n for(let i = 0, len = bonePose.length; i < len; i += 7) {\n let index = bonePose[i];\n let m = bonePose.slice(i + 1, i + 7);\n let matrix = [m[0], m[1], 0, 0, m[2], m[3], 0, 0, 0, 0, 1, 0, m[4], m[5], 0, 1];\n let coords = math.matrix.calPoint([0, 0], matrix);\n bonePoseHash[index] = {\n coords,\n pose: matrix,\n };\n }\n }\n // 顶点格式化,相对于骨骼点的x/y位移差值\n let verticesList = item.verticesList = [];\n for(let i = 0, len = vertices.length; i < len; i += 2) {\n let index = i >> 1;\n let x = vertices[i];\n let y = vertices[i + 1];\n let res = {\n index,\n x,\n y,\n };\n verticesList.push(res);\n // 有添加绑定骨骼才有权重\n if(weightHash) {\n res.weightList = [];\n let weight = weightHash[index];\n weight.forEach(item => {\n let { index, value } = item;\n let { coords, pose } = bonePoseHash[index];\n // 先求骨头的角度,逆向选择至水平后,平移x/y的差值\n let [x0, y0] = math.matrix.calPoint([0, 0], pose);\n let [x1, y1] = math.matrix.calPoint([1, 0], pose);\n let dx = x1 - x0;\n let dy = y1 - y0;\n let theta;\n // 4个象限分开判断\n if(dx >= 0 && dy >= 0) {\n theta = -Math.atan(Math.abs(dy / dx));\n }\n else if(dx < 0 && dy >= 0) {\n theta = -Math.PI + Math.atan(Math.abs(dy / dx));\n }\n else if(dx < 0 && dy < 0) {\n theta = Math.PI - Math.atan(Math.abs(dy / dx));\n }\n else {\n theta = Math.atan(Math.abs(dy / dx));\n }\n let rotate = [Math.cos(theta), Math.sin(theta), 0, 0, -Math.sin(theta), Math.cos(theta), 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n let translate = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x - coords[0], y - coords[1], 0, 1];\n let matrix = math.matrix.multiply(rotate, translate);\n res.weightList.push({\n index,\n value,\n matrix,\n });\n });\n }\n }\n // 三角形,切割图片坐标\n let tex = texHash[path || name];\n let { width, height } = tex;\n let triangleList = item.triangleList = [];\n for(let i = 0, len = triangles.length; i < len; i += 3) {\n let i1 = triangles[i];\n let i2 = triangles[i + 1];\n let i3 = triangles[i + 2];\n // uv坐标\n let p1x = uvs[i1 * 2];\n let p1y = uvs[i1 * 2 + 1];\n let p2x = uvs[i2 * 2];\n let p2y = uvs[i2 * 2 + 1];\n let p3x = uvs[i3 * 2];\n let p3y = uvs[i3 * 2 + 1];\n // uv贴图坐标根据尺寸映射真实坐标\n let x1 = p1x * width;\n let y1 = p1y * height;\n let x2 = p2x * width;\n let y2 = p2y * height;\n let x3 = p3x * width;\n let y3 = p3y * height;\n // 从内心往外扩展约0.25px,可参数指定\n let [x0, y0] = math.geom.triangleIncentre(x1, y1, x2, y2, x3, y3);\n let px = parseFloat(props.enlarge);\n if(isNaN(px)) {\n px = 0.25;\n }\n // 单独为slot配置的扩展参数\n if(props.enlargeSlot && props.enlargeSlot.hasOwnProperty(slotName)) {\n let n = parseFloat(props.enlargeSlot[slotName]);\n if(isNaN(n)) {\n n = 0.25;\n }\n px = n;\n }\n let scale = px ? triangleScale(x0, y0, x1, y1, x2, y2, x3, y3, px) : 1;\n // 以内心为transformOrigin\n let m = math.matrix.identity();\n m[12] = -x0;\n m[13] = -y0;\n // 缩放\n let t = math.matrix.identity();\n t[0] = t[5] = scale;\n m = math.matrix.multiply(t, m);\n // 移动回去\n t[12] = x0;\n t[13] = y0;\n m = math.matrix.multiply(t, m);\n // 获取扩展后的三角形顶点坐标\n let [sx1, sy1] = math.matrix.calPoint([x1, y1], m);\n let [sx2, sy2] = math.matrix.calPoint([x2, y2], m);\n let [sx3, sy3] = math.matrix.calPoint([x3, y3], m);\n // 三角形所在矩形距离左上角原点的坐标,以此做img切割最小尺寸化,以及变换原点计算\n // let [ox, oy, ow, oh] = triangleOriginCoords(sx1, sy1, sx2, sy2, sx3, sy3);\n triangleList.push({\n index: Math.round(i / 3),\n indexList: [i1, i2, i3],\n // ox,\n // oy,\n // ow,\n // oh,\n // points: [\n // [p1x, p1y],\n // [p2x, p2y],\n // [p3x, p3y]\n // ],\n coords: [\n [x1, y1],\n [x2, y2],\n [x3, y3]\n ],\n scale,\n scaleCoords: [\n [sx1, sy1],\n [sx2, sy2],\n [sx3, sy3]\n ],\n width,\n height,\n });\n }\n }\n });\n });\n return hash;\n}\n\n/**\n * 将三角形从内心缩放指定像素\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n * @param px 缩放多少像素,可正负\n * @returns {number} 缩放倍数\n */\nfunction triangleScale(x0, y0, x1, y1, x2, y2, x3, y3, px = 0) {\n // 内心到任意一边的距离\n let a = y2 - y1;\n let b = x1 - x2;\n let c = x2 * y1 - x1 * y2;\n let d = Math.abs(a * x0 + b * y0 + c) / Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return (d + px) / d;\n}\n\n/**\n * 获取三角形所在最小矩形的原点坐标、尺寸\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleOriginCoords(x1, y1, x2, y2, x3, y3) {\n let xMin = x1;\n let yMin = y1;\n let xMax = x1;\n let yMax = y1;\n xMin = Math.min(xMin, x2);\n xMin = Math.min(xMin, x3);\n yMin = Math.min(yMin, y2);\n yMin = Math.min(yMin, y3);\n xMax = Math.max(xMax, x2);\n xMax = Math.max(xMax, x3);\n yMax = Math.max(yMax, y2);\n yMax = Math.max(yMax, y3);\n return [xMin, yMin, xMax - xMin, yMax - yMin];\n}\n\nfunction parseAnimation(data, frameRate, boneHash) {\n let hash = {};\n data.forEach(item => {\n let { duration, playTimes, name, bone = [], slot = [], ffd = [] } = item;\n hash[name] = item;\n item.options = {\n duration: 1000 * duration / frameRate,\n iterations: playTimes === 0 ? Infinity : playTimes,\n fill: 'forwards',\n };\n // 骨骼动画列表\n item.boneAnimationList = bone.map(item => {\n let { name, translateFrame, rotateFrame, scaleFrame } = item;\n let { transform: originTransform = {} } = boneHash[name];\n let res = {\n name,\n list: [],\n };\n if(translateFrame) {\n let offsetSum = 0;\n let last;\n let value = translateFrame.map(frame => {\n let { duration: d = 1 } = frame;\n let easingFn = getEasing(frame);\n let offset = offsetSum / duration;\n offsetSum += d;\n let { x = 0, y = 0 } = originTransform;\n let res = {\n type: 0,\n translateX: (frame.x || 0) + x,\n translateY: (frame.y || 0) + y,\n offset,\n easingFn,\n };\n if(last) {\n last.dx = res.translateX - last.translateX;\n last.dy = res.translateY - last.translateY;\n }\n last = res;\n return res;\n });\n res.list.push(value);\n }\n if(rotateFrame) {\n let offsetSum = 0;\n let last;\n let value = rotateFrame.map(frame => {\n let { duration: d = 1 } = frame;\n let easingFn = getEasing(frame);\n let offset = offsetSum / duration;\n offsetSum += d;\n let { skX = 0 } = originTransform;\n let res = {\n type: 1,\n rotateZ: (frame.rotate || 0) + skX,\n offset,\n easingFn,\n };\n if(last) {\n last.dz = res.rotateZ - last.rotateZ;\n }\n last = res;\n return res;\n });\n res.list.push(value);\n }\n if(scaleFrame) {\n let offsetSum = 0;\n let last;\n let value = scaleFrame.map(frame => {\n let { duration: d = 1 } = frame;\n let easingFn = getEasing(frame);\n let offset = offsetSum / duration;\n offsetSum += d;\n let { scX = 1, scY = 1 } = originTransform;\n let res = {\n type: 2,\n scaleX: (frame.x === undefined ? 1 : frame.x) * scX,\n scaleY: (frame.y === undefined ? 1 : frame.y) * scY,\n offset,\n easingFn,\n };\n if(last) {\n last.dx = res.scaleX - last.scaleX;\n last.dy = res.scaleY - last.scaleY;\n }\n last = res;\n return res;\n });\n res.list.push(value);\n }\n return res;\n });\n // 插槽动画列表\n item.slotAnimationList = slot.map(item => {\n let { displayFrame, colorFrame } = item;\n if(displayFrame) {\n let offsetSum = 0;\n displayFrame.forEach(frame => {\n let { duration: d = 1 } = frame;\n let offset = offsetSum / duration;\n offsetSum += d;\n frame.offset = offset;\n });\n }\n if(colorFrame) {\n let offsetSum = 0;\n let last;\n colorFrame.forEach(frame => {\n let { duration: d = 1 } = frame;\n frame.easingFn = getEasing(frame);\n let offset = offsetSum / duration;\n offsetSum += d;\n frame.offset = offset;\n // 没有value就用默认值\n if(!frame.value) {\n frame.value = {\n aM: 100,\n };\n }\n if(frame.value.aM === undefined) {\n frame.value.aM = 100;\n }\n if(last) {\n last.da = frame.value.aM - last.value.aM;\n }\n last = frame;\n });\n }\n return item;\n });\n // 自由变形列表\n let ffdAnimationHash = item.ffdAnimationHash = {};\n item.ffdAnimationList = ffd.map(item => {\n let { name, slot, frame } = item;\n // db限制了不能出现在名字里\n ffdAnimationHash[slot + '>' + name] = item;\n if(frame) {\n let offsetSum = 0;\n let last;\n frame.forEach(frame => {\n let { vertices, duration: d = 1, offset: os } = frame;\n frame.easingFn = getEasing(frame);\n if(vertices) {\n for(let i = 0; i < os; i++) {\n vertices.unshift(0);\n }\n }\n let offset = offsetSum / duration;\n offsetSum += d;\n frame.offset = offset;\n // 顶点变形数据vertices都是偏移量,无偏移为空\n if(last) {\n let verticesLast = last.vertices;\n if(verticesLast && vertices) {\n last.dv = [];\n for(let i = 0, len = Math.max(verticesLast.length, vertices.length); i < len; i++) {\n last.dv.push((vertices[i] || 0) - (verticesLast[i] || 0));\n }\n }\n else if(verticesLast) {\n last.dv = last.vertices.map(n => -n);\n }\n else if(vertices) {\n last.dv = vertices;\n }\n }\n last = frame;\n });\n }\n return item;\n });\n });\n return hash;\n}\n\nfunction getEasing(frame) {\n let curve = frame.curve;\n if(curve && curve[0] !== 1 && curve[1] !== 1 && curve[2] !== 0 && curve[3] !== 0) {\n return karas.animate.easing.cubicBezier(curve[0], curve[1], curve[2], curve[3]);\n }\n}\n\nexport default {\n parseAndLoadTex,\n parseSke,\n};\n","import karas from 'karas';\n\nconst { math } = karas;\n\n/**\n * 根据动画时间状态修改骨骼当前matrix\n * @param animationList 动画列表\n * @param offset 当前时间偏移量\n * @param boneHash 骨骼hash\n */\nfunction animateBoneMatrix(animationList, offset, boneHash) {\n animationList.forEach(item => {\n let { name, list } = item;\n let bone = boneHash[name];\n // 先以静态变换样式为基础\n let { transform = {} } = bone;\n let res = {};\n res.translateX = transform.x || 0;\n res.translateY = transform.y || 0;\n res.rotateZ = transform.skX || 0;\n res.scaleX = transform.scX === undefined ? 1 : transform.scX;\n res.scaleY = transform.scY === undefined ? 1 : transform.scY;\n // 再assign动画中的变换样式\n list.forEach(frames => {\n let len = frames.length;\n if(!len) {\n return;\n }\n let type = frames[0].type;\n let i = binarySearch(0, len - 1, offset, frames);\n let current = frames[i];\n let easingFn = current.easingFn;\n // 是否最后一帧\n if(i === len - 1) {\n if(type === 0) {\n res.translateX = current.translateX;\n res.translateY = current.translateY;\n }\n else if(type === 1) {\n res.rotateZ = current.rotateZ;\n }\n else if(type === 2) {\n res.scaleX = current.scaleX;\n res.scaleY = current.scaleY;\n }\n }\n else {\n let next = frames[i + 1];\n let total = next.offset - current.offset;\n let percent = (offset - current.offset) / total;\n if(easingFn) {\n percent = easingFn(percent);\n }\n if(type === 0) {\n res.translateX = current.translateX + current.dx * percent;\n res.translateY = current.translateY + current.dy * percent;\n }\n else if(type === 1) {\n res.rotateZ = current.rotateZ + current.dz * percent;\n }\n else if(type === 2) {\n res.scaleX = current.scaleX + current.dx * percent;\n res.scaleY = current.scaleY + current.dy * percent;\n }\n }\n });\n let matrix = math.matrix.identity();\n if(res.translateX || res.translateY) {\n let m = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, res.translateX || 0, res.translateY || 0, 0, 1];\n matrix = math.matrix.multiply(matrix, m);\n }\n if(res.rotateZ) {\n let d = math.geom.d2r(res.rotateZ);\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n let m = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = math.matrix.multiply(matrix, m);\n }\n if(res.scaleX !== undefined || res.scaleY !== undefined) {\n let m = [res.scaleX === undefined ? 1 : res.scaleX, 0, 0, 0, 0, res.scaleY === undefined ? 1 : res.scaleY, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = math.matrix.multiply(matrix, m);\n }\n bone.matrixA = matrix;\n });\n}\n\n/**\n * 二分查找根据时间轴帧序列和当前百分比获得当前帧\n * @param i\n * @param j\n * @param offset\n * @param frames\n * @returns {frame}\n */\nfunction binarySearch(i, j, offset, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame.offset > offset) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame.offset === offset) {\n return middle;\n }\n else if(frame.offset > offset) {\n return binarySearch(i, Math.max(middle - 1, i), offset, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, offset, frames);\n }\n }\n}\n\n/**\n * 递归遍历骨骼,根据父子属性合并生成骨骼相对于舞台的最终currentMatrix\n * @param root 根骨骼\n */\nfunction mergeBoneMatrix(root) {\n root.currentMatrix = root.matrixA || root.matrix;\n root.children.forEach(item => {\n mergeChildBoneMatrix(item, root.currentMatrix);\n });\n}\n\nfunction mergeChildBoneMatrix(bone, parentMatrix) {\n bone.currentMatrix = math.matrix.multiply(parentMatrix, bone.matrixA || bone.matrix);\n bone.children.forEach(item => {\n mergeChildBoneMatrix(item, bone.currentMatrix);\n });\n}\n\n/**\n * 根据当前动画时间执行slot的动画,确定显示slot下的皮肤索引和透明度\n * @param slotAnimationList\n * @param offset\n * @param slotHash\n */\nfunction animateSlot(slotAnimationList, offset, slotHash) {\n slotAnimationList.forEach(item => {\n let { name, displayFrame, colorFrame } = item;\n let slot = slotHash[name];\n if(displayFrame) {\n if(displayFrame.length) {\n let i = binarySearch(0, displayFrame.length - 1, offset, displayFrame);\n let { value = 0 } = displayFrame[i];\n slot.displayIndexA = value;\n }\n }\n if(colorFrame) {\n let len = colorFrame.length;\n if(len) {\n let i = binarySearch(0, len - 1, offset, colorFrame);\n let current = colorFrame[i];\n let easingFn = current.easing;\n // 是否最后一帧\n if(i === len - 1) {\n slot.colorA = current.value;\n }\n else {\n let next = colorFrame[i + 1];\n let total = next.offset - current.offset;\n let percent = (offset - current.offset) / total;\n if(easingFn) {\n percent = easingFn(percent);\n }\n slot.colorA = {\n aM: current.value.aM + current.da * percent,\n };\n }\n }\n }\n });\n}\n\n/**\n * 根据当前骨骼状态计算slot中显示对象变换matrix\n * @param offset\n * @param slot\n * @param skinHash\n * @param bone\n * @param boneHash\n * @param texHash\n * @param ffdAnimationHash\n */\nfunction calSlot(offset, slot, skinHash, bone, boneHash, texHash, ffdAnimationHash) {\n slot.forEach(item => {\n let { name, parent, displayIndex = 0, displayIndexA = displayIndex } = item;\n // 插槽隐藏不显示\n if(displayIndexA < 0) {\n return;\n }\n let skin = skinHash[name];\n let displayTarget = skin.display[displayIndexA];\n // 网格类型\n if(displayTarget.type === 'mesh') {\n let { verticesList, triangleList } = displayTarget;\n // 先进行顶点变换\n verticesList.forEach(item => {\n let { weightList } = item;\n // 有绑定骨骼的mesh,计算权重\n if(weightList) {\n let m = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n weightList.forEach(weight => {\n let { index, value, matrix } = weight;\n let boneMatrix = bone[index].currentMatrix;\n let offset = karas.math.matrix.multiply(boneMatrix, matrix);\n for(let i = 0; i < 16; i++) {\n m[i] += offset[i] * value;\n }\n });\n item.matrix = m;\n }\n // 没有绑定认为直属父骨骼\n else {\n let parentBoneMatrix = boneHash[parent].currentMatrix;\n let offsetMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, item.x, item.y, 0, 1];\n let m = karas.math.matrix.multiply(parentBoneMatrix, offsetMatrix);\n item.matrix = m;\n }\n // 每次先清空ffd自由变换的数据\n item.matrixF = null;\n });\n // 如果有ffd自定义顶点变换,计算偏移量matrix\n let ffd = ffdAnimationHash[name + '>' + (displayTarget.path || displayTarget.name)];\n if(ffd) {\n let { frame } = ffd;\n if(frame) {\n let len = frame.length;\n let i = binarySearch(0, len - 1, offset, frame);\n let current = frame[i];\n let easingFn = current.easingFn;\n // 是否最后一帧\n if(i === len - 1) {\n let { vertices } = current;\n if(vertices) {\n for(let i = 0, len = vertices.length; i < len - 1; i += 2) {\n let x = vertices[i];\n let y = vertices[i + 1];\n if(x === 0 && y === 0) {\n continue;\n }\n let index = i >> 1;\n let target = verticesList[index];\n let m = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, 0, 1];\n target.matrixF = math.matrix.multiply(target.matrix, m);\n }\n }\n }\n else {\n let next = frame[i + 1];\n let total = next.offset - current.offset;\n let percent = (offset - current.offset) / total;\n if(easingFn) {\n percent = easingFn(percent);\n }\n let { vertices, dv } = current;\n if(vertices || dv) {\n let len = 0;\n if(vertices) {\n len = vertices.length;\n }\n if(dv) {\n len = Math.max(len, dv.length);\n }\n for(let i = 0; i < len - 1; i += 2) {\n let x, y;\n if(vertices) {\n x = vertices[i] || 0;\n y = vertices[i + 1] || 0;\n }\n else {\n x = y = 0;\n }\n if(dv) {\n x += (dv[i] || 0) * percent;\n y += (dv[i + 1] || 0) * percent;\n }\n if(x === 0 && y === 0) {\n continue;\n }\n let index = i >> 1;\n let target = verticesList[index];\n let m = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, 0, 1];\n target.matrixF = math.matrix.multiply(target.matrix, m);\n }\n }\n }\n }\n }\n // 三角形根据顶点坐标变化计算仿射变换matrix\n triangleList.forEach(item => {\n let { indexList, coords } = item;\n let source = coords[0].concat(coords[1]).concat(coords[2]);\n let target = [];\n indexList.forEach(i => {\n let vertices = verticesList[i];\n let coords = math.matrix.calPoint([0, 0], vertices.matrixF || vertices.matrix);\n target = target.concat(coords.slice(0, 2));\n });\n // 先交换确保3个点顺序\n let [source1, target1] = math.tar.exchangeOrder(source, target);\n let matrix = math.tar.transform(source1, target1);\n item.matrix = matrix;\n });\n }\n // 默认图片类型\n else {\n let { transform = {} } = displayTarget;\n let tex = texHash[displayTarget.path || displayTarget.name];\n let parentBoneMatrix = boneHash[parent].currentMatrix;\n let matrix = math.matrix.identity();\n // 图片本身形变,因中心点在图片本身中心,所以无论是否有translate都要平移\n let t = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, (transform.x || 0) - tex.frameWidth * 0.5, (transform.y || 0) - tex.frameHeight * 0.5, 0, 1];\n matrix = math.matrix.multiply(matrix, t);\n // 可选旋转\n if(transform.skX) {\n let d = math.geom.d2r(transform.skX);\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n let t = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = math.matrix.multiply(matrix, t);\n }\n // 可选缩放\n if(transform.scX !== undefined || transform.scY !== undefined) {\n let t = [transform.scX === undefined ? 1 : transform.scX, 0, 0, 0, 0, transform.scY === undefined ? 1 : transform.scY, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = math.matrix.multiply(matrix, t);\n }\n // tfo为图片中心,可合并\n t = math.matrix.identity();\n t[12] = tex.frameWidth * 0.5;\n t[13] = tex.frameHeight * 0.5;\n matrix = math.matrix.multiply(t, matrix);\n t = math.matrix.identity();\n t[12] = -tex.frameWidth * 0.5;\n t[13] = -tex.frameHeight * 0.5;\n matrix = math.matrix.multiply(matrix, t);\n matrix = math.matrix.multiply(parentBoneMatrix, matrix);\n displayTarget.matrix = matrix;\n }\n });\n}\n\nfunction clearAnimation(bone, slot) {\n bone.forEach(item => {\n delete item.matrixA;\n });\n slot.forEach(item => {\n delete item.displayIndexA;\n delete item.colorA;\n });\n}\n\nexport default {\n animateBoneMatrix,\n mergeBoneMatrix,\n animateSlot,\n calSlot,\n clearAnimation,\n};\n","import karas from 'karas';\n\nconst { math } = karas;\n\nfunction canvasBone(ctx, matrixEvent, bone, dx, dy) {\n let { length, children, currentMatrix } = bone;\n let m = math.matrix.multiply(matrixEvent, currentMatrix);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.beginPath();\n ctx.strokeStyle = '#000';\n ctx.lineWidth = 1;\n ctx.arc(dx, dy, 5, 0, Math.PI * 2);\n ctx.moveTo(dx, dy);\n ctx.lineTo((length || 5) + dx, dy);\n ctx.closePath();\n ctx.stroke();\n children.forEach(item => {\n canvasBone(ctx, matrixEvent, item, dx, dy);\n });\n}\n\nfunction canvasSlot(ctx, matrixEvent, slot, skinHash, texHash, dx, dy) {\n slot.forEach(item => {\n let { name, displayIndex = 0, displayIndexA = displayIndex, blendMode, color = {}, colorA = color } = item;\n // 插槽隐藏不显示\n if(displayIndexA < 0) {\n return;\n }\n // 叠加模式\n if(blendMode === 'add') {\n ctx.globalCompositeOperation = 'lighter';\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n let { aM = 100 } = colorA;\n let opacity = ctx.globalAlpha;\n // 透明度\n ctx.globalAlpha *= aM / 100;\n let skin = skinHash[name];\n let displayTarget = skin.display[displayIndexA];\n let tex = texHash[displayTarget.path || displayTarget.name];\n // 网格类型\n if(displayTarget.type === 'mesh') {\n let { triangleList } = displayTarget;\n triangleList.forEach(item => {\n let { matrix, scaleCoords } = item;\n matrix = math.matrix.multiply(matrixEvent, matrix);\n // clip绘制\n ctx.save();\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.beginPath();\n ctx.moveTo(scaleCoords[0][0] + dx, scaleCoords[0][1] + dy);\n ctx.lineTo(scaleCoords[1][0] + dx, scaleCoords[1][1] + dy);\n ctx.lineTo(scaleCoords[2][0] + dx, scaleCoords[2][1] + dy);\n ctx.closePath();\n ctx.clip();\n ctx.drawImage(tex.source, -tex.x - tex.frameX + dx, -tex.y - tex.frameY + dy);\n ctx.restore();\n });\n }\n // 默认图片类型\n else {\n let { matrix } = displayTarget;\n if(matrix[0] === 0 || matrix[5] === 0) {\n return;\n }\n matrix = math.matrix.multiply(matrixEvent, matrix);\n // clip绘制\n ctx.save();\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.beginPath();\n ctx.moveTo(-tex.frameX + dx, -tex.frameY + dy);\n ctx.lineTo(-tex.frameX + tex.width + dx, -tex.frameY + dy);\n ctx.lineTo(-tex.frameX + tex.width + dx, -tex.frameY + tex.height + dy);\n ctx.lineTo(-tex.frameX + dx, -tex.frameY + tex.height + dy);\n ctx.closePath();\n ctx.clip();\n ctx.drawImage(tex.source, -tex.x - tex.frameX + dx, -tex.y - tex.frameY + dy);\n ctx.restore();\n }\n // 恢复模式\n if(blendMode) {\n ctx.globalCompositeOperation = 'source-over';\n }\n ctx.globalAlpha = opacity;\n });\n}\n\nfunction canvasTriangle(ctx, matrixEvent, slot, skinHash, texHash, dx, dy) {\n slot.forEach(item => {\n let { name, displayIndex = 0, displayIndexA = displayIndex } = item;\n // 插槽隐藏不显示\n if(displayIndexA < 0) {\n return;\n }\n let skin = skinHash[name];\n let displayTarget = skin.display[displayIndexA];\n let tex = texHash[displayTarget.path || displayTarget.name];\n // 网格类型\n if(displayTarget.type === 'mesh') {\n let { verticesList, triangleList } = displayTarget;\n triangleList.forEach(item => {\n let { matrix, scaleCoords } = item;\n matrix = math.matrix.multiply(matrixEvent, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.strokeStyle = '#39F';\n ctx.lineWidth = 1;\n ctx.beginPath();\n ctx.moveTo(scaleCoords[0][0] + dx, scaleCoords[0][1] + dy);\n ctx.lineTo(scaleCoords[1][0] + dx, scaleCoords[1][1] + dy);\n ctx.lineTo(scaleCoords[2][0] + dx, scaleCoords[2][1] + dy);\n ctx.closePath();\n ctx.stroke();\n });\n verticesList.forEach(item => {\n let { matrix, matrixF } = item;\n matrix = math.matrix.multiply(matrixEvent, matrixF || matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#0D6';\n ctx.beginPath();\n ctx.arc(dx, dy, 4, 0, Math.PI * 2);\n ctx.closePath();\n ctx.fill();\n });\n }\n // 默认图片类型\n else {\n let { matrix } = displayTarget;\n matrix = math.matrix.multiply(matrixEvent, matrix);\n ctx.save();\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.strokeStyle = '#F90';\n ctx.lineWidth = 1;\n ctx.beginPath();\n ctx.moveTo(dx, dy);\n ctx.lineTo(tex.frameWidth + dx, dy);\n ctx.lineTo(tex.frameWidth + dx, tex.frameHeight + dy);\n ctx.lineTo(dx, tex.frameHeight + dy);\n ctx.closePath();\n ctx.stroke();\n ctx.strokeStyle = 'rgba(172, 0, 172, 0.5)';\n ctx.beginPath();\n ctx.moveTo(-tex.frameX + dx, -tex.frameY + dy);\n ctx.lineTo(-tex.frameX + tex.width + dx, -tex.frameY + dy);\n ctx.lineTo(-tex.frameX + tex.width + dx, -tex.frameY + tex.height + dy);\n ctx.lineTo(-tex.frameX + dx, -tex.frameY + tex.height + dy);\n ctx.closePath();\n ctx.stroke();\n ctx.restore();\n }\n });\n}\n\nexport default {\n canvasSlot,\n canvasTriangle,\n canvasBone,\n};\n","import karas from 'karas';\nimport parser from './parser';\nimport util from './util';\nimport render from './render';\nimport { version } from '../package.json';\n\nlet uuid = 0;\n\nconst SHARE_CACHE = {};\nconst { STYLE_KEY: {\n DISPLAY,\n VISIBILITY,\n OPACITY,\n MARGIN_LEFT,\n PADDING_LEFT,\n BORDER_LEFT_WIDTH,\n MARGIN_TOP,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n WIDTH,\n HEIGHT,\n} } = karas.enums;\n\nclass Dragonbones extends karas.Component {\n componentDidMount() {\n this.init();\n }\n\n shouldComponentUpdate(nextProps) {\n let props = this.props;\n if(nextProps !== props) {\n if(nextProps.ske !== props.ske\n || nextProps.tex !== props.tex\n || nextProps.enlarge !== props.enlarge\n || nextProps.enlargeSlot !== props.enlargeSlot\n && !karas.util.equal(nextProps.enlargeSlot, props.enlargeSlot)) {\n this.init();\n }\n else {\n if(nextProps.armature !== props.armature) {\n this.armature(nextProps.armature, props);\n }\n else {\n if(nextProps.action !== props.action) {\n this.action(nextProps.action);\n }\n if(nextProps.imagePath !== props.imagePath) {\n this.changeImage(nextProps.imagePath);\n }\n if(nextProps.playbackRate !== props.playbackRate && this.animation) {\n this.animation.playbackRate = nextProps.playbackRate;\n }\n if(nextProps.fps !== props.fps && this.animation) {\n this.animation.fps = nextProps.fps;\n }\n }\n }\n }\n return false;\n }\n\n init() {\n let props = this.props;\n let { ske, tex } = props;\n let total = 0;\n if(karas.util.isString(ske)) {\n total++;\n props.loadJson(ske, (res) => {\n total--;\n ske = res;\n this.build(total, ske, tex);\n });\n }\n if(karas.util.isString(tex)) {\n total++;\n props.loadJson(tex, (res) => {\n total--;\n tex = res;\n this.build(total, ske, tex);\n });\n }\n this.build(total, ske, tex);\n }\n\n build(count, ske, tex) {\n if(count !== 0) {\n return;\n }\n let props = this.props;\n this.staticCacheFlag = !!props.staticCache;\n this.staticCacheHash = {};\n ske.uuid = ske.uuid || ++uuid;\n if(ske.version !== '5.5') {\n throw new Error('The version' + ske.version + ' does not match 5.5');\n }\n this.ske = karas.util.clone(ske);\n this.tex = karas.util.clone(tex);\n parser.parseAndLoadTex(this.tex, (texHash) => {\n this.texHash = texHash;\n this.armature(props.armature, props);\n }, props);\n }\n\n armature(name, options = {}) {\n let op = karas.util.extend({}, options);\n op.armature = name;\n let {\n name: n,\n bone,\n boneHash,\n slot,\n slotHash,\n skin,\n skinHash,\n animationHash,\n defaultActions,\n canvas,\n } = parser.parseSke(this.ske, this.texHash, op);\n this.armatureName = n;\n this.bone = bone;\n this.boneHash = boneHash;\n this.slot = slot;\n this.slotHash = slotHash;\n this.skin = skin;\n this.skinHash = skinHash;\n this.animationHash = animationHash;\n this.canvas = canvas;\n\n let defaultAction;\n if(options.action && animationHash[options.action]) {\n let key = options.pause ? 'gotoAndStop' : 'gotoAndPlay';\n defaultAction = {\n [key]: options.action,\n };\n }\n // 不存在或没有指定使用ske文件的第一个\n else if(defaultActions && defaultActions.length) {\n defaultAction = defaultActions[0];\n }\n if(defaultAction) {\n let a = this.action(defaultAction.gotoAndPlay || defaultAction.gotoAndStop);\n if(options.pause || defaultAction.gotoAndStop) {\n a.gotoAndStop(0);\n }\n return a;\n }\n else {\n console.warn('No action data');\n }\n }\n\n action(name) {\n this.actionName = name;\n let animation = this.animationHash[name];\n if(!animation) {\n throw new Error('Can not find animation: ' + name);\n }\n // 清除上次动画的影响\n if(this.animation) {\n util.clearAnimation(this.bone, this.slot);\n }\n let { boneAnimationList, slotAnimationList, ffdAnimationHash, options } = animation;\n if(!karas.util.isNil(this.props.playbackRate)) {\n options.playbackRate = this.props.playbackRate;\n }\n if(!karas.util.isNil(this.props.fps)) {\n options.fps = this.props.fps;\n }\n // 隐藏节点模拟一段不展示的动画,带动每次渲染\n let fake = this.ref.fake;\n fake.clearAnimate();\n let a = this.animation = fake.animate([\n {\n backgroundColor: '#000',\n },\n {\n backgroundColor: '#FFF',\n },\n ], options);\n // 劫持隐藏节点渲染,因本身display:none可以不执行原本逻辑,计算并渲染骨骼动画\n let self = this;\n let computedStyle = self.shadowRoot.computedStyle;\n let root = self.root;\n let width = root.width;\n let height = root.height;\n fake.render = function(renderMode, ctx, dx = 0, dy = 0) {\n if(computedStyle[DISPLAY] === 'none'\n || computedStyle[VISIBILITY] === 'hidden'\n || computedStyle[OPACITY] === 0) {\n return;\n }\n // 开启了静态帧优化优先使用缓存\n let offScreen;\n let sourceCtx;\n let staticKey;\n if(self.staticCacheFlag) {\n offScreen = karas.inject.getCacheCanvas(width, height);\n sourceCtx = ctx;\n ctx = offScreen.ctx;\n let frame = Math.floor(a.currentTime * (self.fps || 60) / 1000);\n // ske文件uuid + 骨架名 + 动画名 + 帧数\n staticKey = self.ske.uuid + '>' + self.armatureName + '>' + self.actionName + '>' + frame;\n let ca = self.staticCacheHash[staticKey];\n if(ca) {\n ctx.putImageData(ca, 0, 0);\n offScreen.draw(ctx);\n sourceCtx.drawImage(offScreen.canvas, 0, 0);\n ctx.clearRect(0, 0, width, height);\n return;\n }\n }\n let { bone, slot, boneHash, slotHash, skinHash, texHash } = self;\n // 动态情况缓存当前帧,为多个实例节省计算\n let dynamicKey = self.ske.uuid + '>' + self.armatureName + '>' + self.actionName;\n let dynamicCache = SHARE_CACHE[dynamicKey];\n if(self.props.share && dynamicCache && dynamicCache.currentTime === a.currentTime) {\n bone = dynamicCache.bone;\n slot = dynamicCache.slot;\n skinHash = dynamicCache.skinHash;\n }\n else {\n let offset = Math.min(1, a.currentTime / a.duration);\n util.animateBoneMatrix(boneAnimationList, offset, boneHash);\n util.mergeBoneMatrix(bone[0]);\n util.animateSlot(slotAnimationList, offset, slotHash);\n util.calSlot(offset, slot, skinHash, bone, boneHash, texHash, ffdAnimationHash);\n SHARE_CACHE[dynamicKey] = {\n bone,\n slot,\n skinHash,\n currentTime: a.currentTime,\n };\n }\n if(renderMode === karas.mode.CANVAS) {\n let { matrixEvent } = self.shadowRoot;\n // 先在dom中居中\n let left = computedStyle[MARGIN_LEFT] + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT] + computedStyle[WIDTH] * 0.5;\n let top = computedStyle[MARGIN_TOP] + computedStyle[BORDER_TOP_WIDTH] + computedStyle[PADDING_TOP] + computedStyle[HEIGHT] * 0.5;\n let t = karas.math.matrix.identity();\n t[12] = left;\n t[13] = top;\n // 画布居中\n if(self.canvas) {\n let dx = self.canvas.x || 0;\n let dy = self.canvas.y || 0;\n t[12] -= dx * 0.5;\n t[13] -= dy * 0.5;\n // 适配尺寸\n if(self.props.fitSize) {\n let sx = computedStyle.width / self.canvas.width;\n let sy = computedStyle.height / self.canvas.height;\n t[0] = sx;\n t[5] = sy;\n }\n }\n matrixEvent = karas.math.matrix.multiply(matrixEvent, t);\n render.canvasSlot(ctx, matrixEvent, slot, skinHash, texHash, dx, dy);\n // debug模式\n if(self.props.debug) {\n render.canvasTriangle(ctx, matrixEvent, slot, skinHash, texHash, dx, dy);\n render.canvasBone(ctx, matrixEvent, bone[0], dx, dy);\n }\n else {\n if(self.props.debugBone) {\n render.canvasBone(ctx, matrixEvent, bone[0], dx, dy);\n }\n if(self.props.debugSlot) {\n render.canvasTriangle(ctx, matrixEvent, slot, skinHash, texHash, dx, dy);\n }\n }\n // 静态帧优化将离屏内容绘入\n if(self.staticCacheFlag) {\n offScreen.draw(ctx);\n sourceCtx.drawImage(offScreen.canvas, 0, 0);\n self.staticCacheHash[staticKey] = ctx.getImageData(0, 0, width, height);\n ctx.clearRect(0, 0, width, height);\n }\n }\n };\n return a;\n }\n\n changeImage(src) {\n if(src) {\n let tex = this.tex;\n tex.imagePath = src;\n let texHash = this.texHash;\n karas.inject.measureImg(src, function() {\n tex.SubTexture.forEach(item => {\n let { name } = item;\n texHash[name].source = karas.inject.IMG[src].source;\n });\n });\n }\n }\n\n setStaticCache(flag) {\n this.staticCacheFlag = !!flag;\n }\n\n cleanStaticCache() {\n this.staticCacheHash = {};\n }\n\n render() {\n return <div>\n <$polyline ref=\"fake\"/>\n </div>;\n }\n}\n\nDragonbones.version = version;\n\nexport default Dragonbones;\n"],"names":["inject","karas","math","parseAndLoadTex","tex","cb","props","src","imagePath","texHash","measureImg","SubTexture","forEach","item","name","x","y","width","height","frameX","frameY","frameWidth","frameHeight","source","IMG","parseSke","ske","globalFrameRate","frameRate","armature","currentArmature","i","len","length","Error","console","warn","bone","slot","skin","animation","defaultActions","canvas","boneHash","parseBone","slotHash","parseSlot","skinHash","parseSkin","animationHash","parseAnimation","data","hash","root","children","parent","transform","push","index","matrix","identity","m","multiply","skX","d","geom","d2r","sin","Math","cos","scX","undefined","scY","slotName","display","type","path","vertices","triangles","uvs","weights","bonePose","weightHash","bonePoseHash","verticesIndex","num","list","j","value","slice","coords","calPoint","pose","verticesList","res","weightList","weight","x0","y0","x1","y1","dx","dy","theta","atan","abs","PI","rotate","translate","triangleList","i1","i2","i3","p1x","p1y","p2x","p2y","p3x","p3y","x2","y2","x3","y3","triangleIncentre","px","parseFloat","enlarge","isNaN","enlargeSlot","hasOwnProperty","n","scale","triangleScale","t","sx1","sy1","sx2","sy2","sx3","sy3","round","indexList","scaleCoords","a","b","c","sqrt","pow","duration","playTimes","ffd","options","iterations","Infinity","fill","boneAnimationList","map","translateFrame","rotateFrame","scaleFrame","originTransform","offsetSum","last","frame","easingFn","getEasing","offset","translateX","translateY","rotateZ","dz","scaleX","scaleY","slotAnimationList","displayFrame","colorFrame","aM","da","ffdAnimationHash","ffdAnimationList","os","unshift","verticesLast","dv","max","curve","animate","easing","cubicBezier","animateBoneMatrix","animationList","frames","binarySearch","current","next","total","percent","matrixA","middle","min","mergeBoneMatrix","currentMatrix","mergeChildBoneMatrix","parentMatrix","animateSlot","displayIndexA","colorA","calSlot","displayIndex","displayTarget","boneMatrix","parentBoneMatrix","offsetMatrix","matrixF","target","concat","tar","exchangeOrder","source1","target1","clearAnimation","canvasBone","ctx","matrixEvent","setTransform","beginPath","strokeStyle","lineWidth","arc","moveTo","lineTo","closePath","stroke","canvasSlot","blendMode","color","globalCompositeOperation","opacity","globalAlpha","save","clip","drawImage","restore","canvasTriangle","fillStyle","uuid","SHARE_CACHE","enums","STYLE_KEY","DISPLAY","VISIBILITY","OPACITY","MARGIN_LEFT","PADDING_LEFT","BORDER_LEFT_WIDTH","MARGIN_TOP","PADDING_TOP","BORDER_TOP_WIDTH","WIDTH","HEIGHT","Dragonbones","init","nextProps","util","equal","action","changeImage","playbackRate","fps","isString","loadJson","build","count","staticCacheFlag","staticCache","staticCacheHash","version","clone","parser","op","extend","armatureName","defaultAction","key","pause","gotoAndPlay","gotoAndStop","actionName","isNil","fake","ref","clearAnimate","backgroundColor","self","computedStyle","shadowRoot","render","renderMode","offScreen","sourceCtx","staticKey","getCacheCanvas","floor","currentTime","ca","putImageData","draw","clearRect","dynamicKey","dynamicCache","share","mode","CANVAS","left","top","fitSize","sx","sy","debug","debugBone","debugSlot","getImageData","flag","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEA,IAAQA,MAAR,GAAyBC,yBAAzB,CAAQD,MAAR;EAAA,IAAgBE,MAAhB,GAAyBD,yBAAzB,CAAgBC,IAAhB,CA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