Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Support morphTarget and morphTargetInfluences #209

Open
shampliu opened this issue Jan 8, 2018 · 3 comments
Open

Support morphTarget and morphTargetInfluences #209

shampliu opened this issue Jan 8, 2018 · 3 comments

Comments

@shampliu
Copy link

shampliu commented Jan 8, 2018

No description provided.

@toxicFork
Copy link
Collaborator

toxicFork commented Jan 11, 2018

@johnmarinelli
Copy link
Contributor

johnmarinelli commented Jan 18, 2018

Hey, I'd like to work on this if nobody has started already. I have been trying to implement the THREE.js Hemisphere Lights example (https://threejs.org/examples/?q=hemisp#webgl_lights_hemisphere) and ran into a morphTargetInfluences error. Right now the only solution I've come up with is to manually scene.add(mesh).

Here is the code from the example -

var material = new THREE.MeshPhongMaterial( { color: 0xffffff, specular: 0xffffff, shininess: 20, morphTargets: true, vertexColors: THREE.FaceColors, flatShading: true } );
var mesh = new THREE.Mesh( geometry, material );

var s = 0.35;
mesh.scale.set( s, s, s );
mesh.position.y = 15;
mesh.rotation.y = -1;
mesh.castShadow = true;
mesh.receiveShadow = true;

scene.add( mesh );

var mixer = new THREE.AnimationMixer( mesh );
mixer.clipAction( geometry.animations[ 0 ] ).setDuration( 1 ).play();
mixers.push( mixer );

@toxicFork If you haven't started on this already, let me know and I'll see what I can do. If you have any pointers or ideas, I'd be happy to hear them as well. Right now I'm not sure how to decouple the AnimationMixer from the element.

@toxicFork
Copy link
Collaborator

toxicFork commented Jan 18, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants