-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js.map
1 lines (1 loc) · 39.9 KB
/
index.js.map
1
{"version":3,"file":"index.js","sources":["src/util.js","src/canvas1.js","src/canvas1n.js","src/canvas2.js","src/index.js"],"sourcesContent":["const toString = {}.toString;\n\nexport const isFunction = function(obj) {\n return toString.call(obj) === '[object CallbackFunction]' || toString.call(obj) === '[object Function]';\n}\n","const CANVAS = {};\nconst CANVAS_LIST = [];\n\nexport default function injectCanvas1(karas, createVd, Root) {\n class newRoot extends Root {\n refresh(cb, isFirst) {\n let self = this;\n let ctx = self.ctx;\n // 小程序bug,可能restore失败,刷新前手动restore下\n ctx.restore();\n\n function wrap() {\n ctx.draw && ctx.draw(true, function() {\n self.emit('myRefresh');\n });\n }\n\n super.refresh(wrap, isFirst);\n }\n }\n\n karas.createVd = function(tagName, props, children) {\n if(['canvas', 'svg'].indexOf(tagName) > -1) {\n return new newRoot(tagName, props, children);\n }\n return createVd(tagName, props, children);\n };\n\n const IMG = karas.inject.IMG;\n const INIT = karas.inject.INIT;\n const LOADING = karas.inject.LOADING;\n const LOADED = karas.inject.LOADED;\n\n karas.inject.checkSupportFontFamily = () => false\n\n karas.inject.measureImg = function(url, cb, options = {}) {\n if(url.indexOf('data:') === 0) {\n let { width = {}, height = {} } = options;\n cb({\n success: true,\n width: width.value,\n height: height.value,\n url,\n source: url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb(cache);\n }\n else if(cache.state === LOADING) {\n cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cache.task.push(cb);\n my.getImageInfo({\n src: url,\n success: function(res) {\n cache.state = LOADED;\n cache.success = true;\n cache.width = res.width;\n cache.height = res.height;\n cache.source = url;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n },\n fail: function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n },\n });\n }\n };\n\n karas.inject.isDom = function(o) {\n return o && (o.getContext || o.arc);\n }\n\n karas.inject.hasCacheCanvas = function(key) {\n return key && CANVAS.hasOwnProperty(key);\n };\n karas.inject.getCacheCanvas = function(w, h, key, message) {\n if(message) {\n key = message;\n }\n // console.log(message,CANVAS);\n if(!CANVAS[key]) {\n throw new Error('Need a cache canvas');\n }\n let o = CANVAS[key];\n return {\n ctx: o,\n canvas: o,\n draw() {\n o.draw(true);\n },\n };\n };\n karas.inject.setCacheCanvas = function(k, v) {\n CANVAS[k] = v;\n };\n\n karas.inject.releaseCacheCanvas = function(o) {\n CANVAS_LIST.push(o);\n };\n\n karas.inject.delCacheCanvas = function(key) {\n key && delete CANVAS[key];\n };\n}\n","const CANVAS = {};\nconst CANVAS_LIST = [];\n\nexport default function injectCanvas1(karas, createVd, Root) {\n class newRoot extends Root {\n refresh(cb, isFirst) {\n let self = this;\n let ctx = self.ctx;\n // 小程序bug,可能restore失败,刷新前手动restore下\n ctx.restore();\n\n function wrap() {\n ctx.draw && ctx.draw(false, function() {\n self.emit('myRefresh');\n });\n }\n\n super.refresh(wrap, isFirst);\n }\n }\n\n karas.createVd = function(tagName, props, children) {\n if(['canvas', 'svg'].indexOf(tagName) > -1) {\n return new newRoot(tagName, props, children);\n }\n return createVd(tagName, props, children);\n };\n\n const IMG = karas.inject.IMG;\n const INIT = karas.inject.INIT;\n const LOADING = karas.inject.LOADING;\n const LOADED = karas.inject.LOADED;\n\n karas.inject.checkSupportFontFamily = () => false\n\n karas.inject.measureImg = function(url, cb, optinos = {}) {\n if(url.indexOf('data:') === 0) {\n let { width = {}, height = {} } = optinos;\n cb({\n success: true,\n width: width.value,\n height: height.value,\n url,\n source: url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb(cache);\n }\n else if(cache.state === LOADING) {\n cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cache.task.push(cb);\n my.getImageInfo({\n src: url,\n success: function(res) {\n cache.state = LOADED;\n cache.success = true;\n cache.width = res.width;\n cache.height = res.height;\n cache.source = url;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n },\n fail: function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n },\n });\n }\n };\n\n karas.inject.isDom = function(o) {\n return o && (o.getContext || o.arc);\n }\n\n karas.inject.hasCacheCanvas = function(key) {\n return key && CANVAS.hasOwnProperty(key);\n };\n karas.inject.getCacheCanvas = function(w, h, key, message) {\n if(message) {\n key = message;\n }\n // console.log(message,CANVAS);\n if(!CANVAS[key]) {\n throw new Error('Need a cache canvas');\n }\n let o = CANVAS[key];\n return {\n ctx: o,\n canvas: o,\n draw() {\n o.draw(false);\n },\n };\n };\n karas.inject.setCacheCanvas = function(k, v) {\n CANVAS[k] = v;\n };\n\n karas.inject.releaseCacheCanvas = function(o) {\n CANVAS_LIST.push(o);\n };\n\n karas.inject.delCacheCanvas = function(key) {\n key && delete CANVAS[key];\n };\n}\n","import karas from 'karas';\n\nfunction recursion(dom, hash) {\n if(dom.tagName === 'img') {\n if(dom.src) {\n hash[dom.src] = true;\n }\n }\n else if(Array.isArray(dom.children)) {\n dom.children.forEach(item => {\n recursion(item, hash);\n });\n }\n let backgroundImage = dom.currentStyle[karas.enums.STYLE_KEY.BACKGROUND_IMAGE];\n if(backgroundImage && /url/i.test(backgroundImage)) {\n let url = /url(\\([^)]+\\))/.exec(backgroundImage);\n if(url) {\n hash[url[1]] = true;\n }\n }\n}\n\nconst IMG_COUNTER = {};\n\nexport default function() {\n class Root extends karas.Root {\n appendTo(dom) {\n if(dom && dom.getContext) {\n this.__dom = dom;\n this.__ctx = dom.getContext('2d');\n }\n else {\n this.__dom = dom.canvas;\n this.__ctx = dom;\n }\n this.__children = karas.builder.initRoot(this.__cd, this);\n this.__initProps();\n this.__root = this;\n this.cache = !!this.props.cache;\n this.__refreshLevel = karas.refresh.level.REFLOW;\n this.__renderMode = karas.mode.CANVAS;\n this.__defs = {\n clear() {},\n };\n this.refresh(null, true);\n if(this.__dom.__root) {\n this.__dom.__root.destroy();\n }\n this.__dom.root = this;\n // 收集img\n let imgHash = {};\n recursion(this, imgHash);\n let imgList = [];\n Object.keys(imgHash).forEach(url => {\n imgList.push(url);\n IMG_COUNTER[url] = IMG_COUNTER[url] || 0;\n IMG_COUNTER[url]++;\n });\n this.__imgList = imgList;\n }\n\n refresh(cb, isFirst) {\n let self = this;\n\n function wrap() {\n self.emit('myRefresh');\n }\n\n super.refresh(wrap, isFirst);\n }\n\n __destroy() {\n super.__destroy();\n if(Array.isArray(this.__imgList)) {\n this.__imgList.forEach(url => {\n if(IMG_COUNTER[url]) {\n IMG_COUNTER[url]--;\n }\n if(!IMG_COUNTER[url]) {\n delete karas.inject.IMG[url];\n }\n });\n }\n }\n }\n\n // Root引用指过来\n let createVd = karas.createVd;\n karas.createVd = function(tagName, props, children) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n return createVd(tagName, props, children);\n };\n\n const IMG = karas.inject.IMG;\n const INIT = karas.inject.INIT;\n const LOADING = karas.inject.LOADING;\n const LOADED = karas.inject.LOADED;\n\n karas.inject.measureImg = function(url, cb, optinos = {}) {\n let { width = 0, height = 0, ctx } = optinos;\n\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb(cache);\n }\n else if(cache.state === LOADING) {\n cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cache.task.push(cb);\n // base64特殊处理\n if(url.indexOf('data:') === 0) {\n let img = ctx.canvas.createImage();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = width || img.width;\n cache.height = height || img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n img.onload = null;\n img.onerror = null;\n };\n img.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.width = width || img.width;\n cache.height = height || img.height;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n img.onload = null;\n img.onerror = null;\n };\n img.src = url;\n return;\n }\n my.getImageInfo({\n src: url,\n success: function(res) {\n let img = ctx.canvas.createImage();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = res.width || img.width;\n cache.height = res.height || img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n img.onload = null;\n img.onerror = null;\n };\n img.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.width = res.width || img.width;\n cache.height = res.height || img.height;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n img.onload = null;\n img.onerror = null;\n };\n img.src = url;\n },\n fail: function() {\n let img = ctx.canvas.createImage();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n img.onload = null;\n img.onerror = null;\n };\n img.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.width = img.width;\n cache.height = img.height;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n img.onload = null;\n img.onerror = null;\n };\n img.src = url;\n // cache.state = LOADED;\n // cache.success = false;\n // cache.url = url;\n // let list = cache.task.splice(0);\n // list.forEach(cb => cb(cache));\n },\n });\n }\n };\n\n karas.inject.isDom = function(o) {\n return o && (o.getContext || o.arc);\n }\n\n const CANVAS = {};\n const CANVAS_LIST = [];\n const WEBGL_LIST = [];\n\n function cache(key, width, height, hash, message) {\n let o;\n if(!key) {\n let target = hash === CANVAS ? CANVAS_LIST : WEBGL_LIST;\n if(target.length) {\n o = target.pop();\n }\n else {\n if(my.createOffscreenCanvas) {\n o = my.createOffscreenCanvas(width, height);\n }\n else {\n o = my._createOffscreenCanvas(width, height);\n }\n }\n }\n else if(!hash[key]) {\n if(my.createOffscreenCanvas) {\n o = hash[key] = my.createOffscreenCanvas(width, height);\n }\n else {\n o = hash[key] = my._createOffscreenCanvas(width, height);\n }\n }\n else {\n o = hash[key];\n }\n o.width = width;\n o.height = height;\n return {\n canvas: o,\n ctx: hash === CANVAS ? o.getContext('2d')\n : (o.getContext('webgl') || o.getContext('experimental-webgl')),\n draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\n available: true,\n release() {\n if(!key) {\n if(hash === CANVAS) {\n CANVAS_LIST.push(this.canvas);\n }\n else {\n WEBGL_LIST.push(this.canvas);\n }\n }\n this.canvas = null;\n this.ctx = null;\n },\n };\n }\n\n function cacheCanvas(key, width, height, message) {\n return cache(key, width, height, CANVAS, message);\n }\n\n karas.inject.hasCacheCanvas = function(key) {\n return key && CANVAS.hasOwnProperty(key);\n };\n\n karas.inject.getCacheCanvas = function(width, height, key, message) {\n return cacheCanvas(key, width, height, message);\n };\n\n karas.inject.releaseCacheCanvas = function(o) {\n CANVAS_LIST.push(o);\n };\n\n karas.inject.delCacheCanvas = function(key) {\n key && delete CANVAS[key];\n };\n};\n","import karas from 'karas';\nimport { version } from '../package.json';\nimport { isFunction } from './util';\nimport injectCanvas1 from './canvas1';\nimport injectCanvas1n from './canvas1n';\nimport injectCanvas2 from './canvas2';\n\nkaras.inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, 1000 / 60);\n};\n\nkaras.myVersion = version;\n\nclass Root extends karas.Root {\n static __isCanvas2 = false;\n\n // 需要小程序内部监听事件手动调用\n onEvent(e) {\n this.__wrapEvent(e, data => {\n this.__emitEvent(data);\n });\n }\n\n __wrapEvent(e, cb) {\n const id = this.__ctx?.id || this.__dom?.id;\n id && my.createSelectorQuery().select(`#${id}`).boundingClientRect().exec(ret => {\n let x, y;\n\n if(ret && ret[0] && e.detail) {\n const { clientX, clientY, x: ox, y: oy } = e.detail;\n const { left, top, width, height } = ret[0];\n const { __scx, __scy } = this;\n\n x = ox ?? clientX - left;\n y = oy ?? clientY - top;\n\n if(!karas.util.isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.width / width;\n }\n if(!karas.util.isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.height / height;\n }\n }\n cb({\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n },\n preventDefault() {\n },\n x,\n y,\n __hasEmitted: false,\n });\n });\n }\n\n appendTo(dom) {\n if(isFunction(dom.getContext)) {\n if(Root.__isCanvas2) {\n karas.inject.requestAnimationFrame = dom.requestAnimationFrame.bind(dom) || karas.inject.requestAnimationFrame;\n }\n this.__dom = dom;\n this.__ctx = dom.getContext('2d');\n }\n else {\n this.__dom = {};\n this.__ctx = dom;\n }\n this.__children = karas.builder.initRoot(this.__cd, this);\n this.__initProps();\n this.__root = this;\n this.__refreshLevel = karas.refresh.level.REFLOW;\n this.__renderMode = karas.mode.CANVAS;\n this.__defs = {\n clear() {\n },\n };\n this.refresh(null, true);\n if(this.__dom.__root) {\n this.__dom.__root.destroy();\n }\n this.__dom.__root = this;\n }\n}\n\nconst createVd = karas.createVd;\n\nlet injected = false;\ninjectCanvas1(karas, createVd, Root);\n\nexport function setCanvasType(type) {\n // 只允许注入一次\n if(injected) {\n return;\n }\n injected = true;\n if(type === 'canvas2') {\n Root.__isCanvas2 = true;\n injectCanvas2(karas, createVd, Root);\n }\n else if(type === 'canvas1n') {\n Root.__isCanvas1n = true;\n injectCanvas1n(karas, createVd, Root);\n }\n}\n\nexport default karas;\n"],"names":["toString","isFunction","obj","call","CANVAS","injectCanvas1","karas","createVd","Root","newRoot","cb","isFirst","self","ctx","restore","wrap","draw","emit","tagName","props","children","indexOf","IMG","inject","INIT","LOADING","LOADED","checkSupportFontFamily","measureImg","url","options","width","height","success","value","source","cache","state","task","push","my","getImageInfo","src","res","list","splice","forEach","fail","isDom","o","getContext","arc","hasCacheCanvas","key","hasOwnProperty","getCacheCanvas","w","h","message","Error","canvas","setCacheCanvas","k","v","releaseCacheCanvas","CANVAS_LIST","delCacheCanvas","optinos","recursion","dom","hash","Array","isArray","item","backgroundImage","currentStyle","enums","STYLE_KEY","BACKGROUND_IMAGE","test","exec","IMG_COUNTER","__dom","__ctx","__children","builder","initRoot","__cd","__initProps","__root","__refreshLevel","refresh","level","REFLOW","__renderMode","mode","__defs","clear","destroy","root","imgHash","imgList","Object","keys","__imgList","img","createImage","onload","onerror","WEBGL_LIST","target","length","pop","createOffscreenCanvas","_createOffscreenCanvas","available","release","cacheCanvas","requestAnimationFrame","setTimeout","myVersion","version","e","__wrapEvent","data","__emitEvent","id","createSelectorQuery","select","boundingClientRect","ret","x","y","detail","clientX","clientY","ox","oy","left","top","__scx","__scy","util","isNil","event","stopPropagation","__stopPropagation","stopImmediatePropagation","__stopImmediatePropagation","preventDefault","__hasEmitted","__isCanvas2","bind","injected","setCanvasType","type","injectCanvas2","__isCanvas1n","injectCanvas1n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,QAAQ,GAAG,GAAGA,QAApB;AAEA,EAAO,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAASC,GAAT,EAAc;EACtC,SAAOF,QAAQ,CAACG,IAAT,CAAcD,GAAd,MAAuB,2BAAvB,IAAsDF,QAAQ,CAACG,IAAT,CAAcD,GAAd,MAAuB,mBAApF;EACD,CAFM;;ECFP,IAAME,MAAM,GAAG,EAAf;AACA,EAEe,SAASC,aAAT,CAAuBC,KAAvB,EAA8BC,QAA9B,EAAwCC,IAAxC,EAA8C;EAAA,MACrDC,OADqD;EAAA;;EAAA;;EAAA;EA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