Jump to content

Multiline text bug in new release of Canvas2D


TMTH
 Share

Recommended Posts

Th following code was working in previous release (preview), rendering text on two lines:

new Text2D("AAA\nBBB", settings)

In current release (announced at 29 Jan) it doesn't work. It produces following exception:

Uncaught TypeError: Cannot read property 'offset' of undefined
    at Text2DInstanceData.descriptor.set [as transformX] (http://localhost:63342/FirstSample/lib/babylon.canvas2d.js:8687:66)
    at Text2D.RenderablePrim2D.updateInstanceDataPart (http://localhost:63342/FirstSample/lib/babylon.canvas2d.js:9337:29)

Without new line symbol:

new Text2D("AAABBB", settings)

it still works

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...