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 🙏

© 2026 – Pkg Stats / Ryan Hefner

tinybim

v0.0.73

Published

一个bim轻量化引擎,基于WebGPU

Downloads

1,597

Readme

官方网站 https://tinybim.cn

//测试天地图Key,请求次数有限,请自行申请
const keys: string[] = ["26eb0c7b03694c6fe26d61fb85ba12fe"];

export async function load_tiny_app(loaders: IFileResolver[], div: HTMLDivElement, store: IStore = null) {

    if(!(navigator as any)?.gpu){
        window.location.href ="https://tinybim.cn/notsupport";
        return;
    }
    
    if (!loaders || loaders.length == 0) {
        return null;
    }
    const app = new TinyApp({ recordable: true, asset_manager: new AssetManager() });
    console.log("TinyBIM version:",app.version);
    await app.init(div);
    const win = app.default_window;
    win.selection.selection_mode = SelectionMode.element;
    win.active();

    const tasks: Promise<void>[] = [];
    const len = loaders.length;
    for (let i = 0; i < len; i++) {
        tasks.push(load_model(app, loaders[i], store));
    }
    await Promise.any(tasks);
    const lerc_url = "/lerc-wasm.wasm";
    const gis_manager = win.gis_manager;
    gis_manager.set_terrain_loader(new CachedArcgisTerrainLoader(lerc_url));
    gis_manager.set_img_loader(new CachedTiandituLoader(keys));

    const menu = new TbContextMenuUI(win);
    menu.add_default();
    menu.install();

    const bk = new Background();
    bk.type = BackgroundType.skybox;
    bk.skybox = "天空1";
    win.background = bk;
    win.set_env("天空1");

    win.render_mode = RenderMode.texture;
    return app;
}

async function load_model(app: TinyApp, loader: IFileResolver, store: IStore = null) {

    const model = app.create_model();
    if (store) {
        await model.load(loader, store);
    }
    else {
        await model.load(loader);
    }

    const wnd = app.default_window;
    if (model.file_type != FileType.Dwg) {
        const mv = model.views.find(v => v.type == ModelViewType.ThreeD) as IView;
        if (mv) {
            await wnd.attach_view(mv);
        }
    }
    else {
        const mv = model.views[0];
        if (mv) {
            await wnd.attach_view(mv);
        }
    }
}

更多示例 https://github.com/tinybim/Samples