流光

  1. 物品 - 添加曲线 - 贝塞尔曲线
  2. 右手边工具栏找到 - 数据 - 倒角 - 深度 加大到 0.1m
  3. 左侧物品窗口,选中曲线,按E,多寄出几个点
  4. 选中中间的点,按 alt + s,拉粗中间的。
    选中头尾的点,按 ALt + s, 啦细,形成中间粗,两边细的形态
  5. 切换到【着色】工作区,右手边渲染引擎修改为Eevee
  6. 着色方式修改为最后一个,就是平时能看彩色色块那个地方,用最后一个。
  7. 右手边,世界环境那里,点击颜色,出现可以选择颜色那个地方,将右手边那条竖条拉到最底下,让整个环境变暗,加快渲染速度
  8. 在着色去点击新建,出现原理化BSDF之后,按 Ctrl + T,创建图像纹理、纹理坐标、映射三件套。(这里如果不行,可以先开启插件 node wrangler )
  9. 删除原理化BSDF块,只留下材质输出块
    10.删除图像纹理块
  10. 新建一个噪波纹理
  11. 将噪波纹理的矢量跟映射的矢量相连接,将噪波纹理的系数跟材质输出块链接
  12. 点击噪波纹理,然后按 ctrl+ shift + 左键
  13. 对着空白点一下,按shift + a,创建一个转换器 - 颜色渐变,然后将颜色渐变放在 噪波纹理 跟 材质输出的中间,他会自动拼接在一起
  14. 噪波纹理的缩放改为 20 ,转化器颜色渐变的第一行随便改一下,让黑白更明显
  15. 这个时候的黑白是一点一点的,把映射里面的缩放的 X 值改成0.1,就可以变成连贯的一条线
  16. 创建三个着色器(一个自发光,一个透明,一个混合),将自发光跟透明链接到混合块的着色器上面
  17. 将颜色渐变的颜色跟混合着色器的系数链接
  18. 将混合着色器着色器跟材质输出的表曲面链接(也可以直接按 ctrl + shift + 左键)
  19. 将自发光颜色改成蓝色,自发光强度调成4,看下连接到着色器的两条线有没有反,有的话换一下
  20. 点击混色着色器,按下m健呼出选项,把混合模式(Blend Mode)修改为 Alpha混合(Alpha Blend)
  21. 然后调整颜色渐变器跟混合着色器的两条线,调整到只有蓝色光线,黑色几乎看不到的情况。
  22. 映射块里面的X坐标修改为 #frame/500,不行就Y坐标,不行就旋转里面的X,看下是哪个
  23. 空白地方点击一下,创建色相/饱和度/明度(Hue/Saturation/Value),然后将这个块的颜色,链接到自发光的颜色上面,修改颜色为蓝色
  24. 重点:把噪波纹理块的颜色,拉到色相/饱和度/明度块上面,饱和度调整成2

1. sublimectrl + f 弹出搜索框,输入要搜索的单词搜索后,按上下键无法像 phpstorm 一样直接跳转到上一个或者下一个查询结果。

解决方法:

entershift + enter 或者 F3shift + F3 替换上下键。

2. 搜索出结果后,无法将光标移动到搜索结果上面,按 ESC 后虽然可以把光标移过去,但搜索高亮又没了

解决方法:

ctrl + 1,这样子可以保留搜索高亮的同时,还可以修改对应的单词。
同时,这时候还可以按F3 + shift + F3 跳转到上一个、下一个搜索结果

ctrl+shift+p 进入命令行,输入 install package

0. 中文汉化包 (按需)

ChineseLocalization
https://github.com/rexdf/ChineseLocalization

1. 侧边栏展示文件类型图标

AFileIcon
https://github.com/SublimeText/AFileIcon

2. 在侧边栏定位到当前文件

FocusFileOnSidebar
https://github.com/miguelgraz/FocusFileOnSidebar

3. 解决双击变量时,无法选中变量前面的$符号问题

默认情况下sublime双击是不能选中$,比如$value,双击只能选中value而不能连$一起选中。
可以通过修改配置实现:
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?",
但是这样设置完,选中$value,其他出现$value的地方不高亮了。
安装下面的插件可以解决
wordHighlight
https://github.com/SublimeText/WordHighlight

4. 语法提示插件,支持多种语言

Anaconda
http://damnwidget.github.io/anaconda/

注意:
安装完之后,需要修改下面配置:
Preferences->Package Settings->Anaconda->Settings Default

  1. 修改python_interpreter为实际Python安装路径(xxx/python.exe)
  2. 修改anaconda_linting值,从默认值true改为false

主题

Preferences -> Settings

{
    "ignored_packages":
    [
        "Vintage",
    ],
    // 主题设置
    "theme": "Default Dark.sublime-theme",
    "color_scheme": "Monokai.sublime-color-scheme",
    "dark_theme": "Adaptive.sublime-theme",
    "light_theme": "Default Dark.sublime-theme",

    // 字体行距设置
    "font_face": ["Consolas","Lucida Sans Typewriter","Courier New"],
    "font_size": 10,
    "line_padding_bottom": 2,
    "line_padding_top": 2,

    // 显示空格跟tab
    "draw_white_space": "all",

    // 关闭单击预览文件功能,防止文件被替换
    "preview_on_click": false,

    // 显示当前文件编码
    "show_encoding": true,

    // 显示当前文件换行符
    "show_line_endings": true,
    /*"font_size": 10,*/

    // 默认情况下sublime双击是不能选中$,
    // 比如$value,双击只能选中value而不能连$一起选中,这里把$符号删掉
    // 但是这样选中$value后,但是其他出现$value的地方不高亮了。
     // 解决:所以如果设置了这个,还需要安装 wordHighlight 插件
    "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?",
}



快捷键

Preferences -> Key Bindings

[
    //跳转到上一个编辑地方
    { "keys": ["alt+left"], "command": "jump_back" },
    // 跳转到下一个编辑地方
    { "keys": ["alt+right"], "command": "jump_forward" },
    //整行下移
    { "keys": ["alt+down"], "command": "swap_line_down" },
    //整行上移
    { "keys": ["alt+up"], "command": "swap_line_up" },
    //自动提示
    { "keys": ["alt+/"], "command": "auto_complete" },
    // 转换大写
    { "keys": ["ctrl+shift+x"], "command": "upper_case" },
    // 转换小写
    { "keys": ["ctrl+shift+y"], "command": "lower_case" },
    // 删除整行
    { "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
    // 光标移动到指定行
    { "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
    // 快速定位到选中的文字
    { "keys": ["ctrl+k"], "command": "find_under_expand_skip" },
    // 这个命令默认使用的是ctrl+shift+P
    { "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
    // outline
    { "keys": ["ctrl+o"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
    // 当前文件中的关键字(方便快速查找内容)
    { "keys": ["ctrl+alt+o"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"} },
    // open resource
    { "keys": ["ctrl+shift+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
    // 文件内查找/替换
    { "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "replace"} },
    // 全局查找/替换, 在查询结果中双击跳转到匹配位置
    {"keys": ["ctrl+shift+h"], "command": "show_panel", "args": {"panel": "find_in_files"} },
    //跳转到定义,比如在某个函数上按此键,则跳转到它的定义
    { "keys": ["ctrl+up"], "command": "goto_definition" },
    // plugin配置
    { "keys": ["alt+a"], "command": "alignment" },
    // 这里使用的是html+css+js prettify插件来格式化
    { "keys": ["ctrl+shift+f"], "command": "htmlprettify" },
    // 选择下一个相同的
    { "keys": ["alt+y"], "command": "find_under_expand" },
    // 注释
    { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
    
    // 在项目中搜索
    { "keys": ["ctrl+shift+f12"], "command": "show_panel", "args": {"panel": "find_in_files"} },

    // 根据文件名搜索
    { "keys": ["shift", "shift"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },

    //{ "keys": ["shift", "shift"], "command": "show_overlay", "args": { "overlay": "goto", "text": "@" } },
    // 换行展示
    { "keys": ["alt+z"], "command": "toggle_setting", "args": {"setting": "word_wrap"} },

    // markdown预览功能:需要安装两个插件:MarkdownEditing、MarkdownLivePreview
    {"keys": ["alt+m"], "command": "open_markdown_preview"},

    //搜索框按下enter之后,焦点自动定在搜索结果的地方
    //没有快捷键,搜索完按 ctrl+1 可以把光标移过去

    //切换tab
    { "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": 0 } },
    { "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": 1 } },
    { "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": 2 } },
    { "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": 3 } },
    { "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": 4 } },
    { "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": 5 } },
    { "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": 6 } },
    { "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": 7 } },
    { "keys": ["ctrl+9"], "command": "select_last_tab" },

    //左右分屏,需要分几个输入数字几,最多分4列,复原的话将2改为1
    {
        "keys": ["alt+shift+2"],
        "command": "set_layout",
        "args":
        {
            "cols": [0.0, 0.5, 1.0],
            "rows": [0.0, 1.0],
            "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
        }
    },

    //上下分屏,需要分几个输入数字几,最多分4行,复原的话将2改为1
    {
        "keys": ["ctrl+shift+2"],
        "command": "set_layout",
        "args":
        {
            "cols": [0.0, 1.0],
            "rows": [0.0, 0.5, 1.0],
            "cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
        }
    },
    {
        "keys": ["ctrl+shift+3"],
        "command": "set_layout",
        "args":
        {
            "cols": [0.0, 1.0],
            "rows": [0.0, 0.33, 0.66, 1.0],
            "cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
        }
    },
    {
        "keys": ["ctrl+shift+1"],
        "command": "set_layout",
        "args":
        {
            "cols": [0.0, 1.0],
            "rows": [0.0, 1.0],
            "cells": [[0, 0, 1, 1]]
        }
    },
]




用了 letsencrypt 的免费证书,过期前忘记续,过期后使用 certbot renew 提示续签失败。

最后用下面步骤解决:

  1. 先停掉 nginx
    nginx -s stop
  2. 进行续签,由于 nginx 配置文件不在默认位置,指定了位置
    certbot renew --nginx --nginx-server-root=/usr/local/openresty/nginx/conf

这里遇到了一个问题,cdn 域名无法续签,添加了 --dry-run 参数打印详细内容(certbot renew --dry-run):

Hint: 
The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. 
Ensure the listed domains point to this nginx server and that it is accessible from the internet.

这是因为 cdn 域名指向了供应商的机器,而不是自己的机器。
cdn 域名临时指回自己机器后重新 执行 certbot renew 后解决改问题
最后再把 cdn 域名重新指向供应商。