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

Error with Materials Sandcastle Example #6827

Closed
OmarShehata opened this issue Jul 23, 2018 · 2 comments
Closed

Error with Materials Sandcastle Example #6827

OmarShehata opened this issue Jul 23, 2018 · 2 comments

Comments

@OmarShehata
Copy link
Contributor

  1. Go to https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Materials.html
  2. Click on Misc materials and choose Water.
  3. Get error Uncaught ReferenceError: require is not defined (on line 150)

Changing:

normalMap: require.toUrl('Assets/Textures/waterNormals.jpg'),

to

normalMap: 'Assets/Textures/waterNormals.jpg',

Seems to work (at least doesn't throw an error).

@hpinkos
Copy link
Contributor

hpinkos commented Jul 23, 2018

Thanks @OmarShehata! Can you update the example to use Cesium.buildModuleUrl('Assets/Textures/waterNormals.jpg') instead of require.toUrl? Also search to make sure none of the other Sandcastle examples use require.toUrl. I thought we fixed this before for #6471 but we obviously missed this one

@hpinkos
Copy link
Contributor

hpinkos commented Aug 7, 2018

Fixed in #6893

@hpinkos hpinkos closed this as completed Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants