How to hide Cesium related javascript code from view (HTML)?

Hi everyone,

I just started working with Cesium from last 2-3 week and trying to learn different things.

The one of the things that I am curious to know is, how do we hide the cesium-javascript logic from the view (end user)? Currently I have the script tag added in the header of the index.html page that refers to my main javascript file with all the code logic. I am using nodejs for server side. So can anyone please guide/share the recommended application development flow where I can hid the cesium-javascript logic from the HTML view?

1 Like

Your question doesn’t really make any sense. “Hide”… what? Hide the Cesium globe so the user can’t see it? Separate your app’s logic from the Cesium script bundle? Separate your app logic from the HTML being displayed? Keep the user from being able to View Source on the Cesium code?

What are you actually trying to do overall? What is the end goal?

I think couldn’t state clearly. So I am trying to separate my ‘app logic from the HTML being displayed’ to end user. For example, see the following code snippet (it’s the source code of HelloWorld example posted by Cesium):

Hello World! @import url(../Build/Cesium/Widgets/widgets.css); html, body, #cesiumContainer { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; }

``

So in the above code, I am talking about hiding the following section from the user:

``

I think it could not be possible,Because javascript runs in client side so evey user can access it