Begin port of PhotonEmitterNode.js