Skip to content

Commit

Permalink
fix(site): megre conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lzxue committed Nov 22, 2019
2 parents 661c8e1 + 224e98e commit 23211d0
Show file tree
Hide file tree
Showing 19 changed files with 73 additions and 80 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ public

yarn.lock
package-lock.json
git_log.sh
8 changes: 4 additions & 4 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ L7 是由蚂蚁金服 AntV 数据可视化团队推出的基于 WebGL 的开源

## 核心特性

### 🌏 数据驱动可视化展示
🌏 数据驱动可视化展示

数据驱动,从数到形,支持丰富的地图可视化类型,更好洞察数据。

### 🌏 2D,3D 一体化的海量数据高性能渲染
🌏 2D,3D 一体化的海量数据高性能渲染

百万级空间数据实时,动态渲染。

### 🌏简单灵活的数据接入
🌏 简单灵活的数据接入

支持CSV,JSON,geojson等数据格式接入,可以根据需求自定义数据格式,无需复杂的空间数据转换。

### 🌏 多地图底图支持,支持离线内网部署
🌏 多地图底图支持,支持离线内网部署

高德地图国内合法合规的地理底图,Mapbox 满足国际化业务需求。

Expand Down
44 changes: 22 additions & 22 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import alias from '@rollup/plugin-alias';
import json from '@rollup/plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import { terser } from "rollup-plugin-terser";
import { terser } from 'rollup-plugin-terser';
import analyze from 'rollup-plugin-analyzer';
import babel from 'rollup-plugin-babel';
import glsl from './rollup-plugin-glsl';
import postcss from 'rollup-plugin-postcss';
import url from 'postcss-url';

function resolveFile(filePath) {
return path.join(__dirname, '..', filePath)
return path.join(__dirname, '..', filePath);
}

module.exports = [
Expand All @@ -22,39 +22,39 @@ module.exports = [
format: 'umd',
name: 'L7',
globals: {
'mapbox-gl': 'mapboxgl',
},
'mapbox-gl': 'mapboxgl'
}
},
external: [
'mapbox-gl',
'mapbox-gl'
],
treeshake: true,
plugins: [
alias(
{
resolve: ['.tsx', '.ts'],
resolve: [ '.tsx', '.ts' ],
entries: [
{
find: /^@l7\/(.*)/,
replacement: resolveFile('packages/$1/src'),
},
replacement: resolveFile('packages/$1/src')
}
]
},
}
),
resolve({
browser: true,
preferBuiltins: false,
extensions: ['.js', '.ts'],
extensions: [ '.js', '.ts' ]
}),
glsl(
['**/*.glsl'],
true,
[ '**/*.glsl' ],
true
),
json(),
postcss({
plugins: [
url({ url: 'inline' }),
],
url({ url: 'inline' })
]
}),
// @see https://github.com/rollup/rollup-plugin-node-resolve#using-with-rollup-plugin-commonjs
commonjs({
Expand All @@ -64,23 +64,23 @@ module.exports = [
lodash: [
'isNil',
'uniq',
'clamp',
'clamp',
'isObject',
'isFunction',
'cloneDeep',
'isString',
'isNumber',
],
'isNumber'
]
}
}),
babel({
extensions: ['.js', '.ts'],
extensions: [ '.js', '.ts' ]
}),
terser(),
analyze({
summaryOnly: true,
limit: 20,
}),
],
},
limit: 20
})
]
}
];
2 changes: 1 addition & 1 deletion docs/api/l7.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ L7 是由蚂蚁金服 AntV 数据可视化团队推出的基于 WebGL 的开源

### 技术支持服务群
L7 相关技术问题,需求反馈,我们会及时响应
![地理空间可视化L7支持群](https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*REc9Qrttrg8AAAAAAAAAAABkARQnAQ)
![地理空间可视化L7支持群](https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*ePmsRbK4lZgAAAAAAAAAAABkARQnAQ)
2 changes: 1 addition & 1 deletion docs/api/scene.en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 场景 Scene
title: Scene
order: 1
---

Expand Down
10 changes: 9 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ module.exports = {
slug: '/tutorial',
title: {
zh: '快速入门',
en: 'Quickstart'
en: 'QuickStart'
},
order: 0
},
{
slug: '/tutorial/map',
title: {
zh: '地图',
en: 'MAP'
},
order: 0
},
Expand Down
9 changes: 4 additions & 5 deletions packages/component/src/css/l7.css

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions packages/l7/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@antv/l7",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.7",
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
"main": "dist/bundle.js",
"main": "dist/l7.js",
"sideEffects": true,
"files": [
"dist",
Expand All @@ -18,16 +18,15 @@
"build:esm": "BABEL_ENV=esm babel src --root-mode upward --out-dir es --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
"watch": "BABEL_ENV=cjs babel src --watch --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments"
},
"author": "xiaoiver",
"license": "ISC",
"gitHead": "0563f357f3a07c099bf1ffa9350e6fa3c88353ae",
"author": "antv",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@l7/core": "0.0.1",
"@l7/scene": "0.0.1",
"@l7/layers": "0.0.1",
"@l7/component": "0.0.1"
"@l7/core": "0.0.1",
"@l7/scene": "0.0.1",
"@l7/layers": "0.0.1",
"@l7/component": "0.0.1"
}
}
4 changes: 2 additions & 2 deletions packages/layers/src/core/triangulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export function PointImageTriangulation(feature: IEncodeFeature) {
*/
export function LineTriangulation(feature: IEncodeFeature) {
const { coordinates } = feature;
let path = coordinates;
let path = coordinates as number[][][] | number[][];
if (Array.isArray(path[0][0])) {
path = coordinates[0];
path = coordinates[0] as number[][];
}
const line = getNormals(path as number[][], false, 0);
return {
Expand Down
7 changes: 4 additions & 3 deletions packages/layers/src/line/models/dash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import {
ILayer,
ILayerModel,
IModel,
IModelUniform,
} from '@l7/core';

import BaseModel from '../../core/baseModel';
export default class ArcModel extends BaseModel {
public getUninforms() {
export default class DashModel extends BaseModel {
public getUninforms(): IModelUniform {
throw new Error('Method not implemented.');
}

public buildModels(): IModel[] {
throw new Error('Method not implemented.');
}
private registerBuiltinAttributes() {
protected registerBuiltinAttributes() {
throw new Error('Method not implemented.');
}
}
4 changes: 0 additions & 4 deletions packages/layers/src/point/models/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import {
IModelUniform,
} from '@l7/core';
import BaseModel from '../../core/baseModel';
import { PointExtrudeTriangulation } from '../core/triangulation';
import pointExtrudeFrag from '../shaders/extrude_frag.glsl';
import pointExtrudeVert from '../shaders/extrude_vert.glsl';

export default class ExtrudeModel extends BaseModel {
public getUninforms(): IModelUniform {
throw new Error('Method not implemented.');
Expand Down
5 changes: 2 additions & 3 deletions site/pages/index.zh.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ const IndexPage = () => {
<img
width="100%"
className="Notification-module--number--31-3Z"
style={{ marginLeft: '125px', marginTop: '50px' }}
src="https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*o40BRo-ANLoAAAAAAAAAAABkARQnAQ"
/>
}
Expand All @@ -147,6 +146,6 @@ const IndexPage = () => {
<Companies title={t('感谢信赖')} companies={companies} />
</>
);
}
};

export default IndexPage
export default IndexPage;
4 changes: 2 additions & 2 deletions stories/Layers/components/Arc2DLine.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Arc2DLineLayer } from '@l7/layers';
import { LineLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
import * as React from 'react';

Expand All @@ -21,7 +21,7 @@ export default class Arc2DLineDemo extends React.Component {
style: 'mapbox://styles/mapbox/dark-v9',
zoom: 2,
});
const lineLayer = new Arc2DLineLayer({})
const lineLayer = new LineLayer({})
.source(await response.text(), {
parser: {
type: 'csv',
Expand Down
4 changes: 2 additions & 2 deletions stories/Layers/components/Arcline.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArcLineLayer } from '@l7/layers';
import { LineLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
import * as React from 'react';

Expand All @@ -21,7 +21,7 @@ export default class ArcLineDemo extends React.Component {
style: 'mapbox://styles/mapbox/dark-v9',
zoom: 2,
});
const lineLayer = new ArcLineLayer({})
const lineLayer = new LineLayer({})
.source(await response.text(), {
parser: {
type: 'csv',
Expand Down
4 changes: 2 additions & 2 deletions stories/Layers/components/Point3D.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Point3dLayer } from '@l7/layers';
import { PointLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
import * as React from 'react';
import data from '../data/data.json';
Expand All @@ -18,7 +18,7 @@ export default class Point3D extends React.Component {
style: 'mapbox://styles/mapbox/streets-v9',
zoom: 1,
});
const pointLayer = new Point3dLayer({});
const pointLayer = new PointLayer({});
const p1 = {
type: 'FeatureCollection',
features: [
Expand Down
4 changes: 2 additions & 2 deletions stories/Layers/components/heatMap.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HeatMapLayer } from '@l7/layers';
import { HeatmapLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
// @ts-ignore
import * as React from 'react';
Expand All @@ -22,7 +22,7 @@ export default class HeatMapLayerDemo extends React.Component {
style: 'mapbox://styles/mapbox/dark-v10',
zoom: 2,
});
const layer = new HeatMapLayer({
const layer = new HeatmapLayer({
enableTAA: false,
});
layer
Expand Down
2 changes: 1 addition & 1 deletion stories/Layers/components/heatMapgrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class GridHeatMap extends React.Component {
style: 'mapbox://styles/mapbox/streets-v9',
zoom: 16,
});
const layer = new HeatMapGridLayer({});
const layer = new HeatmapLayer({});
layer
.source(await response.json(), {
parser: {
Expand Down
21 changes: 6 additions & 15 deletions stories/Layers/components/pointImage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PointImageLayer, PointLayer } from '@l7/layers';
import { PointLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
import * as React from 'react';
import data from '../data/data.json';
Expand All @@ -18,8 +18,8 @@ export default class PointImage extends React.Component {
zoom: 15,
id: 'map',
pitch: 0,
type: 'mapbox',
style: 'mapbox://styles/mapbox/streets-v9',
type: 'amap',
style: 'dark',
});
scene.addImage(
'00',
Expand All @@ -33,11 +33,8 @@ export default class PointImage extends React.Component {
'02',
'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*o16fSIvcKdUAAAAAAAAAAABkARQnAQ',
);
this.scene = scene;
scene.on('loaded', () => {
run();
});
const imageLayer = new PointImageLayer({})

const imageLayer = new PointLayer({})
.source(await response.json(), {
parser: {
type: 'json',
Expand All @@ -46,15 +43,9 @@ export default class PointImage extends React.Component {
}
})
.shape('name', ['00', '01', '02'])
.size(60);
.size(30);
scene.addLayer(imageLayer);

function run() {
scene.render();
console.log('render');
requestAnimationFrame(run);
}
this.scene = scene;
}

public render() {
Expand Down
1 change: 0 additions & 1 deletion stories/MapAdaptor/components/Mapbox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-ignore
import '!style-loader!css-loader!./css/l7.css';
import { Marker, Popup, Scale, Zoom } from '@l7/component';
import { PolygonLayer } from '@l7/layers';
// @ts-ignore
Expand Down

0 comments on commit 23211d0

Please sign in to comment.