
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

npm i c-rain
<script stc="https://unpkg.com/c-rain/dist/index.js"></script>
import CodeRain from 'c-rain';
// or
// <script stc="https://unpkg.com/c-rain/dist/index.js"></script> 全局暴露了CodeRain类
/**
* 参数 options 可选(或部分传入)
* @code 随机下落的字符
* @fontSize 下落字符的字体大小
* @textColor 字符的字体颜色
* @bgColor 背景颜色
* @initBgColor 初始背景颜色,防止初次渲染时闪动
* @gap 字符的左右间隙,screen.availWidth / gap = 字符列数
* @speed 字符下落速度
*/
/**
* 默认参数
{
code: 'Hello World',
fontSize: 16,
textColor: '#0f0',
bgColor: 'rgba(0,0,0,0.05)',
initBgColor: 'rgba(0,0,0)',
gap: 15,
speed: 10,
}
*/
const codeRain = new CodeRain(options);
// 实例方法
// 开始背景雨效果
codeRain.start();
// 暂停背景雨效果,start()可恢复
codeRain.stop();
// 改变选项属性,实时变化背景雨效果
codeRain.change(options);
// 清除背景雨效果
codeRain.clear();
FAQs
code rain background (代码雨背景)
The npm package c-rain receives a total of 16 weekly downloads. As such, c-rain popularity was classified as not popular.
We found that c-rain demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.