Integrating cesium and three js and manipulating geometry of 3D object

I am following below blog post:

Seems to be working for me. When I am trying to manipulate its geometry by using vertices for scaling. The whole scene moves. How can I specifically manipulate the 3D object.

I tried referring this JS fiddle project, but doesn't work.

Can you help me with the same.

It will be really helpful for me.

Thanks

Link updated:

I am following below blog post:
https://cesium.com/blog/2017/10/23/integrating-cesium-with-threejs/

Seems to be working for me. When I am trying to manipulate its geometry by using vertices for scaling. The whole scene moves. How can I specifically manipulate the 3D object.

I tried referring this JS fiddle project, but doesn’t work.

http://jsfiddle.net/Atrahasis/b05m3Lqg/

I’m a bit confused as to what the expected behavior here is. Are you saying that the plane in that JSfiddle should’t move when you move the vertices of the cube? It looks like these two lines are explicitly moving the plane:

plane.position.copy(SELECTED.position);

plane.lookAt(camera.position);

``

Also, this question sounds like it’s specific to ThreeJS. You might get more help on their forum.

Hi Omar,

Thanks for your response.

Actually the problem is when I am trying to integrate this three.js script for geometry manipulation of 3d object on top of cesium layer, it gets misplaced and gets mapped somewhere else in the 3D space.

ThreeJS with CesiumJS is still an experimental thing, but make sure you check out the full code example. For example, here’s where the positions are set up:

https://github.com/AnalyticalGraphicsInc/cesium-threejs-experiment/blob/master/public/CesiumThree.js#L204

It might be easier to just port that code over to CesiumJS. You should be able to do everything in your demo just fine, including picking, dynamically resizing and positioning objects. This is the closest demo I can think of:

That way you wouldn’t have to worry about independently managing two separate 3D engines in one context.