Skip to content

Commit

Permalink
timelayer examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Zemledelec committed Aug 6, 2022
1 parent a99d657 commit d835e44
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions timelayer/timelayer1.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@
<input type="range" min="0" max="100" value="0" class="pl-slider">
</div>
<script>
let osm1 = new XYZ("osm-1", {
let osm1 = new og.layer.XYZ("osm-1", {
isBaseLayer: true,
url: "//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
maxNativeZoom: 19,
defaultTextures: [{color: "#AAD3DF"}, {color: "#F2EFE9"}],
isSRGB: false,
});

var globus = new Globe({
let globus = new og.Globe({
target: "earth",
name: "Earth",
terrain: new EmptyTerrain(),
terrain: new og.terrain.EmptyTerrain(),
layers: [osm1],
});

function createCanvasTilesLayer(id) {
return new CanvasTiles(`cnv-${id}`, {
return new og.layer.CanvasTiles(`cnv-${id}`, {
isBaseLayer: false,
drawTile: function (material, applyCanvas) {

Expand Down Expand Up @@ -95,12 +95,12 @@

let timeLayers = getCanvasLayers(10);

let la = new LayerAnimation({
let la = new og.control.LayerAnimation({
layers: timeLayers,
repeat: true
});

globus.planet.addControl(new LayerSwitcher());
globus.planet.addControl(new og.control.LayerSwitcher());
globus.planet.addControl(la);

let $slider = document.querySelector(".pl-slider"),
Expand Down
10 changes: 5 additions & 5 deletions timelayer/timelayer2.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
<input type="range" min="0" max="100" value="0" class="pl-slider">
</div>
<script>
var globus = new Globe({
let globus = new og.Globe({
target: "earth",
name: "Earth",
terrain: new EmptyTerrain(),
terrain: new og.terrain.EmptyTerrain(),
layers: [],
useNightTexture: false,
useSpecularTexture: false
Expand All @@ -48,7 +48,7 @@
let res = [];
for (let i = 0; i < yearsArr.length; i++) {
let y = yearsArr[i].toString();
let img = new GeoImage(`${y} million years}`, {
let img = new og.layer.GeoImage(`${y} million years}`, {
src: `./scotese/${y}.jpg`,
corners: [[-180, 90], [180, 90], [180, -90], [-180, -90]],
isBaseLayer: false,
Expand All @@ -63,12 +63,12 @@
let yearsAgo = [0, 20, 35, 50, 66, 90, 105, 120, 150, 170, 200, 220, 240, 260, 280, 300, 340, 370, 400, 430, 450, 470, 500, 540, 600, 750];
let timeLayers = getYearsLayers(yearsAgo);

let la = new LayerAnimation({
let la = new og.control.LayerAnimation({
layers: timeLayers,
repeat: true
});

globus.planet.addControl(new LayerSwitcher());
globus.planet.addControl(new og.control.LayerSwitcher());
globus.planet.addControl(la);

let $slider = document.querySelector(".pl-slider"),
Expand Down

0 comments on commit d835e44

Please sign in to comment.