npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kreativwebdesign/lode-cli

v1.0.0

Published

Tool to generate lod artifacts for glTF files.

Downloads

3

Readme

lode CLI

This CLI helps to automatically generate LOD artifacts for .gltf files.

Use Package

The package can be used via npm install -D @kreativwebdesign/lode-cli, yarn add -D @kreativwebdesign/lode-cli or just npx @kreativwebdesign/lode-cli

init

To setup a configuration file, run npx @kreativwebdesign/lode-cli init. This will guide you through the setup for the configuration file. If you change the name of the configuration file, make sure to pass the path to the run command.

Configuration file

{
  "source": "**/*.gltf",
  "outputFoldername": "lode-build",
  "watch": false
}

config

Run npx @kreativwebdesign/lode-cli config to configure the level of details for each model. You can pass the following options:

| Option | Description | Default | | ---------------- | ------------------------ | ------------------------ | | -c, --config | Path to config file | ./lode-cli.config.json | | -s, --source | Source glob pattern | **/*.gltf | | -a, --all | Wheter to reconfigure all models | false |


For each model the following options can be set:
How many level of details should i generate (min. 2): Set how many level of details the cli should generate for this model. Minimum is two, the first being the original file.

Then for each level of detail the following options can be set:
For which distance should the artifact "XXX" be used? (-1 for infinity):
Set the distance, this artifact should be visible. The values stack onto the previous distance. Type -1 for the last artifact to be rendered infinitely (only valid for the last artifact). The first one being the original artifact
Target scale for the artifact "LOD-X" (0-1):
Set the target scale for this artifact relative to the original size. Choose a value between 1 (being the same as the original) and 0 (being no polygons). This can not be set for the original artifact.

run

This command runs the LOD generating. You can pass various options to this command. Run npx @kreativwebdesign/lode-cli or npx @kreativwebdesign/lode-cli run to execute it. You can pass various options to the run command. These flags override the configuration file.

| Option | Description | Default | | ---------------- | ------------------------ | ------------------------ | | -c, --config | Path to config file | ./lode-cli.config.json | | -s, --source | Source glob pattern | **/*.gltf | | -o, --outputFoldername | Outputfoldername | lode-build | | -w, --watch | Watch source files | false | | -h, --help | Display help for command | |

Watch mode (-w) will also automatically start lode server on port 3001.

help

Run npx @kreativwebdesign/lode-cli help to display help.

clean

Run npx @kreativwebdesign/lode-cli clean to clean the output folder. You can pass the same outputFoldername and config option as for the run command.

Dev Usage

Instead of installing the package one can simply run npx @kreativwebdesign/lode-cliyarn start while working on the cli itself.

Dev

Run yarn setup to get up and running

Publish

  • Prepare versions and ensure clean setup state
  • yarn build
  • npm publish --access public

Currently publish workflow is only tested on Mac.