Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
js
README.md
app.js
index.html

README.md

day 014


No Interactions for this one
[project link](http://caiyuli.com/projects/xDaysOfMaking/d014/)

three.js, GLSL

态浓意远淑且真,肌理细腻骨肉匀。

Endless insatiable, blinding me sweetly

learned today

Feb 22th 2017

Practicing shaping functions to get control of transit effect using mix ( )

Main Functions in this code

  • impulse is a shaping function to create certain curve

float impulse( float k, float x ){
    float h = k*x;
    return h*exp(1.0-h);
}
  • Using mix( ) to mix between rect distance field and circle distance field get us a smooth transition between these two shapes

//use impluse shaping function to detemine the speed/shape of how it transit bt circle and rect
float sdf = mix(c,r,impulse(12.,abs(sin(t))));
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.