three.js CubicInterpolant

2023-02-16 17:47 更新

代碼示例

const interpolant = new THREE.CubicInterpolant(
new Float32Array( 2 ),
new Float32Array( 2 ),
1,
new Float32Array( 1 )
);

interpolant.evaluate( 0.5 );

構(gòu)造函數(shù)(Constructor)

CubicInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer )

parameterPositions -- 位置數(shù)組
sampleValues -- 樣本數(shù)組
sampleSize -- 樣本數(shù)量
resultBuffer -- 用于存儲插值結(jié)果的緩沖區(qū)。

屬性(Properties)

.parameterPositions : null

.resultBuffer : null

.sampleValues : null

.settings : Object

.valueSize : null

方法(Methods)

.evaluate ( t : Number ) : Array

評估位置t處的插值。

源碼(Source)

src/math/interpolants/CubicInterpolant.js


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號