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

@loaders.gl/draco

Package Overview
Dependencies
Maintainers
8
Versions
338
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/draco - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3

src/.DS_Store

26

dist/es5/gltf-attribute-utils.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -13,12 +11,4 @@ value: true

var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _gltfTypeUtils = require("./gltf-type-utils");
var POSITION = 'POSITION';
var TEXCOORD_0 = 'TEXCOORD_0';
var TEXCOORD_1 = 'TEXCOORD_1';
var TEXCOORD_2 = 'TEXCOORD_2';
var ATTRIBUTE_PATTERNS = [[/color/i, 'COLOR_0'], [/pickingColor/i, 'COLOR_1'], [/normal/i, 'NORMAL'], [/tangent/i, 'TANGENT'], [/texCoord1/i, TEXCOORD_0], [/texCoord2/i, TEXCOORD_1], [/texCoord3/i, TEXCOORD_2], [/texCoord/i, TEXCOORD_0], [/uv1/i, TEXCOORD_0], [/uv2/i, TEXCOORD_1], [/uv3/i, TEXCOORD_2], [/uv/i, TEXCOORD_0], [/joints/i, 'JOINTS_0'], [/weights/i, 'WEIGHTS_0'], [/pos/i, POSITION], [/vertex/i, POSITION], [/vertices/i, POSITION]];
function getGLTFIndices(attributes) {

@@ -79,18 +69,2 @@ for (var name in attributes) {

function getGLTFAttributeName(name) {
name = name.toLowerCase();
for (var _i = 0; _i < ATTRIBUTE_PATTERNS.length; _i++) {
var _ATTRIBUTE_PATTERNS$_ = (0, _slicedToArray2.default)(ATTRIBUTE_PATTERNS[_i], 2),
regex = _ATTRIBUTE_PATTERNS$_[0],
standardizedName = _ATTRIBUTE_PATTERNS$_[1];
if (regex.exec(name)) {
return standardizedName;
}
}
return null;
}
function getAccessorData(attribute, attributeName) {

@@ -97,0 +71,0 @@ var buffer = attribute;

@@ -1,8 +0,2 @@

import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import { getAccessorTypeFromSize, getComponentTypeFromArray } from './gltf-type-utils';
const POSITION = 'POSITION';
const TEXCOORD_0 = 'TEXCOORD_0';
const TEXCOORD_1 = 'TEXCOORD_1';
const TEXCOORD_2 = 'TEXCOORD_2';
const ATTRIBUTE_PATTERNS = [[/color/i, 'COLOR_0'], [/pickingColor/i, 'COLOR_1'], [/normal/i, 'NORMAL'], [/tangent/i, 'TANGENT'], [/texCoord1/i, TEXCOORD_0], [/texCoord2/i, TEXCOORD_1], [/texCoord3/i, TEXCOORD_2], [/texCoord/i, TEXCOORD_0], [/uv1/i, TEXCOORD_0], [/uv2/i, TEXCOORD_1], [/uv3/i, TEXCOORD_2], [/uv/i, TEXCOORD_0], [/joints/i, 'JOINTS_0'], [/weights/i, 'WEIGHTS_0'], [/pos/i, POSITION], [/vertex/i, POSITION], [/vertices/i, POSITION]];
export function getGLTFIndices(attributes) {

@@ -60,19 +54,2 @@ for (const name in attributes) {

function getGLTFAttributeName(name) {
name = name.toLowerCase();
for (const _ref of ATTRIBUTE_PATTERNS) {
var _ref2 = _slicedToArray(_ref, 2);
const regex = _ref2[0];
const standardizedName = _ref2[1];
if (regex.exec(name)) {
return standardizedName;
}
}
return null;
}
function getAccessorData(attribute, attributeName) {

@@ -79,0 +56,0 @@ let buffer = attribute;

@@ -1,8 +0,2 @@

import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import { getAccessorTypeFromSize, getComponentTypeFromArray } from './gltf-type-utils';
var POSITION = 'POSITION';
var TEXCOORD_0 = 'TEXCOORD_0';
var TEXCOORD_1 = 'TEXCOORD_1';
var TEXCOORD_2 = 'TEXCOORD_2';
var ATTRIBUTE_PATTERNS = [[/color/i, 'COLOR_0'], [/pickingColor/i, 'COLOR_1'], [/normal/i, 'NORMAL'], [/tangent/i, 'TANGENT'], [/texCoord1/i, TEXCOORD_0], [/texCoord2/i, TEXCOORD_1], [/texCoord3/i, TEXCOORD_2], [/texCoord/i, TEXCOORD_0], [/uv1/i, TEXCOORD_0], [/uv2/i, TEXCOORD_1], [/uv3/i, TEXCOORD_2], [/uv/i, TEXCOORD_0], [/joints/i, 'JOINTS_0'], [/weights/i, 'WEIGHTS_0'], [/pos/i, POSITION], [/vertex/i, POSITION], [/vertices/i, POSITION]];
export function getGLTFIndices(attributes) {

@@ -60,18 +54,2 @@ for (var name in attributes) {

function getGLTFAttributeName(name) {
name = name.toLowerCase();
for (var _i = 0; _i < ATTRIBUTE_PATTERNS.length; _i++) {
var _ATTRIBUTE_PATTERNS$_ = _slicedToArray(ATTRIBUTE_PATTERNS[_i], 2),
regex = _ATTRIBUTE_PATTERNS$_[0],
standardizedName = _ATTRIBUTE_PATTERNS$_[1];
if (regex.exec(name)) {
return standardizedName;
}
}
return null;
}
function getAccessorData(attribute, attributeName) {

@@ -78,0 +56,0 @@ var buffer = attribute;

4

package.json
{
"name": "@loaders.gl/draco",
"version": "1.0.0-alpha.2",
"version": "1.0.0-alpha.3",
"description": "Framework-independent loader and writer for Draco compressed meshes and point clouds",

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

"@babel/runtime": "^7.3.1",
"@loaders.gl/core": "1.0.0-alpha.2",
"@loaders.gl/core": "1.0.0-alpha.3",
"draco3d": "^1.3.4"
}
}
// TODO - remove
import {getAccessorTypeFromSize, getComponentTypeFromArray} from './gltf-type-utils';
// Patters that map known names to GLTF counterparts
const POSITION = 'POSITION';
const TEXCOORD_0 = 'TEXCOORD_0';
const TEXCOORD_1 = 'TEXCOORD_1';
const TEXCOORD_2 = 'TEXCOORD_2';
const ATTRIBUTE_PATTERNS = [
[/color/i, 'COLOR_0'],
[/pickingColor/i, 'COLOR_1'],
[/normal/i, 'NORMAL'],
[/tangent/i, 'TANGENT'],
[/texCoord1/i, TEXCOORD_0],
[/texCoord2/i, TEXCOORD_1],
[/texCoord3/i, TEXCOORD_2],
[/texCoord/i, TEXCOORD_0],
[/uv1/i, TEXCOORD_0],
[/uv2/i, TEXCOORD_1],
[/uv3/i, TEXCOORD_2],
[/uv/i, TEXCOORD_0],
[/joints/i, 'JOINTS_0'],
[/weights/i, 'WEIGHTS_0'],
[/pos/i, POSITION],
[/vertex/i, POSITION],
[/vertices/i, POSITION]
];
// Returns the indices array, if present

@@ -92,14 +66,2 @@ export function getGLTFIndices(attributes) {

// Convert an attribute name string to glTF 2.0 recommended attribute names
// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#geometry
function getGLTFAttributeName(name) {
name = name.toLowerCase();
for (const [regex, standardizedName] of ATTRIBUTE_PATTERNS) {
if (regex.exec(name)) {
return standardizedName;
}
}
return null;
}
function getAccessorData(attribute, attributeName) {

@@ -106,0 +68,0 @@ let buffer = attribute;

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

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

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