-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change hand color #22
Comments
See the README: (window.controller = new Leap.Controller)
.use('riggedHand', {
materialOptions: {
color: new THREE.Color(0xff0000)
}
})
.connect() See Plunkr: https://plnkr.co/edit/7fkhnY?p=info Note that you may want to change the material wholly. I recommend taking a look at this PR, which shows how to put in a custom shader experimentally: #11 Specifically, you can subscribe to the .on('riggedHand.meshAdded', function(handMesh){
console.log('mesh added', arguments);
handMesh.material = new THREE.ShaderMaterial({
uniforms: uniforms,
vertexShader: document.getElementById('vertexShader').innerHTML,
fragmentShader: document.getElementById('fragmentShader').innerHTML
});
handMesh.skinning = true;
}) |
For some reason I was assuming that materialOptions had to be a static, JSON-like hash (e.g. accepting Thanks a lot! |
done! |
Is there an easy way to do it?
Function that sets bone color seems like an overkill. Also, if I set HSL value, it doesn't seem to be correct anyway (try to set red in HSL space).
I've looked at the source code and I can't see how I can provide material option that would overwrite color.
The text was updated successfully, but these errors were encountered: