Jump to content

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


Borislav
 Share

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.

Link to comment
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 

Link to comment
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).

Link to comment
Share on other sites

  • 1 year later...

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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...