What browser am I using?
is fantastic web app that will make it easy to know what browser your client or anybody is using.
You're using Firefox 27.
Share this with your support team!
Browser details
This information may help support representatives resolve any issues you're experiencing with their website.
Operating system
Windows 7
Cookies enabled
Yes
Flash version
12.0.0
Java version
1.7.0_09
Browser size
1349 x 664
Screen size
1366 x 768
Color depth
24 bit
Your full user agent string is:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
Showing posts with label TECH. Show all posts
Showing posts with label TECH. Show all posts
Sunday, March 09, 2014
What browser am I using?
Label:
Modules,
TECH,
Top Sites,
Web Desaign
Thursday, January 16, 2014
Download Flat Round Icons Set
If you need some pixel-perfect, round and flat icons for your next
project, you'll definitely find RoundIcons interesting. You can download
a set of 60 icon for a tweet or a like.
Free flat round icons set – 60 icons
Get a taste and check out these free icons from our premium bundle
Label:
Inspiration,
Multimedia,
PSD,
TECH
Saturday, November 30, 2013
Ionic: Advanced HTML5 Hybrid Mobile App Framework
Ionic offers a library of mobile-optimized HTML, CSS and JS components for building highly interactive apps. It is built with Sass and optimized for AngularJS. It's in alpha and it looks like a very promising framework for developing hybrid mobile apps in HTML5.
Label:
Inspiration,
TECH,
Top Sites,
Tutorial
Sunday, October 27, 2013
Free Download 180 Beautiful Flat Icons (AI, EPS,PDF, PNG)
A great set of 90 flat round icons in two variations by Elegant Themes. The icons come in two versions: full color and single color, for a total of 180 variations. This download includes .ai, .eps, .pdf, and .png (64px and 128px). Below is the full set in both styles. These icons are completely free and Open Source under the GPL, so feel free to use them in your personal and commercial projects alike. We are on a mission to create the best collection of Open Source graphics on the web, so that the WordPress ecosystem can use and enjoy them alongside the freedoms they have become accustomed to.
Thursday, September 19, 2013
Tutorial Create 3D version of the Treehouse Logo Using three.js
This is a great tutorial by Nick Pettit on how to create an interactive 3D graphic with three.js.
In this step-by-step guide, we’re going to create a 3D version of the Treehouse logo using three.js, which is a 3D graphics framework built on top of WebGL. Click and drag your mouse to orbit the camera! You can also use your mousewheel to zoom in and out.
3D graphics can be difficult, especially 3D in the browser. Frameworks like three.js make it a bit easier, but the official documentation is still under construction and there are a few quirks that can stop beginners from ever getting started. If you’re new to 3D, this guide will help you get started.
Even though three.js might look complex at first, it would actually take even more code to write the same thing in pure WebGL, mostly because we’d need to write a rendering engine. All the heavy lifting is done with three.js without sacrificing much flexibility.
Also, if you’re using Safari, you need to enable WebGL first. Here’s how to enable WebGL in Safari:
For this tutorial, you’ll also need a file called OrbitControls.js which is included in the three.js download. Here’s the file path:
If you’d rather just grab the two files you need, they’re included with the example code for this tutorial.
Fortunately, there’s a three.js FAQ with an excellent guide on how to run three.js locally using either Python, Ruby, or adjusting your browser settings. It’s easier than it sounds, so if you’re scratching your head wondering why some files aren’t loading, check out the guide.
In order to export a mesh from Blender for use in three.js, you’ll need to open the utility folder in three.js and install the exporter. Here are instructions on how to export from Blender to three.js.
Like I said, nothing special here. The magic happens between the script tags.
Finally, we need to add the camera to the scene.
Next, we’ll need a light in order to see our 3D objects, so we’ll add a
Before leaving the callback function, we create a new mesh with our geometry and the material as parameters, then we add the mesh to the scene.
The
After that, we need to render our scene through the camera we added earlier and then update the orbit controls.
To see what the final result looks like, be sure to download the
code. Try changing some of the parameters around and see what happens!
source:http://blog.teamtreehouse.com/the-beginners-guide-to-three-js
In this step-by-step guide, we’re going to create a 3D version of the Treehouse logo using three.js, which is a 3D graphics framework built on top of WebGL. Click and drag your mouse to orbit the camera! You can also use your mousewheel to zoom in and out.
3D graphics can be difficult, especially 3D in the browser. Frameworks like three.js make it a bit easier, but the official documentation is still under construction and there are a few quirks that can stop beginners from ever getting started. If you’re new to 3D, this guide will help you get started.
Even though three.js might look complex at first, it would actually take even more code to write the same thing in pure WebGL, mostly because we’d need to write a rendering engine. All the heavy lifting is done with three.js without sacrificing much flexibility.
Browser Compatibility
For this tutorial, you’ll need the desktop version of either Chrome, Firefox, or Safari. Unfortunately, WebGL doesn’t work on mobile browsers yet, and it won’t be available in Internet Explorer until version 11.Also, if you’re using Safari, you need to enable WebGL first. Here’s how to enable WebGL in Safari:
- Open the Preferences menu.
- Click on the Advanced tab.
- Click the checkbox that says Show Develop menu in menu bar.
- Open the Develop menu from the menu bar and select Enable WebGL.
Getting Started
Download three.js
Head over to http://threejs.org/ and click the “Download” link on the left side of your screen. Once the zip has finished downloading, open it up and go to the build folder. Inside, you’ll find a file called three.min.js and, if you’re following along, you should copy this file into your local development directory.For this tutorial, you’ll also need a file called OrbitControls.js which is included in the three.js download. Here’s the file path:
threejs folder > examples > js > controls > OrbitControls.js If you’d rather just grab the two files you need, they’re included with the example code for this tutorial.
setup the local environment
JavaScript has a security feature called the same-origin policy, which means you cannot load externally hosted files inside of your JavaScript code. This can be slightly problematic, because three.js needs to load geometry, textures, and other files. In order to circumvent this issue, you’ll need a local http server so that your files come from the same origin. Simply opening the index.html file directly in the browser isn’t going to work.Fortunately, there’s a three.js FAQ with an excellent guide on how to run three.js locally using either Python, Ruby, or adjusting your browser settings. It’s easier than it sounds, so if you’re scratching your head wondering why some files aren’t loading, check out the guide.
CreatE 3D Assets
I’ve already created a 3D version of the Treehouse logo that you’re welcome to use for learning purposes (you can find the mesh inside the code download), but if you’d like to create your own meshes, I recommend you use Blender. It’s a wonderful 3D modeling and rendering package that’s free, open source, and cross-platform. There’s also plenty of educational material out there (free and paid) to help you get started modeling. I used Blender for the first time and had my finished mesh in about an hour. There’s probably some optimizations I could have made (the mesh topology is actually a bit messy) but it works for this demo.In order to export a mesh from Blender for use in three.js, you’ll need to open the utility folder in three.js and install the exporter. Here are instructions on how to export from Blender to three.js.
The HTML
Alright. Once you’ve got your files in place and your local environment setup, it’s time to start coding. Let’s get the HTML out of the way first, because that’s the easy part. You just need a basic template like this to get going. This also assumes your JavaScript is stored in a folder calledjs, so check your file paths just in case.index.html
<!doctype html>
<html lang="en">
<head>
<title>Treehouse Logo in three.js</title>
<meta charset="utf-8">
</head>
<body style="margin: 0;">
<script src="js/three.min.js"></script>
<script src="js/OrbitControls.js"></script>
<script>
// Our 3D code will go here...
</script>
</body>
</html>
|
Using three.js to Create 3D Scenes
We could write our JavaScript externally, but since there aren’t any HTML elements inside of the body, I figured it would help make this example a bit more clear if inline script tags were used.Global variables and functions
Inside our script tags, we want to set up some global variables and then call some functions, all of which will be defined later on:// Set up the scene, camera, and renderer as global variables. var scene, camera, renderer; init(); animate(); |
Create the Scene
Three.js uses the concept of a scene to define an area where you can place things like geometry, lights, cameras, and so on. In the following code, we start writing our initialization function by creating a scene. Then, we store the width and height of the browser window in the variablesWIDTH and HEIGHT. We’ll need them in more than once place later on, so it’s good to just grab them once and store them.// Globals from the previous step go here... // Sets up the scene. function init() { // Create the scene and set the scene size. scene = new THREE.Scene(); var WIDTH = window.innerWidth, HEIGHT = window.innerHeight; // More code goes here next... } |
Create the Renderer
Next, we set up a three.js renderer. We could use the SVG or canvas renderers, but we want to use the WebGL renderer because it’s able to take advantage of the GPU, which makes it several orders of magnitude more performant. After creating the renderer, we append it to the DOM via the body element. This will make three.js create acanvas inside the body element that will be used to render our scene.// Sets up the scene. function init() { // Code from previous steps goes here... // Create a renderer and add it to the DOM. renderer = new THREE.WebGLRenderer({antialias:true}); renderer.setSize(WIDTH, HEIGHT); document.body.appendChild(renderer.domElement); // More code goes here next... } |
Create a Camera
Once our scene and renderer are in place, we can create a camera. ThePerspectiveCamera takes a few parameters. They are:- FOV – We’re using 45 degrees for our field of view.
- Apsect – We’re simply dividing the browser width and height to get an aspect ratio.
- Near – This is the distance at which the camera will start rendering scene objects.
- Far – Anything beyond this distance will not be rendered. Perhaps more commonly known as the draw distance.
0,0,0 but I’ve set the Y value to 6 just to get some distance between our view and the mesh.Finally, we need to add the camera to the scene.
// Sets up the scene. function init() { // Code from previous steps goes here... // Create a camera, zoom it out from the model a bit, and add it to the scene. camera = new THREE.PerspectiveCamera(45, WIDTH / HEIGHT, 0.1, 20000); camera.position.set(0,6,0); scene.add(camera); // More code goes here next... } |
Update the Viewport on Resize
This is all well and good, but what happens when the site visitor resizes the browser window? For that, we’ll need to add an event listener. When the browser is resized, a couple of things happen. First, we resample the new width and height of the browser and store it in a variable that’s scoped to the function. Then, we use those values to set the new size of our renderer as well as recalculate the aspect ratio of the camera. In addition, we need to callupdateProjectionMatrix()
on the camera object so that our scene will actually update with the
new parameters. This is computationally expensive in the context of
real-time 3D rendering, but once the browser is resized, things click
back to their normal frame rates.// Sets up the scene. function init() { // Code from previous steps goes here... // Create an event listener that resizes the renderer with the browser window. window.addEventListener('resize', function() { var WIDTH = window.innerWidth, HEIGHT = window.innerHeight; renderer.setSize(WIDTH, HEIGHT); camera.aspect = WIDTH / HEIGHT; camera.updateProjectionMatrix(); }); // More code goes here next... } |
Add Lighting
Now it’s time to start crafting our scene a bit. By calling thesetClearColorHex function on our WebGLRenderer object, we’re able to set the background color of our scene to the Treehouse grey hex color with an opacity of 1.Next, we’ll need a light in order to see our 3D objects, so we’ll add a
PointLight
to the scene and set its position. There are several other kinds of
lights you can add to a scene, so be sure to check out the linked
documentation.// Sets up the scene. function init() { // Code from previous steps goes here... // Set the background color of the scene. renderer.setClearColorHex(0x333F47, 1); // Create a light, set its position, and add it to the scene. var light = new THREE.PointLight(0xffffff); light.position.set(-100,200,100); scene.add(light); // More code goes here next... } |
Load Geometry
Our mesh has been exported from Blender using the three.js JSON exporter, so we need to use theJSONLoader
to get the geometry into the scene. A callback is used inside the
loader to set the material on the mesh. In this case, we’re using a
basic LambertMaterial
to set the mesh to Treehouse’s green color. For completeness, I should
note here that the green you’re seeing in the final render isn’t quite
the same as Treehouse’s logo green. That’s because the point light is
skewing the brightness slightly, but we won’t worry about it for this
demo.Before leaving the callback function, we create a new mesh with our geometry and the material as parameters, then we add the mesh to the scene.
// Sets up the scene. function init() { // Code from previous steps goes here... // Load in the mesh and add it to the scene. var loader = new THREE.JSONLoader(); loader.load( "models/treehouse_logo.js", function(geometry){ var material = new THREE.MeshLambertMaterial({color: 0x55B663}); mesh = new THREE.Mesh(geometry, material); scene.add(mesh); }); // More code goes here next... } |
Add Controls
The last thing in our initialization function is the orbit controls we included earlier. These aren’t totally necessary, but they do allow us to drag the mouse across the mesh and orbit around it. It also allows the mousewheel to be used to zoom in and out of the mesh.// Sets up the scene. function init() { // Code from previous steps goes here... // Add OrbitControls so that we can pan around with the mouse. controls = new THREE.OrbitControls(camera, renderer.domElement); } // More code goes here next... |
Render the Scene
After our initialization function, we need to finish up with our animation function. It may not seem like anything is really “animated” here in the traditional sense, but we do need to redraw when the camera orbits around the mesh.The
requestAnimationFrame() function uses a newer
browser API that delegates redraws to the browser. This has some pretty
cool benefits, but primarily it makes sure the browser isn’t drawing
your animation unnecessarily if that tab isn’t currently selected. Paul Irish wrote an excellent blog post on requestAnimationFrame that explains this in more detail.After that, we need to render our scene through the camera we added earlier and then update the orbit controls.
// Sets up the scene. function init() { // Code from previous steps goes here... } // Renders the scene and updates the render as needed. function animate() { // Read more about requestAnimationFrame at http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/ requestAnimationFrame(animate); // Render the scene. renderer.render(scene, camera); controls.update(); } |
source:http://blog.teamtreehouse.com/the-beginners-guide-to-three-js
Label:
Inspiration,
Multimedia,
TECH,
Tutorial
Monday, September 16, 2013
Download E-Commerce Icon Set (33 Icons, PNG, PS, AI)
The icons are ideally suited to e-commerce projects and include many popular payment providers, including Bitcoin.
The icons come in different-sized PNGs (32 × 32, 64 × 64, 128 × 128 and 256 × 256 pixels), and the set includes Photoshop and Illustrator files containing all of the icons. Released under the Creative Commons Attribution-ShareAlike 3.0 Unported license, freely available for private and commercial projects.
source: http://www.smashingmagazine.com/2013/09/13/freebie-e-commerce-icons-33-png-ps-ai/
Sunday, September 15, 2013
Tutorial Add a Progress Bar to Your Site
In this quick tip, we will use the new NProgress jQuery plugin to add a progress bar to a web page. If you’d like to learn more, keep reading!
The NProgress Plugin
NProgress is a jQuery plugin that shows an interactive progress bar on the top of your page, inspired by the one on YouTube. It consists of a global object –NProgress which holds a number of methods that you can call to advance the progress bar. Here is a quick demo of the methods:<div>
<h1>Quick Load</h1>
<p>Show the progress bar quickly. This is useful for one-off tasks like AJAX requests and page loads.</p>
<button class="quick-load">Quick Load</button>
</div>
<div>
<h1>Incremental Load</h1>
<p>The progress bar is incremented with every element that is loaded. This can be useful in web apps that load multiple items.</p>
<button class="show-progress-bar">Show Progress Bar</button>
<button class="load-one-item">Load An Item</button>
<button class="finish">Finish Loading</button>
</div>
<div>
<h1>Percentage Load</h1>
<p>NProgress lets you set the progress bar to a specific percentage. This can be useful in apps where you know the total number of the items to be loaded, so you can calculate the percentage. This is the technique that we will use in the demo.</p>
<button class="show-progress-bar">Show Progress Bar</button>
<button class="set-to-25">Set to 25% Loaded</button>
<button class="set-to-75">Set to 75% Loaded</button>
<button class="finish">Finish Loading</button>
</div>
The plugin github page suggests that you hook up the
NProgress.start() function to your $(document).ready() callback and NProgress.done() to $(window).load()
which is a very easy way to integrate the plugin. This won’t show the
real progress (for that you will have to monitor all the resources that
are included in your page and increment the bar manually), however most
people won’t notice anyway.Now that you have a good idea of how NProgress is used, let’s make a more complicated example – a gallery that shows a progress bar while loading images. The bar will correspond to the actual number of images loaded.
The Gallery
As usual, we start off with the HTML markup. This time it is very simple, we only have need a div to hold the photos, and a load button:index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Quick Tip: Add a Progress Bar to Your Site</title>
<link href="http://fonts.googleapis.com/css?family=PT+Sans+Narrow:700" rel="stylesheet" />
<!-- The Stylesheets -->
<link href="assets/nprogress/nprogress.css" rel="stylesheet" />
<link href="assets/css/style.css" rel="stylesheet" />
</head>
<body>
<h1>Gallery Progress Bar</h1>
<div id="main"></div>
<a href="#" id="loadMore">Load More</a>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="assets/nprogress/nprogress.js"></script>
<script src="assets/js/script.js"></script>
</body>
</html>
I am including a custom font from Google Webfonts and two stylesheets in the <head>, and three JavaScript files before the closing </body> tag.Things get more interesting in the jQuery part of the tutorial. Here I am using the Deferred object to show the photos consecutively. This is needed, because we want the photos to download in parallel (which is much faster), but fade into view one after the other. This article is too short to explain how Deferreds work, but you can read through one of these: link, link, link. They are a powerful tool that can simplify asynchronous interactions.
assets/js/script.js
(function($){
// An array with photos to show on the page. Instead of hard
// coding it, you can fetch this array from your server with AJAX.
var photos = [
'assets/photos/1.jpg', 'assets/photos/2.jpg',
'assets/photos/3.jpg', 'assets/photos/4.jpg',
// more photos here
];
$(document).ready(function(){
// Define some variables
var page = 0,
loaded = 0,
perpage = 10,
main = $('#main'),
expected = perpage,
loadMore = $('#loadMore');
// Listen for the image-loaded custom event
main.on('image-loaded', function(){
// When such an event occurs, advance the progress bar
loaded++;
// NProgress.set takes a number between 0 and 1
NProgress.set(loaded/expected);
if(page*perpage >= photos.length){
// If there are no more photos to show,
// remove the load button from the page
loadMore.remove();
}
});
// When the load button is clicked, show 10 more images
// (controlled by the perpage variable)
loadMore.click(function(e){
e.preventDefault();
loaded = 0;
expected = 0;
// We will pass a resolved deferred to the first image,
// so that it is shown immediately.
var deferred = $.Deferred().resolve();
// Get a slice of the photos array, and show the photos. Depending
// on the size of the array, there may be less than perpage photos shown
$.each(photos.slice(page*perpage, page*perpage + perpage), function(){
// Pass the deferred returned by each invocation of showImage to
// the next. This will make the images load one after the other:
deferred = main.showImage(this, deferred);
expected++;
});
// Start the progress bar animation
NProgress.start();
page++;
});
loadMore.click();
});
// Create a new jQuery plugin, which displays the image in the current element after
// it has been loaded. The plugin takes two arguments:
// * src - the URL of an image
// * deferred - a jQuery deferred object, created by the previous call to showImage
//
// Returns a new deferred object that is resolved when the image is loaded.
$.fn.showImage = function(src, deferred){
var elem = $(this);
// The deferred that this function will return
var result = $.Deferred();
// Create the photo div, which will host the image
var holder = $('<div class="photo" />').appendTo(elem);
// Load the image in memory
var img = $('<img>');
img.load(function(){
// The photo has been loaded! Use the .always() method of the deferred
// to get notified when the previous image has been loaded. When this happens,
// show the current one.
deferred.always(function(){
// Trigger a custom event on the #main div:
elem.trigger('image-loaded');
// Append the image to the page and reveal it with an animation
img.hide().appendTo(holder).delay(100).fadeIn('fast', function(){
// Resolve the returned deferred. This will notifiy
// the next photo on the page and call its .always() callback
result.resolve()
});
});
});
img.attr('src', src);
// Return the deferred (it has not been resolved at this point)
return result;
}
})(jQuery);
The progress bar is incremented with every loaded image by the callback function that listens for the image-loaded custom event. This way the showImage function is free to handle only the loading and displaying of the photos.by Martin Angelov
source: http://tutorialzine.com/2013/09/quick-tip-progress-bar/
Label:
Education,
HTML,
Inspiration,
Modules,
Multimedia,
TECH,
Tutorial
Subscribe to:
Posts (Atom)




RSS Feed
Twitter
Facebook