Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ export default [
"eslint-seatbelt/configure": "error",
"no-unused-vars": [
"error",
{ vars: "all", args: "none", caughtErrors: "none" },
{
vars: "all",
args: "none",
caughtErrors: "none",
ignoreRestSiblings: true,
},
],
// There were too many errors to address when this was first turned on.
// Using eslint-seatbelt to gradually address them
Expand Down
6 changes: 3 additions & 3 deletions packages/engine/Source/Scene/GltfJsonLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async function upgradeVersion(gltfJsonLoader, gltf) {
!usesExtension(gltf, "KHR_techniques_webgl") &&
!usesExtension(gltf, "KHR_materials_common")
) {
return Promise.resolve();
return gltf;
}

// Load all buffers into memory. updateVersion will read and in some cases modify
Expand Down Expand Up @@ -212,7 +212,7 @@ async function upgradeVersion(gltfJsonLoader, gltf) {
});

await Promise.all(promises);
updateVersion(gltf);
return updateVersion(gltf);
}

function decodeDataUris(gltf) {
Expand Down Expand Up @@ -258,7 +258,7 @@ async function processGltfJson(gltfJsonLoader, gltf) {
addPipelineExtras(gltf);

await decodeDataUris(gltf);
await upgradeVersion(gltfJsonLoader, gltf);
gltf = await upgradeVersion(gltfJsonLoader, gltf);
addDefaults(gltf);
await loadEmbeddedBuffers(gltfJsonLoader, gltf);
removePipelineExtras(gltf);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Generated from the glTF JSON schemas at:
// https://github.com/CesiumGS/glTF/tree/e68efc9086f60743c331a2c757a1ffadcdb5d532/extensions/2.1/Vendor/3DTILES_shape_ellipsoid_region/schema
// Do not edit; rerun `npm run generate-types -w @cesium/gltf` instead.

import type { Gltf2 } from "../Gltf2.js";

/** @internal */
export namespace _3DTILES_shape_ellipsoid_region {
export interface Shape extends Gltf2.Property {
/**
* The minimum height of the region relative to the ellipsoid's surface, in
* meters. May be negative.
*/
minimumHeight: number;
/**
* The maximum height of the region relative to the ellipsoid's surface, in
* meters. May be negative.
*/
maximumHeight: number;
/**
* The minimum latitude of the region, in radians. Must be in the range
* [-pi/2, pi/2].
*
* @default -1.57079632679
*/
minimumLatitude?: number;
/**
* The maximum latitude of the region, in radians. Must be in the range
* [-pi/2, pi/2].
*
* @default 1.57079632679
*/
maximumLatitude?: number;
/**
* The minimum longitude of the region, in radians. Minimum and maximum
* longitude must evaluate to (0 <= abs(maximumLongitude - minimumLongitude)
* <= 2 * pi).
*
* @default -3.14159265359
*/
minimumLongitude?: number;
/**
* The maximum longitude of the region, in radians. Minimum and maximum
* longitude must evaluate to (0 <= abs(maximumLongitude - minimumLongitude)
* <= 2 * pi).
*
* @default 3.14159265359
*/
maximumLongitude?: number;
}
}
12 changes: 12 additions & 0 deletions packages/gltf/SchemaTypes/Gltf2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// See packages/gltf/README.md#generated-gltf-types.

import type { _3DTILES_implicit_tiling } from "./Extensions/3DTILES_implicit_tiling.js";
import type { _3DTILES_shape_ellipsoid_region } from "./Extensions/3DTILES_shape_ellipsoid_region.js";
import type { _3DTILES_subtree } from "./Extensions/3DTILES_subtree.js";
import type { _3DTILES_tileset } from "./Extensions/3DTILES_tileset.js";
import type { _3DTILES_tileset_voxels } from "./Extensions/3DTILES_tileset_voxels.js";
Expand Down Expand Up @@ -1330,6 +1331,11 @@ export namespace Gltf2 {
* Parameter values defining a sphere shape.
*/
sphere?: Gltf2.Shape.Sphere;
/**
* JSON object with extension objects. Property names correspond to glTF
* extension names and property values are extension-specific objects.
*/
extensions?: Gltf2.Shape.Extensions;
}
export namespace Shape {
/**
Expand Down Expand Up @@ -1437,6 +1443,12 @@ export namespace Gltf2 {
*/
sizeZ?: number;
}
export interface Extensions extends Gltf2.Property.Extensions {
/**
* (glTF 2.1)
*/
"3DTILES_shape_ellipsoid_region"?: _3DTILES_shape_ellipsoid_region.Shape;
}
/**
* A sphere, centered at the origin in local space with a radius equal in
* all directions, with normals facing outwards. (glTF 2.1)
Expand Down
1 change: 1 addition & 0 deletions packages/gltf/SchemaTypes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
export type * from "./Gltf1.js";
export type * from "./Gltf2.js";
export type * from "./Extensions/3DTILES_implicit_tiling.js";
export type * from "./Extensions/3DTILES_shape_ellipsoid_region.js";
export type * from "./Extensions/3DTILES_subtree.js";
export type * from "./Extensions/3DTILES_tileset.js";
export type * from "./Extensions/3DTILES_tileset_voxels.js";
Expand Down
Loading