Skip to content

Instantly share code, notes, and snippets.

View yunusyurtturk's full-sized avatar

Yunus Yurttürk yunusyurtturk

View GitHub Profile
var viewer = new Cesium.Viewer('cesiumContainer');
//Normally you would define the default styles
//in CSS, but for the example it's easier to
//just do it here.
var geoOverlay = document.createElement('div');
viewer.container.appendChild(geoOverlay);
geoOverlay.style.display = 'none';
geoOverlay.style['background-color'] = 'white';
geoOverlay.style.position = 'absolute';
@yunusyurtturk
yunusyurtturk / WallpaperMaterial.js
Created October 15, 2024 23:09 — forked from mramato/WallpaperMaterial.js
A Cesium demo for creating a custom wallpaper material
//Call this once at application startup
Cesium.Material._materialCache.addMaterial('Wallpaper', {
fabric : {
type : 'Wallpaper',
uniforms : {
image : Cesium.Material.DefaultImageId,
anchor : new Cesium.Cartesian2(0, 0)
},
components : {
diffuse : 'texture2D(image, fract((gl_FragCoord.xy - anchor.xy) / vec2(imageDimensions.xy))).rgb',