Nodragem Posted October 13, 2018 Share Posted October 13, 2018 Hello, I am trying to make an helper to load my shaders using a json file (linking to the fx files and textures). For now, I am using this interface to read my json: interface TextureDefinition { refName:string, path:string, wrapU:string, wrapV:string } interface ShaderDefiniton { refName:string, path:string, attributes:string[], uniforms:string[], textures: TextureDefinition[] } But I just realised that the attributes, uniforms and many other options are already part of IShaderMaterialOptions . Hence I could take into account all shader options by using this interface: interface TextureDefinition { refName:string, path:string, wrapU:string, wrapV:string } interface ShaderDefiniton { refName:string, path:string, options:BABYLON.IShaderMaterialOptions, textures: TextureDefinition[] } However, I get the following error: Am I not accessing IShaderMaterialOptions from the right place? I tried BABYLON.Material without any more success... Quote Link to comment Share on other sites More sharing options...
droggam Posted October 13, 2018 Share Posted October 13, 2018 @Nodragem I may come forward as total nub but its correct as far as i can see it has no exported member like that something in ur code is off. I dont have that exported member neither. Quote Link to comment Share on other sites More sharing options...
Nodragem Posted October 13, 2018 Author Share Posted October 13, 2018 Yep, maybe it is not exported... just to clarify, it does exist according to the doc: https://doc.babylonjs.com/api/interfaces/babylon.ishadermaterialoptions Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 13, 2018 Share Posted October 13, 2018 hi i think you most use BABYLON.ShaderMaterial Quote Link to comment Share on other sites More sharing options...
Nodragem Posted October 13, 2018 Author Share Posted October 13, 2018 No, it does not work either ? but good try! Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 14, 2018 Share Posted October 14, 2018 can you make PG playground https://www.babylonjs-playground.com/ Quote Link to comment Share on other sites More sharing options...
Nodragem Posted October 14, 2018 Author Share Posted October 14, 2018 Do you know how to upload files (I need a texture and JSON file) on the PG? Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 14, 2018 Share Posted October 14, 2018 i use https://imgur.com/ for texture and github for js *** https://cdn.rawgit.com/[ url ] sample https://cdn.rawgit.com/NasimiAsl/Extensions/master/GeometryBuilder/SGBD.js 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.