Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: url.split is not a function #106

Open
mocon opened this issue Sep 19, 2017 · 5 comments
Open

TypeError: url.split is not a function #106

mocon opened this issue Sep 19, 2017 · 5 comments

Comments

@mocon
Copy link

mocon commented Sep 19, 2017

Hello. I'm seeing the following error right after install:

screen shot 2017-09-19 at 1 02 10 pm

Am I doing something wrong, or is this a bug? Thanks!

@crapthings
Copy link

crapthings commented Sep 27, 2017

yes same thing here what's wrong

import React, { Component } from 'react'
import { render } from 'react-dom'

import 'aframe'
import 'aframe-particle-system-component'
import { Entity, Scene } from 'aframe-react'

class App extends Component {
  render () {
    return (
      <Scene>
        <Entity geometry={{primitive: 'box'}} material={{color: 'red'}} position={{x: 0, y: 0, z: -5}}/>
        <Entity particle-system={{preset: 'snow'}}/>
        <Entity light={{type: 'point'}}/>
        <Entity gltf-model={{src: 'virtualcity.gltf'}}/>
        <Entity text={{value: 'Hello, WebVR!'}}/>
      </Scene>
    );
  }
}

Meteor.startup(function () {
  const app = document.getElementById('app')
  render(<App />, app)
})

@crapthings
Copy link

the error goes after i removed this line

    <Entity gltf-model={{ src: 'virtualcity.gltf' }}/>

@ETZerK
Copy link

ETZerK commented Oct 2, 2017

same here.
But what if we need to load a glTF file?

@psigen
Copy link

psigen commented Nov 16, 2017

I think this is just a typo in the example code.

Removing the dictionary such that the gltf-model attribute is set to a URL string (instead of an object containing a src property) seems to work fine for me, e.g.

<Entity gltf-model={'virtualcity.gltf'}/>
<Entity gltf-model="virtualcity.gltf"/>

@l00f00
Copy link

l00f00 commented Dec 11, 2018

Hi, wich version of Aframe are you using?
I was having the same problem and this last answer from @psigen worked for loading the gltf asset without throwing directory parsing error, anyway my models are showing as empty entities.

I'm using   "dependencies": {
    "aframe": "^0.8.2",
    "aframe-react": "^4.4.0",
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants