voxel-label

0.0.1 • Public • Published

voxel-label

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

npm install

Run the start script:

npm start

This gets the server running on port 8080.

You may view a demo at http://127.0.0.1:8080.

API

require('voxel-label')(labelText, avatar, game, playerID, emitter, otherPlayers)

Example:

Single-player mode:

var playerLabel = LabelMaker("JayJay", avatar, game, 1)

Multi-player mode:

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)

Credits:

license

BSD

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    0

Package Sidebar

Install

npm i voxel-label

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • chrisekelley