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

gltf-pipeline

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gltf-pipeline

Content pipeline tools for optimizing glTF assets.

  • 0.1.0-alpha3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9K
increased by8.61%
Maintainers
1
Weekly downloads
 
Created
Source

glTF Pipeline

License Build Status Coverage Status

Content pipeline tools for optimizing glTF assets by Richard Lee and the Cesium team.

This project is under active development, see the roadmap.

gltf-pipeline can be used as a command-line tool or Node.js module.

Instructions

Clone this repo and install Node.js. From the root directory of this repo, run:

npm install

Command-Line Example:

node ./bin/gltf-pipeline.js ./specs/data/boxTexturedUnoptimized/CesiumTexturedBoxTest.gltf -o output.gltf

Command-Line Flags

FlagDescriptionRequired
-i, --inputPath to the input glTF file.:white_check_mark: Yes
-o, --outputDirectory or filename for the exported glTF file.No
-b, --binaryWrite binary glTF file.No, default false
-s, --separateWrites out separate geometry/animation data files, shader files and textures instead of embedding them in the glTF file.No, default false
-h, --helpDisplay helpNo
-t, --separateTextureWrite out separate textures, but embed geometry/animation data files, and shader files.No, default false
-q, --quantizeQuantize attributes using WEB3D_quantized_attributes extension.No, default false
-n, --encodeNormalsOct-encode the normals of this model.No, default false
-c, --compressTextureCoordinatesCompress the texture coordinates of this model.No, default false
--aoBake ambient occlusion to vertex data using default settings only. When specifying other settings, do not use --ao on its own. Advanced settings in lib/bakeAmbientOcclusion.jsNo, default false
--ao.toTextureBake AO to existing diffuse textures instead of to vertices. Does not modify shaders.No, default false
--ao.groundPlaneSimulate a groundplane at the lowest point of the model when baking AO.No, default false
--ao.ambientShadowContributionAmount of AO to show when blending between shader computed lighting and AO. 1.0 is full AO, 0.5 is a 50/50 blend.No, default 0.5
--ao.qualityValid settings are high, medium, and low.No, default low

Build Instructions

Run the tests:

npm run test

To run JSHint on the entire codebase, run:

npm run jsHint

To run JSHint automatically when a file is saved, run the following and leave it open in a console window:

npm run jsHint-watch

Running test coverage

Coverage uses istanbul. Run:

npm run coverage

For complete coverage details, open coverage/lcov-report/index.html.

The tests and coverage covers the Node.js module; it does not cover the command-line interface, which is tiny.

Debugging

  • To debug the tests in Webstorm, open the Gulp tab, right click the test task, and click Debug 'test'.
  • To run a single test, change the test function from it to fit.

Contributions

Pull requests are appreciated! Please use the same Contributor License Agreement (CLA) and Coding Guide used for Cesium.


Keywords

FAQs

Package last updated on 26 Jul 2016

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