Skip to content

Commit

Permalink
Merge pull request #9478 from CesiumGS/deprecate-ktx
Browse files Browse the repository at this point in the history
Deprecate loadCRN and loadKTX
  • Loading branch information
lilleyse authored Apr 9, 2021
2 parents ab07bcb + fadf3e2 commit 3bca4a0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

### 1.81 - 2021-05-01

##### Deprecated :hourglass_flowing_sand:

- `loadCRN` has been deprecated and will be removed in CesiumJS 1.82. It will be replaced with support for KTX2. [#9478](https://github.com/CesiumGS/cesium/pull/9478)
- `loadKTX` has been deprecated and will be removed in CesiumJS 1.82. It will be replaced with support for KTX2. [#9478](https://github.com/CesiumGS/cesium/pull/9478)

### 1.80 - 2021-04-01

##### Additions :tada:
Expand Down
6 changes: 6 additions & 0 deletions Source/Core/loadCRN.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import defined from "./defined.js";
import DeveloperError from "./DeveloperError.js";
import Resource from "./Resource.js";
import TaskProcessor from "./TaskProcessor.js";
import deprecationWarning from "./deprecationWarning.js";

var transcodeTaskProcessor = new TaskProcessor("transcodeCRNToDXT");

Expand Down Expand Up @@ -36,8 +37,13 @@ var transcodeTaskProcessor = new TaskProcessor("transcodeCRNToDXT");
* @see {@link https://github.com/BinomialLLC/crunch|crunch DXTc texture compression and transcoding library}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
* @deprecated This function has been deprecated and will be removed in CesiumJS 1.82.
*/
function loadCRN(resourceOrUrlOrBuffer) {
deprecationWarning(
"loadCRN",
"loadCRN is deprecated and will be removed in CesiumJS 1.82."
);
//>>includeStart('debug', pragmas.debug);
if (!defined(resourceOrUrlOrBuffer)) {
throw new DeveloperError("resourceOrUrlOrBuffer is required.");
Expand Down
6 changes: 6 additions & 0 deletions Source/Core/loadKTX.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import PixelFormat from "./PixelFormat.js";
import Resource from "./Resource.js";
import RuntimeError from "./RuntimeError.js";
import WebGLConstants from "./WebGLConstants.js";
import deprecationWarning from "./deprecationWarning.js";

/**
* Asynchronously loads and parses the given URL to a KTX file or parses the raw binary data of a KTX file.
Expand Down Expand Up @@ -57,8 +58,13 @@ import WebGLConstants from "./WebGLConstants.js";
* @see {@link https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/|KTX file format}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
* @deprecated This function has been deprecated and will be removed in CesiumJS 1.82.
*/
function loadKTX(resourceOrUrlOrBuffer) {
deprecationWarning(
"loadKTX",
"loadKTX is deprecated and will be removed in CesiumJS 1.82."
);
//>>includeStart('debug', pragmas.debug);
Check.defined("resourceOrUrlOrBuffer", resourceOrUrlOrBuffer);
//>>includeEnd('debug');
Expand Down

0 comments on commit 3bca4a0

Please sign in to comment.