Skip to content
This repository
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 12 lines (12 sloc) 0.371 kb
1 2 3 4 5 6 7 8 9 10 11 12
An.object().named('Graphic').plural('Graphics').from(Widget).
has('red',0).
has('green',0).
has('blue', 0).
has('alpha',1.0).
does('color', function(R,G,B,A) {
return this.
has('red',Math.min(255,Math.max(0,1*R))).
has('green',Math.min(255,Math.max(0,1*G))).
has('blue',Math.min(255,Math.max(0,1*B))).
has('alpha',Math.min(1.0, Math.max(0,1*A)))
})
Something went wrong with that request. Please try again.