update three

This commit is contained in:
thinkinggis 2019-02-27 16:44:33 +08:00
parent 00d58a03c5
commit 5362965dee
10 changed files with 6 additions and 90 deletions

View File

@ -7,3 +7,4 @@ node_modules/
demos/assets/
demos/index.html
demos/*
src/core/three.js

View File

@ -3,13 +3,14 @@ module.exports = {
babelrc: {
presets: [
"@babel/preset-env"
]
],
},
extensions: ['.js'],
include: [
'src/**/*.js',
'test/**/*.js',
'node_modules/_three@0.96.0@three/**/*.js',
'node_modules/_three@0.101.1@three/**/*.js',
'node_modules/three/**/*.js',
'node_modules/simple-statistics/src/*.js'
],
exclude: [

View File

@ -109,7 +109,7 @@
"polyline-normals": "^2.0.2",
"rbush": "^2.0.2",
"simple-statistics": "^7.0.1",
"three": "^0.96.0",
"three": "^0.101.1",
"venn.js": "^0.2.20",
"viewport-mercator-project": "^5.2.0",
"webworkify-webpack": "^2.1.3",

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,3 @@
import { polygonPath } from '../../shape/path';
import { fill } from '../../shape/polygon';
export default function hexagonBuffer(layerData) {
const attribute = {

View File

@ -6,7 +6,7 @@ export default function NormalBuffer(layerData) {
pickingIds: []
};
layerData.forEach(item => {
const { color, size, id, coordinates} = item;
const { color, size, id, coordinates } = item;
attributes.vertices.push(...coordinates);
attributes.colors.push(...color);
attributes.pickingIds.push(id);

View File

@ -36,7 +36,6 @@ export default class HeatMapLayer extends Layer {
};
const Mesh = new DrawHexagon(this._buffer, config);
this.add(Mesh);
}
_drawGrid() {
this.type = 'heatmap';

View File

@ -11,7 +11,6 @@ export default class LineLayer extends Layer {
render() {
this.type = 'polyline';
this.init();
const source = this.layerSource;
const layerData = this.layerData;
const style = this.get('styleOptions');
const buffer = this._buffer = new LineBuffer({

View File

@ -37,7 +37,6 @@ export default class PointLayer extends Layer {
this._textPoint();
return;
}
const source = this.layerSource;
const style = this.get('styleOptions');
const pointShapeType = this._getShape();
@ -98,7 +97,6 @@ export default class PointLayer extends Layer {
}
_textPoint() {
const source = this.layerSource;
const styleOptions = this.get('styleOptions');
const buffer = new TextBuffer({
type: this.shapeType,

View File

@ -5,12 +5,6 @@ import * as statistics from './statistics';
const R_EARTH = 6378000;
/**
* 计算方格密度图
* @param {*} data 经纬度数据 和属性数据
* @param {*} size 半径大小 单位 km
* @return
*/
export function aggregatorToGrid(data, option) {
const dataArray = data.dataArray;
const { size = 10 } = option;