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

gcl-roof-renderer

v0.0.2

Published

基于ThreeJs的屋顶光伏板组件等模型的渲染及交互

Readme

ROOF-RENDERER

安装 roofRenderer 插件

npm install gcl-roof-renderer

引用方式

import { RoofRenderer } from 'gcl-roof-renderer'

使用方式

// 初始化渲染器
const roofRenderer = new RoofRenderer(rendererOptions)
// 渲染屋顶
roofRenderer.render()

// 展开/收起
roofRenderer.toggleExpand(isExpand)

类型说明

// 初始化参数配置
type RoofRenderOptions = {
  element: HTMLElement // 渲染节点
  width: number // 画布宽度
  height: number // 画布高度
  roof: RoofOptions // 屋顶配置信息
  column: ColumnOptions // 立柱配置信息
  beam: BeamOptions // 斜梁配置信息
  crossbar: CrossbarOptions // 横梁配置信息
  panel: PanelOptions // 光伏板组件配置信息
  layout: LayoutOptions // 排布方式配置信息
  onPanelClick: Function // 光伏板组件点击事件
}

// 屋顶配置信息
type RoofOptions = {
  type: number // 1: 平屋顶 2: 斜屋顶
  width: number // 屋顶宽度 东西长
  length: number // 屋顶长度 南北长
  height: number // 屋顶高度
}

// 立柱配置信息
type ColumnOptions = {
  width: number // 立柱宽度
  height: number // 立柱长度
  gapList: Array<number> // 立柱间距
  heightList: Array<number> // 立柱高度
  northGapList: Array<number> // 立柱间距(北屋顶)
  northHeightList: Array<number> // 立柱高度(南屋顶)
}

// 斜梁(榀)配置信息
type BeamOptions = {
  width: number // 斜梁宽度
  height: number // 斜梁高度
  gap: number // 斜梁间距
}

// 横梁配置信息
type CrossbarOptions = {
  width: number // 横梁宽度
  height: number // 横梁高度
}

// 光伏组件配置信息
type PanelOptions = {
  width: number // 宽度
  length: number // 长度
  height: number // 高度
}

// 排布方式配置信息
type LayoutOptions = {
  rows: number // 排布行数
  angle: number // 倾角
  horizontal: Array<number> // 横排的序号列表
  northRows: number // 排布行数(北屋顶)
  northNorizontal: Array<number> // 横排的序号列表(北屋顶)
  northAngle: number // 倾角(北屋顶)
  westSouthPoint: Array<number> // 西南原点
  eastNorthPoint: Array<number> // 东北原点
}