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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
define.class('$server/service', function() {
this.attributes = {
outnumber: Config({persist:true, type:Number, flow:"out", value:100}),
outboolean: Config({persist:true, type:Boolean, flow:"out", value:true}),
outfloat: Config({persist:true, type:float, flow:"out", value:3.1415}),
outint: Config({persist:true, type:int, flow:"out", value:42}),
outvec2: Config({persist:true, type:vec2, flow:"out", value:vec2(1,2)}),
outvec3: Config({persist:true, type:vec3, flow:"out", value:vec3(1,2,3)}),
outvec4: Config({persist:true, type:vec4, flow:"out", value:vec4(1,2,3,4)}),
outarray: Config({persist:true, type:Array, flow:"out", value:[1,2,3,4,5,"6"]}),
outstring: Config({persist:true, type:String, flow:"out", value:"Cats"}),
outobject: Config({persist:true, type:Object, flow:"out", value:{some:{complex:'object'}}}),
number: Config({persist:true, type:Number, flow:"in"}),
boolean: Config({persist:true, type:Boolean, flow:"in"}),
float: Config({persist:true, type:float, flow:"in"}),
int: Config({persist:true, type:int, flow:"in"}),
vec2: Config({persist:true, type:vec2, flow:"in"}),
vec3: Config({persist:true, type:vec3, flow:"in"}),
vec4: Config({persist:true, type:vec4, flow:"in"}),
array: Config({persist:true, type:Array, flow:"in"}),
string: Config({persist:true, type:String, flow:"in"}),
object: Config({persist:true, type:Object, flow:"in"})
};
this.onnumber = function(ev, v, o) {
console.log("number", this.number)
console.log("\n")
this.outnumber = v;
}
this.onboolean = function(ev, v, o) {
console.log("boolean", this.boolean)
console.log("\n")
this.outboolean = v;
}
this.onfloat = function(ev, v, o) {
console.log("float", this.float)
console.log("\n")
this.outfloat = v;
}
this.onint = function(ev, v, o) {
console.log("int", this._int)
console.log("\n")
this.outint = v;
}
this.onvec2 = function(ev, v, o) {
console.log("vec2", this.vec2)
console.log("\n")
this.outvec2 = v;
}
this.onvec3 = function(ev, v, o) {
console.log("vec3", this.vec3)
console.log("\n")
this.outvec3 = v;
}
this.onvec4 = function(ev, v, o) {
console.log("vec4", this.vec4)
console.log("\n")
this.outvec4 = v;
}
this.onarray = function(ev, v, o) {
console.log("array", this.array)
console.log("\n")
this.outarray = v;
}
this.onstring = function(ev, v, o) {
console.log("string", this.string)
console.log("\n")
this.outstring = v;
}
this.onobject = function(ev, v, o) {
console.log("object", this.object)
console.log("\n")
this.outobject = v;
}
this.init = function(ev, v, o) {
console.log("number", this.number)
console.log("boolean", this.boolean)
console.log("float", this.float)
console.log("int", this.int)
console.log("vec2", this.vec2)
console.log("vec3", this.vec3)
console.log("vec4", this.vec4)
console.log("array", this.array)
console.log("string", this.string)
console.log("object", this.object)
console.log("\n\n")
this.outobject = this.object;
this.outstring = this.string;
this.outarray = this.array;
this.outvec4 = this.vec4;
this.outvec3 = this.vec3;
this.outvec2 = this.vec2;
this.outint = this.int;
this.outfloat = this.float;
this.outboolean = this.boolean;
this.outnumber = this.number;
}
});
|