-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[PointCloudShading] when eyeDomeLighting is turned on, the page will flicker and changes to black. #12535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
I loaded over 20 sets of point cloud data of transmission lines at one time. |
|
@ggetz Cesium.Ion.defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MWEyNWI4NS02ZWVmLTQyZTEtOTRjZi02NjljOWNhOWViNGEiLCJpZCI6MTQwNTg1LCJpYXQiOjE3MzYzNjg4OTR9.rIAEC387JLBYOPt3w1fliKTWZgTGCQYJlG8o5HJsTwY";
const viewer = new Cesium.Viewer("cesiumContainer");
const tiles = [
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
"http://192.168.10.128:42225/distribution/model/klwsoeqnw5ot/tileset.json",
];
function updateOffset(tileset, index) {
let offset = new Cesium.Cartesian3(0, 280 * index, 0);
let modelMatrix = tileset.root.transform;
let worlOffset = Cesium.Matrix4.multiplyByPoint(
modelMatrix,
offset,
new Cesium.Cartesian3(),
);
let newModelMatrix = new Cesium.Matrix4();
Cesium.Matrix4.setTranslation(modelMatrix, worlOffset, newModelMatrix);
tileset.root.transform = newModelMatrix;
}
function getStyle() {
return new Cesium.Cesium3DTileStyle({
show: "true",
color: "color('#ffffff')",
pointSize: 3,
});
}
function setPointCloudShading(pointCloudShading) {
pointCloudShading.eyeDomeLighting = true;
pointCloudShading.geometricErrorScale = 0.1;
pointCloudShading.eyeDomeLightingStrength = 2.5;
pointCloudShading.eyeDomeLightingRadius = 2.2;
pointCloudShading.attenuation = true;
pointCloudShading.maximumAttenuation = 2;
pointCloudShading.baseResolution = 0.05;
pointCloudShading.usePointSize = true;
pointCloudShading.circlePoint = true;
}
async function loadTileset() {
for (let i = 0; i < 20; i++) {
const tileset = await Cesium.Cesium3DTileset.fromUrl(tiles[i], {});
viewer.scene.primitives.add(tileset);
tileset.style = getStyle();
const { pointCloudShading } = tileset;
setPointCloudShading(pointCloudShading);
console.log(tileset);
if (i === 0) {
viewer.flyTo(tileset);
}
setTimeout(() => {
updateOffset(tileset, i);
}, 2000);
}
}
try {
loadTileset();
} catch (error) {
console.log(`Error loading tileset: ${error}`);
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What happened?
When the point cloud data is initially loaded on the page, and eyeDomeLighting is turned on, the page will flicker and changes to black.
This issue didn't occur in version 120, but it appeared in both versions 124 and 125.
Reproduction steps
...
Sandcastle example
No response
Environment
Browser: Chrome
CesiumJS Version: 1.124, 1.25
Operating System: win 10 gtx3060 12g 11-i7
The text was updated successfully, but these errors were encountered: