BlackMojito Posted January 5, 2018 Share Posted January 5, 2018 Is there an easy way to render a static 2D background? Like in Threejs, we can pass a texture as the "clear color" for each frame. Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted January 5, 2018 Share Posted January 5, 2018 Hi, I'd go this way Clear color with alpha = 0, and image set behind the canvas. http://playground.babylonjs.com/#XLEWBL But there's some odd cuts ^^ Maybe there's a built-in method ? Never heard about it... Quote Link to comment Share on other sites More sharing options...
MarianG Posted January 5, 2018 Share Posted January 5, 2018 Or layerhttps://www.babylonjs-playground.com/#1SWPNU#9 babbleon, aWeirdo and GameMonetize 3 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted January 5, 2018 Share Posted January 5, 2018 you can also use a BABYLON.Layer new BABYLON.Layer("myBackground", "textures/grass.jpg", scene, true); http://playground.babylonjs.com/#SY1R8P Edit; @MarianG beat me to it MarianG and Pryme8 2 Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted March 19, 2018 Author Share Posted March 19, 2018 On 2018/1/6 at 12:42 AM, SvenFrankson said: Hi, I'd go this way Clear color with alpha = 0, and image set behind the canvas. http://playground.babylonjs.com/#XLEWBL But there's some odd cuts ^^ Maybe there's a built-in method ? Never heard about it... It seems that the background does not work anymore? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.