
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
= Cesium
WebGL Virtual Globe and Map Engine
{}[http://badge.fury.io/rb/cesium]
= Requirements
In Gemfile file add line:
gem "cesium"
Run the bundle command to install it.
This gem relies on 'requirejs-rails' gem.
Make sure you follow the instruction from: https://github.com/jwhitley/requirejs-rails and you understand the concept of RequireJS: http://requirejs.org
Now you are ready to use this gem :-)
= Examples
== Example 1: For the convenience there is prepared route that will show you the globe. All you need to do is to modify your route.rb and add: get 'cesium', to: 'cesium#index' Now you can see the WebGL globe by visiting: http://localhost:3000/cesium
== Example 2: Usage of this gem inside your own Rails application.
I presume you have a canvas tag in your view with id "globe":
You should have some CSS to define canvas size. Here is an example that shows how to display the globe and cover 100% width & height of the wrapper html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; }
.fullSize { width: 100%; height: 100%; }
In the javascript module that is related to the view Here I use application.js (coffee):
require [ 'jquery' 'Cesium' ], ($, Cesium) ->
$ ->
canvas = $('#globe')[0] # change this to match your needs!!!
@scene = new Cesium.Scene canvas
primitives = @scene.getPrimitives()
bing = new Cesium.BingMapsImageryProvider(
url: 'http://dev.virtualearth.net'
mapStyle: Cesium.BingMapsStyle.AERIAL
proxy: if Cesium.FeatureDetection.supportsCrossOriginImagery() then undefined else new Cesium.DefaultProxy('/proxy/')
)
terrainProvider = new Cesium.CesiumTerrainProvider(
url: 'http://cesium.agi.com/smallterrain'
)
ellipsoid = Cesium.Ellipsoid.WGS84
centralBody = new Cesium.CentralBody(ellipsoid)
centralBody.getImageryLayers().addImageryProvider(bing)
centralBody.terrainProvider = terrainProvider
primitives.setCentralBody(centralBody)
new Cesium.SceneTransitioner(@scene, ellipsoid)
##################################################################
# INSERT CODE HERE to create graphics primitives in the scene.
##################################################################
animate = =>
# INSERT CODE HERE to update primitives based on changes to animation time, camera parameters, etc.
tick = =>
@scene.initializeFrame()
animate()
@scene.render()
Cesium.requestAnimationFrame(tick)
tick()
canvas.oncontextmenu = =>
false
onResize = =>
width = canvas.clientWidth
height = canvas.clientHeight
return if canvas.width == width and canvas.height == height
canvas.width = width
canvas.height = height
@scene.getCamera().frustum.aspectRatio = width / height
$(window).on('resize', onResize)
onResize()
= Contribution
== To write new feature or fix a bug:
We follow git-flow branching model which means:
More about git-flow: https://github.com/nvie/gitflow
== To report an issue/bug:
== Maintainers
== How to upgrade to latest version of the Cesium
Clone specific version of the Cesium (-b VERSION_NUM):
git clone git@github.com:AnalyticalGraphicsInc/cesium.git -b 1.3 cd cesium ./Tools/apache-ant-[VERSION]/bin/ant clean ./Tools/apache-ant-[VERSION]/bin/ant combine ./Tools/apache-ant-[VERSION]/bin/ant buildApps ./Tools/apache-ant-[VERSION]/bin/ant runServer
After executing all of the build steps:
= License
Please check the Cesium website for details: http://cesium.agi.com https://raw.github.com/AnalyticalGraphicsInc/cesium/master/LICENSE.md
FAQs
Unknown package
We found that cesium demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.