docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
listlengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
this._xrSessionManager.session.requestLightProbe({ reflectionFormat: this.options.reflectionFormatSRGBA8 ? "srgba8" : this._xrSessionManager.session.preferredReflectionFormat ?? "srgba8" }).then((value: XRLightProbe) => { this._xrLightProbe = value;
<mask> if (this._xrLightProbe === null) { <mask> return null; <mask> } <mask> <mask> if (this._reflectionCubeMap = null) { <mask> this._reflectionCubeMap = this._getXRGLBinding().getReflectionCubeMap(this._xrLightProbe); <mask> this._xrLightProbe.addEv...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9fe874fd1f91ff0c5ff5c5b0b18a0fd94cab01e4
src/XR/features/WebXRLightEstimation.ts
this._reflectionCubeMap = this._getXRGLBinding().getReflectionCubeMap(this._xrLightProbe!); });
<mask> <mask> if (this._reflectionCubeMap = null) { <mask> this._reflectionCubeMap = this._getXRGLBinding().getReflectionCubeMap(this._xrLightProbe); <mask> this._xrLightProbe.addEventListener('reflectionchange', this._updateReflectionCubeMap); <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9fe874fd1f91ff0c5ff5c5b0b18a0fd94cab01e4
src/XR/features/WebXRLightEstimation.ts
return true;
<mask> public get xrLightProbe(): Nullable<XRLightProbe> { <mask> return this._xrLightProbe; <mask> } <mask> <mask> /** <mask> * The most recent light estimate. Available starting on the first frame where the device provides a light probe () <mask> */ <mask> public get xrLig...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9fe874fd1f91ff0c5ff5c5b0b18a0fd94cab01e4
src/XR/features/WebXRLightEstimation.ts
if (this._xrLightProbe !== null) {
<mask> * Dispose this feature and all of the resources attached <mask> */ <mask> public dispose(): void { <mask> super.dispose(); <mask> if (this._xrLightProbe !== null && this._reflectionCubeMap !== null) { <mask> this._xrLightProbe.removeEventListener('reflectionchange'...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9fe874fd1f91ff0c5ff5c5b0b18a0fd94cab01e4
src/XR/features/WebXRLightEstimation.ts
if (this.upVector.x !== 0 || this.upVector.y !== 1.0 || this.upVector.z !== 0) { Matrix.LookAtLHToRef(Vector3.Zero(), this._referencePoint, this.upVector, this._lookAtTemp); this._lookAtTemp.multiplyToRef(this._cameraRotationMatrix, this._tempMatrix); ...
<mask> BABYLON.Vector3.TransformNormalToRef(this._defaultUpVector, this._cameraRotationMatrix, this.upVector); <mask> } else { <mask> Matrix.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this._cameraRotationMatrix); <mask> } <ma...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a0143e4b019bd99698ed87658eda08d286a6b254
src/Cameras/babylon.targetCamera.ts
<mask> if (!this.lockedTarget) { <mask> // Compute <mask> this._updateCameraRotationMatrix(); <mask> <mask> if (this.upVector.x !== 0 || this.upVector.y !== 1.0 || this.upVector.z !== 0) { <mask> Matrix.LookAtLHToRef(Vector3.Zero(), ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a0143e4b019bd99698ed87658eda08d286a6b254
src/Cameras/babylon.targetCamera.ts
if (!this.rotationQuaternion) {
<mask> public createRigCamera(name: string, cameraIndex: number): Camera { <mask> if (this.cameraRigMode !== Camera.RIG_MODE_NONE) { <mask> var rigCamera = new TargetCamera(name, this.position.clone(), this.getScene()); <mask> if (this.cameraRigMode === Camera.RIG...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a0143e4b019bd99698ed87658eda08d286a6b254
src/Cameras/babylon.targetCamera.ts
/** * Stores an array of 2D Triangles. * Internally the data is stored as a Float32Array to minimize the memory footprint. * This can use the Tri2DInfo class as proxy for storing/retrieving data. * The array can't grow, it's fixed size. */
<mask> } <mask> } <mask> <mask> export class Tri2DArray { <mask> constructor(count: number) { <mask> this._count = count; <mask> this._array = new Float32Array(9 * count); <mask> } <mask> </s> Update for @raananw Former-commit-id: 750142c86590d92160c...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
/** * Clear the content and allocate a new array to store the given count of triangles * @param count The new count of triangles to store */
<mask> this._array = new Float32Array(9 * count); <mask> } <mask> <mask> public clear(count: number) { <mask> if (this._count === count) { <mask> return; <mask> } </s> Update for @raananw Former-commit-id: 750142c86590d92160c10293f85c8631097...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
/** * Store a given triangle at the given index * @param index the 0 based index to store the triangle in the array * @param a the A vertex of the triangle * @param b the B vertex of the triangle * @param c the C vertex of the triangle */
<mask> this._array = new Float32Array(9 * count); <mask> } <mask> <mask> public storeTriangle(index: number, a: Vector2, b: Vector2, c: Vector2) { <mask> let center = new Vector2((a.x + b.x + c.x) / 3, (a.y + b.y + c.y) / 3); <mask> <mask> let la = Vector2.Di...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
this._array[0] = a.x; this._array[1] = a.y; this._array[2] = b.x; this._array[3] = b.y; this._array[4] = c.x; this._array[5] = c.y; this._array[6] = center.x; this._array[7] = center.y; this._array[8] = r...
<mask> let rs = Math.max(Math.max(la, lb), lc); <mask> let radius = Math.sqrt(rs); <mask> <mask> let offset = index * 9; <mask> this._array[offset + 0] = a.x; <mask> this._array[offset + 1] = a.y; <mask> this._array[offset + 2] = b.x; <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
tri2dInfo.a.x = this._array[0]; tri2dInfo.a.y = this._array[1]; tri2dInfo.b.x = this._array[2]; tri2dInfo.b.y = this._array[3]; tri2dInfo.c.x = this._array[4]; tri2dInfo.c.y = this._array[5]; tri2dInf...
<mask> throw new Error(`Can't fetch the triangle at index ${index}, max index is ${this._count - 1}`); <mask> } <mask> <mask> let offset = index * 9; <mask> tri2dInfo.a.x = this._array[offset + 0]; <mask> tri2dInfo.a.y = this._array[offset...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
/** * Transform the given triangle and store its result in the array * @param index The index to store the result to * @param tri2dInfo The triangle to transform * @param transform The transformation matrix */
<mask> } <mask> <mask> public transformAndStoreToTri2DInfo(index: number, tri2dInfo: Tri2DInfo, transform: Matrix) { <mask> if (index >= this._count) { <mask> throw new Error(`Can't fetch the triangle at index ${index}, max index is ${this._count - 1}`); <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
tri2dInfo.a.x = this._array[0]; tri2dInfo.a.y = this._array[1]; tri2dInfo.b.x = this._array[2]; tri2dInfo.b.y = this._array[3]; tri2dInfo.c.x = this._array[4]; tri2dInfo.c.y = this._array[5];
<mask> throw new Error(`Can't fetch the triangle at index ${index}, max index is ${this._count - 1}`); <mask> } <mask> <mask> let offset = index * 9; <mask> tri2dInfo.a.x = this._array[offset + 0]; <mask> tri2dInfo.a.y = this._array[offset + 1]; <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
/** * Get the element count that can be stored in this array * @returns {} */
<mask> <mask> tri2dInfo.transformInPlace(transform); <mask> } <mask> <mask> public get count(): number { <mask> return this._count; <mask> } <mask> </s> Update for @raananw Former-commit-id: 750142c86590d92160c10293f85c863109773e9f </s> remove tr...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
/** * Check if a given point intersects with at least one of the triangles stored in the array. * If true is returned the point is intersecting with at least one triangle, false if it doesn't intersect with any of them * @param p The point to check */
<mask> return this._count; <mask> } <mask> <mask> public doesContain(p: Vector2): boolean { <mask> Tri2DArray._checkInitStatics(); <mask> let a = Tri2DArray.tempT[0]; <mask> </s> Update for @raananw Former-commit-id: 750142c86590d92160c10293f85c863109773e9...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
/** * Make a intersection test between two sets of triangles. The triangles of setB will be transformed to the frame of reference of the setA using the given bToATransform matrix. * If true is returned at least one triangle intersects with another of the other set, otherwise false is returne...
<mask> } <mask> return false; <mask> } <mask> <mask> public static doesIntersect(setA: Tri2DArray, setB: Tri2DArray, bToATransform: Matrix): boolean { <mask> Tri2DArray._checkInitStatics(); <mask> <mask> let a = Tri2DArray.tempT[0]; </s> Update ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
/** * Some 2D Math helpers functions */
<mask> } <mask> <mask> class Math2D { <mask> <mask> static Dot(a: Vector2, b: Vector2): number { <mask> return a.x * b.x + a.y * b.y; </s> Update for @raananw Former-commit-id: 750142c86590d92160c10293f85c863109773e9f
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a120a0132e415b66aa9c17b6043c49355e273abe
canvas2D/src/Tools/babylon.math2D.ts
import { Nullable } from "babylonjs/types"; import { Vector3, Color3, Quaternion, Matrix, TmpVectors } from "babylonjs/Maths/math";
<mask> import { SpotLight } from "babylonjs/Lights/spotLight"; <mask> import { Vector3, Color3, Quaternion } from "babylonjs/Maths/math"; <mask> import { Light } from "babylonjs/Lights/light"; <mask> import { Node } from "babylonjs/node"; <mask> import { ShadowLight } from "babylonjs/Lights/shadowLight"; <mask> i...
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
import { DirectionalLight } from 'babylonjs';
<mask> import { Logger } from "babylonjs/Misc/logger"; <mask> import { _GLTFUtilities } from "../glTFUtilities"; <mask> <mask> const NAME = "KHR_lights_punctual"; <mask> <mask> enum LightType { <mask> DIRECTIONAL = "directional", </s> Initial pass of fix for inconsistent behavior of punctual lights when r...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
public postExportNodeAsync(context: string, node: Nullable<INode>, babylonNode: Node, nodeMap?: {[key: number]: number}): Promise<Nullable<INode>> {
<mask> * @param node glTF node <mask> * @param babylonNode BabylonJS node <mask> * @returns nullable INode promise <mask> */ <mask> public postExportNodeAsync(context: string, node: INode, babylonNode: Node): Promise<INode> { <mask> return new Promise((resolve, reject) => { <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
if ( node && babylonNode instanceof ShadowLight) {
<mask> * @returns nullable INode promise <mask> */ <mask> public postExportNodeAsync(context: string, node: INode, babylonNode: Node): Promise<INode> { <mask> return new Promise((resolve, reject) => { <mask> if (babylonNode instanceof ShadowLight) { <mask> const b...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
const yaw = -Math.atan2(localAxis.z * (this._exporter._babylonScene.useRightHandedSystem ? -1 : 1), localAxis.x) + Math.PI / 2;
<mask> node.translation = lightPosition.asArray(); <mask> } <mask> if (lightType !== LightType.POINT) { <mask> const localAxis = babylonLight.direction; <mask> const yaw = -Math.atan2(localAxis.z, localA...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
<mask> } <mask> <mask> this._lights.lights.push(light); <mask> <mask> if (node.extensions == null) { <mask> node.extensions = {}; <mask> } <mask> const lightReference: ILightReference = ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
public _nodes: INode[];
<mask> public _accessors: IAccessor[]; <mask> /** <mask> * Stores all the generated nodes, which contains transform and/or mesh information per node <mask> */ <mask> private _nodes: INode[]; <mask> /** <mask> * Stores all the generated glTF scenes, which stores multiple node hierar...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/glTFExporter.ts
public _nodeMap: { [key: number]: number };
<mask> <mask> /** <mask> * Stores a map of the unique id of a node to its index in the node array <mask> */ <mask> private _nodeMap: { [key: number]: number }; <mask> <mask> /** <mask> * Specifies if the source Babylon scene was left handed, and needed conversion. <mask> */ <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/glTFExporter.ts
private _applyExtension<T>(node: Nullable<T>, extensions: IGLTFExporterExtensionV2[], index: number, actionAsync: (extension: IGLTFExporterExtensionV2, node: Nullable<T>) => Promise<Nullable<T>> | undefined): Promise<Nullable<T>> {
<mask> <mask> private static _ExtensionNames = new Array<string>(); <mask> private static _ExtensionFactories: { [name: string]: (exporter: _Exporter) => IGLTFExporterExtensionV2 } = {}; <mask> <mask> private _applyExtension<T>(node: T, extensions: IGLTFExporterExtensionV2[], index: number, actionAsy...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/glTFExporter.ts
return currentPromise.then((newNode) => this._applyExtension(newNode, extensions, index + 1, actionAsync));
<mask> if (!currentPromise) { <mask> return this._applyExtension(node, extensions, index + 1, actionAsync); <mask> } <mask> <mask> return currentPromise.then((newNode) => this._applyExtension(newNode || node, extensions, index + 1, actionAsync)); <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/glTFExporter.ts
private _applyExtensions<T>(node: Nullable<T>, actionAsync: (extension: IGLTFExporterExtensionV2, node: Nullable<T>) => Promise<Nullable<T>> | undefined): Promise<Nullable<T>> {
<mask> <mask> return currentPromise.then((newNode) => this._applyExtension(newNode || node, extensions, index + 1, actionAsync)); <mask> } <mask> <mask> private _applyExtensions<T>(node: T, actionAsync: (extension: IGLTFExporterExtensionV2, node: T) => Promise<Nullable<T>> | undefined): Promise<N...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/glTFExporter.ts
public _extensionsPreExportTextureAsync(context: string, babylonTexture: Nullable<Texture>, mimeType: ImageMimeType): Promise<Nullable<BaseTexture>> {
<mask> <mask> return this._applyExtension(node, extensions, 0, actionAsync); <mask> } <mask> <mask> public _extensionsPreExportTextureAsync(context: string, babylonTexture: Texture, mimeType: ImageMimeType): Promise<Nullable<BaseTexture>> { <mask> return this._applyExtensions(babylonText...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a1fc5e21780eff88bee481734d897e055f7b7486
serializers/src/glTF/2.0/glTFExporter.ts
if (this._engine.webGLVersion > 1) {
<mask> <mask> const currentFB = this._engine._currentFramebuffer; <mask> this._engine._bindUnboundFramebuffer(framebuffer); <mask> <mask> if (this._engine.webGLVersion > 1 || this._engine.isWebGPU) { <mask> const gl = this._context as WebGL2RenderingContext; <mask> <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/WebGL/webGLRenderTargetWrapper.ts
// if layer index is not specified, try to query it from layerIndices // default is layer 0
<mask> const gl = this._context as WebGL2RenderingContext; <mask> <mask> const attachment = (<any>gl)["COLOR_ATTACHMENT" + attachmentIndex]; <mask> if (texture.is2DArray || texture.is3D) { <mask> if (faceIndexOrLayer == -1) { <mask> if (this...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/WebGL/webGLRenderTargetWrapper.ts
if (this.layerIndices && this.layerIndices[attachmentIndex]) { faceIndexOrLayer = this.layerIndices[attachmentIndex]; } else { faceIndexOrLayer = 0; }
<mask> <mask> const attachment = (<any>gl)["COLOR_ATTACHMENT" + attachmentIndex]; <mask> if (texture.is2DArray || texture.is3D) { <mask> if (faceIndexOrLayer == -1) { <mask> return; <mask> } <mask> gl.framebufferTextureL...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/WebGL/webGLRenderTargetWrapper.ts
// if face index is not specified, try to query it from faceIndices // default is face 0 if (faceIndexOrLayer == -1) { if (this.faceIndices && this.faceIndices[attachmentIndex]) { faceIndexOrLayer = this.faceIndices[attachme...
<mask> gl.framebufferTextureLayer(gl.FRAMEBUFFER, attachment, texture._hardwareTexture.underlyingResource, lodLevel, faceIndexOrLayer); <mask> } else if (texture.isCube) { <mask> gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/WebGL/webGLRenderTargetWrapper.ts
// Default behavior (WebGL)
<mask> } else { <mask> gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gl.TEXTURE_2D, texture._hardwareTexture.underlyingResource, lodLevel); <mask> } <mask> } else { <mask> // Default behavior <mask> const gl = this._context; <mask> <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/WebGL/webGLRenderTargetWrapper.ts
public setTexture(texture: InternalTexture, index: number = 0, disposePrevious: boolean = true) {
<mask> * @param texture the texture to set <mask> * @param index the index in the textures array to set <mask> * @param disposePrevious If this function should dispose the previous texture <mask> */ <mask> public setTexture(texture: InternalTexture, index: number = 0, disposePrevious: boole...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/WebGL/webGLRenderTargetWrapper.ts
this._bindTextureRenderTarget(texture, index); } /** * Sets the layer and face indices of every render target texture * @param layers The layer of the texture to be set (make negative to not modify) * @param faces The face of the texture to be set (make negative to not modify) ...
<mask> * @param disposePrevious If this function should dispose the previous texture <mask> */ <mask> public setTexture(texture: InternalTexture, index: number = 0, disposePrevious: boolean = true, faceIndexOrLayer: number = -1) { <mask> super.setTexture(texture, index, disposePrevious); <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/WebGL/webGLRenderTargetWrapper.ts
/** Cube Map Array Texture target */ public static readonly TEXTURE_CUBE_MAP_ARRAY = 0xDEADBEEF;
<mask> public static readonly TEXTURE_2D_ARRAY = 35866; <mask> /** Cube Map Texture target */ <mask> public static readonly TEXTURE_CUBE_MAP = 34067; <mask> /** 3D Texture target */ <mask> public static readonly TEXTURE_3D = 32879; <mask> <mask> /** nearest is mag = nearest and min = nea...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/constants.ts
private _faceIndices: Nullable<number[]> = null; private _layerIndices: Nullable<number[]> = null; private _layerCounts: Nullable<number[]> = null;
<mask> private _isCube: boolean; <mask> private _isMulti: boolean; <mask> private _textures: Nullable<InternalTexture[]> = null; <mask> /** @internal */ <mask> public _samples = 1; <mask> <mask> /** @internal */ <mask> public _attachments: Nullable<number[]> = null; <mask> /** ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/renderTargetWrapper.ts
* Gets the number of layers of the render target wrapper (only used if is2DArray is true and wrapper is not a multi render target. If it is, use the layer index getter instead)
<mask> return (<{ width: number; height: number }>this._size).height || <number>this._size; <mask> } <mask> <mask> /** <mask> * Gets the number of layers of the render target wrapper (only used if is2DArray is true) <mask> */ <mask> public get layers(): number { <mask> ret...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/renderTargetWrapper.ts
* @param texture The texture to set * @param index The index in the textures array to set
<mask> } <mask> <mask> /** <mask> * Set a texture in the textures array <mask> * @param texture the texture to set <mask> * @param index the index in the textures array to set <mask> * @param disposePrevious If this function should dispose the previous texture <mask> */ <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/renderTargetWrapper.ts
const targetTypes: number[] = []; const faceIndex: number[] = []; const layerIndex: number[] = []; const layerCounts: number[] = [];
<mask> const samplingModes: number[] = []; <mask> const types: number[] = []; <mask> <mask> for (let i = 0; i < textureCount; ++i) { <mask> const texture = textureArray[i]; <mask> <mask> samplingModes.push(texture.samplingM...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/renderTargetWrapper.ts
* @param rtWrapper The render target wrapper to render to * @param faceIndex The face of the texture to render to in case of cube texture and if the render target wrapper is not a multi render target
<mask> } <mask> <mask> /** <mask> * Binds the frame buffer to the specified texture. <mask> * @param texture The render target wrapper to render to <mask> * @param faceIndex The face of the texture to render to in case of cube texture <mask> * @param requiredWidth The width of the ta...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
* @param lodLevel Defines the lod level to bind to the frame buffer * @param layer Defines the 2d array index to bind to the frame buffer if the render target wrapper is not a multi render target
<mask> * @param faceIndex The face of the texture to render to in case of cube texture <mask> * @param requiredWidth The width of the target to render to <mask> * @param requiredHeight The height of the target to render to <mask> * @param forceFullscreenViewport Forces the viewport to be the ent...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
rtWrapper: RenderTargetWrapper,
<mask> * @param lodLevel defines the lod level to bind to the frame buffer <mask> * @param layer defines the 2d array index to bind to frame buffer to <mask> */ <mask> public bindFramebuffer( <mask> texture: RenderTargetWrapper, <mask> faceIndex: number = 0, <mask> requ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
const webglRTWrapper = rtWrapper as WebGLRenderTargetWrapper;
<mask> forceFullscreenViewport?: boolean, <mask> lodLevel = 0, <mask> layer = 0 <mask> ): void { <mask> const webglRTWrapper = texture as WebGLRenderTargetWrapper; <mask> <mask> if (this._currentRenderTarget) { <mask> this.unBindFramebuffer(this._currentR...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
this._currentRenderTarget = rtWrapper;
<mask> <mask> if (this._currentRenderTarget) { <mask> this.unBindFramebuffer(this._currentRenderTarget); <mask> } <mask> this._currentRenderTarget = texture; <mask> this._bindUnboundFramebuffer(webglRTWrapper._MSAAFramebuffer ? webglRTWrapper._MSAAFramebuffer : webglRT...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
if (!rtWrapper.isMulti) { if (rtWrapper.is2DArray) { gl.framebufferTextureLayer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, rtWrapper.texture!._hardwareTexture?.underlyingResource, lodLevel, layer); } else if (rtWrapper.isCube) {
<mask> this._currentRenderTarget = texture; <mask> this._bindUnboundFramebuffer(webglRTWrapper._MSAAFramebuffer ? webglRTWrapper._MSAAFramebuffer : webglRTWrapper._framebuffer); <mask> <mask> const gl = this._gl; <mask> if (!texture.isMulti) { <mask> if (texture.is2DAr...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
rtWrapper.texture!._hardwareTexture?.underlyingResource,
<mask> gl.framebufferTexture2D( <mask> gl.FRAMEBUFFER, <mask> gl.COLOR_ATTACHMENT0, <mask> gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, <mask> texture.texture!._hardwareTexture?.underlyingResource, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
const depthStencilTexture = rtWrapper._depthStencilTexture;
<mask> ); <mask> } <mask> } <mask> <mask> const depthStencilTexture = texture._depthStencilTexture; <mask> if (depthStencilTexture) { <mask> const attachment = texture._depthStencilTextureWithStencil ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHM...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
const attachment = rtWrapper._depthStencilTextureWithStencil ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT; if (rtWrapper.is2DArray) {
<mask> } <mask> <mask> const depthStencilTexture = texture._depthStencilTexture; <mask> if (depthStencilTexture) { <mask> const attachment = texture._depthStencilTextureWithStencil ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT; <mask> if (texture.is2DArray) {...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
} else if (rtWrapper.isCube) {
<mask> if (depthStencilTexture) { <mask> const attachment = texture._depthStencilTextureWithStencil ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT; <mask> if (texture.is2DArray) { <mask> gl.framebufferTextureLayer(gl.FRAMEBUFFER, attachment, depthStencilTexture._...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
requiredWidth = rtWrapper.width;
<mask> if (this._cachedViewport && !forceFullscreenViewport) { <mask> this.setViewport(this._cachedViewport, requiredWidth, requiredHeight); <mask> } else { <mask> if (!requiredWidth) { <mask> requiredWidth = texture.width; <mask> if (lodLeve...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
requiredHeight = rtWrapper.height;
<mask> requiredWidth = requiredWidth / Math.pow(2, lodLevel); <mask> } <mask> } <mask> if (!requiredHeight) { <mask> requiredHeight = texture.height; <mask> if (lodLevel) { <mask> requiredHeight = requ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Engines/thinEngine.ts
<mask> import { Constants } from "../../Engines/constants"; <mask> <mask> import "../../Engines/Extensions/engine.multiRender"; <mask> import type { InternalTexture } from "./internalTexture"; <mask> import { WebGLRenderTargetWrapper } from "../../Engines/WebGL/webGLRenderTargetWrapper"; <mask> <mask> /** <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
* Define the type of texture at each attahment index (of Constants.TEXTURE_2D, .TEXTURE_2D_ARRAY, .TEXTURE_CUBE_MAP, .TEXTURE_CUBE_MAP_ARRAY, .TEXTURE_3D)
<mask> * Define the default type of the buffers we are creating <mask> */ <mask> drawOnlyOnFirstAttachmentByDefault?: boolean; <mask> /** <mask> * Define the type of texture at each attahment index (of Constants.TEXTURE_2D, .TEXTURE_2D_ARRAY, .TEXTURE_CUBE_MAP, .TEXTURE_3D) <mask> */ ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
* Define the face index of each texture in the textures array as necessary (for Constants.TEXTURE_CUBE_MAP and .TEXTURE_CUBE_MAP_ARRAY)
<mask> * Define the type of texture at each attahment index (of Constants.TEXTURE_2D, .TEXTURE_2D_ARRAY, .TEXTURE_CUBE_MAP, .TEXTURE_3D) <mask> */ <mask> targetTypes?: number[]; <mask> /** <mask> * Define the face index or layer of each texture in the textures array as necessary <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
faceIndex?: number[]; /** * Define the layer index of each texture in the textures array as necessary (for Constants.TEXTURE_3D, .TEXTURE_2D_ARRAY, and .TEXTURE_CUBE_MAP_ARRAY) */ layerIndex?: number[]; /** * Define the number of layer of each texture in the textures array as necess...
<mask> targetTypes?: number[]; <mask> /** <mask> * Define the face index or layer of each texture in the textures array as necessary <mask> */ <mask> faceIndexOrLayer?: number[]; <mask> } <mask> <mask> /** <mask> * A multi render target, like a render target provides the ability to rend...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
const faceIndex: number[] = []; const layerIndex: number[] = []; const layerCounts: number[] = []; this._initTypes(count, types, samplingModes, useSRGBBuffers, targetTypes, faceIndex, layerIndex, layerCounts, options);
<mask> const types: number[] = []; <mask> const samplingModes: number[] = []; <mask> const useSRGBBuffers: boolean[] = []; <mask> const targetTypes: number[] = []; <mask> const faceIndexOrLayer: number[] = []; <mask> this._initTypes(count, types, samplingModes, useS...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
faceIndex: faceIndex, layerIndex: layerIndex, layerCounts: layerCounts
<mask> types: types, <mask> textureCount: count, <mask> useSRGBBuffers: useSRGBBuffers, <mask> targetTypes: targetTypes, <mask> faceIndexOrLayer: faceIndexOrLayer <mask> }; <mask> <mask> this._count = count; <mask> this._drawO...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
this._isMulti = true;
<mask> <mask> this._count = count; <mask> this._drawOnlyOnFirstAttachmentByDefault = drawOnlyOnFirstAttachmentByDefault; <mask> <mask> if (count > 0) { <mask> this._createInternalTextures(); <mask> this._createTextures(textureNames); <mask> } <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
private _initTypes(count: number, types: number[], samplingModes: number[], useSRGBBuffers: boolean[], targets: number[], faceIndex: number[], layerIndex: number[], layerCounts: number[], options?: IMultiRenderTargetOptions) {
<mask> this._createTextures(textureNames); <mask> } <mask> } <mask> <mask> private _initTypes(count: number, types: number[], samplingModes: number[], useSRGBBuffers: boolean[], targets: number[], faceIndexOrLayer: number[], options?: IMultiRenderTargetOptions) { <mask> const ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
if (options && options.faceIndex && options.faceIndex[i] !== undefined) { faceIndex.push(options.faceIndex[i]); } else { faceIndex.push(0); } if (options && options.layerIndex && options.layerIndex[i] !== undefined) { ...
<mask> } else { <mask> targets.push(gl.TEXTURE_2D); <mask> } <mask> <mask> if (options && options.faceIndexOrLayer && options.faceIndexOrLayer[i] !== undefined) { <mask> faceIndexOrLayer.push(options.faceIndexOrLayer[i]); <mask> } e...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
layerCounts.push(1);
<mask> <mask> if (options && options.faceIndexOrLayer && options.faceIndexOrLayer[i] !== undefined) { <mask> faceIndexOrLayer.push(options.faceIndexOrLayer[i]); <mask> } else { <mask> faceIndexOrLayer.push(-1); <mask> } <mask> } <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
this.renderTarget.setTexture(texture, index, disposePrevious);
<mask> if (index === 0) { <mask> this._texture = texture; <mask> } <mask> <mask> const renderTarget = this.renderTarget as WebGLRenderTargetWrapper; <mask> renderTarget.setTexture(texture, index, disposePrevious, this._multiRenderTargetOptions.faceIndexOrLayer![index])...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
this._count = this.renderTarget.textures ? this.renderTarget.textures.length : 0;
<mask> this.textures[index] = new Texture(null, this.getScene()); <mask> } <mask> this.textures[index]._texture = texture; <mask> <mask> this._count = renderTarget.textures ? renderTarget.textures.length : 0; <mask> <mask> if (this._multiRenderTargetOptions.types) { ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
} /*else if (texture.isCubeArray) { target = Constants.TEXTURE_CUBE_MAP_ARRAY; }*/ else if (texture.is3D) {
<mask> if (texture.is2DArray) { <mask> target = Constants.TEXTURE_2D_ARRAY; <mask> } else if (texture.isCube) { <mask> target = Constants.TEXTURE_CUBE_MAP; <mask> } else if (texture.is3D) { <mask> target = Constants.TEXTURE_3D; <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
<mask> } <mask> <mask> /** <mask> * Changes an attached texture's face index or layer. <mask> * @param faceIndexOrLayer The face index or layer of the texture to be attached <mask> * @param index The index of the texture to modify the attachment of <mask> */ <mask> public setInt...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
* @param layerIndex The layer index of the texture to be attached to the framebuffer * @param faceIndex The face index of the texture to be attached to the framebuffer
<mask> * Changes an attached texture's face index or layer. <mask> * @param index The index of the texture to modify the attachment of <mask> */ <mask> public setLayerAndFaceIndex(index: number, layerIndex: number = -1, faceIndex: number = -1) { <mask> if (!this.textures[index] || !this....
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
public setLayerAndFaceIndex(index: number, layerIndex: number = -1, faceIndex: number = -1) { if (!this.textures[index] || !this.renderTarget) {
<mask> * Changes an attached texture's face index or layer. <mask> * @param faceIndexOrLayer The face index or layer of the texture to be attached <mask> * @param index The index of the texture to modify the attachment of <mask> */ <mask> public setInternalFaceIndexOrLayer(faceIndexOrLayer:...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
if (this._multiRenderTargetOptions.layerIndex) { this._multiRenderTargetOptions.layerIndex[index] = layerIndex; } if (this._multiRenderTargetOptions.faceIndex) { this._multiRenderTargetOptions.faceIndex[index] = faceIndex; } this.renderTarg...
<mask> if (!this.textures[index]) { <mask> return; <mask> } <mask> <mask> if (this._multiRenderTargetOptions.faceIndexOrLayer) { <mask> this._multiRenderTargetOptions.faceIndexOrLayer[index] = faceIndexOrLayer; <mask> } <mask> <mask> const rende...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
this._multiRenderTargetOptions.layerIndex = layerIndices; this._multiRenderTargetOptions.faceIndex = faceIndices; this.renderTarget.setLayerAndFaceIndices(layerIndices, faceIndices);
<mask> if (this._multiRenderTargetOptions.faceIndexOrLayer) { <mask> this._multiRenderTargetOptions.faceIndexOrLayer[index] = faceIndexOrLayer; <mask> } <mask> <mask> const renderTarget = this.renderTarget as WebGLRenderTargetWrapper; <mask> renderTarget.setTexture(thi...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
const faceIndex: number[] = []; const layerIndex: number[] = []; const layerCounts: number[] = [];
<mask> const types: number[] = []; <mask> const samplingModes: number[] = []; <mask> const useSRGBBuffers: boolean[] = []; <mask> const targetTypes: number[] = []; <mask> const faceIndexOrLayer: number[] = []; <mask> <mask> this._initTypes(count, types, samplingMo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
this._initTypes(count, types, samplingModes, useSRGBBuffers, targetTypes, faceIndex, layerIndex, layerCounts, options);
<mask> const useSRGBBuffers: boolean[] = []; <mask> const targetTypes: number[] = []; <mask> const faceIndexOrLayer: number[] = []; <mask> <mask> this._initTypes(count, types, samplingModes, useSRGBBuffers, targetTypes, faceIndexOrLayer, options); <mask> this._multiRenderT...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
this._multiRenderTargetOptions.faceIndex = faceIndex; this._multiRenderTargetOptions.layerIndex = layerIndex; this._multiRenderTargetOptions.layerCounts = layerCounts;
<mask> this._multiRenderTargetOptions.types = types; <mask> this._multiRenderTargetOptions.samplingModes = samplingModes; <mask> this._multiRenderTargetOptions.useSRGBBuffers = useSRGBBuffers; <mask> this._multiRenderTargetOptions.targetTypes = targetTypes; <mask> this._mult...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/multiRenderTarget.ts
protected _isMulti: boolean; /** * Define if the texture has multiple draw buffers or if false a single draw buffer. */ public get isMulti(): boolean { return this._isMulti; }
<mask> <mask> private _isCubeData: boolean; <mask> /** <mask> * Gets render target creation options that were used. <mask> */ <mask> public get renderTargetOptions(): RenderTargetCreationOptions { <mask> return this._renderTargetOptions; </s> Extended support for MRT control Adde...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/renderTargetTexture.ts
this._isMulti = isMulti;
<mask> this.isRenderTarget = true; <mask> this._initialSizeParameter = size; <mask> this._renderPassIds = []; <mask> this._isCubeData = isCube; <mask> <mask> this._processSizeParameter(size); <mask> <mask> this.renderPassId = this._renderPassIds[0]; <mask> </...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/renderTargetTexture.ts
if (!this._isMulti && this.is2DArray) {
<mask> <mask> let returnValue = checkReadiness; <mask> <mask> if (!checkReadiness) { <mask> if (this.is2DArray) { <mask> for (let layer = 0; layer < this.getRenderLayers(); layer++) { <mask> this._renderToTarget(0, useCameraPostProcess, dumpForDeb...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/renderTargetTexture.ts
} else if (!this._isMulti && this.isCube) {
<mask> this._renderToTarget(0, useCameraPostProcess, dumpForDebug, layer, camera); <mask> scene.incrementRenderId(); <mask> scene.resetCachedMaterial(); <mask> } <mask> } else if (this.isCube) { <mask> for (let...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a20b6b993c06c155d58a1d3a99f2191db57d3a26
packages/dev/core/src/Materials/Textures/renderTargetTexture.ts
<mask> import { DataBuffer } from '../Meshes/dataBuffer'; <mask> <mask> declare type Material = import("../Materials/material").Material; <mask> declare type PostProcess = import("../PostProcesses/postProcess").PostProcess; <mask> declare type Texture = import("../Materials/Textures/texture").Texture; <mask> <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Engines/engine.ts
<mask> * Observable event triggered each time the canvas receives pointerout event <mask> */ <mask> public onCanvasPointerOutObservable = new Observable<PointerEvent>(); <mask> <mask> /** <mask> * Observable event triggered before each texture is initialized <mask> */ <mask> pub...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Engines/engine.ts
declare type Texture = import("../Materials/Textures/texture").Texture;
<mask> declare type Observer<T> = import("../Misc/observable").Observer<T>; <mask> declare type VideoTexture = import("../Materials/Textures/videoTexture").VideoTexture; <mask> declare type RenderTargetTexture = import("../Materials/Textures/renderTargetTexture").RenderTargetTexture; <mask> <mask> /** <mask> * ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Engines/thinEngine.ts
/** * Observable event triggered before each texture is initialized */ public onBeforeTextureInitObservable = new Observable<Texture>();
<mask> public readonly premultipliedAlpha: boolean = true; <mask> <mask> /** <mask> * Creates a new engine <mask> * @param canvasOrContext defines the canvas or WebGL context to use for rendering. If you provide a WebGL context, Babylon.js will not hook events on the canvas (like pointers, keybo...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Engines/thinEngine.ts
// Clear observables if (this.onBeforeTextureInitObservable) { this.onBeforeTextureInitObservable.clear(); }
<mask> this.stopRenderLoop(); <mask> <mask> // Empty texture <mask> if (this._emptyTexture) { <mask> this._releaseTexture(this._emptyTexture); <mask> this._emptyTexture = null; </s> Texture And ThinEngine Former-commit-id: f5d78058562d04df6b2d114492ab888fbf33946...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Engines/thinEngine.ts
import "../../Materials/Textures/baseTexture.polynomial";
<mask> import { MaterialFlags } from "../materialFlags"; <mask> import { Constants } from "../../Engines/constants"; <mask> import { IAnimatable } from '../../Animations/animatable.interface'; <mask> <mask> import "../../Shaders/pbr.fragment"; <mask> import "../../Shaders/pbr.vertex"; <mask> import { EffectFall...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/PBR/pbrBaseMaterial.ts
<mask> import { serialize, SerializationHelper, serializeAsTexture, expandToProperty } from "../../Misc/decorators"; <mask> import { Observer, Observable } from "../../Misc/observable"; <mask> import { CubeMapToSphericalPolynomialTools } from "../../Misc/HighDynamicRange/cubemapToSphericalPolynomial"; <mask> import...
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/baseTexture.ts
<mask> import { CubeMapToSphericalPolynomialTools } from "../../Misc/HighDynamicRange/cubemapToSphericalPolynomial"; <mask> import { Nullable } from "../../types"; <mask> import { Scene } from "../../scene"; <mask> import { Matrix } from "../../Maths/math.vector"; <mask> import { SphericalPolynomial } from "../../...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/baseTexture.ts
<mask> this._texture = null; <mask> } <mask> } <mask> <mask> /** <mask> * Get the polynomial representation of the texture data. <mask> * This is mainly use as a fast way to recover IBL Diffuse irradiance data. <mask> * @see https://learnopengl.com/PBR/IBL/Diffuse-irr...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/baseTexture.ts
<mask> import { HDRTools } from "../../Misc/HighDynamicRange/hdr"; <mask> import { CubeMapToSphericalPolynomialTools } from "../../Misc/HighDynamicRange/cubemapToSphericalPolynomial"; <mask> import { _TypeStore } from '../../Misc/typeStore'; <mask> import { Tools } from '../../Misc/tools'; <mask> import "../../Eng...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/hdrCubeTexture.ts
import "../../Engines/Extensions/engine.rawTexture"; import "../../Materials/Textures/baseTexture.polynomial";
<mask> import { Tools } from '../../Misc/tools'; <mask> import { ToGammaSpace } from '../../Maths/math.constants'; <mask> <mask> /** <mask> * This represents a texture coming from an HDR input. <mask> * <mask> * The only supported format is currently panorama picture stored in RGBE format. </s> Texture And ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/hdrCubeTexture.ts
export * from "./baseTexture.polynomial";
<mask> export * from "./baseTexture"; <mask> export * from "./colorGradingTexture"; <mask> export * from "./cubeTexture"; <mask> export * from "./dynamicTexture"; <mask> export * from "./equiRectangularCubeTexture"; <mask> export * from "./hdrCubeTexture"; <mask> export * from "./internalTexture"; </s> Texture ...
[ "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/index.ts
<mask> import { Observable } from "../../Misc/observable"; <mask> import { Nullable, int } from "../../types"; <mask> import { SphericalPolynomial } from "../../Maths/sphericalPolynomial"; <mask> import { RenderTargetCreationOptions } from "../../Materials/Textures/renderTargetCreationOptions"; <mask> import { _Ti...
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/internalTexture.ts
declare type SphericalPolynomial = import("../../Maths/sphericalPolynomial").SphericalPolynomial;
<mask> declare type ThinEngine = import("../../Engines/thinEngine").ThinEngine; <mask> declare type BaseTexture = import("../../Materials/Textures/baseTexture").BaseTexture; <mask> <mask> /** <mask> * Defines the source of the internal texture <mask> */ </s> Texture And ThinEngine Former-commit-id: f5d78058...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/internalTexture.ts
<mask> import { serialize, SerializationHelper } from "../../Misc/decorators"; <mask> import { Observable } from "../../Misc/observable"; <mask> import { Nullable } from "../../types"; <mask> import { Scene } from "../../scene"; <mask> import { Matrix, Vector3 } from "../../Maths/math.vector"; <mask> import { Bas...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/texture.ts
import { ThinEngine } from '../../Engines/thinEngine';
<mask> import { Constants } from "../../Engines/constants"; <mask> import { _TypeStore } from '../../Misc/typeStore'; <mask> import { _DevTools } from '../../Misc/devTools'; <mask> import { IInspectable } from '../../Misc/iInspectable'; <mask> import { Engine } from '../../Engines/engine'; <mask> import { TimingT...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/texture.ts
declare type Scene = import("../../scene").Scene;
<mask> declare type CubeTexture = import("../../Materials/Textures/cubeTexture").CubeTexture; <mask> declare type MirrorTexture = import("../../Materials/Textures/mirrorTexture").MirrorTexture; <mask> declare type RenderTargetTexture = import("../../Materials/Textures/renderTargetTexture").RenderTargetTexture; <mas...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/texture.ts
constructor(url: Nullable<string>, sceneOrEngine: Nullable<Scene | ThinEngine>, noMipmap: boolean = false, invertY: boolean = true, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE, onLoad: Nullable<() => void> = null, onError: Nullable<(message?: string, exception?: any) => void> = null, buffer: Nullable<stri...
<mask> * @param buffer define the buffer to load the texture from in case the texture is loaded from a buffer representation <mask> * @param deleteBuffer define if the buffer we are loading the texture from should be deleted after load <mask> * @param format define the format of the texture we are try...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/texture.ts
var engine = (sceneOrEngine && (sceneOrEngine as ThinEngine).getCaps) ? (sceneOrEngine as ThinEngine) : (scene ? scene.getEngine() : null);
<mask> this._format = format; <mask> } <mask> <mask> var scene = this.getScene(); <mask> var engine = (sceneOrEngine && (sceneOrEngine as Engine).getCaps) ? (sceneOrEngine as Engine) : (scene ? scene.getEngine() : null); <mask> <mask> if (!engine) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Materials/Textures/texture.ts
import "../Materials/Textures/baseTexture.polynomial";
<mask> import { PostProcess } from "../PostProcesses/postProcess"; <mask> import { Logger } from "../Misc/logger"; <mask> <mask> import "../Engines/Extensions/engine.renderTargetCube"; <mask> <mask> import "../Shaders/rgbdEncode.fragment"; <mask> import "../Shaders/rgbdDecode.fragment"; <mask> import { Engine...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a33779df37063b98468583a4eb3c93c28d642f39
src/Misc/environmentTextureTools.ts
import { _TypeStore } from "babylonjs/Misc/typeStore"; import { Nullable } from "babylonjs/types";
<mask> import { Observable } from "babylonjs/Misc/observable"; <mask> import { Measure } from "../measure"; <mask> import { ValueAndUnit } from "../valueAndUnit"; <mask> import { Control } from "./control"; <mask> import { _TypeStore } from 'babylonjs/Misc/typeStore'; <mask> import { Nullable } from 'babylonjs/ty...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf
gui/src/2D/controls/textBlock.ts