codecamp

three.js AnimationUtils

AnimationUtils

一个提供各种动画辅助方法的对象,内部使用。

方法

.arraySlice ( array, from, to ) : Array

和Array.prototype.slice作用一样, 但也适用于类型化数组.

.convertArray ( array, type, forceClone ) : Array

将数组转换为某种特定类型。

.flattenJSON ( jsonKeys, times, values, valuePropertyName ) : Array

用于解析AOS关键帧格式。

.getKeyframeOrder ( times ) : Array

返回一个数组,时间和值可以根据此数组排序。

.isTypedArray ( object ) : Boolean

如果该对象是类型化数组,返回true

.makeClipAdditive ( targetClip : AnimationClip, referenceFrame : Number, referenceClip : AnimationClip, fps : Number ) : AnimationClip

Converts the keyframes of the given animation clip to an additive format.

.sortedArray ( values, stride, order ) : Array

将getKeyframeOrder方法返回的数组排序。

.subclip ( clip : AnimationClip, name : String, startFrame : Number, endFrame : Number, fps : Number ) : AnimationClip

创建一个新的片段,仅包含所给定帧之间的原始剪辑片段。

源码

src/animation/AnimationUtils.js


three.js AnimationObjectGroup
three.js KeyframeTrack
温馨提示
下载编程狮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; }