Skip to content

Commit

Permalink
corre3 many updates and files archived
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-armour committed Sep 15, 2016
1 parent 7c77186 commit c3d2bc6
Show file tree
Hide file tree
Showing 24 changed files with 676 additions and 93 deletions.
8 changes: 6 additions & 2 deletions elevations-core3/a-cor-core/core-r2.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

COR.getMenuDetailsHeader() +

COR.getMenuDetailsTemplate() +

COR.getMenuDetailsObjectProperties() +

COR.getMenuDetailsTemplate() +

COR.getMenuDetailsAbout() +

COR.getMenuFooter() +
Expand All @@ -37,6 +37,10 @@

if ( window.self !== window.top ) { hamburger.style.left = '0px'; }

CORdetailsObjectProperties.setAttribute( 'open', 'open' );

CORdetailsTemplate.removeAttribute( 'open' );

}

</script>
Expand Down
18 changes: 9 additions & 9 deletions elevations-core3/a-cor-core/core-r2.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,11 @@

var menuDetailsTemplate =

'<details id=detailsTemplate open >' +
'<details id=CORdetailsTemplate open >' +

'<summary id=menuSummaryTemplate ><h3>Template</h3></summary>' +
'<summary id=CORmenuSummaryTemplate ><h3>Template</h3></summary>' +

'<p id=pTemplate >' +
'<p id=CORpTemplate >' +

'<button onclick=alert("Howdy!"); > button </button>' + b +

Expand All @@ -363,16 +363,16 @@

var menuDetailsObjectProperties =

'<details> ' +
'<details id=CORdetailsObjectProperties > ' +

'<summary id=MenuSummaryObjectProperties ><h3>Object Properties: ' + ( obj.objectName || '' ) + ' </h3></summary>' +
'<summary id=summaryObjectProperties ><h3>Object Properties: ' + ( obj.objectName || '' ) + ' </h3></summary>' +

'<p>' +
'<button onclick=properties.innerHTML=COR.getObjectProperties(COR.place); >Get place properties</button> ' +
'<button onclick=properties.innerHTML=COR.getObjectProperties(); >Get defaults</button> ' +
'<button onclick=pProperties.innerHTML=COR.getObjectProperties(COR.place); >Get place properties</button> ' +
'<button onclick=pProperties.innerHTML=COR.getObjectProperties(); >Get defaults</button> ' +
'</p>' +

'<p id=properties ></p>' + b +
'<p id=pProperties ></p>' + b +

'</details>' +

Expand Down Expand Up @@ -400,7 +400,7 @@

}

MenuSummaryObjectProperties.innerHTML = '<h3>Object Properties: ' + ( obj.objectName || '' ) + '</h3>';
summaryObjectProperties.innerHTML = '<h3>Object Properties: ' + ( obj.objectName || '' ) + '</h3>';

return '<table>' + txt + '</table>';

Expand Down
22 changes: 16 additions & 6 deletions elevations-core3/b-sel-select/select-r1.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,28 @@
<meta charset=utf-8 >
<title>Elevations Core3 Select R1</title>
<meta name=viewport content='width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no' >
<meta name=description content='Core
' >
<meta name=description content='Core use GitHuB API to get file names and folders from GitHub Server. A remote LS or DIR service.' >
<meta name=keywords content='Jaanga,GitHub API,CSS,HTML,JavaScript,GitHub,FOSS' >
<meta name=date content='2016-09-05' >
<meta name=date content='2016-09-14' >
</head>
<body>
<script src=https://cdnjs.cloudflare.com/ajax/libs/showdown/1.4.3/showdown.min.js ></script>
<script src=../a-cor-core/core-r2.js ></script>
<script src=../b-sel-select/select-r1.js ></script>
<script>

SEL.urlAPITreeContents = 'https://api.github.com/repos/jaanga/terrain3/git/trees/gh-pages?recursive=1';

// SEL.defaultFile = '../../elevations/elevations-data-04/san-francisco_10_163_394_3_3_450_450_.json';
SEL.defaultFile; // if no default, select a random file

SEL.searchInFolder = 'elevations-data-04/';
SEL.extension = '.json';

// SEL.urlBase = '../../../../elevations/' + SEL.searchInFolder;
SEL.urlBase = 'https://jaanga.github.io/terrain3/elevations/' + SEL.searchInFolder;



init();

Expand All @@ -30,10 +41,10 @@

SEL.getMenuDetailsSelectFile() +

COR.getMenuDetailsTemplate() +

COR.getMenuDetailsObjectProperties( COR.defaults ) +

COR.getMenuDetailsTemplate() +

COR.getMenuDetailsAbout() +

COR.getMenuFooter() +
Expand All @@ -52,7 +63,6 @@
SEL.onLoadJSONFile = function() {

COR.place = SEL.fileJSON;
COR.place.name = SEL.fileName;

COR.getPlaceDefaults();

Expand Down
12 changes: 8 additions & 4 deletions elevations-core3/b-sel-select/select-r1.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

SEL = SEL || {};

SEL.urlAPITreeContents = 'https://api.github.com/repos/jaanga/terrain3/git/trees/gh-pages?recursive=1';
/*
// more visible in HTML
SEL.urlAPITreeContents = 'https://api.github.com/repos/jaanga/terrain3/git/trees/gh-pages?recursive=1';
// SEL.defaultFile = '../../elevations/elevations-data-04/san-francisco_10_163_394_3_3_450_450_.json';
SEL.defaultFile; // if no default, select a random file
Expand All @@ -14,6 +17,7 @@
// SEL.urlBase = '../../../../elevations/' + SEL.searchInFolder;
SEL.urlBase = 'https://jaanga.github.io/terrain3/elevations/' + SEL.searchInFolder;
*/


SEL.getMenuDetailsSelectFile = function() {
Expand All @@ -30,11 +34,11 @@
'<select id=SELselFiles onchange=SEL.getJSONFileXHR(SEL.urlBase+this.value); size=12 style=width:100%; ></select>' +
'</p>' +

'<p><input type=file id=SELinpFile onchange=SEL.getJSONFileReader(this); /></p>' +
'<p><input type=file id=SELinpFile onchange=SEL.getJSONFileReader(this); /></p>' + b +

'</details>' +

b;
'';

return menuDetailsSelectFile;

Expand Down Expand Up @@ -93,7 +97,7 @@
file = SEL.defaultFile ? SEL.defaultFile : SEL.urlBase + SELselFiles.value;

SELselFiles.selectedIndex = SEL.defaultFile ? -1 : SELselFiles.selectedIndex;

console.log( 'file', file );
SEL.getJSONFileXHR( file );

}
Expand Down
1 change: 1 addition & 0 deletions elevations-core3/c-ovr-overlay/overlay-r1.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

'<p>' +
'Map overlay quality' + b +
'<small>+ number: better quality but slower</small>' +
'<select id=OVRselMapZoom onchange=OVR.getMapOverlayParameters();MAP.drawMapOverlay(); ></select> + zoom level</p>' + b +

'<details id=detailsOverlayParameters >' +
Expand Down
10 changes: 8 additions & 2 deletions elevations-core3/e-thr-threejs/threejs-r1.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
<script src=../e-thr-threejs/threejs-r1.js ></script>
<script>

THR.cameraNear = 1;
THR.cameraFar = 2000;

THR.moreThreejsInits = function() {

var geometry, material

THR.renderer.setClearColor( COR.defaults.backgroundColor );

THR.updateCamera = true;

geometry = new THREE.BoxGeometry( 360, 2, 180 );
Expand All @@ -43,6 +45,8 @@
THR.axisHelper = new THREE.AxisHelper( 90 );
THR.scene.add( THR.axisHelper );

THR.controls.autoRotate = true;

};

init();
Expand All @@ -53,7 +57,7 @@

function init() {

// COR.taglineHeader = 'Three.js Howdy! &rarr;' + b;
COR.taglineHeader += 'Three.js Howdy! &rarr;' + b;

COR.initLeftMenu();

Expand All @@ -69,6 +73,8 @@

if ( window.self !== window.top ) { hamburger.style.left = '0px'; }

window.addEventListener( 'keyup', THR.onKeyUp, false );

}


Expand Down
13 changes: 8 additions & 5 deletions elevations-core3/e-thr-threejs/threejs-r1.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

var THR = THR || {};

THR.cameraNear = 0.001;
THR.cameraFar = 2;

THR.getThreeJS = function() {

var ground, gridHelper, axisHelper;
Expand All @@ -26,16 +29,16 @@
THR.stats.domElement.style.display = window.innerWidth < 500 ? 'none' : '';

THR.renderer = new THREE.WebGLRenderer( { alpha: 1, antialias: true } );
// THR.renderer.setClearColor( 0xf0f0f0 );
THR.renderer.setClearColor( COR.defaults.backgroundColor );
// THR.renderer.setPixelRatio( window.devicePixelRatio );
THR.renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( THR.renderer.domElement );

THR.camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 0.001, 2 );
THR.camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, THR.cameraNear, THR.cameraFar );
THR.camera.position.set( 100, 100, 100 );

THR.controls = new THREE.OrbitControls( THR.camera, THR.renderer.domElement );
// THR.controls.maxDistance = 800;
THR.controls.maxDistance = 800;
// THR.controls.autoRotate = true;

THR.scene = new THREE.Scene();
Expand Down Expand Up @@ -102,9 +105,9 @@

switch( event.keyCode ) {

// case 32: THR.controls.autoRotate = !THR.controls.autoRotate; break; // space bar
case 32: THR.controls.autoRotate = !THR.controls.autoRotate; break; // space bar

case 32: TERchkRotate.click(); break; // space bar
// case 32: TERchkRotate.click(); break; // space bar

}

Expand Down
10 changes: 6 additions & 4 deletions elevations-core3/elevations-view-tgif-r1.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
<script>


// SEL.urlAPITreeContents = 'https://api.github.com/repos/jaanga/terrain3/git/trees/gh-pages?recursive=1';
SEL.urlAPITreeContents = 'https://api.github.com/repos/jaanga/terrain3/git/trees/gh-pages?recursive=1';

SEL.searchInFolder = 'elevations-data-tgif/';

SEL.urlBase = '../elevations/' + SEL.searchInFolder;
// SEL.urlBase = 'https://jaanga.github.io/terrain3/elevations/' + SEL.searchInFolder;
// SEL.urlBase = '../elevations/' + SEL.searchInFolder;
SEL.urlBase = 'https://jaanga.github.io/terrain3/elevations/' + SEL.searchInFolder;


init();
Expand Down Expand Up @@ -81,10 +81,12 @@

if ( location.hash.length ) { SEL.defaultFile = location.hash.slice( 6 ); }

SEL.getGitHubAPITreeContents();


}

SEL.getGitHubAPITreeContents();

if ( window.self !== window.top ) { hamburger.style.left = '0px'; }

window.addEventListener( 'keyup', THR.onKeyUp, false );
Expand Down
10 changes: 10 additions & 0 deletions elevations-core3/f-map-map/map-r2.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@

<script>

SEL.urlAPITreeContents = 'https://api.github.com/repos/jaanga/terrain3/git/trees/gh-pages?recursive=1';

// SEL.defaultFile = '../../elevations/elevations-data-04/san-francisco_10_163_394_3_3_450_450_.json';
SEL.defaultFile; // if no default, select a random file

SEL.searchInFolder = 'elevations-data-04/';
SEL.extension = '.json';

// SEL.urlBase = '../../../../elevations/' + SEL.searchInFolder;
SEL.urlBase = 'https://jaanga.github.io/terrain3/elevations/' + SEL.searchInFolder;

init();

Expand Down
11 changes: 3 additions & 8 deletions elevations-core3/f-map-map/map-r2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
var MAP = MAP || {};


MAP.onLoadJSONFile = function() {

// MAP.initMapGeometry();

}



MAP.initMapGeometry = function() {

var place = COR.place;
Expand Down Expand Up @@ -132,6 +124,8 @@ console.timeEnd( 'timer0' );

}



MAP.drawMap = function() {

var geometry, material;
Expand Down Expand Up @@ -165,6 +159,7 @@ console.timeEnd( 'timer0' );

CAS.center = MAP.mesh.position.clone();
CAS.cameraTrack();

}

}
Expand Down
18 changes: 11 additions & 7 deletions elevations-core3/h-kml-kml/kml-r2.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,23 @@
<script src=../g-msh-mesh-lines/mesh-lines-r1.js ></script>
<script src=../h-kml-kml/kml-r2.js ></script>

<!--
<script src=../../google-maps-api3/f-elv-elevations/elevations-r1.js ></script>
-->
<script src=http://jaanga.github.io/terrain3/google-maps-api3/f-elv-elevations/elevations-r1.js ></script>

<script>

SEL.urlAPITreeContents = 'https://api.github.com/repos/jaanga/terrain3/git/trees/gh-pages?recursive=1';

// SEL.defaultFile = '../../elevations/elevations-data-path-json/oakland-gran-fondo-55_12_657_1582_3_3_30_30_.json';
SEL.defaultFile = '../../elevations/elevations-data-path-json/oakland-gran-fondo-28_14_2631_6329_3_3_510_510_.json';
// SEL.defaultFile = '../../elevations/elevations-data-04/san-francisco_10_163_394_3_3_450_450_.json';
SEL.defaultFile; // if no default, select a random file

SEL.searchInFolder = 'elevations-data-path-json/';
// SEL.extension = '.txt';

SEL.urlBase = '../../elevations/' + SEL.searchInFolder;
// SEL.urlBase = 'https://jaanga.github.io/terrain3/elevations/' + SEL.searchInFolder;
SEL.extension = '.json';

// SEL.urlBase = '../../../../elevations/' + SEL.searchInFolder;
SEL.urlBase = 'https://jaanga.github.io/terrain3/elevations/' + SEL.searchInFolder;

init();

Expand Down Expand Up @@ -107,7 +111,7 @@
COR.place = SEL.fileJSON;

COR.getPlaceDefaults();
console.log( 'svs', COR.place.verticalScale );

OVR.setMenuDetailsOverlay();

MAP.initMapGeometry();
Expand Down
3 changes: 3 additions & 0 deletions elevations-core3/h-kml-kml/kml-r2.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
KML.getPathProperties = function() {

var pt;

if ( !THR.line ) { alert( 'No such geometry.' ); return }

pt = THR.line.geometry;
pt.computeBoundingBox();

Expand Down
Loading

0 comments on commit c3d2bc6

Please sign in to comment.