BabylonJS / Extensions

Extensions for Babylon.js
175 stars 154 forks source link

added support rendering at the top of canvas by simi transparent、and optimized html scale, now it seems better to perform, fixed two bugs #260

Closed CTOSPACE closed 5 months ago

CTOSPACE commented 5 months ago
  1. Fixed the issue of positioning when HtmlMesh is not at the root node, modified htmlMesh. position to not htmlMesh. getAbsolutePosition()

  2. Fixed issue where pointerCaptureBehavior may be null

New features:

  1. Added rendering at the top of canvas so that htmlMesh can be semi transparent in the scene

Optimized:

  1. Optimized the display scaling of htmlMesh, now HTML will adaptively scale according to its own size and mesh size in the scene
sebavan commented 5 months ago

@ericwood73 I will only merge once you will fully approve the PR :-)

CTOSPACE commented 5 months ago

Great additions to the package. I have only editorial comments, just cleaning up some naming. Also would you be willing to update the README and the README-npm with your changes? Thanks.

Okay, I'm sorry I saw it a bit late. I'll modify the Readme document today

ericwood73 commented 5 months ago

Don't worry about the readme. I've already updated it.

On Fri, Jan 12, 2024, 9:34 PM CTOSPACE @.***> wrote:

Great additions to the package. I have only editorial comments, just cleaning up some naming. Also would you be willing to update the README and the README-npm with your changes? Thanks.

Okay, I'm sorry I saw it a bit late. I'll modify the Readme document today

— Reply to this email directly, view it on GitHub https://github.com/BabylonJS/Extensions/pull/260#issuecomment-1890264067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ5LNKJMOC7TTP4LNTHY5LYOHXFDAVCNFSM6AAAAABBSRDN62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQGI3DIMBWG4 . You are receiving this because you were mentioned.Message ID: @.***>

CTOSPACE commented 5 months ago

In my project, we need to pop up a device's HTML control board by clicking on the device in the scene, so I have implemented a 2D renderer. I wonder if it can also be merged to provide 2D rendering, just like Threejs's 2D renderer, but it seems that my implementation maybe is better

https://github.com/BabylonJS/Extensions/assets/1892162/2f6f6c96-e731-46ba-9eb8-86b32add3c3d