ferat Posted July 12, 2016 Share Posted July 12, 2016 Hi, I have an application that uses BabylonJS: http://rapidmockup.topempresas.net/ As you see, i have a skybox with 3D backgrounds and a ArcRotateCamera in my scene. This works well, but i need a second behavior in my scene. When the user select an option, i need to rotate only the object and the plane in my scene, but not the background. It is because i need a option to user add your own backgorund image, but users will upload only one texture, and the background skybox must be fixed to see only one face. Is it possible? How to make it? Thanks by the support! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 12, 2016 Share Posted July 12, 2016 Hiya @ferat! Welcome to the forum! I am a little rushed at the moment, but maybe you are looking for a background "layer". It's easy to use. Let's take a playground search for the term "layer"... http://doc.babylonjs.com/playground?q=layer&page=1&max=500&bf=all Oooh, we got a crap-wagon full of returns! I'll help ya find a good one... http://www.babylonjs-playground.com/#UUXLX#15 Yeah, whoever made that playground was a definite mad-man. Lines 19-22 are the part YOU care-about. Line 22 shows that the background has ALL the power of Babylon.Texture and Babylon.BaseTexture classes, so you have plenty of knobs to twist (such as background.texture.wAng or maybe background.texture.vOffset), should you desire to twist knobs. Hope this helps. Holler if not. Madclaws and V!nc3r 2 Quote Link to comment Share on other sites More sharing options...
ferat Posted July 13, 2016 Author Share Posted July 13, 2016 This is Awesome!!! Thanks very much @Wingnut!! This works perfectly for me. Quote Link to comment Share on other sites More sharing options...
ferat Posted July 14, 2016 Author Share Posted July 14, 2016 Is there any way to save a screenshot with this layer of background? I am using BABYLON.Tools.CreateScreenshot but always creates an image with a transparent background. For now, I'm using canvas.toDataURL ("image / png"), keeping the preserveDrawingBuffer to true to be able to save the full picture. Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 14, 2016 Share Posted July 14, 2016 Hello! the best option is the one you already found Just use toDataUrl Quote Link to comment Share on other sites More sharing options...
ferat Posted July 14, 2016 Author Share Posted July 14, 2016 Thanks @Deltakosh!! 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.