Animating star field
A Pen by Graeme Fulton on CodePen.
/** | |
* AudioAnalyser | |
* param- soundPath: path to your sound | |
*/ | |
function AudioAnalyser(soundPath){ | |
this.sound =soundPath; | |
this.audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | |
this.source; |
//x positions | |
else if((this.floor[i].position.x - this.tileWidth)>camera.position.x){ | |
this.floor[i].position.x-=(this.tileWidth*2); | |
} | |
//if the camera has moved past the entire square in the opposite direction, move the square the opposite way | |
else if((this.floor[i].position.x + this.tileWidth)<camera.position.x){ | |
this.floor[i].position.x+=(this.tileWidth*2); | |
} |
/** | |
* Terrain array | |
*/ | |
function TerrainMatrix(){ | |
this.floor = []; | |
this.tileHeight=100; | |
this.tileWidth=100; | |
this.tileRowNumber = 3; | |
/** | |
* createTerrainMatrix | |
* @TODO: create the matrix of terrains - need to add 9 bits of terrain | |
*/ | |
createTerrainMatrix:function(scene, perlinNoise){ | |
//every 100px on the z axis, add a bit of ground | |
for ( var z= 100; z > -200; z-=100 ) { | |
/** | |
* createTerrainMatrix | |
* @TODO: create the matrix of terrains - need to add 9 bits of terrain | |
*/ | |
createTerrainMatrix:function(scene, perlinNoise){ | |
//every 100px on the z axis, add a bit of ground | |
for ( var z= 100; z > -200; z-=100 ) { | |
/** | |
* createTerrainMatrix | |
* @TODO: create the matrix of terrains - need to add 9 bits of terrain | |
*/ | |
createTerrainMatrix:function(scene, perlinNoise){ | |
//every 100px on the z axis, add a bit of ground | |
//to put the camera in the middle of three bits of terrain, z= 5 | |
for ( var z= -5; z > -200; z-=100 ) { |
<?php | |
/**Search all tags and taxonomies**/ | |
/**modified: http://www.rfmeier.net/include-category-and-post-tag-names-in-the-wordpress-search/**/ | |
/**useful: http://wordpress.stackexchange.com/questions/2623/include-custom-taxonomy-term-in-search **/ | |
Class Tag_Search(){ | |
private function __construct(){ | |
add_filter( 'posts_join', array($this,'custom_posts_join'), 10, 2 ); | |
add_filter( 'posts_where', array($this,'custom_posts_where'), 10, 2 ); |
add_action('bp_init', array($this,'create_profile_field_group')); | |
/** src for create_profile_field_group : http://www.amkd.com.au/wordpress/buddypress-adding-custom-profile-field-programatically/118 **/ | |
public function create_profile_field_group(){ | |
global $wpdb; | |
$group_args = array( | |
'name' => 'Search Preferences' | |
); | |
$sqlStr = "SELECT `id` FROM `wp_bp_xprofile_groups` WHERE `name` = 'Search Preferences'"; | |
$groups = $wpdb->get_results($sqlStr); |
Animating star field
A Pen by Graeme Fulton on CodePen.
Moving from one sphere to many
A Pen by Graeme Fulton on CodePen.