Merge branch 'master' of git://gitorious.org/fg/fgdata
This commit is contained in:
commit
93364b3d31
2 changed files with 24 additions and 2 deletions
|
@ -701,12 +701,34 @@ var Path = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Image
|
||||||
|
# ==============================================================================
|
||||||
|
# Class for an image element on a canvas
|
||||||
|
#
|
||||||
|
var Image = {
|
||||||
|
new: func(parent, id)
|
||||||
|
{
|
||||||
|
var m = {
|
||||||
|
parents: [Image, Element.new(parent, "image", id, arg)]
|
||||||
|
};
|
||||||
|
m.color = _createColorNodes(m._node, "color");
|
||||||
|
m.sourceRect = m._node.getNode("source", 1);
|
||||||
|
return m;
|
||||||
|
},
|
||||||
|
|
||||||
|
setFile: func(file)
|
||||||
|
{
|
||||||
|
me.set("file", file);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
# Element factories used by #Group elements to create children
|
# Element factories used by #Group elements to create children
|
||||||
Group._element_factories = {
|
Group._element_factories = {
|
||||||
"group": Group.new,
|
"group": Group.new,
|
||||||
"map": Map.new,
|
"map": Map.new,
|
||||||
"text": Text.new,
|
"text": Text.new,
|
||||||
"path": Path.new
|
"path": Path.new,
|
||||||
|
"image": Image.new
|
||||||
};
|
};
|
||||||
|
|
||||||
# Canvas
|
# Canvas
|
||||||
|
|
|
@ -59,7 +59,7 @@ void main() {
|
||||||
|
|
||||||
vec3 dirt = vec3(1.0);
|
vec3 dirt = vec3(1.0);
|
||||||
if (filmWear) {
|
if (filmWear) {
|
||||||
dirt = texture2D(film_tex, initialCoords + vec2(0.0, osg_SimulationTime * 7.7)).rgb;
|
dirt = texture2D(film_tex, initialCoords*vec2( 1.0, fg_BufferSize.y / fg_BufferSize.x ) + vec2(0.0, osg_SimulationTime * 7.7)).rgb;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 color = texture2D( lighting_tex, c1 );
|
vec4 color = texture2D( lighting_tex, c1 );
|
||||||
|
|
Loading…
Add table
Reference in a new issue