🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

gltf-component-data

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gltf-component-data

Small library and command line utility for adding component data to a glTF file.

0.1.1
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

gltf-component-data

Small library and command line utility for adding component data to a glTF file.

Library Usage

import fs from "fs";
import addComponentData from "gltf-component-data";

const gltf = JSON.parse(fs.readFileSync("mygltf.gltf"));

// Add component data mutates the gltf object
addComponentData(gltf, {
  {
    scenes: {
      Root Scene: {
        loop-animation: {
          clip: "idle_eyes"
        }
      }
    },
    nodes: {
      Head: {
        scale-audio-feedback: ""
      }
    }
  }
});

CLI Usage

npm install -g gltf-component-data
Usage: gltf-component-data <gltfPath> <componentsPath> [options]

  Options:

    -V, --version    output the version number
    -o, --out <out>  The directory to output the modified glTF file. Defaults to the existing glTF path.
    -h, --help       output usage information

Components JSON Format:

{
  "scenes": {
    "Root Scene": {
      "loop-animation": {
        "clip": "idle_eyes"
      }
    }
  },
  "nodes": {
    "Head": {
      "scale-audio-feedback": ""
    }
  }
}

FAQs

Package last updated on 26 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts