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

Fix for black screen on glTF model #6

Merged
merged 1 commit into from
Oct 15, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ function createScene(canvas) {
negativeZ : skyBoxBaseUrl + '_mz.jpg'
});

var modelMatrix = Cesium.Transforms.northEastDownToFixedFrame(Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, 500));
var model = Cesium.Model.fromGltf({
url : 'lib/cesium/Apps/SampleData/models/CesiumAir/Cesium_Air.gltf',
modelMatrix : modelMatrix,
scale : 20.0,
minimumPixelSize : 50,
});
scene.primitives.add(model);
// OIT is enabled when you add the model but is currently incompatible with postprocessing filters
scene._oit.isSupported = function() {
return false;
}

return scene;
}

Expand Down