JavaFX 2D text with background in 3D scene

后端 未结 1 427
Happy的楠姐
Happy的楠姐 2020-12-10 20:06

For my project, I need 2D text inside a 3D scene (not as overlay!). So I\'ve tried adding a BorderPane with Label/Text nodes to my sce

相关标签:
1条回答
  • 2020-12-10 20:55

    Since you are embedding the Text node in a styled border pane, and rendering both in the scene, setting also the cache for the border pane really helps.

    borderPane.setCache(true);
    

    You will go from this:

    Cache text

    to this:

    Cache border pane

    Also, you can set this hint, to improve resolution.

    borderPane.setCacheHint(CacheHint.SCALE_AND_ROTATE);
    

    cache hint

    0 讨论(0)
提交回复
热议问题