百度:Tangram
基本上就是个百度版jQuery,2.0版本使用链式API,更像了。
配套的还有UI库Magic和模版引擎BaiduTemplate(和ejs很像)
腾讯:JX
理念在介绍里面写的很详细,代码清晰,注释丰富,可读性很好,但只有文档没有实例。
比较传统的大块头框架,本质上来说还是一堆工具方法和对象的堆积,提供了很基本的模块化的开发方式,但没有模块间的依赖关系支持。
| #ifdef GL_ES | |
| precision highp float; | |
| #endif | |
| uniform sampler2D from, to; | |
| uniform float progress; | |
| uniform vec2 resolution; | |
| // default interpolationPower = 5; | |
| uniform float interpolationPower; |
| // Lastly, add in the `requestAnimationFrame` shim, if necessary. Does nothing | |
| // if `requestAnimationFrame` is already on the `window` object. | |
| (function () { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; | |
| for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
| window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; | |
| window.cancelAnimationFrame = | |
| window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame']; | |
| } |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="charset=UTF-8" /> | |
| <script> | |
| window.addEventListener("load", function (ev) { | |
| var canvas = document.createElement("canvas"); | |
| canvas.width = canvas.height = 256; | |
| var c2d = canvas.getContext("2d"); |
| function hideAddressBar() | |
| { | |
| if(!window.location.hash) | |
| { | |
| if(document.height < window.outerHeight) | |
| { | |
| document.body.style.height = (window.outerHeight + 50) + 'px'; | |
| } | |
| setTimeout( function(){ window.scrollTo(0, 1); }, 50 ); |
| Handlebars.registerHelper 'each_with_index', (array, fn) -> | |
| buffer = '' | |
| for i in array | |
| item = i | |
| item.index = _i | |
| buffer += fn(item) | |
| buffer |