Skip to content

Commit

Permalink
release 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Jul 28, 2021
1 parent 26f9e53 commit e516a19
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 9 deletions.
62 changes: 56 additions & 6 deletions dist/echarts-gl.js
Original file line number Diff line number Diff line change
Expand Up @@ -25638,9 +25638,6 @@ requestAnimationFrame = (typeof window !== 'undefined'
* (renderer) (renderer)
* / \
* ViewGL ViewGL
*
* @module echarts-gl/core/LayerGL
* @author Yi Shen(http://github.com/pissang)
*/


Expand Down Expand Up @@ -25732,6 +25729,8 @@ var LayerGL = function (id, zr) {
});

this._backgroundColor = null;

this._disposed = false;
};

LayerGL.prototype.setUnpainted = function () {};
Expand Down Expand Up @@ -26048,10 +26047,18 @@ function collectResources(scene, textureResourceList, geometryResourceList) {
* Dispose the layer
*/
LayerGL.prototype.dispose = function () {
if (this._disposed) {
return;
}
this._stopAccumulating();
this.renderer.disposeScene(this.scene);

if (this._textureList) {
markUnused(this._textureList);
markUnused(this._geometriesList);
checkAndDispose(this.renderer, this._textureList);
checkAndDispose(this.renderer, this._geometriesList);
}
this.zr.off('globalout', this.onglobalout);
this._disposed = true;
};

// Event handlers
Expand Down Expand Up @@ -26533,7 +26540,18 @@ EChartsGL.prototype.update = function (ecModel, api) {
// TODO

external_echarts_.registerPostInit(function (chart) {
chart.getZr().painter.getRenderedCanvas = function (opts) {
var zr = chart.getZr();
var oldDispose = zr.painter.dispose;

zr.painter.dispose = function () {
this.eachOtherLayer(function (layer) {
if (layer instanceof core_LayerGL) {
layer.dispose();
}
});
oldDispose.call(this);
}
zr.painter.getRenderedCanvas = function (opts) {
opts = opts || {};
if (this._singleCanvas) {
return this._layers[0].dom;
Expand Down Expand Up @@ -40363,6 +40381,10 @@ ZRTextureAtlasSurface.prototype = {
*/
getCoords: function (id) {
return this._coords[id];
},

dispose: function () {
this._zr.dispose();
}
};

Expand Down Expand Up @@ -41833,6 +41855,8 @@ var Grid3DView_dimIndicesMap = {
dispose: function () {
this.groupGL.removeAll();
this._control.dispose();
this._axisLabelSurface.dispose();
this._axisPointerLabelsSurface.dispose();
}
}));
;// CONCATENATED MODULE: ./node_modules/echarts/lib/coord/cartesian/Cartesian.js
Expand Down Expand Up @@ -51528,6 +51552,10 @@ LabelsBuilder.prototype.updateLabels = function (highlightDataIndices) {
this._labelsMesh.geometry.dirty();
};

LabelsBuilder.prototype.dispose = function () {
this._labelTextureSurface.dispose();
}

/* harmony default export */ const common_LabelsBuilder = (LabelsBuilder);
;// CONCATENATED MODULE: ./src/component/common/Geo3DBuilder.js

Expand Down Expand Up @@ -52282,6 +52310,10 @@ Geo3DBuilder.prototype = {
this._setColorOfDataIndex(data, dataIndex, colorArr);
},

dispose: function () {
this._labelsBuilder.dispose();
},

_setColorOfDataIndex: function (data, dataIndex, colorArr) {
if (dataIndex < this._startIndex && dataIndex > this._endIndex) {
return;
Expand Down Expand Up @@ -52390,6 +52422,7 @@ Geo3DBuilder.prototype = {

dispose: function () {
this._control.dispose();
this._geo3DBuilder.dispose();
}
}));
;// CONCATENATED MODULE: ./node_modules/echarts/lib/coord/geo/fix/textCoord.js
Expand Down Expand Up @@ -56328,6 +56361,7 @@ var Bar3DView_vec3 = dep_glmatrix.vec3;
},

dispose: function () {
this._labelsBuilder.dispose();
this.groupGL.removeAll();
}
}));
Expand Down Expand Up @@ -57453,6 +57487,10 @@ PointsBuilder.prototype = {
this.rootNode.add(this._labelsBuilder.getMesh());
},

dispose: function () {
this._labelsBuilder.dispose();
},

_updateSymbolSprite: function (seriesModel, itemStyle, symbolInfo, dpr) {
symbolInfo.maxSize = Math.min(symbolInfo.maxSize * 2, 200);
var symbolSize = [];
Expand Down Expand Up @@ -57941,6 +57979,9 @@ PointsBuilder.prototype = {
},

dispose: function () {
this._pointsBuilderList.forEach(function (pointsBuilder) {
pointsBuilder.dispose();
});
this.groupGL.removeAll();
},

Expand Down Expand Up @@ -58822,6 +58863,9 @@ external_echarts_.util.merge(Polygons3DSeries.prototype, componentShadingMixin);

dispose: function () {
this.groupGL.removeAll();
this._geo3DBuilderList.forEach(function (geo3DBuilder) {
geo3DBuilder.dispose();
})
}
}));
;// CONCATENATED MODULE: ./src/chart/polygons3D/install.js
Expand Down Expand Up @@ -59854,6 +59898,7 @@ external_echarts_.util.merge(Map3DSeries.prototype, componentShadingMixin);
dispose: function () {
this.groupGL.removeAll();
this._control.dispose();
this._geo3DBuilder.dispose();
}
}));
;// CONCATENATED MODULE: ./src/chart/map3D/install.js
Expand Down Expand Up @@ -60147,6 +60192,9 @@ GLViewHelper.prototype._updateCamera = function (width, height, dpr) {

dispose: function () {
this.groupGL.removeAll();
this._pointsBuilderList.forEach(function (pointsBuilder) {
pointsBuilder.dispose();
});
},

remove: function () {
Expand Down Expand Up @@ -64010,6 +64058,8 @@ var globalLayoutId = 1;

// Stop layout.
this._layoutId = -1;

this._pointsBuilder.dispose();
},

remove: function () {
Expand Down
2 changes: 1 addition & 1 deletion dist/echarts-gl.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/echarts-gl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "echarts-gl",
"description": "Extension pack of ECharts providing 3D plots and globe visualization",
"version": "2.0.6",
"version": "2.0.7",
"maintainers": [
{
"name": "Yi Shen"
Expand Down

0 comments on commit e516a19

Please sign in to comment.