@antv/l7-core
Advanced tools
Comparing version 2.19.7 to 2.19.8
@@ -36,10 +36,10 @@ import container, { createLayerContainer, createSceneContainer, lazyInject, lazyMultiInject } from './inversify.config'; | ||
export * from './services/source/ISourceService'; | ||
export { container, createSceneContainer, createLayerContainer, | ||
export { BasePostProcessingPass, | ||
/** | ||
* lazy inject,供各个 Layer 使用 | ||
* 各个 Service 接口标识符 | ||
*/ | ||
lazyInject, lazyMultiInject, | ||
TYPES, container, createLayerContainer, createSceneContainer, | ||
/** | ||
* 各个 Service 接口标识符 | ||
* lazy inject,供各个 Layer 使用 | ||
*/ | ||
TYPES, packCircleVertex, BasePostProcessingPass, }; | ||
lazyInject, lazyMultiInject, packCircleVertex, }; |
@@ -36,10 +36,10 @@ import container, { createLayerContainer, createSceneContainer, lazyInject, lazyMultiInject } from "./inversify.config"; | ||
export * from "./services/source/ISourceService"; | ||
export { container, createSceneContainer, createLayerContainer, | ||
export { BasePostProcessingPass, | ||
/** | ||
* lazy inject,供各个 Layer 使用 | ||
* 各个 Service 接口标识符 | ||
*/ | ||
lazyInject, lazyMultiInject, | ||
TYPES, container, createLayerContainer, createSceneContainer, | ||
/** | ||
* 各个 Service 接口标识符 | ||
* lazy inject,供各个 Layer 使用 | ||
*/ | ||
TYPES, packCircleVertex, BasePostProcessingPass }; | ||
lazyInject, lazyMultiInject, packCircleVertex }; |
@@ -16,4 +16,3 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
import { LRUCache } from '@antv/l7-utils'; | ||
// @ts-ignore | ||
import TinySDF from '@mapbox/tiny-sdf'; | ||
import TinySDF from "./tiny_sdf"; | ||
import { EventEmitter } from 'eventemitter3'; | ||
@@ -265,6 +264,12 @@ import { injectable } from 'inversify'; | ||
if (sdf) { | ||
var tinySDF = new TinySDF(fontSize, buffer, radius, cutoff, fontFamily, fontWeight); | ||
var tinySDF = new TinySDF({ | ||
fontSize: fontSize, | ||
buffer: buffer, | ||
radius: radius, | ||
cutoff: cutoff, | ||
fontFamily: fontFamily, | ||
fontWeight: fontWeight | ||
}); | ||
// used to store distance values from tinySDF | ||
// tinySDF.size equals `fontSize + buffer * 2` | ||
var imageData = ctx.getImageData(0, 0, tinySDF.size, tinySDF.size); | ||
var _iterator = _createForOfIteratorHelper(characterSet), | ||
@@ -275,15 +280,15 @@ _step; | ||
var char = _step.value; | ||
var iconData = void 0; | ||
if (iconfont) { | ||
// @ts-ignore | ||
// const icon = eval( | ||
// '("' + char.replace('&#x', '\\u').replace(';', '') + '")', | ||
// ); | ||
var icon = String.fromCharCode(parseInt(char.replace('&#x', '').replace(';', ''), 16)); | ||
var iconData = tinySDF.draw(icon); | ||
populateAlphaChannel(iconData, imageData); | ||
iconData = tinySDF.draw(icon); | ||
} else { | ||
populateAlphaChannel(tinySDF.draw(char), imageData); | ||
iconData = tinySDF.draw(char); | ||
} | ||
// populateAlphaChannel(tinySDF.draw(char), imageData); | ||
var _iconData = iconData, | ||
data = _iconData.data, | ||
width = _iconData.width, | ||
height = _iconData.height; | ||
var imageData = ctx.getImageData(0, 0, width, height); | ||
populateAlphaChannel(data, imageData); | ||
@@ -290,0 +295,0 @@ // 考虑到描边,需要保留 sdf 的 buffer,不能像 deck.gl 一样直接减去 |
@@ -14,2 +14,3 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
import { gl } from "../gl"; | ||
/** | ||
@@ -16,0 +17,0 @@ * ported from Three.js EffectComposer |
@@ -25,4 +25,4 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
import { TYPES } from "../../../types"; | ||
import { PassType } from "../IMultiPassRenderer"; | ||
import { gl } from "../gl"; | ||
import { PassType } from "../IMultiPassRenderer"; | ||
import BaseNormalPass from "./BaseNormalPass"; | ||
@@ -29,0 +29,0 @@ |
@@ -17,3 +17,3 @@ "use strict"; | ||
var _l7Utils = require("@antv/l7-utils"); | ||
var _tinySdf = _interopRequireDefault(require("@mapbox/tiny-sdf")); | ||
var _tiny_sdf = _interopRequireDefault(require("./tiny_sdf")); | ||
var _eventemitter = require("eventemitter3"); | ||
@@ -23,3 +23,3 @@ var _inversify = require("inversify"); | ||
var _font_util = require("../../utils/font_util"); | ||
var _dec, _class; // @ts-ignore | ||
var _dec, _class; | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
@@ -280,6 +280,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
if (sdf) { | ||
var tinySDF = new _tinySdf.default(fontSize, buffer, radius, cutoff, fontFamily, fontWeight); | ||
var tinySDF = new _tiny_sdf.default({ | ||
fontSize: fontSize, | ||
buffer: buffer, | ||
radius: radius, | ||
cutoff: cutoff, | ||
fontFamily: fontFamily, | ||
fontWeight: fontWeight | ||
}); | ||
// used to store distance values from tinySDF | ||
// tinySDF.size equals `fontSize + buffer * 2` | ||
var imageData = ctx.getImageData(0, 0, tinySDF.size, tinySDF.size); | ||
var _iterator = _createForOfIteratorHelper(characterSet), | ||
@@ -290,15 +296,15 @@ _step; | ||
var char = _step.value; | ||
var iconData = void 0; | ||
if (iconfont) { | ||
// @ts-ignore | ||
// const icon = eval( | ||
// '("' + char.replace('&#x', '\\u').replace(';', '') + '")', | ||
// ); | ||
var icon = String.fromCharCode(parseInt(char.replace('&#x', '').replace(';', ''), 16)); | ||
var iconData = tinySDF.draw(icon); | ||
populateAlphaChannel(iconData, imageData); | ||
iconData = tinySDF.draw(icon); | ||
} else { | ||
populateAlphaChannel(tinySDF.draw(char), imageData); | ||
iconData = tinySDF.draw(char); | ||
} | ||
// populateAlphaChannel(tinySDF.draw(char), imageData); | ||
var _iconData = iconData, | ||
data = _iconData.data, | ||
width = _iconData.width, | ||
height = _iconData.height; | ||
var imageData = ctx.getImageData(0, 0, width, height); | ||
populateAlphaChannel(data, imageData); | ||
@@ -305,0 +311,0 @@ // 考虑到描边,需要保留 sdf 的 buffer,不能像 deck.gl 一样直接减去 |
@@ -23,4 +23,4 @@ "use strict"; | ||
var _types = require("../../../types"); | ||
var _IMultiPassRenderer = require("../IMultiPassRenderer"); | ||
var _gl = require("../gl"); | ||
var _IMultiPassRenderer = require("../IMultiPassRenderer"); | ||
var _BaseNormalPass2 = _interopRequireDefault(require("./BaseNormalPass")); | ||
@@ -27,0 +27,0 @@ var _dec, _dec2, _class, _class2, _descriptor; |
{ | ||
"name": "@antv/l7-core", | ||
"version": "2.19.7", | ||
"version": "2.19.8", | ||
"description": "", | ||
@@ -28,5 +28,5 @@ "main": "lib/index.js", | ||
"@antv/async-hook": "^2.2.9", | ||
"@antv/l7-utils": "2.19.7", | ||
"@antv/l7-utils": "2.19.8", | ||
"@babel/runtime": "^7.7.7", | ||
"@mapbox/tiny-sdf": "^1.2.5", | ||
"@mapbox/tiny-sdf": "^2.0.6", | ||
"@turf/helpers": "^6.1.4", | ||
@@ -51,3 +51,3 @@ "ajv": "^6.10.2", | ||
}, | ||
"gitHead": "6199318706a4a9a4a29a886123d8bbdcb50b1501", | ||
"gitHead": "9111d4c9dcbeca5df641a994215c062e5b209311", | ||
"publishConfig": { | ||
@@ -54,0 +54,0 @@ "access": "public" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
993221
284
20986
+ Added@antv/l7-utils@2.19.8(transitive)
+ Added@mapbox/tiny-sdf@2.0.6(transitive)
- Removed@antv/l7-utils@2.19.7(transitive)
- Removed@mapbox/tiny-sdf@1.2.5(transitive)
Updated@antv/l7-utils@2.19.8
Updated@mapbox/tiny-sdf@^2.0.6