小编Nic*_*ens的帖子

三.js胖线hilbert3D转点

我试图用思考来实现,我发现了这个例子

但是该示例使用:

var points = GeometryUtils.hilbert3D( new THREE.Vector3( 0, 0, 0 ), 20.0, 1, 0, 1, 2, 3, 4, 5, 6, 7 );
Run Code Online (Sandbox Code Playgroud)

我不想使用这个,而是想用 Vector3 点数组创建线。

var geometry = new LineGeometry();
            geometry.setPositions( positions );
            geometry.setColors( colors );

            matLine = new LineMaterial( {

                color: 0xffffff,
                linewidth: 5, // in pixels
                vertexColors: true,
                //resolution:  // to be set by renderer, eventually
                dashed: false

            } );

            line = new Line2( geometry, matLine );
            line.computeLineDistances();
            line.scale.set( 1, 1, 1 );
            scene.add( line ); …
Run Code Online (Sandbox Code Playgroud)

points three.js

3
推荐指数
1
解决办法
1650
查看次数

标签 统计

points ×1

three.js ×1