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

gltf-bounding-box

Package Overview
Dependencies
Maintainers
8
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gltf-bounding-box - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "gltf-bounding-box",
"version": "0.2.0",
"version": "0.2.1",
"description": "Computes the global bounding box of a gltf model",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -15,8 +15,3 @@ "use strict";

if (primitivesCount > 1) {
console.error(
"gltfReader: Currently unable to load meshes with more than 1 primitive."
);
return null;
} else if (primitivesCount === 0) {
if (primitivesCount === 0) {
console.error("gltfReader: Mesh has no primitive.");

@@ -26,12 +21,15 @@ return null;

const primitive = mesh.primitives[0];
const positions = [];
mesh.primitives.forEach((primitive) => {
// Attributes
if (!primitive.attributes) return;
// Attributes
const attributes = {};
if (!primitive.attributes) return [];
return gltfReader._loadAccessor(
gltf,
primitive.attributes.POSITION,
buffers
);
positions.push(...gltfReader._loadAccessor(
gltf,
primitive.attributes.POSITION,
buffers
));
})
return positions;
},

@@ -38,0 +36,0 @@

@@ -12,3 +12,3 @@ import gltf1BoundingBox from './gltf1-bounding-box';

computeBoundings(gltf, buffers={}) {
if (gltf instanceof Buffer) {
if (Boolean(gltf.readUInt32LE)) {
const version = gltf.readUInt32LE(4);

@@ -15,0 +15,0 @@ if (version === 2) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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