Upgrading Sandcastle: We Need Your Input!

Some sort of “variable watch”, like in a debugger? This could probably be useful for certain debugging tasks (but would not replace the generic console log forwarding).

I don’t know how difficult that could be to integrate, or whether something like that may become less urgent when there is an option to set breakpoints and use the actual, browser-based debugger for tasks like this.

I regularly use the Sandcastle, so I’ll just add some of my reoccuring thoughts. :slightly_smiling_face:

  1. “Better search” is already mentioned in the post. I’d just like to add to that, because that’s a pain point for me.
    I’d love to have a setting to make the search bar only search the code, only the titles, only the comments etc. or any combination of that.
    If the search would allow that, I think 90% of my search-related problems would already be solved. :slight_smile:
    The other 10% then come down to stuff like fuzzy searching. Usually I know more or less exactly what I’m searching for, so this would only help in case of different vocabulary (“behavior” vs “behaviour”) or typos.
    However, when I look back, I think such searching capabilities would have helped me a lot when I first started using Cesium.

  2. If you want to jump on that train, you could integrate some type of LLM to help with searching and maybe with generating examples on the fly. I can imagine that this might actually be a nice use case for AI. However, my experience with AI and Cesium so far is, that there’s quite a lot of “almost correct” code and a bit too much hallucination. :smile:

  3. Also +1 from me for a re-structuring of the sandcastles. The current categories sometimes seem a bit random, so I just started to mostly ignore them. I often just click through all of them, because I can never remember if an example was in the “Beginners” category or in “Geometries” etc. :smiley:
    Naming and order are also a bit hard to follow sometimes. When you look into the “Geometries” category, you have examples like “Box” (singular) and “Circles and Ellipses” (plural). And while these two are at the beginning of the list, you have to scroll past “Geometry Height Reference” to reach the example for “Polygon”, because it starts with “P”.
    However, I have no idea how to solve this without just creating another arbitrary ordering. I guess if the search would be better, this problem would be much less severe anyways. Maybe a tag system instead of only one category per sandcastle would help.

1 Like

you try using the way less CPU and GPU taxing requestRenderMode, if it not breaks core functionality of your demo.
And manage scene.requestRender() manually when needed.

const viewer = new Cesium.Viewer("cesiumContainer", { requestRenderMode: false, });

5+ session open without hearing a fan or anything. Would even recommend that mode by default for anything static, that’s not just experimental sandcastle and not making heavy use of the timeline.

1 Like

yes, this would be nice if it was managed by sandcastle UI

Thank you everyone for the great feedback so far! For anyone following this thread I just opened a new one with a preview of the new UI design. We’d love some feedback how it looks before it’s completely finalized. Please take a look and let us know what you think!

1 Like

Save my last run code in localStorage, so that I can restore my code even if the page is broken for some reason

2 Likes

I want to share my work on Sandcastle in an easy and visual way.

  1. Can you shorten the shared URL?
    It’s very long, now. I can’t share it on X or some sns.

  2. Can you create an OGP image and attach it automatically?
    The OGP image is Cesium logo and earth, now.
    I want to share my work’s snapshot which is on the right of Sandcastle automaticaly.

1 Like

Hi,

My only suggestion would be to add more functionality to the examples themselves. An example might be the ellipses and ellipsoid examples, they’re all static entities drawn at exact locations, however when people want to deal with, say, ellipsoids they want to know how they can change it on the fly (properties), moving its location, how ellipsoids are rendered over and under the globe, and under and over a terrain, with or without clipping, can they be clampedToGround, how does the “stretching” work (ie. radii and inside radii, with examples of a slide bar changing its orientation, etc.

Basically, more extensive and (hopefully) practical examples. There’s an argument here for a suite of “things you might want to do” which a lot of entities have in common, so for every example of some entity, throw in the same UI (slider, checkboxes for features on and off), maybe disable controls that doesn’t work on that entity (or in that context, maybe with a simple text or link to doco).

Any and all of this might also reduce basic noise in the forum as such. Just having a simple example of an entity’s location printed to screen in Cartesian3 and Cartographic.degrees on the fly is gold.

Cheers,

Alex

Hi,

Was just looking at the new Sandcastle which is looking good, and I noticed that the filter ‘Showcase’ is on by default (the button is also a bit misleading; the drop-down looks like you’re looking for labels, when in reality it filters by them), meaning anybody that tries to search for things don’t know (because it’s not obvious) that they’re only searching through the Showcases (a very tiny subset of all that is available). I think that’s a huge mistake, as every time I need to search for things and go to the Sandcastle I have to remember to uncheck that default.

I also noticed that hitting the enter key (as in, type in your search criteria, then hit enter) reloads the page. You need to (at least) trap the enter key and ignore it, otherwise the page reloads (Chrome latest, Win11, etc.).

Cheers,

Alex

3 Likes

Props to all involved with the new Sandcastle. It’s soooo much better. The editor improvements, type completions, etc.. Excellent work and something that has been long needed.

3 Likes

Hi,

Is there any button to do like “Undo”? for sometimes write big block wrong code and want to revoke. If there were such a feature, I think it would be even better. Ctrl+Z could do this. could it add some tip about these shotcut?

@Marco13 I think the repo below is similar to what you specified. It provides map in map functionality, but more importanly to your comment, it saves camera views in a URL that’s pulled in through code running in the Sandcastle.

I created it so I could easily display the sun on the horizon in two different spots on the Earth in one window. (High frequency radio communications behave differently–usually better–when the sun is on the horizon.) In the view below, the viewers are synched showing that the sun was setting in Sweden when it was rising in New Mexico, about forty-five minutes before I made a radio contact between the two locations. I originally developed the code so they user could see both perspectives, but then I wanted the user to not have to setup the views on their own, hence storing the camera orientations in the Sandcastle URL.

You can see the demo at

Is this close to what you were specifying? Please let me know if I can answer any questions.

Best Regards,

Hamilton Carter

415-799-1629

hcarter333@gmail.com

@antigrav_kids Generally, it already is possible to save the camera orientation as part of the Sandcastle (or the viewer initialization outside of a sandcastle). The question originally was about how that could become a part of the workflow. I frequently have that case where I’m creating a sandcastle and navigating to have a certain view, and then would like to “save” that view, as part of the sandcastle that I’m currently editing. Right now, the Sandcastle has that “Insert” menu at the top, where a Button/Toggle/Menu can be inserted. I think that it could be relatively easy to have something similar, to insert the viewer.scene.camera.setView(...) call for the current camera orientation (but there certainly are more things to think through).

I’d have to take a closer look at the exact code there. Maybe there is some overlap to what I was asking about.

1 Like

Thanks @Marco13 , I understand now.

Best Regards,

Hamilton