maptalks / maptalks/issues

3d-extrusion 的海拔和height违反直觉

Open
#694 0 comments 0 reactions 1 assignee View on GitHub

@fuzhenn is already working on this.

Since Jun 19, 2024.

vt
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

用户如果想悬空3d-extrusion,altitude和height的设计违反人的直觉

- 目前需要绕个弯来解决这个问题,即悬空高度=altitude-height
- 应该设计成 altitude即使悬空的高度,height为拔高的高度

```js
const dataConfig = {
type: '3d-extrusion',
altitudeProperty: 'altitude',
heightProperty:'height',
altitudeScale: 5,
defaultAltitude: 0,
top: true,
side: true,
// sideVerticalUVMode: 1
// textureYOrigin: 'bottom'
};

```

建议添加新的字段来解决这个问题:

```js
const dataConfig = {
type: '3d-extrusion',
altitudeAttribute: 'altitude',
heightAttribute:'height',
altitudeScale: 5,
defaultAltitude: 0,
top: true,
side: true,
// sideVerticalUVMode: 1
// textureYOrigin: 'bottom'
};

```
当用户设置了新的字段时,用新的方法来处理,老的字段就用老的方式处理

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.