a voxeljs module that implements LabelPlugin , a three.js plugin that adds labels to your game players (avatars).
npm install voxel-label
|1||downloads in the last week|
|9||downloads in the last month|
|Version||0.0.1 last updated 10 months ago|
Voxel-label is a voxeljs module that implements LabelPlugin, a three.js plugin that adds labels to your game players (avatars). It can work in single-player mode as well as with voxel-client for labelling all avatars in a multiplayer game.
Get it running on your machine
Run the start script:
This gets the server running on port 8080.
You may view a demo at http://127.0.0.1:8080.
require('voxel-label')(labelText, avatar, game, playerID, emitter, otherPlayers)
var playerLabel = LabelMaker("JayJay", avatar, game, 1)
Make sure that your application populates a registration objects that has a username for the other players ("others"). voxel-app-server has an example of how to do this.
var playerLabel = LabelMaker(labelText, avatar, game, client.playerID, client.emitter, client.others)
- Much of the code for the LabelPlugin and Label.js comes from Chris Strom's blog: http://japhr.blogspot.com.es/2013/03/fun-with-threejs-camera-orientation.html
- Max Ogden for creating voxeljs