1. A concise explanation of the problem you're experiencing.
I tried to run this example: https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/index.html?src=Circles%20and%20Ellipses.html&label=Showcases
This is my code:
var redEllipse = viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(-103.0, 40.0),
name : 'Red ellipse on surface',
ellipse : {
semiMinorAxis : 250000.0,
semiMajorAxis : 400000.0,
material : Cesium.Color.RED.withAlpha(0.5)
}
});
var blueEllipse = viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 100000.0),
name : 'Blue translucent, rotated, and extruded ellipse with outline',
ellipse : {
semiMinorAxis : 150000.0,
semiMajorAxis : 300000.0,
extrudedHeight : 200000.0,
rotation : Cesium.Math.toRadians(45),
material : Cesium.Color.BLUE.withAlpha(0.5),
outline : true
}
});
viewer.zoomTo(viewer.entities);
redEllipse.ellipse.material = '//cesiumjs.org/images/2015/02-02/cats.jpg';
I had added the last line of code. When I F8 run this example it reported errors as bellow:
An error occurred while rendering. Rendering has stopped.
undefined
SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.
Error: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.
at new Texture (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:87526:20)
at Material.update (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:88808:27)
at Primitive.update (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:102364:28)
at PrimitiveCollection.update (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:213456:27)
at updateAndRenderPrimitives (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:222436:27)
at executeCommandsInViewport (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:222297:13)
at updateAndExecuteCommands (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:222160:13)
at render (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:222696:9)
at tryAndCatchError (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:222714:13)
at Scene.render (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:222755:13)
By the way I run this code in windows chrome browser. I run chrome with this command:
"...\chrome.exe" --args --disable-web-security
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to use wall to model a building and attach the image to the wall. By doing this I aim to display a realistic building in the map.
4. The Cesium version you're using, your operating system and browser.
Cesium: 1.43
OS: windows 10
browser: chrome 64