jQuery里提供了许多创建交互式网站的方法,外国网站上蛮多现成的代码的,选了几个不错的分享一下。 预加载图片 (function($) { var cache = []; // Arguments are image paths relative to the current page. $.pr ...
分类:
Web程序 时间:
2016-06-06 09:08:36
阅读次数:
171
Given a binary tree, return all root-to-leaf paths.ExampleGiven the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:[ "1->2->5", "1->3"] ...
分类:
其他好文 时间:
2016-06-06 06:51:39
阅读次数:
193
顶点光照(Vertex Lit) 是最低保真度的光照、不支持实时阴影的渲染路径。最好是用于旧机器或受限制的移动平台上。1.顶点照明渲染路径通常在一个通道中渲染物体,所有光源的照明都是在物体的顶点上进行计算的。2.顶点照明渲染路径是最快的渲染路径并且有最广泛的硬件支持(然而,请记住:它无法工作在游戏机上)。3.由于所有的光照都是在顶点层级上计算的,此渲染路径不支持大部分的逐像素渲染效果:如,阴影、法线贴图、灯光遮罩、高精度的高光...
分类:
编程语言 时间:
2016-06-02 13:46:24
阅读次数:
165
正向渲染一个基于着色器的渲染路径。它支持逐像素计算光照(包括法线贴图和灯光Cookies)和来自一个平行光的实时阴影。在默认设置中,少数最亮的灯光在逐像素计算光照模式下渲染。其余的灯光计算对象顶点的光照。 根据影响物体的光源的不同,正向渲染路径用单个或多个通道来渲染物体。在正向渲染中,光源本身也会根据他们的设置和强度受到不同的对待。...
分类:
编程语言 时间:
2016-06-02 13:43:16
阅读次数:
155
延时光照是有着最高保真度的光照和阴影的渲染路径。如果你有很多实时灯光,最好是使用延时光照。它需要一定水平的硬件支持,仅在 Unity Pro可用,移动设备上不支持。
延迟光照是一种当前最高级的能实现光线和阴影保真的渲染路径
1.完全采用以每像素的方式评估光线,这等于意味着全部将以正常贴图的方式正确的和物体交互2.所有光线都能拥有信息缓存3.所有的光线都能产生阴影4.对于能影响任何物体的光线数量没有上限...
分类:
编程语言 时间:
2016-06-02 13:43:15
阅读次数:
156
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space ...
分类:
其他好文 时间:
2016-05-28 11:28:36
阅读次数:
141
//存 NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString *path=[paths objectAtIndex:0]; NSLog(@"path ...
分类:
移动开发 时间:
2016-05-27 14:29:48
阅读次数:
189
一天一道LeetCode系列(一)题目
A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).
The robot can only move either down or right at any point in time. The robo...
分类:
其他好文 时间:
2016-05-27 12:18:25
阅读次数:
209
题目链接:https://leetcode.com/problems/unique-paths/
题目:
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or ri...
分类:
其他好文 时间:
2016-05-27 11:55:25
阅读次数:
179
题目链接:https://leetcode.com/problems/unique-paths-ii/
题目:
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstac...
分类:
其他好文 时间:
2016-05-27 11:53:04
阅读次数:
144