Jump to content

How do I actually use gradients


DylanD
 Share

Recommended Posts

Hello again everyone, :D

So earlier I figured out how to get gradients into my scene... but now I can't get them to do what I want.

Im hoping to have the gradient go up and down kind of following water like movement, or even just something I could control the height.  So in the playground I have the block with the gradient and one next to it, I want the intersection of the two colours to follow the moving blocks top edge(or at least goes up and down with the block, possibly all the way up or down)...

https://www.babylonjs-playground.com/#2IFRKC#16

 

Any ideas how I could do this?

Link to comment
Share on other sites

17 minutes ago, Deltakosh said:

Pretty good no?

To be honest, no.

They don't have much of an explanation for them(that I found) and I could get them to do what I wanted in the end.  So :( not really.

(not trying to hate but they're so close to pseudo shadows the way I want them but I just can't figure them out :(, so its a bit frustrating)

But I have to understand that they are still in the "beta" or whatever *sigh*

Good start though I guess :) 

https://doc.babylonjs.com/extensions/gradient

Also I don't know if it is my machine specific but on safari the bottom bar of the website regularly blocks the last few lines of the documentation and I understand you are Microsoft and hate safari/Mac but I have not choice I must use Mac. (rant) ?

(^doesnt happen on chrome though..)

Link to comment
Share on other sites

So I have what I want working in the playground, but I can't seem to get that into my local code and I don't know why, I just update to 3.3.0 alpha.12 for just my gradient material,  maybe I need to update my Babylonjs to 3.3.0alpha(current)?

I don't know how good of an idea that is since it might break everything which would be really bad, so any ideas?

Maybe il make a back up and then test the update...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...