Sign in to follow this  
Borislav

I am getting a strange error when I try to add shadows.

Recommended Posts

Compiltation error

Line 9:1275 - Cannot read property 'dispose' of undefined

 

I get this when I attempt to add this to my game:

 

var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
shadowGenerator.getShadowMap().renderList.push(sphere);
ground.receiveShadows = true;

 

But, when I delete this I still continue to get it for no reason.

To return back I need to refresh the page.

Share this post


Link to post
Share on other sites

run console.log(); with each property in the code above and check where it will print "undefined".

You are accessing dispose field of something which doesn't exist in memory or it is other place.

Or you forgot to intialize something before the code above.

Share this post


Link to post
Share on other sites
6 minutes ago, spinnerbox said:

run console.log(); with each property in the code above and check where it will print "undefined".

You are accessing dispose field of something which doesn't exist in memory or it is other place.

Or you forgot to intialize something before the code above.

Compiltation error

Line 8:23846 - r.needCube is not a function 

Share this post


Link to post
Share on other sites
1 hour ago, Borislav said:

Compiltation error

Line 8:23846 - r.needCube is not a function 

seems you tring to use shadows with HemisphericLight. It does not work with this type of light

Share this post


Link to post
Share on other sites
On 05.04.2017 at 4:41 PM, c75 said:

seems you tring to use shadows with HemisphericLight. It does not work with this type of light

Hm...

I am somewhat newbie so I don't understand lots of things.

I read the tutorial and I copied the script and customised it for my game(changed torus to sphere).

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.