代码之家  ›  专栏  ›  技术社区  ›  garrettlynchirl

使用矢量3的参数几何

  •  0
  • garrettlynchirl  · 技术社区  · 6 年前

    var restDistance = 20;
    var xSegs = 15;
    var ySegs = 10;
    
    var clothFunction = plane(restDistance * xSegs, restDistance * ySegs, zSegs);
    var cloth = new Cloth(xSegs, ySegs);
    
    clothGeometry = new THREE.ParametricGeometry( clothFunction, cloth.w, cloth.h, true );
    

    var clothFunction = function (u, v) {
                    return new THREE.Vector3(restDistance * xSegs, restDistance * ySegs, 1);
                };
    
    1 回复  |  直到 6 年前