-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore update engine line(finished) (#2130)
* Feat: fillImage&radar update to G-Engine (#2107) * feat: 切换fillImage到G引擎 * feat: 补充上体提交代码 * feat: radar和fillImage支持G引擎(有bug) * fix: 调整radar中uniform块中对象的顺序(遍历时一般按照unicode排序) * fix: 修改radar shader中的拼写错误 --------- Co-authored-by: huyang <[email protected]> * fix: radar 数据映射 * fix: webgl2转webgl时,关键字texture未被替换成texture2D的bug * feat: 删除一些无用代码 * chore: adapter simpleLine to G-Device * fix: 调整uniformBlock中uniform的顺序,避免BaseAlignment规则导致的对齐问题 * chore: 提交例子 * chore: 提交线的例子 * chore: rename fillmage.ts to fillImage.ts * chore: adapter line and linedash to G-device * fix: fillImage中uniform没对齐的bug * chore: update linewall to device Engine * fix: line.ts中uniform顺序不对的问题 * chore: 提取getUninforms到BaseModel中 * chore: 修改例子 * fix: add space before uniform block in shader * fix: flowLine和greatCircle的shader中uniformBlock少一个空格导致的bug * feat: 清空earthArc_3d中的内容,由arc3d接管 * feat: 更新line的demo * Origin/chore update engine line (#2151) * chore: 环境变量设置 renderer * chore: 设置 环境变量 * fix: line location a_DistanceAndIndex * fix: 注释掉点点动画 * fix: 纹理引入 --------- Co-authored-by: taiyuanhy <[email protected]> Co-authored-by: huyang <[email protected]> Co-authored-by: yuqi.pyq <[email protected]>
- Loading branch information
1 parent
26af005
commit 2eecf81
Showing
93 changed files
with
1,135 additions
and
940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
### Line - arc3d_earth | ||
|
||
```tsx | ||
import { Scene, EarthLayer, LineLayer } from '@antv/l7'; | ||
import { Earth } from '@antv/l7-maps'; | ||
import React, { useEffect } from 'react'; | ||
export default () => { | ||
useEffect(() => { | ||
const scene = new Scene({ | ||
id: 'map', | ||
map: new Earth({}), | ||
}); | ||
|
||
// 地球模式下背景色默认为 #000 通过 setBgColor 方法我们可以设置可视化层的背景色 | ||
scene.setBgColor('#333'); | ||
|
||
// const earthlayer = new EarthLayer() | ||
// .source( | ||
// 'https://gw.alipayobjects.com/mdn/rms_23a451/afts/img/A*3-3NSpqRqUoAAAAAAAAAAAAAARQnAQ', | ||
// { | ||
// parser: { | ||
// type: 'image', | ||
// }, | ||
// }, | ||
// ) | ||
// .color('#2E8AE6') | ||
// .shape('fill') | ||
// .style({ | ||
// globalOptions: { | ||
// ambientRatio: 0.6, // 环境光 | ||
// diffuseRatio: 0.4, // 漫反射 | ||
// specularRatio: 0.1, // 高光反射 | ||
// }, | ||
// }) | ||
// .animate(true); | ||
|
||
// const atomLayer = new EarthLayer().color('#2E8AE6').shape('atomSphere'); | ||
|
||
// const bloomLayer = new EarthLayer() | ||
// .color('#fff') | ||
// .shape('bloomSphere') | ||
// .style({ | ||
// opacity: 0.7, | ||
// }); | ||
|
||
scene.on('loaded', () => { | ||
// scene.addLayer(earthlayer); | ||
|
||
// scene.addLayer(atomLayer); | ||
// scene.addLayer(bloomLayer); | ||
|
||
fetch( | ||
'https://gw.alipayobjects.com/os/bmw-prod/20a69b46-3d6d-4ab5-b8b5-150b6aa52c88.json', | ||
) | ||
.then((res) => res.json()) | ||
.then((flydata) => { | ||
const flyLine = new LineLayer({ blend: 'normal' }) | ||
.source(flydata, { | ||
parser: { | ||
type: 'json', | ||
coordinates: 'coord', | ||
}, | ||
}) | ||
.color('#b97feb') | ||
.shape('earthArc3d') | ||
.size(0.5) | ||
.active(true) | ||
.animate({ | ||
interval: 2, | ||
trailLength: 2, | ||
duration: 1, | ||
}) | ||
.style({ | ||
segmentNumber: 60, | ||
globalArcHeight: 20, | ||
}); | ||
scene.addLayer(flyLine); | ||
}); | ||
|
||
// earthlayer.setEarthTime(4.0); | ||
}); | ||
}, []); | ||
return ( | ||
<div | ||
id="map" | ||
style={{ | ||
height: '500px', | ||
position: 'relative', | ||
}} | ||
/> | ||
); | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.