Skip to content
Merged
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
35 changes: 22 additions & 13 deletions src-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3848,7 +3848,7 @@ index 59ca2d5a..46160831 100644
}

diff --git a/src-testing/src/renderers/common/Backend.ts b/src-testing/src/renderers/common/Backend.ts
index a41d0e8b..de6996e9 100644
index 3d48d63b..626e62ec 100644
--- a/src-testing/src/renderers/common/Backend.ts
+++ b/src-testing/src/renderers/common/Backend.ts
@@ -1,10 +1,38 @@
Expand Down Expand Up @@ -3983,7 +3983,7 @@ index a41d0e8b..de6996e9 100644

/**
* Copies data of the given source texture to the given destination texture.
@@ -483,7 +539,7 @@ class Backend {
@@ -519,7 +575,7 @@ class Backend {
* @param {Object3D} object - The 3D object to test.
* @return {boolean} Whether the 3D object is fully occluded or not.
*/
Expand All @@ -3992,7 +3992,7 @@ index a41d0e8b..de6996e9 100644

/**
* Resolves the time stamp for the given render context and type.
@@ -493,7 +549,7 @@ class Backend {
@@ -529,7 +585,7 @@ class Backend {
* @param {string} [type='render'] - The type of the time stamp.
* @return {Promise<number>} A Promise that resolves with the time stamp.
*/
Expand All @@ -4001,7 +4001,7 @@ index a41d0e8b..de6996e9 100644
if (!this.trackTimestamp) {
warnOnce('WebGPURenderer: Timestamp tracking is disabled.');
return;
@@ -507,7 +563,7 @@ class Backend {
@@ -543,7 +599,7 @@ class Backend {

const duration = await queryPool.resolveQueriesAsync();

Expand All @@ -4010,7 +4010,7 @@ index a41d0e8b..de6996e9 100644

return duration;
}
@@ -557,7 +613,7 @@ class Backend {
@@ -593,7 +649,7 @@ class Backend {
* @abstract
* @return {number} The maximum anisotropy texture filtering value.
*/
Expand All @@ -4019,7 +4019,7 @@ index a41d0e8b..de6996e9 100644

/**
* Returns the drawing buffer size.
@@ -567,7 +623,7 @@ class Backend {
@@ -603,7 +659,7 @@ class Backend {
getDrawingBufferSize() {
_vector2 = _vector2 || new Vector2();

Expand All @@ -4028,7 +4028,7 @@ index a41d0e8b..de6996e9 100644
}

/**
@@ -589,7 +645,7 @@ class Backend {
@@ -625,7 +681,7 @@ class Backend {

_color4 = _color4 || new Color4();

Expand All @@ -4037,7 +4037,7 @@ index a41d0e8b..de6996e9 100644

_color4.getRGB(_color4);

@@ -634,7 +690,11 @@ class Backend {
@@ -670,7 +726,11 @@ class Backend {
* @param {Object} object - The object.
* @return {Object} The object's dictionary.
*/
Expand All @@ -4050,7 +4050,7 @@ index a41d0e8b..de6996e9 100644
let map = this.data.get(object);

if (map === undefined) {
@@ -652,7 +712,7 @@ class Backend {
@@ -688,7 +748,7 @@ class Backend {
* @param {Object} object - The object.
* @return {boolean} Whether a dictionary for the given object as been defined or not.
*/
Expand All @@ -4059,7 +4059,7 @@ index a41d0e8b..de6996e9 100644
return this.data.has(object);
}

@@ -661,7 +721,7 @@ class Backend {
@@ -697,7 +757,7 @@ class Backend {
*
* @param {Object} object - The object to delete.
*/
Expand Down Expand Up @@ -8138,7 +8138,7 @@ index 2034fee1..05c726b4 100644
// if a texture is not ready for use, it falls back to a default texture so it's possible
// to use it for rendering. If a texture in this state is disposed, it's important to
diff --git a/src-testing/src/renderers/common/TimestampQueryPool.ts b/src-testing/src/renderers/common/TimestampQueryPool.ts
index f46665bf..67eb6bdb 100644
index a2e65be3..e32dd793 100644
--- a/src-testing/src/renderers/common/TimestampQueryPool.ts
+++ b/src-testing/src/renderers/common/TimestampQueryPool.ts
@@ -5,7 +5,17 @@ import { warn } from '../../utils.js';
Expand Down Expand Up @@ -8169,7 +8169,16 @@ index f46665bf..67eb6bdb 100644
let timestamp = this.timestamps.get(uid);

if (timestamp === undefined) {
@@ -117,7 +127,7 @@ class TimestampQueryPool {
@@ -115,7 +125,7 @@ class TimestampQueryPool {
* @param {string} uid - A unique identifier for the render context.
* @return {boolean} True if a timestamp is available, false otherwise.
*/
- hasTimestamp(uid) {
+ hasTimestamp(uid: string) {
return this.timestamps.has(uid);
}

@@ -127,7 +137,7 @@ class TimestampQueryPool {
* @param {number} frameId - The current frame identifier.
* @returns {?number}
*/
Expand All @@ -8178,7 +8187,7 @@ index f46665bf..67eb6bdb 100644

/**
* Resolve all timestamps and return data (or process them).
@@ -126,14 +136,14 @@ class TimestampQueryPool {
@@ -136,14 +146,14 @@ class TimestampQueryPool {
* @async
* @returns {Promise<number>|number} The resolved timestamp value.
*/
Expand Down
7 changes: 7 additions & 0 deletions types/three/src/renderers/common/TimestampQueryPool.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ declare abstract class TimestampQueryPool {
* @return {?number} The timestamp, or undefined if not available.
*/
getTimestamp(uid: string): number;
/**
* Returns whether a timestamp is available for a given render context.
*
* @param {string} uid - A unique identifier for the render context.
* @return {boolean} True if a timestamp is available, false otherwise.
*/
hasTimestamp(uid: string): boolean;
/**
* Allocate queries for a specific uid.
*
Expand Down
Loading