New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/gltf

Package Overview
Dependencies
Maintainers
4
Versions
343
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/gltf - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

2

package.json
{
"name": "@loaders.gl/gltf",
"version": "0.4.3",
"version": "0.4.4",
"description": "Framework-independent loader for the glTF format",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -11,3 +11,2 @@ /* eslint-disable camelcase, max-statements */

} from '@loaders.gl/core';
import {DracoEncoder, DracoDecoder} from '@loaders.gl/draco';
import packBinaryJson from '../glb-writer/pack-binary-json';

@@ -28,3 +27,7 @@

export default class GLTFBuilder {
constructor(rootPath) {
constructor(rootPath, options = {}) {
// Soft dependency on Draco, needs to be imported and supplied by app
this.DracoEncoder = options.DracoDecoder || options.DracoEncoder;
this.DracoDecoder = options.DracoDecoder;
// Lets us keep track of how large the body will be, as well as the offset for each of the

@@ -222,3 +225,7 @@ // original buffers.

addCompressedMesh(attributes, mode = 4) {
const dracoEncoder = new DracoEncoder();
if (!this.DracoEncoder) {
throw new Error('DracoEncoder/Decoder not registered');
}
const dracoEncoder = new this.DracoEncoder();
const compressedData = dracoEncoder.encodeMesh(attributes);

@@ -231,3 +238,3 @@

// rather than the original source data.
const dracoDecoder = new DracoDecoder();
const dracoDecoder = new this.DracoDecoder();
const decodedData = dracoDecoder.decodeMesh(attributes);

@@ -259,3 +266,7 @@ const fauxAccessors = this._addFauxAttributes(decodedData.attributes);

addCompressedPointCloud(attributes) {
const dracoEncoder = new DracoEncoder();
if (!this.DracoEncoder) {
throw new Error('DracoEncoder/Decoder not registered');
}
const dracoEncoder = new this.DracoEncoder();
const compressedData = dracoEncoder.encodePointCloud(attributes);

@@ -268,3 +279,3 @@

// rather than the original source data.
const dracoDecoder = new DracoDecoder();
const dracoDecoder = new this.DracoDecoder();
const decodedData = dracoDecoder.decodePointCloud(compressedData);

@@ -271,0 +282,0 @@ const fauxAccessors = this._addFauxAttributes(decodedData.attributes);

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