All files / src/WebGL/materials SphereImposterOutlineMaterial.ts

0% Statements 0/12
0% Branches 0/9
0% Functions 0/2
0% Lines 0/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29                                                         
import { Color } from "../core/Color";
import { ImposterMaterial } from "./ImposterMaterial";
 
export class SphereImposterOutlineMaterial extends ImposterMaterial {
  outlineColor: Color;
  outlineWidth: number;
  outlinePushback: number;
  
  constructor(parameters?: any) {
    super(parameters);
    parameters = parameters || {};
 
    this.shaderID = "sphereimposteroutline";
    this.outlineColor = parameters.color || new Color(0.0, 0.0, 0.0);
    this.outlineWidth = parameters.width || 0.1;
    this.outlinePushback = parameters.pushback || 1.0;
 
    this.setValues(parameters);
  }
 
  clone<T extends this>(material: T = new SphereImposterOutlineMaterial() as T): T {
    super.clone.call(this, material);
    material.outlineColor = this.outlineColor;
    material.outlineWidth = this.outlineWidth;
    material.outlinePushback = this.outlinePushback;
    return material;
  }
}