three#IcosahedronBufferGeometry JavaScript Examples

The following examples show how to use three#IcosahedronBufferGeometry. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FireBallCore.js    From sketch-webcam with MIT License 6 votes vote down vote up
constructor() {
    const geometry = new IcosahedronBufferGeometry(2, 4);

    const material = new RawShaderMaterial({
      uniforms: {
        time: {
          value: 0
        },
        texture: {
          value: null
        },
        alphaShow: {
          value: 0
        },
        alphaHide: {
          value: 0
        }
      },
      vertexShader: vs,
      fragmentShader: fs,
      transparent: true
    });

    super(geometry, material);
  }
Example #2
Source File: FireBallFlare.js    From sketch-webcam with MIT License 6 votes vote down vote up
constructor() {
    const geometry = new IcosahedronBufferGeometry(2.2, 5);

    const material = new RawShaderMaterial({
      uniforms: {
        time: {
          value: 0
        },
        texture: {
          value: null
        },
        alphaShow: {
          value: 0
        },
        alphaHide: {
          value: 0
        }
      },
      vertexShader: vs,
      fragmentShader: fs,
      transparent: true,
      blending: AdditiveBlending,
      side: DoubleSide,
      depthWrite: false
    });

    super(geometry, material);
  }