Skip to content
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

exporting the CCDIKHelper class also #23404

Merged
merged 1 commit into from
Feb 1, 2022
Merged

exporting the CCDIKHelper class also #23404

merged 1 commit into from
Feb 1, 2022

Conversation

abernier
Copy link
Contributor

@abernier abernier commented Feb 1, 2022

The CCDIKHelper class was not exported.

Context: I needed it in an example I made using SkinnedMesh+CCDIKSolver: https://codesandbox.io/s/romantic-rubin-n0df6?file=/src/index.js -- In my example, because that class was not exported, I had to copy it to that file to be able to reuse it, which is not ideal: that's why I make that PR

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 1, 2022

Can't you use the factory method CCDIKSolver.createHelper() for creating an instance of the helper?

@abernier
Copy link
Contributor Author

abernier commented Feb 1, 2022

Can't you use the factory method CCDIKSolver.createHelper() for creating an instance of the helper?

Oh yeah, I tried that first, but it didn't work:

createHelper() {
return new CCDIKHelper( this.mesh, this.mesh.geometry.userData.MMD.iks );
}

because it uses MMD's iks: this.mesh.geometry.userData.MMD.iks -- I don't have MMD datas in my example

We could also fix that:

	createHelper() {

		return new CCDIKHelper( this.mesh, this.iks );

	}

but we should then patch the MMD examples that take advantage on this...

Exporting the CCDIKHelper seemed easier to me

@Mugen87 Mugen87 added this to the r138 milestone Feb 1, 2022
@mrdoob mrdoob merged commit a3f62b1 into mrdoob:dev Feb 1, 2022
@mrdoob
Copy link
Owner

mrdoob commented Feb 1, 2022

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants