spite / THREE.MeshLine

Mesh replacement for THREE.Line
MIT License
2.14k stars 381 forks source link

Failed to execute 'uniform3fv' on 'WebGLRenderingContext' #39

Closed Bramichou closed 7 years ago

Bramichou commented 7 years ago

Uncaught TypeError: Failed to execute 'uniform3fv' on 'WebGLRenderingContext': No function was found that matched the signature provided.

I got this issue when i'm trying to create a basic line with MehsLine ...

` import {MeshLine, MeshLineMaterial} from 'three.meshline'

createLine(){

    this.lineGeometry = new THREE.Geometry()
    this.lineGeometry.vertices.push(
            new THREE.Vector3(this.sprite.position.x, 0., this.sprite.position.z),
    );

    this.lineMesh = new MeshLine()
    this.lineMesh.setGeometry(this.lineGeometry)

    this.lineMaterial = new MeshLineMaterial({
        color : 0xffffff,
        lineWidth : 10.
    })

    this.line = new THREE.Mesh(this.lineMesh.geometry, this.lineMaterial)

    this.scene.add(this.line)
}

`

when i create my sprite, i want to draw a line, and when i move my sprite, i want to add dynamiclly vertices to draw dynamiclly the line following the position of the sprite.

But at this time, just draw a point is so hard ? Why i got this error ? Thx for answering 👍

patricknelson commented 7 years ago

I'm getting this error too... what did you do to get around it?

subblue commented 7 years ago

I just had the same problem, you now have to pass in the colour as a new THREE.Color(0xff0000)