React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.
This file contains 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
<!DOCTYPE html> | |
<canvas id="game" width="600" height="400"></canvas> | |
<script id="fragment" type="x-shader/x-fragment"> | |
precision mediump float; | |
uniform vec2 resolution; | |
uniform float time; | |
struct Ball { |
This file contains 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
Class Rectangle | |
val rectWrites = ( | |
(__ \ 'width).write[Long] and | |
(__ \ 'height).write[Long] and | |
(__ \ 'x).write[Long] and | |
(__ \ 'y).write[Long] | |
)( (r: Rectangle) => (r.width, r.height, r.x, r.y) ) |
This file contains 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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
// Hardcoded parameters -------- | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; |
This file contains 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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
// Adapted by Sergey Kosarevsky from: | |
// http://rectalogic.github.io/webvfx/examples_2transition-shader-pagecurl_8html-example.html |
This file contains 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
// Fonts mixin | |
font-url(file) | |
return '../fonts/' + file | |
webfont(family, file, hack-chrome-windows = false, weight = 'normal') | |
@font-face | |
font-family family | |
src url(font-url(file + '.eot')) | |
src url(font-url(file + '.eot?#iefix')) format('embedded-opentype'), | |
url(font-url(file + '.woff')) format('woff'), |
This file contains 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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
uniform float persp; | |
uniform float unzoom; | |
uniform float reflection; |
This file contains 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
// Converted from https://github.com/rectalogic/rendermix-basic-effects/blob/master/assets/com/rendermix/CrossZoom/CrossZoom.frag | |
// Which is based on https://github.com/evanw/glfx.js/blob/master/src/filters/blur/zoomblur.js | |
// With additional easing functions from https://github.com/rectalogic/rendermix-basic-effects/blob/master/assets/com/rendermix/Easing/Easing.glsllib | |
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; |
This file contains 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
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |