How to use the @here/harp-materials.HighPrecisionLineMaterial.DEFAULT_COLOR function in @here/harp-materials

To help you get started, we’ve selected a few @here/harp-materials examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heremaps / harp.gl / @here / harp-lines / lib / HighPrecisionLines.ts View on Github external
constructor(
        geometry?: THREE.BufferGeometry,
        material?: HighPrecisionLineMaterial,
        positions?: number[] | THREE.Vector3[],
        color?: THREE.Color,
        opacity?: number
    ) {
        super(geometry === undefined ? new THREE.BufferGeometry() : geometry, material);

        if (material === undefined) {
            material = new HighPrecisionLineMaterial({
                color: color ? color : HighPrecisionLineMaterial.DEFAULT_COLOR,
                opacity: opacity !== undefined ? opacity : HighPrecisionLineMaterial.DEFAULT_OPACITY
            });
        }

        this.matrixWorldInverse = new THREE.Matrix4();

        if (positions) {
            this.setPositions(positions);
        }
    }