mirror of https://gitee.com/antv-l7/antv-l7
refactor source
This commit is contained in:
parent
19ff35a71a
commit
42fa9363a3
|
@ -1,4 +1,4 @@
|
|||
import * as THREE from '../../core/three';
|
||||
|
||||
import Material from './material';
|
||||
import { getModule } from '../../util/shaderModule';
|
||||
export default class PointMaterial extends Material {
|
||||
|
@ -26,7 +26,7 @@ export default class PointMaterial extends Material {
|
|||
this.vertexShader = vs;
|
||||
this.fragmentShader = fs;
|
||||
this.transparent = true;
|
||||
if (!this.uniforms.shape) { this.blending = THREE.AdditiveBlending; }
|
||||
// if (!this.uniforms.shape) { this.blending = THREE.AdditiveBlending; }
|
||||
if (this.uniforms.u_texture) {
|
||||
this.defines.TEXCOORD_0 = true;
|
||||
}
|
||||
|
|
|
@ -90,8 +90,8 @@ export default class TileLayer extends Layer {
|
|||
const zoom = Math.floor(this.scene.getZoom()) - 1;
|
||||
const minZoom = this.get('minZoom');
|
||||
const maxZoom = this.get('maxZoom');
|
||||
const minSourceZoom = this.get('minSourceZoom');
|
||||
const maxSourceZoom = this.get('maxSourceZoom');
|
||||
const minSourceZoom = this.tileSource.get('minSourceZoom');
|
||||
const maxSourceZoom = this.tileSource.get('maxSourceZoom');
|
||||
const currentZoom = this.scene.getZoom();
|
||||
this.tileZoom = zoom > maxSourceZoom ? maxSourceZoom : zoom;
|
||||
if (currentZoom < minZoom || currentZoom >= maxZoom || currentZoom < minSourceZoom) {
|
||||
|
|
|
@ -55,7 +55,7 @@ export default class VectorTile extends Tile {
|
|||
context.disable(context.STENCIL_TEST);
|
||||
};
|
||||
this._object3D.add(this.mesh);
|
||||
} else {
|
||||
} else { // 如果是热力图
|
||||
this._object3D = this.mesh;
|
||||
}
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -78,7 +78,7 @@ export default class TileSource extends Source {
|
|||
});
|
||||
}
|
||||
tileDestroy(tile) {
|
||||
if (!tile || !tile.data || tile.loading) {
|
||||
if (!tile || !tile.data || tile.loading || !tile.data.data.dataArray) {
|
||||
return;
|
||||
}
|
||||
const tileData = tile.data;
|
||||
|
|
Loading…
Reference in New Issue