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

gltfpack

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gltfpack - npm Package Compare versions

Comparing version 0.19.1 to 0.20.0

10

library.js

@@ -50,5 +50,5 @@ // This file is part of gltfpack and is distributed under the terms of MIT License.

interface = iface;
fs_interface = iface;
var result = instance.exports.pack(argv.length, buf);
interface = undefined;
fs_interface = undefined;

@@ -75,3 +75,3 @@ instance.exports.free(buf);

var instance;
var interface;
var fs_interface;

@@ -132,7 +132,7 @@ var output = { data: new Uint8Array(), position: 0, size: 0 };

file.close = function () {
interface.write(file.name, new Uint8Array(file.data.buffer, 0, file.size));
fs_interface.write(file.name, new Uint8Array(file.data.buffer, 0, file.size));
};
} else {
try {
file.data = interface.read(file.name);
file.data = fs_interface.read(file.name);

@@ -139,0 +139,0 @@ if (!file.data) {

{
"name": "gltfpack",
"version": "0.19.1",
"version": "0.20.0",
"description": "A command-line tool that can optimize glTF files for size and speed",

@@ -5,0 +5,0 @@ "author": "Arseny Kapoulkine",

@@ -27,2 +27,4 @@ # 📦 gltfpack

When working with glTF files that contain point clouds, gltfpack automatically processes the point cloud data to reduce the download size to the extent possible. In addition to aforementioned compression options (either `-c` or `-cc` are recommended), gltfpack can also prune point clouds to provide a more uniform density when `-si` option is used.
## Decompression

@@ -55,3 +57,3 @@

* `-mi`: use mesh instancing when serializing references to the same meshes (requires `EXT_mesh_gpu_instancing`)
* `-si R`: simplify meshes targeting triangle count ratio R (default: 1; R should be between 0 and 1)
* `-si R`: simplify meshes targeting triangle/point count ratio R (default: 1; R should be between 0 and 1)

@@ -63,3 +65,34 @@ The following settings are frequently used to restrict some optimizations:

* `-ke`: keep extras data
* `-vpf`: use floating-point position quantization instead of the default fixed-point (this results in larger position data, but does not insert new nodes with dequantization transforms; when using this option, `-cc` is recommended as well)
## Extensions
gltfpack supports most Khronos extensions and some multi-vendor extensions in the input scenes, with newer extensions added regularly. The following extensions are fully supported:
- KHR_lights_punctual
- KHR_materials_anisotropy
- KHR_materials_clearcoat
- KHR_materials_emissive_strength
- KHR_materials_ior
- KHR_materials_iridescence
- KHR_materials_pbrSpecularGlossiness
- KHR_materials_sheen
- KHR_materials_specular
- KHR_materials_transmission
- KHR_materials_unlit
- KHR_materials_variants
- KHR_materials_volume
- KHR_mesh_quantization
- KHR_texture_transform
Even if the source file does not use extensions, gltfpack may use some extensions in the output file either by default or when certain options are used:
- KHR_mesh_quantization (used by default unless disabled via `-noq`)
- KHR_texture_transform (used by default when textures are present, unless disabled via `-noq` or `-vtf`)
- KHR_texture_basisu (used when requested via `-tc`)
- EXT_meshopt_compression (used when requested via `-c` or `-cc`)
- EXT_mesh_gpu_instancing (used when requested via `-mi`)
gltfpack does not support vendor-specific extensions or custom extensions, including ones defined in [Khronos glTF repository](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor). Unknown extension nodes are discarded from the output.
## Building

@@ -66,0 +99,0 @@

Sorry, the diff of this file is not supported yet

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