Hello everyone, as shown in the example, when the fourth parameter ofnew BABYLON.Engine is set to true(adaptToDeviceRatio = true), the newly register view will change, the ball is no longer in the center,
Is this a bug?
If it’s not how can I make two canvas same?
edit: Also, If I set the scene clearColor transparent, the view has another problem(also shown in example)
It creates a view on the right and the main canvas used by the engine is made invisible so that it does not interfere with the view rendering.
I have a set a blue background color on the view canvas and set a transparent color for the scene: as you can see it does work as we can see the blue of the background. However, you need to pass true as the 3rd parameter of registerView for a transparent color to work.
Also, setting adaptToDeviceRatio=true at engine creation is the same thing as changing the hardware scaling level: in this PG I change this value and it does work as expected.
Note that you must use Babylon.js 5.0 for this to work as there were some bugs in 4.2 related to views/hardware scaling level/transparent colors.
Thank you so much
These problems had bothered me for a few days, turns out it’s just that I’m using the wrong version
5.0.0 alpha.60 is perfect and solved all the issues
Thank you guys again!