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

559 views
Skip to first unread message

ruchicha...@gmail.com

unread,
Sep 19, 2018, 8:51:30 AM9/19/18
to cesium-dev
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.

Can you help me with the same.

It will be really helpful for me.

Thanks

Ruchi Chaurasia

unread,
Sep 19, 2018, 8:53:01 AM9/19/18
to cesium-dev

Link updated:

On Wednesday, September 19, 2018 at 6:21:30 PM UTC+5:30, Ruchi Chaurasia wrote:
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.


Omar Shehata

unread,
Sep 20, 2018, 10:55:16 AM9/20/18
to cesium-dev
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.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Ruchi Chaurasia

unread,
Sep 24, 2018, 5:05:20 AM9/24/18
to cesium-dev
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.

On Wednesday, September 19, 2018 at 6:21:30 PM UTC+5:30, Ruchi Chaurasia wrote:
Message has been deleted

Omar Shehata

unread,
Sep 24, 2018, 10:52:02 AM9/24/18
to cesium-dev
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:


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. 
Reply all
Reply to author
Forward
0 new messages