codecamp

three.js Data3DTexture

创建一个三维的纹理贴图。这种纹理贴图只能被用于WebGL 2渲染环境中。

构造函数

Data3DTexture( data : TypedArray, width : Number, height : Number, depth : Number )

data -- 纹理的数据。
width -- 纹理的宽度。
height -- 纹理的高度。
depth -- 纹理的深度。

例子

WebGL2 / materials / texture3d

属性

共有属性请参见其基类Texture。

.wrapR : number

这定义了纹理在深度方向上的包裹方式。

默认值为 THREE.ClampToEdgeWrapping,其中边缘被夹紧到外边缘纹素。其他两个选择是 THREE.RepeatWrapping 和 THREE.MirroredRepeatWrapping。有关详细信息,请参阅纹理常量页面。

方法

共有方法请参见其基类Texture。

源代码

src/textures/Data3DTexture.js


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