Cole Watson

Members
  • Content count

    4
  • Joined

  • Last visited

  1. Cole Watson

    Using ImportMesh with a String

    @Dad72 removing the name worked for me! Thanks! Not sure why that is but it got it all working well. https://playground.babylonjs.com/#5336A5#5
  2. Cole Watson

    Using ImportMesh with a String

    I am able to get the obj loaded when using the .Append function but not using the Import Mesh function https://playground.babylonjs.com/#5336A5#3
  3. Cole Watson

    Using ImportMesh with a String

    I have tried .obj and .stl to no avail...
  4. Hi Everyone! I am new to Babylon and had a question about the ImportMesh function of the SceneLoader. For my use case I am downloading obj files from and endpoint using our custom headers before making the ImportMesh call. When we download the OBJ files we get a string containing everything in that OBJ file. I am aware that in the sceneFilename parameter we are able to pass in the "stringified" version of the obj file. But I cant seem to get it to work. I get the error: core.umd.js:1487 ERROR Error: Uncaught (in promise): TypeError: First argument to DataView constructor must be an ArrayBuffer TypeError: First argument to DataView constructor must be an ArrayBuffer at new DataView (<anonymous>) at r.isBinary (babylonjs.loaders.min.js:1) at r.importMesh (babylonjs.loaders.min.js:1) at babylon.js:35 at m (babylon.js:35) at Function.i._loadData (babylon.js:35) at Function.i.ImportMesh (babylon.js:35) Here is an example of the call being made: BABYLON.SceneLoader.ImportMesh( 'Some_Name', '', 'Data: string version of obj file...', scene, this.onSuccess, this.onProgress, this.onError, '.stl' ); If anyone has any idea of what I am doing wrong here that would be hugely helpful!