-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #654 from pmndrs/dev
Version 6.36.1
- Loading branch information
Showing
10 changed files
with
1,175 additions
and
1,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* An ID manager. | ||
*/ | ||
|
||
export class IdManager { | ||
|
||
/** | ||
* Constructs a new ID manager. | ||
* | ||
* @param initialId - The first ID. | ||
*/ | ||
|
||
constructor(initialId = 0) { | ||
|
||
/** | ||
* The next ID. | ||
*/ | ||
|
||
this.nextId = initialId; | ||
|
||
} | ||
|
||
/** | ||
* Returns the next unique ID. | ||
* | ||
* @return The ID. | ||
*/ | ||
|
||
getNextId() { | ||
|
||
return this.nextId++; | ||
|
||
} | ||
|
||
/** | ||
* Resets the ID counter. | ||
* | ||
* @param initialId - The first ID. | ||
* @return This manager. | ||
*/ | ||
|
||
reset(initialId = 0) { | ||
|
||
this.nextId = initialId; | ||
return this; | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export * from "./orthographicDepthToViewZ.js"; | ||
export * from "./viewZToOrthographicDepth.js"; | ||
|
||
export * from "./IdManager.js"; |