codecamp

three.js Interpolant

A参数样本上插值的抽象基类

参数域是一维的,通常是数据定义的曲线上的时间或路径。

示例值可以具有任何维度,派生类可以对数据应用特殊的解释。

该类提供间隔查找的模板方法,将实际的插值延迟到派生类。

对于最多两个点之间的访问时间复杂度为O(1),对于随机访问时间复杂度为O(log N),其中N为位置数。

相关: http://www.oodesign.com/template-method-pattern.html

构造器

Interpolant( parameterPositions, sampleValues, sampleSize, resultBuffer )

parameterPositions -- 位置数组

sampleValues -- 样本数组

sampleSize -- 样品数量

resultBuffer -- 用于存储插值结果的缓冲区。

注意: 这不是设计为直接调用的。

属性

.parameterPositions : null

.resultBuffer : null

.sampleValues : null

.settings : Object

可选的、特定于子类的设置结构。

.valueSize : null

方法

.evaluate ( t : Number ) : Array

计算补间函数在位置 t 的值。

源码(Source)

src/math/Interpolant.js


three.js Frustum
three.js Line3
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

参考

核心 / BufferAttributes

渲染器 / WebXR

开发者参考

WebGL渲染器

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }