THREE.MeshLine icon indicating copy to clipboard operation
THREE.MeshLine copied to clipboard

MeshLineMaterial.copy copy uniforms repeatedly.

Open shawn0326 opened this issue 4 years ago • 0 comments

ShaderMaterial already copied all the uniforms. No need to copy again ?

MeshLineMaterial.prototype.copy = function(source) {
    THREE.ShaderMaterial.prototype.copy.call(this, source)

    // No need to copy again~~~~
    this.lineWidth = source.lineWidth
    this.map = source.map
    this.useMap = source.useMap
    this.alphaMap = source.alphaMap
    this.useAlphaMap = source.useAlphaMap
    this.color.copy(source.color)
    this.opacity = source.opacity
    this.resolution.copy(source.resolution)
    this.sizeAttenuation = source.sizeAttenuation
    this.dashArray.copy(source.dashArray)
    this.dashOffset.copy(source.dashOffset)
    this.dashRatio.copy(source.dashRatio)
    this.useDash = source.useDash
    this.visibility = source.visibility
    this.alphaTest = source.alphaTest
    this.repeat.copy(source.repeat)

    return this
  }

shawn0326 avatar Jan 24 '21 12:01 shawn0326