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

xr-frame-cli

v0.9.13

Published

Command tools for xr-frame.

Downloads

14

Readme

xr-frame-cli

用于微信小程序内置的xr-frame系统的CLI,提供以下两个功能:

  1. 通过环境贴图,生成xr-frame专用的env-data,包含skyboxdiffuse shspecular map,支持打包成单二进制文件。
  2. gltf模型文件进行预处理,优化为xr-frame友好的数据结构,同时支持打包为glb,能大幅提升加载速度。

使用

首先安装:

npm i xr-frame-cli -g

之后可以使用下列指令:

env-data

运行:

xr-frame env-data -h

可以看到所有支持的操作。

目前支持的输入格式为['hdr', 'exr', 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'tiff'],要求输入图片比例近似2:1

xr-frame env-data -i test/exr.exr为例,原始图片和产物如下(specular maprgbd编码):

gltf

运行:

xr-frame gltf -h

可以看到所有支持的操作。

如果需要更进阶的优化,可以尝试使用SeinJSUnityToolkit。注意如果要导出动画的话,不要勾选Use SeinAnimator

开发测试

项目提供了一张图和一个模型用于开发测试。

env-data

执行:

npm run dev && xr-frame env-data -i test/exr.exr

输出将会在test/exr目录下。

gltf

执行:

npm run dev && xr-frame gltf -i test/gltf-sources/gltf/index.gltf -o test/gltf-dist

输出将会在test/gltf-dist/gltf目录下。