5plintered Posted July 6, 2017 Share Posted July 6, 2017 So I have an application that uses the Babylon NPM package. It doesnt have the grid material extension so I'm wondering how to import it in. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 6, 2017 Share Posted July 6, 2017 Unfortunately you have to manually reference it We are planning to integrate the grid material into core framework as it is used a lot (for v3.1) 5plintered 1 Quote Link to comment Share on other sites More sharing options...
yahiko Posted July 6, 2017 Share Posted July 6, 2017 I assume you already have installed BabylonJS and the grid material extension (babylon.gridMaterial.js, babylon.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. 5plintered 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.