Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shader-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

shader-loader

glsl loader for webpack working with chunks (inspired by ShaderLoader from cabbibo)

  • 1.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-26.01%
Maintainers
1
Weekly downloads
 
Created
Source

Glsl loader for webpack

Glsl loader for webpack2 & webpack3. It support chunks & inspire by ShaderLoader

Getting started

Install:

npm install shader-loader --save-dev

Config webpack:

module: {
	rules: [
      {
        test: /\.(glsl|vs|fs)$/,
        loader: 'shader-loader',
        options: {
          glsl: {
            chunkPath: resolve("/glsl/chunks")
          }
        }
      }
	]
}

You can now require your glsl files:

var vertexShader = require("shader.vs");
var fragmentShader = require("shader.fs");

if you use $xxx in your shader its replace by the content of xxx.glsl, for example:

void main(void) {
	$snoise //replace by chunks/snoise.glsl
}

Learn more about loaders & webpack: http://webpack.github.io/docs/loaders.html

License

MIT (http://www.opensource.org/licenses/mit-license.php)

Keywords

FAQs

Package last updated on 24 Jul 2017

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