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

@gltf-transform/core

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gltf-transform/core - npm Package Compare versions

Comparing version 4.0.0-alpha.12 to 4.0.0-alpha.13

2

dist/io/writer-context.d.ts

@@ -59,3 +59,3 @@ import { BufferViewUsage } from '../constants.js';

readonly accessorUsageGroupedByParent: Set<string>;
readonly accessorParents: Map<Property<import("../properties/property.js").IProperty>, Set<Accessor>>;
readonly accessorParents: Map<Property<import("core/src/properties/property.js").IProperty>, Set<Accessor>>;
constructor(_doc: Document, jsonDoc: JSONDocument, options: Required<WriterOptions>);

@@ -62,0 +62,0 @@ /**

import { bbox } from '../constants.js';
import type { Node, Scene } from '../properties/index.js';
/**
* Computes bounding box (AABB) in world space for the given {@link Node} or {@link Scene}.
*
* Example:
*
* ```ts
* const {min, max} = getBounds(scene);
* ```
*/
/** @hidden Implemented in /core for use by /extensions, publicly exported from /functions. */
export declare function getBounds(node: Node | Scene): bbox;
{
"name": "@gltf-transform/core",
"version": "4.0.0-alpha.12",
"version": "4.0.0-alpha.13",
"repository": "github:donmccurdy/glTF-Transform",

@@ -54,3 +54,3 @@ "homepage": "https://gltf-transform.dev/",

},
"gitHead": "28df1abd4360a833b6cb170955d6cddae66ca7f7"
"gitHead": "e1040fa15cba3d6c753047e0a974ed3b4176e4d5"
}

@@ -242,2 +242,3 @@ import {

let maxIndex = -Infinity;
let needSparseWarning = false;

@@ -272,6 +273,4 @@ // (1) Write accessor definitions, gathering indices and values.

if (count > accessor.getCount() / 3) {
// Too late to write non-sparse values in the proper buffer views here.
const pct = ((100 * indices.length) / accessor.getCount()).toFixed(1);
logger.warn(`Sparse accessor with many non-zero elements (${pct}%) may increase file size.`);
if (count > accessor.getCount() / 2) {
needSparseWarning = true;
}

@@ -290,2 +289,6 @@

if (needSparseWarning) {
logger.warn(`Some sparse accessors have >50% non-zero elements, which may increase file size.`);
}
// (3) Write index buffer view.

@@ -292,0 +295,0 @@

@@ -5,11 +5,3 @@ import { transformMat4 } from 'gl-matrix/vec3';

/**
* Computes bounding box (AABB) in world space for the given {@link Node} or {@link Scene}.
*
* Example:
*
* ```ts
* const {min, max} = getBounds(scene);
* ```
*/
/** @hidden Implemented in /core for use by /extensions, publicly exported from /functions. */
export function getBounds(node: Node | Scene): bbox {

@@ -16,0 +8,0 @@ const resultBounds = createBounds();

@@ -28,3 +28,3 @@ import { determinant, getRotation } from 'gl-matrix/mat4';

// TODO(v4): Compare performance if we replace the switch with individual functions.
// TODO(perf): Compare performance if we replace the switch with individual functions.
public static decodeNormalizedInt(i: number, componentType: GLTF.AccessorComponentType): number {

@@ -48,3 +48,3 @@ // Hardcode enums from accessor.ts to avoid a circular dependency.

// TODO(v4): Compare performance if we replace the switch with individual functions.
// TODO(perf): Compare performance if we replace the switch with individual functions.
public static encodeNormalizedInt(f: number, componentType: GLTF.AccessorComponentType): number {

@@ -51,0 +51,0 @@ // Hardcode enums from accessor.ts to avoid a circular dependency.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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