Jump to content

BABYLON.GUI in Typescript


JCPalmer
 Share

Recommended Posts

I have made a GUI "form" to exercise a webm video & sound recording process I have made.  I had just written it as a 180 line StackPanel right in a javascript file specific to the directory of the test scene.  If this was bundled as Typescript right with the other code, then it could be injected to any scene I write with very little code & screwing around.

I added the GUI.d.ts file, but you get  error TS2694: Namespace 'BABYLON' has no exported member 'GUI'. when you assign the type  BABYLON.GUI.StackPanel to an object.  Any ideas on how to fix this?

Link to comment
Share on other sites

Actually, neither, but you got me to think of the answer.  I was just putting all d.ts files in a source sub-directory.  I only used ///references for other source files to help it figure out how to order them.  For most projects I just use an include: with a "src/**/*.ts" in the tsconfig.json

The QI extension, where this is going, is too complicated for an include.  There I use a files: array that all the files in the order that works.  I added the d.ts file there & problem solved.

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...