How to use the CylinderBufferGeometry function from three

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

94
95
96
97
98
99
100
101
102
103
const backRing = frontRing.clone();
backRing.position.z = -THICKNESS / 2;
backRing.rotateY(Math.PI);
scene.add(backRing);

const outerCylinderGeometry = new THREE.CylinderBufferGeometry(
  RADIUS + (THICKNESS / 2),
  RADIUS + (THICKNESS / 2),
  THICKNESS,
  SEGMENTS,
fork icon2
star icon3
watch icon2

+ 11 other calls in file

65
66
67
68
69
70
71
72
73
74
    );
}

drawCylinder (penAttributes, dimensions, position, rotation) {
    this._addObjectFromGeometry(
        new three.CylinderBufferGeometry(dimensions[0], dimensions[1], dimensions[2]),
        position,
        rotation,
        penAttributes.color4f
    );
fork icon304
star icon0
watch icon10

+ 7 other calls in file

702
703
704
705
706
707
708
709
710
711
var matLineYellowTransparent = matLineYellow.clone();
matLineYellowTransparent.opacity = 0.25;

// reusable geometry

var arrowGeometry = new THREE.CylinderBufferGeometry( 0, 0.05, 0.2, 12, 1, false);

var scaleHandleGeometry = new THREE.BoxBufferGeometry( 0.125, 0.125, 0.125);

var lineGeometry = new THREE.BufferGeometry( );
fork icon4
star icon26
watch icon0

982
983
984
985
986
987
988
989
990
991

}

static prepareBeamInstance() {

  let beamGeometry = new THREE.CylinderBufferGeometry(
    BEAM_TOP_RADIUS,
    BEAM_TOP_RADIUS,
    BEAM_LENGTH,
    BEAM_RESOLUTION,
fork icon0
star icon7
watch icon0

+ 3 other calls in file

18
19
20
21
22
23
24
25
26
27
let material = new THREE.LineBasicMaterial( { color : color } );
let ellipse = new THREE.Line( geometry, material );
this.add( ellipse );

// Head
let _coneGeometry = new THREE.CylinderBufferGeometry( 0, 0.5, 1, 5, 1 );
let _headLength = headLength * Math.max(radiusX, radiusY);
let _headWidth = headWidth * _headLength;
this.cone = new THREE.Mesh( _coneGeometry, new THREE.MeshBasicMaterial( { color: color } ) );
this.cone.scale.set( _headWidth, _headLength, _headWidth );
fork icon0
star icon4
watch icon0

+ 3 other calls in file

251
252
253
254
255
256
257
258
259
260
/*
// const originY = 1.25;
const length = 2;
const height = (1.85 - 1.5) / 2;

var geometry = new THREE.CylinderBufferGeometry(0.02, 0.02, length, 16);

this.laserMaterial = new THREE.MeshBasicMaterial({
  color: 0xff00aa
});
fork icon0
star icon0
watch icon0

+ 2 other calls in file

350
351
352
353
354
355
356
357
358
359
    new THREE.Matrix4()
    .set(1,  0, 0, 0,
         0,  0, 1, 0,
         0, -1, 0, 0,
         0,  0, 0, 1));
var geometry = new THREE.CylinderBufferGeometry( radius, radius, direction.length()/2.0, 6, 6, true );
var cyl1 = new THREE.Mesh( geometry, material_from );
var cyl2 = new THREE.Mesh( geometry, material_to );
cyl1.applyMatrix(orientation);
cyl2.applyMatrix(orientation);
fork icon0
star icon0
watch icon0

+ 2 other calls in file

Other functions in three

Sorted by popularity

function icon

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