This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| block: function(color) { | |
| return new THREE.Mesh( | |
| new THREE.BoxGeometry(0.5, 0.5, 10), | |
| new THREE.MeshNormalMaterial() | |
| ); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // random data | |
| var data = { | |
| color: '#FF0000', | |
| size: 20, | |
| lat: 52.3747158, | |
| lon: 4.8986231, | |
| size: 20 | |
| }; | |
| // add a block in realtime after getting data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| else | |
| { | |
| $('#count').text(parseInt($('#count').html())+1); | |
| console.log("New user"); | |
| document.getElementById('cont').innerHTML = response._source.country; | |
| $('.error').fadeIn(400).delay(3000).fadeOut(400); | |
| console.log(response._source); | |
| var time = response._source.h+":"+response._source.m+":"+response._source.s; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (response.hits){ | |
| console.log(response.hits.hits.length); | |
| var l = response.hits.hits.length; | |
| document.getElementById('count').innerHTML = response.hits.hits.length +1; | |
| for(var i=0;i<l;i++) | |
| { | |
| var data = { | |
| color: '#2962FF', | |
| lat: response.hits.hits[i]._source.latitude, | |
| lon: response.hits.hits[i]._source.longitude, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (response.hits){ | |
| console.log(response.hits.hits.length); | |
| var l = response.hits.hits.length; | |
| document.getElementById('count').innerHTML = response.hits.hits.length +1; | |
| for(var i=0;i<l;i++) | |
| { | |
| var data = { | |
| color: '#2962FF', | |
| lat: response.hits.hits[i]._source.latitude, | |
| lon: response.hits.hits[i]._source.longitude, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| appbase.searchStream({ | |
| type: 'people71', | |
| body: { | |
| "from" : 0, "size" : 1000, | |
| query: { | |
| match_all: {} | |
| } | |
| } | |
| }).on('data', function(response) { | |
| console.log('test'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.ajax({ | |
| url : 'http://www.telize.com/geoip', | |
| type: 'GET', | |
| success : handleData | |
| }); | |
| function handleData(data) | |
| { | |
| document.getElementById('cont').innerHTML = data.country; | |
| $('.error').fadeIn(400).delay(3000).fadeOut(400); | |
| jsonObject.latitude=data.latitude; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| appbase.index({ | |
| type: 'people71', | |
| body: jsonObject | |
| }).on('data', function(response) { | |
| console.log(response); | |
| }).on('error', function(error) { | |
| console.log(error); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| appbase.index({ | |
| type: 'people71', | |
| body: jsonObject | |
| }).on('data', function(response) { | |
| console.log(response); | |
| }).on('error', function(error) { | |
| console.log(error); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.ajax({ | |
| url : 'http://www.telize.com/geoip', | |
| type: 'GET', | |
| success : handleData | |
| }); | |
| function handleData(data) | |
| { | |
| document.getElementById('cont').innerHTML = data.country; | |
| $('.error').fadeIn(400).delay(3000).fadeOut(400); | |
| jsonObject.latitude=data.latitude; |