New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wgslx/wgslx-loader

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wgslx/wgslx-loader

Webpack loader for wgsl, wgslx, and wgsli files.

  • 0.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

WGSLX Loader (wgslx-loader)

Webpack loader for wgsl, wgslx, and wgsli files. Load, validate, and minify WebGPU shaders with ease. Planned support for including other shader files.

import { code } from './shader.wgsl';

//...

const shaderModule = device.createShaderModule({ code });
/** Shader module. */
export interface WgslxShader {
  /** Shader source. */
  readonly code: string;

  /** Shader label derived from the file name. */
  readonly label?: string;

  /** Shader source map if configured to be generated. */
  readonly sourceMap?: string;
}

Installation

npm install --save-dev wgslx-loader

Usage

Install webpack loader for *.wgsl, *.wgslx, and *.wgsli files by adding the loader into your webpack config.

// webpack.config.js
module.exports = {
  module: {
    rules: [
      {
        test: /\.(wgsl[ix]?)$/,
        use: 'wgslx-loader',
      },
    ],
  },
};

Install types for *.wgsl, *.wgslx, and *.wgslxi files

// tsconfig.json
{
  "compilerOptions": {
    "types": ["@wgslx/wgslx-loader"]
  }
}

Keywords

FAQs

Package last updated on 05 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc