Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@vxna/gltf-loader
Advanced tools
An opinionated webpack loader for glTF files and it's resources.
Usage with file-loader@>=5.0.0
requires esModule: false
option.
This loader emit warning on glTF files with Data URI resources because they are less efficient. If you want self-contained files, consider GLB file format instead and use it with file-loader only.
Name | Type | Default | Description |
---|---|---|---|
inline | {Boolean} | false | Inline glTF into bundle |
pretty | {Boolean} | false | Make glTF human readable |
Visit this CodeSandbox for the full-featured example that you can download or play online.
file-loader@>=5.0.0
Inline glTF into bundle (geometry/textures are external):
// webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.gltf$/,
loader: '@vxna/gltf-loader',
options: { inline: true }
},
{
test: /\.(bin|jpe?g|png)$/,
loader: 'file-loader',
options: { esModule: false }
}
]
}
}
Output glTF file (geometry/textures are external):
// webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.gltf$/,
use: [
{
loader: 'file-loader',
options: { esModule: false }
},
'@vxna/gltf-loader'
]
},
{
test: /\.(bin|jpe?g|png)$/,
loader: 'file-loader',
options: { esModule: false }
}
]
}
}
Based on webmanifest-loader
FAQs
An opinionated webpack loader for glTF files
We found that @vxna/gltf-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.