CesiumGS / CesiumGS/cesium

[Cesium3DTileStyleEngine] Missing support of access to values which are not in batch table, but present

Open
#4,654 4 comments 0 reactions 0 assignees View on GitHub
category - 3d tiles priority - high type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

It is currently not possible to access coordinates from a Cesium3DTileStyle.

An example would be:
```
tileset.style = new Cesium3DTileStyle({
"color" : {
"conditions" : [
["(${x} < ${offset} || ${x} > ${offset} + ${maxHeight})", "rgb(255, 255, 255)"],
[true, "rgb((${x} - ${offset})/${maxHeight}, 230, 230)"],
]
}
});
```

It would be also nice if you have access to BoundingBoxes and other properties of a tileset, so a support of following attributes would be nice:
* x/y/z
* bounding box of current tile
* bounding box of root tileset
* level in tree of current tile, starting from root tileset

Contributor guide

Open the contributing guide

Research direction

Start with the Cesium3DTileStyleEngine and Cesium3DTileStyle entry points, then trace how style expressions currently access batch-table values. Clarify the scope for coordinates, current and root tile bounding boxes, and tree level; done means the agreed attributes can be used in the listed style conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.