<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>islighting</title>
	<atom:link href="http://www.islighting.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.islighting.com</link>
	<description>#interaction, #processing, #data visualization</description>
	<lastBuildDate>Wed, 04 Jan 2012 02:15:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>2011年终总结</title>
		<link>http://www.islighting.com/archives/271</link>
		<comments>http://www.islighting.com/archives/271#comments</comments>
		<pubDate>Sat, 31 Dec 2011 12:47:42 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[activities]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=271</guid>
		<description><![CDATA[<p>关键字：创业，转变</p>
<p>一直觉得30岁之前要努力改变现状，越晚，惯性越大，改变越难。<br />
也正好有这么个好的创业机会，有这几个志同道合的好友。<br />
在这个浮躁的时代，有那么一群能沉下心来做事的好友，能为同个目标共同拼搏，真是很不容易。</p>
<p>带着家人朋友的支持与期许，我们在年中扯旗上路。<br />
作坊虽小，事情虽多，却也是忙苦并快乐着。<br />
创业之艰辛于我们来说并不在体力精神，在于不断试错，调整方向，在于匮乏可用的资源。</p>
<p>人人都有压力，巴士大叔也不例外。<br />
也许国内环境真已不适合草根起家，或者选择的方向有偏差，<br />
在漆黑的下一个弯口，我们选择黯然离场。<br />
但我们深知，内心留存着一团火，<br />
在未来某一刻，它终会光亮敞透。</p>
<p>转变，从设计师到码农。<br />
转变，从执行到业务模式的探索。<br />
转变，从交付产品到持续交付运营。</p>
<p>2011，来的飞快，去的飞快。<br />
感谢一路相伴的朋友，感谢家人，这一年的经历，值得好好回味。</p>
]]></description>
			<content:encoded><![CDATA[<p>关键字：创业，转变</p>
<p>一直觉得30岁之前要努力改变现状，越晚，惯性越大，改变越难。<br />
也正好有这么个好的创业机会，有这几个志同道合的好友。<br />
在这个浮躁的时代，有那么一群能沉下心来做事的好友，能为同个目标共同拼搏，真是很不容易。</p>
<p>带着家人朋友的支持与期许，我们在年中扯旗上路。<br />
作坊虽小，事情虽多，却也是忙苦并快乐着。<br />
创业之艰辛于我们来说并不在体力精神，在于不断试错，调整方向，在于匮乏可用的资源。</p>
<p>人人都有压力，巴士大叔也不例外。<br />
也许国内环境真已不适合草根起家，或者选择的方向有偏差，<br />
在漆黑的下一个弯口，我们选择黯然离场。<br />
但我们深知，内心留存着一团火，<br />
在未来某一刻，它终会光亮敞透。</p>
<p>转变，从设计师到码农。<br />
转变，从执行到业务模式的探索。<br />
转变，从交付产品到持续交付运营。</p>
<p>2011，来的飞快，去的飞快。<br />
感谢一路相伴的朋友，感谢家人，这一年的经历，值得好好回味。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/271/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一条html5的宣传片</title>
		<link>http://www.islighting.com/archives/265</link>
		<comments>http://www.islighting.com/archives/265#comments</comments>
		<pubDate>Fri, 23 Dec 2011 16:36:05 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[devs]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=265</guid>
		<description><![CDATA[<p><a href="http://www.islighting.com/archives/265/attachment/2867948537722029534" rel="attachment wp-att-282"><img class="alignnone size-large wp-image-282" title="2867948537722029534" src="http://www.islighting.com/wp-content/uploads/2011/12/2867948537722029534-1024x593.jpg" alt="" width="500" height="289" /></a><a href="http://www.islighting.com/archives/265/attachment/2844867589631748334" rel="attachment wp-att-281"><img class="alignnone size-large wp-image-281" title="2844867589631748334" src="http://www.islighting.com/wp-content/uploads/2011/12/2844867589631748334-1024x596.jpg" alt="" width="500" height="291" /></a><a href="http://www.islighting.com/archives/265/attachment/92042317401546056" rel="attachment wp-att-276"><img class="alignnone size-large wp-image-276" title="92042317401546056" src="http://www.islighting.com/wp-content/uploads/2011/12/92042317401546056-1024x595.jpg" alt="" width="500" height="290" /></a><a href="http://www.islighting.com/archives/265/attachment/2806305517822396785" rel="attachment wp-att-280"><img class="alignnone size-large wp-image-280" title="2806305517822396785" src="http://www.islighting.com/wp-content/uploads/2011/12/2806305517822396785-1024x596.jpg" alt="" width="500" height="291" /></a><a href="http://www.islighting.com/archives/265/attachment/2544252314504770869" rel="attachment wp-att-279"><img class="alignnone size-large wp-image-279" title="2544252314504770869" src="http://www.islighting.com/wp-content/uploads/2011/12/2544252314504770869-1024x592.jpg" alt="" width="500" height="289" /></a><a href="http://www.islighting.com/archives/265/attachment/1328561890091448651" rel="attachment wp-att-278"><img class="alignnone size-large wp-image-278" title="1328561890091448651" src="http://www.islighting.com/wp-content/uploads/2011/12/1328561890091448651-1024x596.jpg" alt="" width="500" height="291" /></a><a href="http://www.islighting.com/archives/265/attachment/92042317401546084" rel="attachment wp-att-277"><img src="http://www.islighting.com/wp-content/uploads/2011/12/92042317401546084-1024x594.jpg" alt="" title="92042317401546084" width="500" height="290" class="alignnone size-large wp-image-277" /></a></p>
<p>前段时间的成果，伙同产品、设计一起加工出来的demo</p>
<p>webgl，canvas，svg，各种前端技术能用上的，都用上了</p>
<p>音乐 Tydi &#8211;  The Camera Doesnt Lie But You Do (Original Mix)</p>
<p><a href="http://weishangye.com/temp_r/demo" rel="nofollow" target="_blank">线上地址</a> -&#60; 点此，用chrome观看</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.islighting.com/archives/265/attachment/2867948537722029534" rel="attachment wp-att-282"><img class="alignnone size-large wp-image-282" title="2867948537722029534" src="http://www.islighting.com/wp-content/uploads/2011/12/2867948537722029534-1024x593.jpg" alt="" width="500" height="289" /></a><a href="http://www.islighting.com/archives/265/attachment/2844867589631748334" rel="attachment wp-att-281"><img class="alignnone size-large wp-image-281" title="2844867589631748334" src="http://www.islighting.com/wp-content/uploads/2011/12/2844867589631748334-1024x596.jpg" alt="" width="500" height="291" /></a><a href="http://www.islighting.com/archives/265/attachment/92042317401546056" rel="attachment wp-att-276"><img class="alignnone size-large wp-image-276" title="92042317401546056" src="http://www.islighting.com/wp-content/uploads/2011/12/92042317401546056-1024x595.jpg" alt="" width="500" height="290" /></a><a href="http://www.islighting.com/archives/265/attachment/2806305517822396785" rel="attachment wp-att-280"><img class="alignnone size-large wp-image-280" title="2806305517822396785" src="http://www.islighting.com/wp-content/uploads/2011/12/2806305517822396785-1024x596.jpg" alt="" width="500" height="291" /></a><a href="http://www.islighting.com/archives/265/attachment/2544252314504770869" rel="attachment wp-att-279"><img class="alignnone size-large wp-image-279" title="2544252314504770869" src="http://www.islighting.com/wp-content/uploads/2011/12/2544252314504770869-1024x592.jpg" alt="" width="500" height="289" /></a><a href="http://www.islighting.com/archives/265/attachment/1328561890091448651" rel="attachment wp-att-278"><img class="alignnone size-large wp-image-278" title="1328561890091448651" src="http://www.islighting.com/wp-content/uploads/2011/12/1328561890091448651-1024x596.jpg" alt="" width="500" height="291" /></a><a href="http://www.islighting.com/archives/265/attachment/92042317401546084" rel="attachment wp-att-277"><img src="http://www.islighting.com/wp-content/uploads/2011/12/92042317401546084-1024x594.jpg" alt="" title="92042317401546084" width="500" height="290" class="alignnone size-large wp-image-277" /></a></p>
<p>前段时间的成果，伙同产品、设计一起加工出来的demo</p>
<p>webgl，canvas，svg，各种前端技术能用上的，都用上了</p>
<p>音乐 Tydi &#8211;  The Camera Doesnt Lie But You Do (Original Mix)</p>
<p><a href="http://weishangye.com/temp_r/demo" rel="nofollow" target="_blank">线上地址</a> -&lt; 点此，用chrome观看</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/265/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StarGate，nodejs+three.js的一次实验</title>
		<link>http://www.islighting.com/archives/251</link>
		<comments>http://www.islighting.com/archives/251#comments</comments>
		<pubDate>Thu, 05 May 2011 08:03:59 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[devs]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=251</guid>
		<description><![CDATA[<p>没有什么能够比在熟悉的语言环境中做所有事更爽的了。nodejs的出现，给了前端众更广阔的发展空间，花点心思，就能从前到后完整的构建一个应用。而对于我来言，初衷其实很简单，在服务器端用最低的成本拥有和文件系统直接打交道的能力。</p>
<p>StarGate最初的功能是要同步腾讯微博/新浪微博，实现到一半时想法有变，大概因为最近视觉信息的内容看了不少，手痒想实践一把。同步的功能后面会陆续添加，以及发微博的时间/节点/传播途径等等，想法很多，逐步实现。</p>
<p>作为一个视觉控，自然在表现上会想要雕琢一番，正好前段时间研究的webgl可以派上用场。表现层使用了<a href="https://github.com/mrdoob/three.js/" target="_blank">three.js</a>，three.js是一个轻量级的webgl框架，有多种渲染引擎，webgl，canvas，svg。前段时间很火的webgl mv <a href="http://www.ro.me/" target="_blank">3 black heart</a>就使用了three做为骨架来构建场景。</p>
<p>在后端，数据库使用了天生和nodejs很搭的mongodb，用<a href="http://mongoosejs.com/" target="_blank">mongoose</a> + <a href="http://expressjs.com/" target="_blank">express</a>搭建后端应用，再用<a href="http://socket.io/" target="_blank">socket.io</a>传输数据，这样，一个应用就跑起来了。。。</p>
<p>附上视频：<br />
</p>
]]></description>
			<content:encoded><![CDATA[<p>没有什么能够比在熟悉的语言环境中做所有事更爽的了。nodejs的出现，给了前端众更广阔的发展空间，花点心思，就能从前到后完整的构建一个应用。而对于我来言，初衷其实很简单，在服务器端用最低的成本拥有和文件系统直接打交道的能力。</p>
<p>StarGate最初的功能是要同步腾讯微博/新浪微博，实现到一半时想法有变，大概因为最近视觉信息的内容看了不少，手痒想实践一把。同步的功能后面会陆续添加，以及发微博的时间/节点/传播途径等等，想法很多，逐步实现。</p>
<p>作为一个视觉控，自然在表现上会想要雕琢一番，正好前段时间研究的webgl可以派上用场。表现层使用了<a href="https://github.com/mrdoob/three.js/" target="_blank">three.js</a>，three.js是一个轻量级的webgl框架，有多种渲染引擎，webgl，canvas，svg。前段时间很火的webgl mv <a href="http://www.ro.me/" target="_blank">3 black heart</a>就使用了three做为骨架来构建场景。</p>
<p>在后端，数据库使用了天生和nodejs很搭的mongodb，用<a href="http://mongoosejs.com/" target="_blank">mongoose</a> + <a href="http://expressjs.com/" target="_blank">express</a>搭建后端应用，再用<a href="http://socket.io/" target="_blank">socket.io</a>传输数据，这样，一个应用就跑起来了。。。</p>
<p>附上视频：<br />
<embed type="application/x-shockwave-flash" width="480" height="400" src="http://player.youku.com/player.php/sid/XMjYzOTc4Mzc2/v.swf" align="middle" allowscriptaccess="sameDomain" quality="high"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/251/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>zen coding 0.7发布</title>
		<link>http://www.islighting.com/archives/228</link>
		<comments>http://www.islighting.com/archives/228#comments</comments>
		<pubDate>Tue, 22 Mar 2011 14:23:09 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[devs]]></category>
		<category><![CDATA[Zen-coding]]></category>
		<category><![CDATA[工具]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=228</guid>
		<description><![CDATA[<p><a href="http://code.google.com/p/zen-coding/" target="_blank">zen coding</a> 更新到<a href="https://github.com/sergeche/zen-coding/wiki/Release-Notes" target="_blank">0.7版本</a>，这次更新还是很有亮点的。最令人欣喜的恐怕是群组展开功能，这在以前需要分段来完成，而现在，只要你愿意，可以用一句表达式从头写到尾，一个module几乎可以一气呵成。另外一个重要的更新是可以编写节点的属性和文本，要编写小段的html也方便许多，如</p>
<blockquote><p>p&#62;{Click }+a{here}+{ to continue}</p></blockquote>
<p>展开后就是</p>
<blockquote><p>&#60;p&#62;Click &#60;a href=&#8221;"&#62;here&#60;/a&#62; to continue&#60;/p&#62;</p></blockquote>
<p>更多的更新内容请看<a href="https://github.com/sergeche/zen-coding/wiki/Release-Notes" target="_blank">0.7 release notes</a>，这里还有一个<a href="http://zen-coding.ru/textarea/" target="_blank">web版</a>，可以体验下zen coding的强大功能。</p>
<p><span id="more-228"></span></p>
<p>最后说说我的页面制作流程</p>
<ol>
<li>在Espresso中搭建html，这个时候zen coding可以帮上大忙</li>
<li>编写css，还原设计稿，Espresso的实时预览功能会使这个过程轻快许多，在“所见即所得”的情况下做页面修整是非常舒服的</li>
<li>页面搭建完毕后转战Textmate，在神器中完成js的编写，后期调试也都在Textmate中完成，借助<a href="https://github.com/johnmuhl/javascript-tools-tmbundle" target="_blank">jsLint</a>和<a href="https://github.com/kswedberg/jquery-tmbundle" target="_blank">jQuery bundle</a></li>
</ol>
<p>过程看起来复杂了些，为什么不在一个工具中完成所有事情呢？我的答案是前端的活杂，很难找到一个能囊括所有流程的编辑器，要有，也是各项表现平平。不如把各阶段分解一下，选择最合适的工具应对，乘波逐浪，岂不快哉！</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/zen-coding/" target="_blank">zen coding</a> 更新到<a href="https://github.com/sergeche/zen-coding/wiki/Release-Notes" target="_blank">0.7版本</a>，这次更新还是很有亮点的。最令人欣喜的恐怕是群组展开功能，这在以前需要分段来完成，而现在，只要你愿意，可以用一句表达式从头写到尾，一个module几乎可以一气呵成。另外一个重要的更新是可以编写节点的属性和文本，要编写小段的html也方便许多，如</p>
<blockquote><p>p&gt;{Click }+a{here}+{ to continue}</p></blockquote>
<p>展开后就是</p>
<blockquote><p>&lt;p&gt;Click &lt;a href=&#8221;"&gt;here&lt;/a&gt; to continue&lt;/p&gt;</p></blockquote>
<p>更多的更新内容请看<a href="https://github.com/sergeche/zen-coding/wiki/Release-Notes" target="_blank">0.7 release notes</a>，这里还有一个<a href="http://zen-coding.ru/textarea/" target="_blank">web版</a>，可以体验下zen coding的强大功能。</p>
<p><span id="more-228"></span></p>
<p>最后说说我的页面制作流程</p>
<ol>
<li>在Espresso中搭建html，这个时候zen coding可以帮上大忙</li>
<li>编写css，还原设计稿，Espresso的实时预览功能会使这个过程轻快许多，在“所见即所得”的情况下做页面修整是非常舒服的</li>
<li>页面搭建完毕后转战Textmate，在神器中完成js的编写，后期调试也都在Textmate中完成，借助<a href="https://github.com/johnmuhl/javascript-tools-tmbundle" target="_blank">jsLint</a>和<a href="https://github.com/kswedberg/jquery-tmbundle" target="_blank">jQuery bundle</a></li>
</ol>
<p>过程看起来复杂了些，为什么不在一个工具中完成所有事情呢？我的答案是前端的活杂，很难找到一个能囊括所有流程的编辑器，要有，也是各项表现平平。不如把各阶段分解一下，选择最合适的工具应对，乘波逐浪，岂不快哉！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/228/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>requestAnimationFrame，更优的动画</title>
		<link>http://www.islighting.com/archives/219</link>
		<comments>http://www.islighting.com/archives/219#comments</comments>
		<pubDate>Sat, 12 Mar 2011 18:08:08 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[devs]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=219</guid>
		<description><![CDATA[<p>浏览器上的动画，通常都是用定时器完成，每隔一段时间改变一下元素属性。但是定时器太古板，不管是否当前标签，都会吃掉部分cpu资源。所幸现代浏览器对开发者友好，将这些脏活抗了去，还做了优化。现在，我们要做的只是调用API，就能减少动画过程中的repaint、reflow，减少cpu占用。</p>
<p>废话不多说，直接上代码</p>
<blockquote>
<pre>// shim layer with setTimeout fallback
    window.requestAnimFrame = (function(){
      return  window.requestAnimationFrame       &#124;&#124;
              window.webkitRequestAnimationFrame &#124;&#124;
              window.mozRequestAnimationFrame    &#124;&#124;
              window.oRequestAnimationFrame      &#124;&#124;
              window.msRequestAnimationFrame     &#124;&#124;
              function(/* function */ callback, /* DOMElement */ element){
                window.setTimeout(callback, 1000 / 60);
              };
    })();

    // usage:
    //</pre></blockquote><p>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>浏览器上的动画，通常都是用定时器完成，每隔一段时间改变一下元素属性。但是定时器太古板，不管是否当前标签，都会吃掉部分cpu资源。所幸现代浏览器对开发者友好，将这些脏活抗了去，还做了优化。现在，我们要做的只是调用API，就能减少动画过程中的repaint、reflow，减少cpu占用。</p>
<p>废话不多说，直接上代码</p>
<blockquote>
<pre>// shim layer with setTimeout fallback
    window.requestAnimFrame = (function(){
      return  window.requestAnimationFrame       ||
              window.webkitRequestAnimationFrame ||
              window.mozRequestAnimationFrame    ||
              window.oRequestAnimationFrame      ||
              window.msRequestAnimationFrame     ||
              function(/* function */ callback, /* DOMElement */ element){
                window.setTimeout(callback, 1000 / 60);
              };
    })();

    // usage:
    // instead of setInterval(render, 16) ....

    (function animloop(){
      render();
      requestAnimFrame(animloop, element);
    })();</pre>
</blockquote>
<p>参考： <a href="http://paulirish.com/2011/requestanimationframe-for-smart-animating/" target="_blank">requestAnimationFrame for smart animating</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/219/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gsutil命令使用技巧(转)</title>
		<link>http://www.islighting.com/archives/203</link>
		<comments>http://www.islighting.com/archives/203#comments</comments>
		<pubDate>Mon, 17 Jan 2011 02:50:01 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[devs]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=203</guid>
		<description><![CDATA[Things的备份

Things是我一直在Mac上使用的GTD软件，相当好用。不过可惜的是，它不支持多台Mac的同步，所以只好自己来搞一个简单的同步+备份。当然云端同步的功能开发者貌似也是在开发中，也许不久之后就能用上。]]></description>
			<content:encoded><![CDATA[<p><strong>Things的备份</strong></p>
<p><a href="http://culturedcode.com/things" target="_blank">Things</a>是我一直在Mac上使用的GTD软件，相当好用。不过可惜的是，它不支持多台Mac的同步，所以只好自己来搞一个简单的同步+备份。当然云端同步的功能开发者貌似也是在开发中，也许不久之后就能用上。</p>
<p>Things的数据保存在  <tt>&lt;your home folder&gt;/Library/Application Support/Cultured Code/Things/database.xml</tt></p>
<p>用google storage来备份那是相当方便了。。附上things的<a href="http://culturedcode.com/things/wiki/index.php/Backups_and_restoring_backups_%28FAQ%29" target="_blank">备份还原faq</a></p>
<hr /><strong>Gsutil命令使用技巧</strong></p>
<p>gsutil [-d][-D] [-h header]… [command args...]</p>
<ol>
<li>-d [option] http请求详细信息</li>
<li>-h [option] http头，设置Content-Type等，具体参照<a href="http://baike.baidu.com/view/70545.htm" target="_blank">http协议</a>。</li>
</ol>
<div>ls [-b] [-l] [-L]  gsuri… –和linux下的ls命令一样</div>
<div>
<ul>
<li>gsutil ls -l gsurl   使用 -l参数可以列出文件详细信息</li>
</ul>
</div>
<p>cp [-a canned_acl] [-R] [-t] [-z extensions] uri… dst_uri  –用于上传/下载文件</p>
<ul>
<li>-a    acl有4个选项，分别为[public-read]、[public-read-write]、[authenticated-read]、[bucket-owner-read]、 [bucket-owner-full-control]</li>
<li>-R   把该目录及其子目录所有文件都上传到gs</li>
<li>-z     gzip方式压缩(主要用于html、txt、css等文件)</li>
</ul>
<p>public-read表示权限为任何人可读(默认不可读)。public-read-write 可读可写，其他的也不用说了吧？演示：</p>
<blockquote><p>gsutil cp -a public-read demo.html   gs://buckets    –将demo.html上传，并权限为所有人可读.</p>
<p>gsutil cp -a public-read-write demo.html     gs://buckets     —同理</p>
<p>gsutil cp -a public-read -R ./images  gs://buckets   –把当前的images目录及其子目录下所有文件上传，并权限为所有认可读。</p></blockquote>
<p>下载和上传没什么两样，就是本都目录和gs目录调换一下就行了。</p>
<blockquote><p>cp  gs://buckets/img.jpg   file://dir cp参数也支持用正则表达式，如<br />
gsutil cp gs://mybucket/[a-f]*.doc localdir</p></blockquote>
<p>注意：cp命令不能以gsutil cp img.jpg   gs://bucket/img/img.jpg   这样的方式上传，即不能直接上传到bucket的某个文件夹。要实现这个功能，必须在本地创建一个和服务器一样的文件夹，再进行上传，如bucket有 个img的文件夹，你就在本地创建一个img，然后按以下方式更新文件</p>
<blockquote><p>gsutil cp <strong>./img</strong>/img.jpg  gs://bucket/img/<strong>img.jpg </strong></p></blockquote>
<p>一定要以上面的方式，最后的img.jpg可以任意改名，但一定要有。cp命令可以用-a参数。</p>
<p>如果你在上传的时候忘记用-a参数设置权限，之后可以用setacl 命令来修改，具体为</p>
<p>setacl acl_name uri… 如</p>
<blockquote><p>setacl  public-read gs://bluckets/img.jpg</p></blockquote>
<p>其他基本的可以用 gsutil –help 来查看帮助</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/203/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>showModalDialog用法</title>
		<link>http://www.islighting.com/archives/197</link>
		<comments>http://www.islighting.com/archives/197#comments</comments>
		<pubDate>Wed, 18 Aug 2010 09:09:21 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[devs]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=197</guid>
		<description><![CDATA[在开发中，有时会碰到一些很重的交互，比如一个带焦点的对话框，在对话框中有内容的搜索、筛选、选择等等。这时候常用的浮动层模拟对话框就显得不那么适用了，尝试用一下showModalDialog。]]></description>
			<content:encoded><![CDATA[<p>在开发中，有时会碰到一些很重的交互，比如一个带焦点的对话框，在对话框中有内容的搜索、筛选、选择等等。这时候常用的浮动层模拟对话框就显得不那么适用了，尝试用一下showModalDialog。showModalDialog本是ie4+时候的用法，Firefox在3.0开始支持。<a href="https://developer.mozilla.org/en/DOM/window.showModalDialog" target="_blank">MDC</a>里面有说明和简单的示例。</p>
<p>用法如下：</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])<br />
vReturnValue = window.showModelessDialog(sURL [, vArguments] [, sFeatures])</div></td></tr></tbody></table></div>
<p>参数说明：<br />
sURL<br />
必选参数，类型：字符串。用来指定对话框要显示的文档的URL。<br />
vArguments<br />
可选参数，类型：变体。用来向对话框传递参数。传递的参数类型不限，包括数组等。对话框通过window.dialogArguments来取得传递进来的参数。<br />
sFeatures<br />
可选参数，类型：字符串。用来描述对话框的外观等信息，可以使用以下的一个或几个，用分号“;”隔开。<br />
dialogHeight 对话框高度，不小于１００px，ＩＥ４中dialogHeight 和 dialogWidth 默认的单位是em，而ＩＥ５中是px，为方便其见，在定义modal方式的对话框时，用px做单位。<br />
dialogWidth: 对话框宽度。<br />
dialogLeft: 距离桌面左的距离。<br />
dialogTop: 离桌面上的距离。<br />
center: {yes | no | 1 | 0 }：窗口是否居中，默认yes，但仍可以指定高度和宽度。<br />
help: {yes | no | 1 | 0 }：是否显示帮助按钮，默认yes。<br />
resizable: {yes | no | 1 | 0 } ［ＩＥ５＋］：是否可被改变大小。默认no。<br />
status: {yes | no | 1 | 0 } ［IE5+］：是否显示状态栏。默认为yes[ Modeless]或no[Modal]。<br />
scroll:{ yes | no | 1 | 0 | on | off }：指明对话框是否显示滚动条。默认为yes。</p>
<p>可以在传vArguments的时候传父页面的window对象进去，这样在子页面也能调用父页面的全局方法，例如关闭时刷新父页面的指定区域。vReturnValue是子页面返回值。</p>
<p>具体使用时传入了父页面的window，结果f5刷新的时候发现被刷掉了，还是老老实实拼了url传过去，处理完成之后用vReturnValue回传结果。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/197/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ribbon</title>
		<link>http://www.islighting.com/archives/183</link>
		<comments>http://www.islighting.com/archives/183#comments</comments>
		<pubDate>Sun, 30 May 2010 09:49:01 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[activities]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=183</guid>
		<description><![CDATA[opengl红宝书看完,就开始练手了,processing真是很方便的一个工具,不用太多纠结语言的一些特性,用来作快速prototype再合适不过了,还有众多强大的第三方类库.尤其是toxiclibs,几乎所有需要的东西,都方便的提供了,值得好好研究.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.islighting.com/wp-content/uploads/2010/05/屏幕快照-2010-05-30-下午05.11.17.png" target="_blank"><img class="alignnone size-medium wp-image-184" title="屏幕快照 2010-05-30 下午05.11.17" src="http://www.islighting.com/wp-content/uploads/2010/05/屏幕快照-2010-05-30-下午05.11.17-300x187.png" alt="屏幕快照 2010-05-30 下午05.11.17" width="300" height="187" /></a></p>
<p>opengl红宝书看完,就开始练手了,processing真是很方便的一个工具,不用太多纠结语言的一些特性,用来作快速prototype再合适不过了,还有众多强大的第三方类库.尤其是<a href="http://code.google.com/p/toxiclibs/" target="_blank">toxiclibs</a>,几乎所有需要的东西,都方便的提供了,值得好好研究.</p>
<p>回到opengl上,Vertex Buffer Object看起来简单,第一次编写的时候还是挺费劲的,好在processing论坛里有着众多的资源,我着的道,前人早已经提出来过,只要放狗搜就有答案.这次还没有用到纹理,法相和光照,3d缺了这些怎么可以.还有残影的绘制,也许可以用一下glsl.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/183/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FIELD.io 的新作 Muse</title>
		<link>http://www.islighting.com/archives/178</link>
		<comments>http://www.islighting.com/archives/178#comments</comments>
		<pubDate>Sat, 15 May 2010 23:09:53 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[activities]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=178</guid>
		<description><![CDATA[<p><img src="http://farm2.static.flickr.com/1004/4603713752_521980f73f.jpg" alt="" /></p>
<p><img src="http://farm4.static.flickr.com/3299/4603713452_21c9832776.jpg" alt="" /></p>
<p><img src="http://farm4.static.flickr.com/3329/4603713020_345d069065.jpg" alt="" /></p>
<p><a href="http://www.field.io/project/muse#/1" target="_blank">Muse</a>，最近看过的视频中最有印象的一个，有种梦境的梦幻感，音乐也很赞。</p>
<p>网站<a href="http://www.field.io/" target="_blank">field.io</a>，需翻墙。<a href="http://www.flickr.com/photos/fliegerhorst/sets/72157624051868178/" target="_blank">flickr</a>上也有一些视频和往期project的截图。</p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm2.static.flickr.com/1004/4603713752_521980f73f.jpg" alt="" /></p>
<p><img src="http://farm4.static.flickr.com/3299/4603713452_21c9832776.jpg" alt="" /></p>
<p><img src="http://farm4.static.flickr.com/3329/4603713020_345d069065.jpg" alt="" /></p>
<p><a href="http://www.field.io/project/muse#/1" target="_blank">Muse</a>，最近看过的视频中最有印象的一个，有种梦境的梦幻感，音乐也很赞。</p>
<p>网站<a href="http://www.field.io/" target="_blank">field.io</a>，需翻墙。<a href="http://www.flickr.com/photos/fliegerhorst/sets/72157624051868178/" target="_blank">flickr</a>上也有一些视频和往期project的截图。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/178/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ArcBall原理解析</title>
		<link>http://www.islighting.com/archives/171</link>
		<comments>http://www.islighting.com/archives/171#comments</comments>
		<pubDate>Sun, 09 May 2010 09:50:29 +0000</pubDate>
		<dc:creator>Bentz</dc:creator>
				<category><![CDATA[devs]]></category>

		<guid isPermaLink="false">http://www.islighting.com/?p=171</guid>
		<description><![CDATA[鼠标在桌面上的二维运动反映为光标在屏幕上的二维运动。当所处理的对象是一个二维形体时，鼠标的二维运动可以一一映射到二维形体上，从而方便地实现几乎所有需要的操作。但是当交互所关注的对象是一个三维物体时，二维屏幕与三维形体之间的矛盾就曝露出来了，ArcBall算法可以解决此矛盾。]]></description>
			<content:encoded><![CDATA[<p>鼠标在桌面上的二维运动反映为光标在屏幕上的二维运动。当所处理的对象是一个二维形体时，鼠标的二维运动可以一一映射到二维形体上，从而方便地实现几乎所有需要的操作。但是当交互所关注的对象是一个三维物体时，二维屏幕与三维形体之间的矛盾就曝露出来了，ArcBall算法可以解决此矛盾。ArcBall是一种允许用户使用鼠标调整方位的三维交互技术。ArcBall的设计不平常在于，在考虑数学基础的同时，将操作反馈很好地结合起来，解决了鼠标调整空间方位的难题。和其他的一些技术相比，在通用的旋转控制器方面，ArcBall更容易使用，也更容易操作，且具有更强的功能。使用ArcBall作为鼠标三维交互控制器，其最大的特点是能很容易计算旋转轴和旋转角度。除外，能把窗口的二维空间转化为三维单位球空间，能让模型沿着Z轴或者其他轴进行平移等等。<br />
ArcBall主要实现了，用户通过在窗口中拖动鼠标来旋转观察目标。可以想象成一个单位半球位于窗口中心，该单位半球的圆心为原点，当X*X+Y*Y&lt;1时，Z=sqrt(1-X*X-Y*Y)，X*X+Y*Y&gt;=1时，Z=0。鼠标按下时产生起始点，松开时产生结束点，这两点可经过相关算法转化为半球空间上的两点，设这两点与圆心所构成的角度为the弧度。当此两点都落在半球时（Z&gt;0），则其旋转轴与这两点和圆心所构成的平面垂直，其旋转的角度为2倍the弧度；当鼠标的起始点和结束点都落在半球外时（Z=0），则其旋转轴为Z轴，旋转角度为同样为2倍the弧度。<br />
由此根据ArcBall的原理，我们可以知道ArcBall是由最初的窗口空间转换为单位球空间，然后再由单位球空间转换为模型空间（变换矩阵）。窗口空间到单位球空间的转换是把窗口两点的坐标单位化为球面上的两点转换为半球面上的两点，算法如下：</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pt.x = -(screen.x – width/2)/(radius* width/2); //单位球原点在中心，取负号能获得与窗口同向<br />
pt.y = (screen.y – height/2)/(radius* height/2);<br />
r = pt.x*pt.x + pt.y*pt.y;<br />
IF r &amp;gt; 1.0 THEN<br />
s = 1.0/Sqrt[r];<br />
pt.x = s*pt.x;<br />
pt.y = s*pt.y;<br />
pt.z = 0.0;<br />
ELSE pt.z = Sqrt[1.0 - r];</div></td></tr></tbody></table></div>
<p>单位球空间到模型空间转换可以计算出旋转轴和旋转角度，从而得到变换矩阵。该转换可以通过四元数来实现。一个联合的四元数q=[v, w]=[x, y, z, w]由两个部分组成，一个是数量w，它等于cosθ/2，其中θ是旋转的角度，一个是向量v，它等于沿着旋转轴的向量的sinθ/2倍。两个四元数运算的结果就是它们旋转组合的结果，这样旋转组合操作就可以采用四元数叉乘来表示。ArcBall获取转换四元数的计算公式如下：</p>
<p>[q.x, q.y, q.z] = V3_Cross[p0, p1];<br />
q.w = V3_Dot[p0, p1];<br />
TM = QuatToMatrix(q);</p>
<p>其中q表示四元数，p0和p1表示旋转的起始点和结束点（可以通过转换一获得）；V3_Cross表示向量的叉积，它记录了旋转的轴的方向；V3_Dot表示向量的点积，它记录了旋转的角度；TM表示旋转矩阵，QuatToMatrix把四元数转换为矩阵。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.islighting.com/archives/171/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

