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

Cannot read property 'XHRLoader' of undefined with vanilla JS build #20

Open
samipe opened this issue Sep 19, 2017 · 3 comments
Open

Cannot read property 'XHRLoader' of undefined with vanilla JS build #20

samipe opened this issue Sep 19, 2017 · 3 comments

Comments

@samipe
Copy link

samipe commented Sep 19, 2017

Hello,

Getting this error message:

Uncaught TypeError: Cannot read property 'XHRLoader' of undefined at o (shaderfrog-runtime.min.js:1) at n.load (shaderfrog-runtime.min.js:1) at robo.js:136 at three.js:33659 at XMLHttpRequest.<anonymous> (three.js:30293)

Line 136-139:
runtime.load( 'Universe_In_A_Letter.json' , function (shaderData) { var material = runtime.get(shaderData.name); holoMesh.material = material; });

shaderfrog-runtime.min.js is included after three.js in index file. Any idea what's wrong?

Thanks

@ghost
Copy link

ghost commented Oct 4, 2017

I get this error as well when I try to load a JSON file. Additionally, if I load the JSON file with THREE.FileLoader then try to add the data and get the data:

function ( data ) {
     runtime.add( data.name, data );
     var material = runtime.get( data.name );
     console.log(material);
}

Error:

Uncaught TypeError: Cannot read property 'RawShaderMaterial' of undefined
    at n.create (ShaderFrog.js:1)
    at n.get (ShaderFrog.js:1)
    at (index):60
    at XMLHttpRequest.<anonymous> (three.js:30090)

In this area of shaderfrog-runtime.min.js:1:
return r.material=new d["default"].RawShaderMaterial(r)

When it tries to get the data:
runtime.get( data.name );

@rugor
Copy link

rugor commented Dec 3, 2017

rolling back to three /r79 'fixes' this for me

@danksky
Copy link

danksky commented Jun 12, 2019

@rugor how did you roll back?
Any update on this?

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

3 participants