Post Reply 
VSMX File Format
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #31
RE: VSMX File Format
Okay, I've gone to the effort and done it for you - hope that helps:

Javascript Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
rain = new Actor( "rain" );
offset = 0.000000;
camera = new Camera( "camera" );
rideau_pluie = new Actor( "Rideau_pluie" );
pluie = new Actor( "pluie_middle" );
reflet = new Actor( "reflet" );
flowater = new Actor( "flux" );
ruisselle = new Actor( "ruissel" );
updateRain = function(/*localvars=8*/) {
	offset = offset - 0.0250000;
	rain.uv_offset = < 0, offset >;
	ruisselle.uv_offset = < 0, offset * 0.200000 >;
	flowater.uv_offset = < 0, offset * 1.40000 >;
	pluie.uv_offset = < 0, offset >;
	rideau_pluie.uv_offset = < 0, offset * 0.550000 >;
	reflet.uv_offset = < 0, offset * 0.320000 >;
	__var1 = offset * 0.500000;
	__var2 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	__var1 = offset * 0.400000 + 555.500;
	__var3 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000 * 0.500000;
	__var1 = offset * 0.300000 + 888.800;
	__var4 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000;
	camera.position = < 7.07100 + __var2, -(1.00000) + __var3, -(25.3310) + __var4 >;
	__var1 = offset * 0.200000;
	__var5 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	__var1 = offset * 0.180000 + 555.500;
	__var6 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000 * 0.700000;
	__var1 = offset * 0.150000 + 888.800;
	__var7 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	camera.direction = < 0.0850000 + __var5 * 0.100000, -(0.0180000) + __var6 * 0.100000, 0.850000 + __var7 * 0.100000 >;
	return null;
};
updateRain();
System.timer[0] = new IntervalTimer( 1.00000 / 60.0000, updateRain );
num_splotch = 60;
splotchs = new Array();
frames = new Array();
computeLight = function(/*localvars=8*/ __var1, __var2, __var3) {
	__var4 = __var1 - 3.20000;
	__var5 = __var2 + 5.60000;
	__var6 = __var3 + 7.60000;
	__var7 = Math.sqrt( __var4 * __var4 + __var5 * __var5 + __var6 * __var6 ) / 10.0000;
	return Math.pow( Math.max( 0.000000, 1.00000 - __var7 ), 1.40000 );
	return null;
};
randomizeSplotch = function(/*localvars=7*/ __var1) {
	__var2 = 0;
	__var3 = -(5.50000);
	__var4 = 0;
	__var5 = Math.random();
	if( __var5 < 0.700000 ) {
		__var2 = 1.50000 + Math.random() * 8.50000;
		__var4 = -(12.0000) + Math.random() * 12.0000;
	} else {
		if( __var5 < 0.950000 ) {
			__var2 = 1.70000 + Math.random() * 0.500000;
			__var4 = -(12.0000) + Math.random() * 12.0000;
		} else {
			__var2 = 1.98000 + Math.random() * 0.100000 - 0.0500000;
			__var4 = -(9.06000) + Math.random() * 0.100000 - 0.0500000;
		}
	}
	__var1.position = < __var2, __var3, __var4 >;
	__var6 = 0.700000 + Math.random() * 0.300000;
	__var1.scale = < __var6, __var6, __var6 >;
	__var1.setColor( < 1.00000, 1.00000, 1.00000, computeLight( __var2, __var3, __var4 ) >, 0.000000 );
	return null;
};
for(i = 0; i < num_splotch; i++) {
	splotchs.push( new Actor( "splotch" + i ) );
	frames.push( Math.floor( Math.random() * 8.00000 ) );
	randomizeSplotch( splotchs[i] );
}
updateSplotches = function(/*localvars=2*/) {
	for(__var1 = 0; __var1 < num_splotch; __var1++) {
		frames[__var1]++;
		if( frames[__var1] == 8 ) {
			randomizeSplotch( splotchs[__var1] );
			frames[__var1] = 0;
		}
		splotchs[__var1].uv_offset = < frames[__var1] / 8.00000, 0 >;
	}
	System.printPerf();
	return null;
};
System.timer[1] = new IntervalTimer( 1.00000 / 30.0000, updateSplotches );


Here's an updated rcomage.exe with a few bugs fixed too:



Attached File(s)
.7z  rcomage.7z (Size: 890.65 KB / Downloads: 442)
13/05/2011 04:09 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
VSMX File Format - ZiNgA BuRgA - 15/02/2010, 03:22 AM
RE: VSMX File Format - gsmoke - 15/02/2010, 04:47 AM
RE: VSMX File Format - Mr. Shizzy - 15/02/2010, 07:15 AM
RE: VSMX File Format - deathmock5 - 15/02/2010, 05:51 PM
RE: VSMX File Format - Gadget - 15/02/2010, 06:04 PM
RE: VSMX File Format - ZiNgA BuRgA - 15/02/2010, 08:22 PM
RE: VSMX File Format - Mr. Shizzy - 15/02/2010, 08:29 PM
RE: VSMX File Format - zeusfriends - 04/01/2011, 12:14 PM
RE: VSMX File Format - ZiNgA BuRgA - 04/01/2011, 07:57 PM
RE: VSMX File Format - zeusfriends - 07/01/2011, 10:24 PM
RE: VSMX File Format - ZiNgA BuRgA - 08/01/2011, 03:00 AM
RE: VSMX File Format - frankzito - 08/01/2011, 03:17 AM
RE: VSMX File Format - ZiNgA BuRgA - 08/01/2011, 03:34 AM
RE: VSMX File Format - frankzito - 08/01/2011, 05:37 AM
RE: VSMX File Format - ffffu - 07/02/2011, 04:02 PM
RE: VSMX File Format - ZiNgA BuRgA - 08/01/2011, 06:25 AM
RE: VSMX File Format - frankzito - 08/01/2011, 06:57 AM
RE: VSMX File Format - ZiNgA BuRgA - 20/01/2011, 06:52 PM
RE: VSMX File Format - eustolio - 09/05/2011, 09:31 AM
RE: VSMX File Format - ZiNgA BuRgA - 07/02/2011, 10:46 PM
RE: VSMX File Format - ffffu - 08/02/2011, 05:55 PM
RE: VSMX File Format - ZiNgA BuRgA - 08/02/2011, 07:08 PM
RE: VSMX File Format - ZiNgA BuRgA - 09/02/2011, 04:52 AM
RE: VSMX File Format - ffffu - 09/02/2011, 06:25 AM
RE: VSMX File Format - ZiNgA BuRgA - 09/02/2011, 07:22 PM
RE: VSMX File Format - ffffu - 09/02/2011, 07:27 PM
RE: VSMX File Format - ZiNgA BuRgA - 09/02/2011, 10:43 PM
RE: VSMX File Format - ZiNgA BuRgA - 09/05/2011, 03:03 PM
RE: VSMX File Format - eustolio - 12/05/2011, 08:27 AM
RE: VSMX File Format - ZiNgA BuRgA - 12/05/2011, 03:51 PM
RE: VSMX File Format - ZiNgA BuRgA - 13/05/2011 04:09 AM
RE: VSMX File Format - eustolio - 14/05/2011, 11:13 PM
RE: VSMX File Format - highboy - 15/05/2011, 05:47 AM
RE: VSMX File Format - zeusfriends - 24/05/2011, 06:18 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: