Jump to content

LSL CSS Background Concept


joniveehernandez
 Share

You are about to reply to a thread that has been inactive for 3667 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi Guys, I'm trying to create an object that display a different texture depends on what data I get. below is only an example that i want to display only the green circle in my object as a texture but the red and yellow circle must not be visible. I got the idea from a CSS technique called sprite. Not sure if that's possible in LSL using only 1 texture. Since i was confuse trying out the Prim texture repeat and offset.


Texture.jpg

Link to comment
Share on other sites

You have the right idea.  If the three circles are on a single texture, all you have to do is put it on a prim face that is as wide as it is tall, set the horizontal repeats to 0.333, and offset the texture left or right each time you want to select a different circle.  You don't need much magic to figure this out.  Adjust the repeats and offsets manually with your Build/Edit tool and remember the numbers.  Then put those numbers into your SLPPF function call.  You're done.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3667 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...