Skip to content

moonscreens/twitch-chat-emotes-threejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitch-chat-emotes-threejs

A Three.JS specific variant of the twitch-chat-emotes package.

Example repository

import TwitchChat from 'twitch-chat-emotes-threejs';
import * as THREE from 'three';

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 => { // receives unique emote textures on creation
		texture.colorSpace = THREE.SRGBColorSpace; // fixes washed out colors
	},

	channels,
	maximumEmoteLimit: 3,
});

ChatInstance.listen((emotes) => { //receives an array of "emote" objects, THREE.js material is within emotes[i].material
	console.log(emotes);
});
``

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published