1. A concise explanation of the problem you're experiencing.
Hi,
We're trying to integrate the Transform Editor in our project.
For that we use the 3D model from the following example (https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=3D%20Tiles%20Photogrammetry.html) uploaded on our Cesion.ION account.
My access token / AssetID : { in mp if needed }
Our first problem is that our 3D model is in the air when we try to integrate the Transform editor, and the feature doesn't even appear.
Our second problem is if we move away of the model, the camera roll-back and the model disappear (see the following video)
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
The code used to integrate it is following the official documentation
-> http://help.agi.com/STKWebVisualizationLibrary/TransformEditor.html
Here is our method to do the transform.
(The container parameter correspond to the div containing the map.)
initViewer(container) {
this.viewer = new Cesium.Viewer(container, {
geocoder: false,
homeButton: false,
// baseLayerPicker: false,
sceneModePicker: false,
navigationHelpButton: false,
});
this.viewer.scene.globe.enableLighting = true;
let tileset = this.viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(21024)
})
);
this.viewer.flyTo(tileset);
tileset.readyPromise.then((tileset) => {
this.transformObject(container ,this.viewer.scene, tileset);
})
return this.viewer;
}
transformObject(container, scene, tileset){
let transform = new Cesium.TransformEditor({
container: container,
scene: scene,
transform: tileset.modelMatrix,
boundingSphere: tileset.boundingSphere,
originalOffset: tileset.boundingSphere.center
})
}
We have no error in the console, no undefined parameters in debug or whatever...
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Our goal is to do the same thing that the 3rd example of this following link
--> https://cesium.com/ion-sdk/
4. The Cesium version you're using, your operating system and browser.
Cesium SDK : 1.57
Angular : 8.0.0
Chrome : 74.0.3729.169 (64 bits)
Thanks in advance for the answers.
bug transform.mov (3.2 MB)