Socket
Socket
Sign inDemoInstall

@vxna/gltf-loader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vxna/gltf-loader

An opinionated webpack loader for glTF files


Version published
Weekly downloads
14
increased by7.69%
Maintainers
1
Weekly downloads
 
Created
Source

@vxna/gltf-loader

Build Status npm

An opinionated webpack loader for glTF files and it's resources.

Warning

This loader emits warning on glTF files with base64-encoded resources because they are less efficient.
If you want self-contained files, consider GLB file format instead and use it with file-loader only.

Options

NameTypeDefaultDescription
inline{Boolean}falseInline glTF files into bundle
pretty{Boolean}falseMake glTF files human readable

Examples

Output glTF files (whitespace is reduced by default):

module.exports = {
  module: {
    rules: [
      {
        test: /\.gltf$/,
        use: ['file-loader', '@vxna/gltf-loader']
      },
      {
        test: /\.(bin|jpe?g|png)$/,
        loader: 'file-loader'
      }
    ]
  }
}

Inline glTF files (resources are still external):

module.exports = {
  module: {
    rules: [
      {
        test: /\.gltf$/,
        loader: '@vxna/gltf-loader',
        options: { inline: true }
      },
      {
        test: /\.(bin|jpe?g|png)$/,
        loader: 'file-loader'
      }
    ]
  }
}

Credits

Based on webmanifest-loader

License

MIT

Keywords

FAQs

Package last updated on 03 Apr 2019

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