Skip to content

Commit

Permalink
Merge branch 'gltf-pbr-specular' into gltf-pbr-anisotropy
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeshurun Hembd committed May 17, 2024
2 parents 92b3060 + 761f798 commit c3df07f
Show file tree
Hide file tree
Showing 25 changed files with 2,490 additions and 2,734 deletions.
15 changes: 0 additions & 15 deletions Apps/SampleData/models/SpecularTest/LICENSE.md

This file was deleted.

53 changes: 0 additions & 53 deletions Apps/SampleData/models/SpecularTest/README.md

This file was deleted.

Binary file not shown.
26 changes: 0 additions & 26 deletions Apps/SampleData/models/SpecularTest/metadata.json

This file was deleted.

7 changes: 1 addition & 6 deletions Apps/Sandcastle/gallery/Picking.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,7 @@

const scene = viewer.scene;
if (scene.mode !== Cesium.SceneMode.MORPHING) {
const pickedObject = scene.pick(movement.endPosition);
if (
scene.pickPositionSupported &&
Cesium.defined(pickedObject) &&
pickedObject.id === modelEntity
) {
if (scene.pickPositionSupported) {
const cartesian = viewer.scene.pickPosition(
movement.endPosition
);
Expand Down
36 changes: 14 additions & 22 deletions Apps/Sandcastle/gallery/development/glTF PBR Specular.html
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,20 @@
);

let model;
loadModel(
"../../SampleData/models/SpecularTest/glTF-Binary/SpecularTest.glb"
);
try {
const resource = await Cesium.IonResource.fromAssetId(2572779);
model = await Cesium.Model.fromGltfAsync({
url: resource,
modelMatrix: modelMatrix,
imageBasedLighting,
});

scene.primitives.add(model);

model.readyEvent.addEventListener(() => zoomToModel(model));
} catch (error) {
window.alert(`Error loading model: ${error}`);
}

Sandcastle.addToggleButton(
"Enable KHR_materials_specular",
Expand All @@ -329,25 +340,6 @@
}
);

async function loadModel(modelURL) {
try {
model = await Cesium.Model.fromGltfAsync({
url: modelURL,
modelMatrix: modelMatrix,
imageBasedLighting,
});

scene.primitives.removeAll();
scene.primitives.add(model);

model.readyEvent.addEventListener(() => {
zoomToModel(model);
});
} catch (error) {
window.alert(`Error loading model: ${error}`);
}
}

function zoomToModel(model) {
const controller = scene.screenSpaceCameraController;
const r = Math.max(
Expand Down
13 changes: 10 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# Change Log

### 1.118
### 1.118 - 2024-06-03

#### @cesium/engine

##### Additions :tada:
###### Additions :tada:

- Added support for glTF models with the [KHR_materials_specular extension](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_specular). [#11970](https://github.com/CesiumGS/cesium/pull/11970)

### 1.117
#### Fixes :wrench:

- Fixed a bug where `scene.pickPosition` returned incorrect results against the globe when `depthTestAgainstTerrain` is `false`. [#4368](https://github.com/CesiumGS/cesium/issues/4368)
- Fixed a bug where `TaskProcessor` worker loading would check the worker module ID rather than the absolute URL when determining if it is cross-origin. [#11833](https://github.com/CesiumGS/cesium/pull/11833)
- Fixed a bug where cross-origin workers would error when loaded with the CommonJS `importScripts` shim instead of an ESM `import`. [#11833](https://github.com/CesiumGS/cesium/pull/11833)
- Corrected the Typescript types for `Billboard.id` and `Label.id` to be `any` [#11973](https://github.com/CesiumGS/cesium/issues/11973)

### 1.117 - 2024-05-01

#### @cesium/engine

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [Andrew McDowell](https://github.com/madole)
- [Tony Luk](https://github.com/impactblue573)
- [Daniel Cooper](https://github.com/moodragon46)
- [Harry Morris](https://github.com/harrythemorris)
- [GeoFS](https://www.geo-fs.com)
- [Xavier Tassin](https://github.com/xtassin/)
- [Esri](https://www.esri.com)
Expand Down
11 changes: 11 additions & 0 deletions Specs/Data/Models/glTF-2.0/BoxSpecular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Box Specular

## Screenshot

![screenshot](screenshot/screenshot.png)

## License Information

Developed by Cesium for testing the KHR_materials_specular extension. Please follow the [Cesium Trademark Terms and Conditions](https://github.com/AnalyticalGraphicsInc/cesium/wiki/CesiumTrademark.pdf).

This model is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
Binary file not shown.

0 comments on commit c3df07f

Please sign in to comment.