暂定:Video Storyboard Sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function cssColorToRGB(color: string) { | |
| // 在浏览器创建一个看不见的元素,把随便什么值喂给它(只要是合法的 CSS 颜色表记就行) | |
| const el = document.createElement("div"); | |
| el.style.color = color; | |
| // 然后再读取它就变成 rgb 或 rgba 开头的标准值了 | |
| const matchRegex = /^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)$/; | |
| const matchResult = matchRegex.exec(el.style.color); | |
| if (!matchResult) { | |
| return null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 为单一元素生成符合 BEM 规则的 CSS Class 名称 | |
| * @param block | |
| * @param element | |
| * @param modifiers | |
| * @returns classes 返回的 Class 名称数组,可直接供 Vue 使用 | |
| */ | |
| export function getBEMClassName( | |
| block: string, | |
| element?: string | null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (typeof window.scrollX !== "number" || typeof window.scrollY !== "number") { | |
| Object.defineProperty(window, "scrollX", { | |
| get() { | |
| return window.pageXOffset; | |
| } | |
| }); | |
| Object.defineProperty(window, "scrollY", { | |
| get() { | |
| return window.pageYOffset; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # - 更新喵窝资源包并打开启动器。 | |
| # - 需要安装 `jq` 才可以工作。 | |
| # - 官网:https://stedolan.github.io/jq/ | |
| # - 包管理器有的话就直接从包管理器装好了。如 macOS + Homebrew,即可 `brew install jq` | |
| PACKDIR_PATH=/Applications/MultiMC.app/Contents/MacOS/instances/Fabric\ 1.16.4/.minecraft/resourcepacks | |
| PACK_REPO=NyaaCat/resourcepack |
name:mine,x:-118,z:112,y:82,enabled:true,red:0.7086123,green:0.47486883,blue:0.91565824,suffix:,world:act2,dimensions:overworld#
name:back home,x:-29,z:55,y:83,enabled:true,red:0.536214,green:0.837014,blue:0.052556634,suffix:,world:act2,dimensions:overworld#
name:room 1,x:-44,z:79,y:82,enabled:true,red:0.011502206,green:0.40554154,blue:0.53481793,suffix:,world:act2,dimensions:overworld#
name:room 2,x:-67,z:82,y:83,enabled:true,red:0.9271869,green:0.95799035,blue:0.21456033,suffix:,world:act2,dimensions:overworld#
name:room 3,x:-87,z:70,y:84,enabled:true,red:0.79276526,green:0.8595252,blue:0.8633945,suffix:,world:act2,dimensions:overworld#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This JavaScript code can be freely redistributed | |
| // as long as this copyright notice is keept unchanged. | |
| // This code is used on AS-IS basis and | |
| // you use it on your own risk. Author of this code | |
| // is not responsible for any damage that this | |
| // code may make. | |
| // | |
| // JS Snow v0.3 | |
| // finished on 11-10-1999 23:04 in Zagreb, Croatia. | |
| // modified on 06-12-2005 11:20 in Zagreb, Croatia. |
NewerOlder