We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
var viewer = new Cesium.Viewer('cesiumContainer'); var origin = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, 1000); var modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(origin, new Cesium.HeadingPitchRoll(0, 0, 0)); var clippingPlanes = new Cesium.ClippingPlaneCollection({ planes : [ new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 0.0, -1.0), 0.0) ], edgeWidth : 3.0 }); var model = viewer.scene.primitives.add(Cesium.Model.fromGltf({ url : '../../SampleData/models/CesiumAir/Cesium_Air.glb', modelMatrix : modelMatrix, minimumPixelSize : 128, clippingPlanes: clippingPlanes })); model.readyPromise.then(function(model) { // Play and loop all animations at half-speed model.activeAnimations.addAll({ speedup : 0.5, loop : Cesium.ModelAnimationLoop.REPEAT }); var camera = viewer.camera; // Zoom to model var controller = viewer.scene.screenSpaceCameraController; var r = 2.0 * Math.max(model.boundingSphere.radius, camera.frustum.near); controller.minimumZoomDistance = r * 0.5; var center = Cesium.Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cesium.Cartesian3()); var heading = Cesium.Math.toRadians(230.0); var pitch = Cesium.Math.toRadians(-20.0); camera.lookAt(center, new Cesium.HeadingPitchRange(heading, pitch, r * 2.0)); }).otherwise(function(error){ window.alert(error); }); Sandcastle.addToolbarButton('Change edge width', function() { clippingPlanes.edgeWith = 0; });
The text was updated successfully, but these errors were encountered:
Oh no wait, i just had a typo
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: