context.js 219 B

1234567891011
  1. var ctx;
  2. /**
  3. * 获取 canvas context
  4. */
  5. export function getCanvasContext() {
  6. if (!ctx) {
  7. ctx = document.createElement('canvas').getContext('2d');
  8. }
  9. return ctx;
  10. }
  11. //# sourceMappingURL=context.js.map