twitch-chat-emotes-threejs
v0.4.3
Published
A library to use `twitch-chat-emotes` with ThreeJS
Downloads
10
Readme
twitch-chat-emotes-threejs
A Three.JS specific variant of the twitch-chat-emotes package.
import TwitchChat from 'twitch-chat-emotes-threejs';
const ChatInstance = new TwitchChat({
// If using planes, consider using MeshBasicMaterial instead of SpriteMaterial
materialType: THREE.SpriteMaterial,
// Passed to material options
materialOptions: {
transparent: true,
},
materialHook: material => console.log, // receives unique emote materials on creation
textureHook: texture => console.log, // receives unique emote textures on creation
channels,
maximumEmoteLimit: 3,
});
ChatInstance.listen((emotes) => { //receives an array of "emote" objects, THREE.js material is within emotes[i].material
console.log(emotes);
});
``