Creating a 3D Game With Three.js and WebGL

Prerequisites

  • A browser with WebGL – this game has been tested on Chrome and Firefox. IE still doesn’t support WebGL, unless you’re using Windows 8.1 with IE11.
  • Three.js library available for download from the Three.js website
  • The Keyboard.js helper library I used for this project, created by Arthur Schreiber at No Karma. Download it from my GitHub repository
  • A basic understanding of what Three.js does. Read this super simple, super quick tutorial by Paul Lewis. It’s basically a short-hand version of this article.

Setup

Get a base index.html running

Step one when making a web-based game is to create the host index.html file. In our case, it only needs to be a very simple set of elements, so we can bundle the CSS styling too.

Import Keyboard.js and Three.js

Three.js is a library contained in just one JavaScript file, so we can grab the minified version from the website.

For Keyboard input, we will need to referencethe aforementioned JavaScript file in our index.html as well.

Create setup() and draw() functions

The setup() function will be the start point for the game code. The draw() function will be run every frame and will handle all the rendering and game logic.

In order to loop the draw() function, we simply utilise the requestAnimationFrame() function call, and pass ‘draw’ as the parameter. Remember, not all browsers natively support the call, and you might have to use Paul Irish’s shim to gain maximum compatibility. Also, it is important to realise that requestAnimationFrame() does not guarantee a fixed frame-rate, so you need to use time-deltas to calculate realistic physics. For a basic game like Pong, we don’t really care about that.

Basic World

Set up the Three.js world and camera

Three.js includes these important elements:

  • Scene
  • Renderer
  • Camera
  • Mesh
  • Light
  • Material

Cameras, Meshes, and Lights need to be added to the scene using the scene.add() function.

Attach a WebGL Three.js Renderer to the DIV

The renderer is attached to whichever HTML DOM element you wish to render the scene to, and a render() call is made each frame to the renderer in order to draw the Three.js scene.

Add a camera to the scene

Three.js has the option to create Perspective and Orthographic cameras. For most uses, Perspective camera is the best choice. We can change position and rotation information of the camera like any other object in the scene.

Draw a sphere and light it

Meshes must be paired with Materials in order to give them a defined look and feel. Meshes can be of many types, include primitives such as Cube, Sphere, Plane and Torus. Materials can have different characteristics depending on their type. The basic Material types include Lambert, Phong, and Basic.

  • Basic renders an unlit Mesh with no shadows or dark shading. A sphere will look like a circle if rendered with Basic.
  • Lambert is a simple diffuse-like lighting that creates shading on sides facing away from a light source. It gives a basic 3D look of surfaces that are matte (non-shiny and non-reflective)
  • Phong is used for achieving a plastic-like look and feel, with the ability to gain highlights that give a much shinier appearance to the Mesh.

Show off your sphere with a Point Light. This is the most basic light, with no direction or rotation. Make sure you tweak the light’s intensity and distance to get it looking good.

Add Game Objects

Draw playing area plane

The playing area will be a Three.js

VUE Software to Provide Compensation Management System With Revenue Reconciliation for Insurance Technology and Distribution Organization

COCONUT CREEK, Fla., July 8, 2013 /PRNewswire/ — VUE Software® today announced that a rapidly growing health insurance technology and distribution partner recently selected the VUE Compensation Management™ solution for its compensation management infrastructure. A subsidiary of one of the top ten health insurance companies in the United States the organization is hiring and training thousands of agents and service workers. The firm plans to leverage the system’s comprehensive commission management capabilities, which include automated revenue reconciliation, to confirm commission accuracy across multiple carriers, maintain smooth operations and ensure correct, timely agent compensation.

Because of its highly specialized business model, rapid growth and ongoing interactions with carriers, exchanges, agents and consumers, the insurance service partner required a robust, configurable system able to scale to high business volumes. Revenue reconciliation was a deciding factor due to the need to verify payment accuracy across a multi-carrier, multi-hierarchy environment and incorporate pay structures such as flat fees, percentages and multiple commission tiers. In addition, higher transaction volumes were anticipated to accommodate the effects of the Patient Protection and Affordable Care Act (PPACA) and increases in Medicare use with a shifting retiree population.

The service partner chose VUE Compensation Management following a referral from an existing VUE Software client on the basis of revenue reconciliation. The solution is being integrated into the service partner’s technology and will provide comprehensive revenue reconciliation capabilities as partnerships are established in the organization’s aggressive growth phase.

“With our dedicated insurance focus and successful track record with reputable clients, VUE Software is an excellent choice for companies that need to rise above industry complexities and healthcare reform challenges,” said Abhinav Dave, executive vice president of VUE Software. “Unlike many solutions, automated reconciliation is built into VUE Compensation Management so our customers can keep pace with complex commission environments. Reconciling variations between expected revenue and payments received is just good business, but doing it manually can be extremely time-consuming. Higher transaction volumes increase the potential for error, particularly in multi-carrier situations. Only a sophisticated system like ours can make accuracy easy.”

VUE Compensation Management’s revenue reconciliation module enables service providers, managing general agents (MGAs), Health Insurance Exchanges (HIXs), carriers and other key partners to forecast, track, measure, compare and recognize earned revenue and avoid agent overpayments. Automation streamlines payment and reconciliation processes, saves time and money, helps eliminate errors and increases overall efficiencies. The system helps strengthen partner relationships by providing factual evidence for any payment errors, since all calculations are documented according to the contracted commission structure.

About VUE Software®

VUE Software is a leading provider of distribution, incentive compensation and sales performance management suites. Backed by over 20 years of insurance experience, VUE Software solutions are built to meet the unique needs of the life, health, property and casualty, and distribution verticals. VUE Software is a doing-business-as (DBA) name of Computer Solutions and Software International, LLC (CSSI).

ASUS PQ321Q UltraHD Monitor Review: Living with a 31.5-inch 4K Desktop Display

Many consider me to be a 4K hater. The past few trade shows I’ve attended have been pushing it on consumers to replace their TVs, but I see less value in it. When it comes to a computer display, it is a different game. Unlike a 50” TV, we sit close to our monitors, even if they are 30” in size. We also have no worries about a lack of native content, since everything is rendered on the fly and native. There are no issues with the lack of HDMI 2.0, as DisplayPort 1.2 can drive a 3840×2160 screen at 60 Hz.

When it comes to 4K on the desktop, my main question is: how much difference will I see? ASUS is one of the first with a HiDPI display in the PQ321Q. While not truly 4K, it is a 3840×2160 LCD display that can accept an Ultra High Definition (UHD) signal over HDMI and DisplayPort. It also clocks in at a wallet-stretching $3,500 right now. The question is, are we seeing the future with displays here, or are we seeing a niche product?

What does 4K/UHD/HiDPI bring to the desktop? We’ve seen it for a few years now in smartphones and tablets, making their smaller screens more usable for reading and general work. My initial thought is more desktop space, as that is what it has meant before. With a 32” monitor and a pixel density this high, running it without any DPI scaling leads to a desktop where reading text is a huge pain. Instead I believe most users will opt for DPI scaling so elements are larger and easier to read. Now you have something similar to the Retina screen on the iPhone: No more desktop space compared to a 2560×1440 monitor, but one that is razor sharp and easier to look at.

To get to this pixel density, ASUS has relied upon a panel from Sharp that uses IGZO technology. IGZO (Indium gallium zinc oxide) is a material that replaces amorphous silicon for the active layer of an LCD screen. The main benefit is higher electron mobility that allows for faster reacting, smaller pixels. We have seen non-IGZO panels in smartphones with higher pixel densities, but we don’t have any other current desktop LCDs that offer a higher pixel density than this ASUS display. IGZO also allows for a wide viewing angle.

Samsung Galaxy S4 Software Will Increase

Kansas – Some telecommunications companies in the United States, such as Verizon, AT & T and Sprint are currently in the process of major reform efforts on a smart phone that is now being loved, Samsung Galaxy S4. Although there is no official announcement from them, any reports from various sources stating the same thing.
According to a report quoted by CNET site, with updates on Samsung Galaxy S4 users can move apps from internal storage to microSD card. This capability can empty the internal storage. So that the performance can be optimized.
Other updates to security software yitu Samsung Knox and bootloader. Developmental changes are also located in the settings are easy to apply and other additional software.
Users of Samsung Galaxy S4, just need to wait for an official announcement about this renewal. Sprint and AT & T amid spreading rumors this renewal. While Verizon is working on desktop software via Samsung Kies.

Yahoo Acquires AdMovate To Increase Mobile Advertising

News about the acquisition of Yahoo is still a lot to buy the company from a small start-up like Summly to large and are known as Tumblr. Today Yahoo has officially announced that it has acquired AdMovate, a private company. AdMovate focus to the world of advertising on mobile devices, they develop a solution that will bring mobile advertising to the target behavior. AdMovate itself also has confirmed this news, but both Yahoo and AdMovate not want to inform the amount of the approved agreement.
Now a team of technicians will AdMovate integrated with Yahoo advertising display team, based in Silicon Valley. Yahoo said that the acquisition is part of their move to invest more in technology advertising platform, so it will be easier for agencies and advertisers purchase. Yahoo CEO Marissa Mayer has even said many times that the company they represent the future of the mobile world so fair they are trying hard to improve their mobile services.

Next Page