Skip to content

Instantly share code, notes, and snippets.

View bigxixi's full-sized avatar

Big XiXi bigxixi

View GitHub Profile
@bigxixi
bigxixi / aeBlendingMode.json
Created April 9, 2024 08:08
AE 脚本 叠加模式
[['BlendingMode.ADD','5220'],
['BlendingMode.ALPHA_ADD','5244'],
['BlendingMode.CLASSIC_COLOR_BURN','5219'],
['BlendingMode.CLASSIC_COLOR_DODGE','5225'],
['BlendingMode.CLASSIC_DIFFERENCE','5234'],
@bigxixi
bigxixi / SVG SMIL Animation Sample.svg
Last active December 9, 2020 18:29
SVG SMIL Animation Sample
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bigxixi
bigxixi / 判断click和touch.js
Created August 31, 2018 15:50
判断click和touch
const Button = document.getElementById("targetButton")
const clickEvent = (function() {
if ('ontouchstart' in document.documentElement === true)
return 'touchstart';
else
return 'click';
})();
Button.addEventListener(clickEvent, e => {
@bigxixi
bigxixi / displacement.html
Created August 31, 2018 15:48 — forked from akella/displacement.html
svg displacement animation
<filter id="displacement" filterUnits="objectBoundingBox">
<feTurbulence type="turbulence" baseFrequency="0.01" numOctaves="2" result="turb"/>
<feColorMatrix in="turb" result="huedturb" type="hueRotate" values="90">
<animate attributeType="XML" attributeName="values" values="0;180;360" dur="6s" repeatCount="indefinite"/>
</feColorMatrix>
<feDisplacementMap in="SourceGraphic" in2="huedturb" scale="20" result="displace" xChannelSelector="B"/>
<feOffset dx="-5" dy="-5" in="displace" result="unoffsetdisplace"/>
</filter>
@bigxixi
bigxixi / 根据图片大小建立平面并赋予贴图.py
Created February 3, 2018 15:03
C4D脚本 根据图片大小建立平面并赋予贴图
# 根据图片大小建立平面并赋予贴图
# xixi@bigxixi.com
import os
import c4d
from c4d import documents, plugins, bitmaps
# 区分 win 和 mac 文件地址
osSlash = '/'
if os.name == 'nt':
osSlash = '\\'
# 选择一个文件夹
@bigxixi
bigxixi / 图片转Binary.jsx
Created December 22, 2017 05:32
AE脚本-图片转Binary编码
//本脚本用于将图片转为binary编码
if(!app.preferences.getPrefAsLong("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY")){
alert("请勾选 ‘首选项’->'常规'->'允许脚本写入文件和访问网络'。");
app.executeCommand(2359);
}else{
alert("选择要转换的文件,完成后会弹出对话框显示代码,另有一份存储在图片文件位置,文件名为图片名+.txt","图片转Binary编码 by Bigxixi");
var myImageFileURI = File("~/Desktop/").openDlg("选择要转换的文件");
var myFile = new File(myImageFileURI);
myFile.encoding="BINARY";
myFile.open();
//加marker
var mk= new MarkerValue("comment content");
//mk.xxx=xxx
app.project.activeItem.layers[2].marker.setValueAtTime(0,mk);
@bigxixi
bigxixi / RunScript.jsx
Last active December 7, 2017 10:04
Run AE script directly in AE.
(function drawUI(thisObj)
{
function UI(thisObj){
var win = (thisObj instanceof Panel) ? thisObj : new Window("palette","Run Script",[0,0,500,450],{resizeable:true,});
if(win != null){
var btn = win.add("button",[180,415,330,435],"Run");
var script = win.add("edittext",[5,5,505,405] ,"Paste your code here, and run to test.",{readonly:0,noecho:0,borderless:0,multiline:1,enterKeySignalsOnChange:0});
btn.onClick = function(){
if(!app.preferences.getPrefAsLong("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY")){
alert("Please check this option:\n'Preferences->General->Allow Scripts to Write Files and Access Network'");