replaceLightNums method

String replaceLightNums(
  1. String string,
  2. WebGLParameters parameters
)

Implementation

String replaceLightNums(String string, WebGLParameters parameters) {
  string = string.replaceAll("NUM_DIR_LIGHTS", parameters.numDirLights.toString());
  string = string.replaceAll("NUM_SPOT_LIGHTS", parameters.numSpotLights.toString());
  string = string.replaceAll("NUM_RECT_AREA_LIGHTS", parameters.numRectAreaLights.toString());
  string = string.replaceAll("NUM_POINT_LIGHTS", parameters.numPointLights.toString());
  string = string.replaceAll("NUM_HEMI_LIGHTS", parameters.numHemiLights.toString());
  string = string.replaceAll("NUM_DIR_LIGHT_SHADOWS", parameters.numDirLightShadows.toString());
  string = string.replaceAll("NUM_SPOT_LIGHT_SHADOWS", parameters.numSpotLightShadows.toString());
  string = string.replaceAll("NUM_POINT_LIGHT_SHADOWS", parameters.numPointLightShadows.toString());

  return string;
}