Jump to content

How do you bring in the grid material extension in Typescript?


5plintered
 Share

Recommended Posts

I assume you already have installed BabylonJS and the grid material extension (babylon.gridMaterial.jsbabylon.gridMaterial.min.js and babylon.gridMaterial.d.ts) you can find in the GitHub repository (

In your source file (for instance main.ts), as said by @Deltakosh, you need to reference manually and explicitly the grid extension TypeScript declaration file like this:

// main.ts

/// <reference path="path--to--babylon.gridMaterial.d.ts" />

...

The path should be absolute or relative to the location of the source file where you put this reference (main.ts).

Also, as well as the main BabylonJS core library, don't forget to include the grid extension in your HTML file.

<script src="babylon.gridMaterial.min.js"></script>

Hope this could help.

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