How to use the Data3DTexture function from three

Find comprehensive JavaScript three.Data3DTexture code examples handpicked from public code repositorys.

41
42
43
44
45
46
47
48
49
50
colormap.needsUpdate = true;

geometry.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
geometry.setIndex(new THREE.BufferAttribute(indices, 1));

const texture = new THREE.Data3DTexture(
    config.volume.data,
    config.volume.shape[2],
    config.volume.shape[1],
    config.volume.shape[0],
fork icon115
star icon803
watch icon0

91
92
93
94
95
96
97
98
99
100
    THREE.NearestFilter,
);
colormap.needsUpdate = true;

if (config.mask.data.length > 0 && config.mask_opacities.data.length > 0) {
    mask = new THREE.Data3DTexture(
        config.mask.data,
        config.mask.shape[2],
        config.mask.shape[1],
        config.mask.shape[0],
fork icon115
star icon803
watch icon0

+ 3 other calls in file

84
85
86
87
88
89
90
91
92
93
texture.minFilter = three_1.LinearFilter;
texture.wrapS = three_1.ClampToEdgeWrapping;
texture.wrapT = three_1.ClampToEdgeWrapping;
texture.generateMipmaps = false;
texture.needsUpdate = true;
const texture3D = new three_1.Data3DTexture();
texture3D.image.data = data;
texture3D.image.width = size;
texture3D.image.height = size;
texture3D.image.depth = size;
fork icon1
star icon3
watch icon0

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)