Wonder-Technology/Wonder.js

View on GitHub
lib/js/src/run/rtx_path_tracer/domain_layer/domain/pipeline/pipeline/entity/jobs/init/InitPathTracingCPJobEntity.bs.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function _createShaderBindingTable has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function _createShaderBindingTable(device) {
  var baseShaderPath = "src/domain_layer/domain/shader/ray_tracing";
  var rayGenShaderModule = Curry._2(WebGPUCoreDpRunAPI$Wonderjs.unsafeGet(undefined).device.createShaderModule, {
        code: Curry._1(WebGPUCoreDpRunAPI$Wonderjs.unsafeGet(undefined).loadGLSL, "" + baseShaderPath + "/ray_generation.rgen")
      }, device);

    Function exec has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function exec(param) {
      return Most.just(Result$Wonderjs.bind(Tuple2$Wonderjs.collectOption(WebGPUCPRepo$Wonderjs.getDevice(undefined), WebGPUCPRepo$Wonderjs.getQueue(undefined)), (function (param) {
                        var device = param[0];
                        PathTracingPassCPRepo$Wonderjs.setShaderBindingTable(_createShaderBindingTable(device));
                        var cameraBindGroupLayout = Curry._2(WebGPUCoreDpRunAPI$Wonderjs.unsafeGet(undefined).device.createBindGroupLayout, {

      Function _buildDirectionLightBufferData has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function _buildDirectionLightBufferData(device, sceneGameObject) {
        return Result$Wonderjs.bind(Contract$Wonderjs.requireCheck((function (param) {
                          return Contract$Wonderjs.test(Log$Wonderjs.buildAssertMessage("only has one direction light", "not"), (function (param) {
                                        return Contract$Wonderjs.Operators.$eq(DirectionLightRunAPI$Wonderjs.getLightCount(sceneGameObject), 1);
                                      }));

        There are no issues that match your filters.

        Category
        Status