krpano制作snow krpano制作snow

krpano制作snow

复制plugins的snow插件,将snow的xml放到同级:


snow.xml:

<krpano>


	<!-- the snow plugin -->
	<plugin name="snow" zorder="1"
	        url="%SWFPATH%/plugins/snow.swf"
	        alturl="%SWFPATH%/plugins/snow.js"
	        floor="0.7"
	        />

	<action name="defaultsnow">
		set(plugin[snow].mode,          snow);
		set(plugin[snow].blendmode,     normal);
		set(plugin[snow].flakes,        4000);
		set(plugin[snow].color,         0xFFFFFF);
		set(plugin[snow].speed,         1.0);
		set(plugin[snow].shake,         4.0);
		set(plugin[snow].speedvariance, 2.0);
		set(plugin[snow].spreading,     4.0);
		set(plugin[snow].wind,          0.0);
	</action>
	
	<action name="snowballs">
		set(plugin[snow].mode,          image);
		set(plugin[snow].imageurl,      '%CURRENTXML%/snow_image/snowball.png');
		set(plugin[snow].blendmode,     normal);
		set(plugin[snow].flakes,        2000);
		set(plugin[snow].imagescale,    0.5);
		set(plugin[snow].speed,         1.0);
		set(plugin[snow].shake,         4.0);
		set(plugin[snow].speedvariance, 2.0);
		set(plugin[snow].spreading,     2.0);
		set(plugin[snow].wind,          0.0);
	</action>
	
	<action name="snowflakes">
		set(plugin[snow].mode,          image);
		set(plugin[snow].imageurl,      '%CURRENTXML%/snow_image/snowflake.png');
		set(plugin[snow].blendmode,     add);
		set(plugin[snow].flakes,        2000);
		set(plugin[snow].imagescale,    0.4);
		set(plugin[snow].speed,         0.5);
		set(plugin[snow].shake,         8.0);
		set(plugin[snow].speedvariance, 2.0);
		set(plugin[snow].spreading,     2.0);
		set(plugin[snow].wind,          0.0);
	</action>
	
	<action name="silverstars">
		set(plugin[snow].mode,          image);
		set(plugin[snow].imageurl,      '%CURRENTXML%/snow_image/silverstar.png');
		set(plugin[snow].blendmode,     add);
		set(plugin[snow].flakes,        2000);
		set(plugin[snow].imagescale,    0.3);
		set(plugin[snow].speed,         1.0);
		set(plugin[snow].shake,         4.0);
		set(plugin[snow].speedvariance, 2.0);
		set(plugin[snow].spreading,     2.0);
		set(plugin[snow].wind,          0.0);
	</action>
	
	<action name="goldenstars">
		set(plugin[snow].mode,          image);
		set(plugin[snow].imageurl,      '%CURRENTXML%/snow_image/star.png');
		set(plugin[snow].blendmode,     normal);
		set(plugin[snow].flakes,        1000);
		set(plugin[snow].imagescale,    1.0);
		set(plugin[snow].speed,         1.0);
		set(plugin[snow].shake,         4.0);
		set(plugin[snow].speedvariance, 2.0);
		set(plugin[snow].spreading,     1.9);
		set(plugin[snow].wind,          0.0);
	</action>
	
	<action name="hearts">
		set(plugin[snow].mode,          image);
		set(plugin[snow].imageurl,      '%CURRENTXML%/snow_image/heart.png');
		set(plugin[snow].blendmode,     normal);
		set(plugin[snow].flakes,        250);
		set(plugin[snow].imagescale,    0.5);
		set(plugin[snow].speed,         1.0);
		set(plugin[snow].shake,         4.0);
		set(plugin[snow].speedvariance, 2.0);
		set(plugin[snow].spreading,     1.5);
		set(plugin[snow].wind,          0.0);
	</action>
	
	<action name="smileys">
		set(plugin[snow].mode,          image);
		set(plugin[snow].imageurl,      '%CURRENTXML%/snow_image/smiley.png');
		set(plugin[snow].blendmode,     normal);
		set(plugin[snow].flakes,        1000);
		set(plugin[snow].imagescale,    1.0);
		set(plugin[snow].speed,         1.0);
		set(plugin[snow].shake,         4.0);
		set(plugin[snow].speedvariance, 2.0);
		set(plugin[snow].spreading,     1.5);
		set(plugin[snow].wind,          0.0);
	</action>
	
	<action name="money">
		set(plugin[snow].mode,          image);
		set(plugin[snow].imageurl,      '%CURRENTXML%/snow_image/money.png');
		set(plugin[snow].blendmode,     normal);
		set(plugin[snow].flakes,        500);
		set(plugin[snow].imagescale,    0.8);
		set(plugin[snow].speed,         0.8);
		set(plugin[snow].shake,         8.0);
		set(plugin[snow].speedvariance, 3.0);
		set(plugin[snow].spreading,     2.5);
		set(plugin[snow].wind,          0.0);
	</action>
	
	<action name="rain">
		set(plugin[snow].mode,          rain);
		set(plugin[snow].blendmode,     normal);
		set(plugin[snow].flakes,        2000);
		set(plugin[snow].color,         0x7FAFFF);
		set(plugin[snow].speed,         3.5);
		set(plugin[snow].shake,         1.0);
		set(plugin[snow].speedvariance, 1.0);
		set(plugin[snow].spreading,     3.0);
		set(plugin[snow].rainwidth,     1.0);
		set(plugin[snow].rainalpha,     0.5);
		set(plugin[snow].wind,          2.0);
	</action>	
	
	<action name="heavyrain">
		set(plugin[snow].mode,          rain);
		set(plugin[snow].blendmode,     normal);
		set(plugin[snow].flakes,        4000);
		set(plugin[snow].color,         0x9FAFFF);
		set(plugin[snow].speed,         4.1);
		set(plugin[snow].shake,         0.0);
		set(plugin[snow].speedvariance, 1.5);
		set(plugin[snow].spreading,     4.0);
		set(plugin[snow].rainwidth,     1.5);
		set(plugin[snow].rainalpha,     0.3);
		set(plugin[snow].wind,          3.0);
	</action>
	
	

</krpano>
将scene的onstart=“snowballs()”里面inclue snow.xml,可选样式


默认雪: onstart=”defaultsnow();”

                雪球:snowballs();

                银色星星:silverstars();

                金色星星:goldenstars();

                心形:hearts();

                笑脸:smileys();

                钱:money();

                雨:rain();

                大雨:heavyrain()

分享本文至:

评论 0

挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
提交评论

清空信息
关闭评论