Skip to content

Conversation

@yomotsu
Copy link
Contributor

@yomotsu yomotsu commented Aug 16, 2020

A part of #19984.
A series of Math classes conversion, Part 3 of 3.

This PR contains:

  • [ ] Interpolant (The base class)
    • CubicInterpolant
    • DiscreteInterpolant
    • LinearInterpolant
    • QuaternionLinearInterpolant
  • [ ] Interpolant.tests.js [*1]

and

  • Color

*1:
The test has to be changed as well because 'Interpolant.tests' was assuming Interpolant base class to be a Function (using call to extend the base class).


edited: Interpolant base class couldn't be converted. I keep it as it is.

@mrdoob mrdoob added this to the r120 milestone Aug 16, 2020
@mrdoob
Copy link
Owner

mrdoob commented Aug 16, 2020

Seems like webgl_loader_mmd broke.

@yomotsu
Copy link
Contributor Author

yomotsu commented Aug 16, 2020

Aww...
It because MMDLoader also assumes Interporant to be a function.

THREE.Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );

Should we keep the Interporant base class as a function? It may break other 3rd party implementations too.

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 16, 2020

Notice that GLTFCubicSplineInterpolant also derives from Interpolant.

function GLTFCubicSplineInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );
}

Interpolant is class that can't be converted now, see #19934 (comment).

@yomotsu
Copy link
Contributor Author

yomotsu commented Aug 16, 2020

Thanks for your notice. I'll revert it for now.

@yomotsu yomotsu marked this pull request as draft August 16, 2020 11:58
@yomotsu
Copy link
Contributor Author

yomotsu commented Aug 16, 2020

let me close this PR.
I will open another PR for Color class.

@yomotsu yomotsu closed this Aug 16, 2020
@mrdoob mrdoob removed this from the r120 milestone Aug 16, 2020
@yomotsu yomotsu mentioned this pull request Aug 16, 2020
43 tasks
@yomotsu yomotsu deleted the move-to-es6-classes/math-interpolants branch June 29, 2021 13:33
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.

3 participants