static async #checkQueryResult (): Promise<boolean> {
if (this.#gl == null || this.#query == null) throw new Error('WebGL 2 is required to check query results')
if (this.#gl.getQueryParameter(this.#query, this.#gl.QUERY_RESULT_AVAILABLE)) {
- return this.#gl.getQueryParameter(this.#query, this.#gl.QUERY_RESULT)
+ return !!(this.#gl.getQueryParameter(this.#query, this.#gl.QUERY_RESULT))
}
/** Query result not yet available, check again in the next frame */
return new Promise((resolve, reject): void => {