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
<mask> this._onAfterRenderCallbacks = []; <mask> <mask> this.detachControl(); <mask> <mask> // Release sounds & sounds tracks <mask> this.mainSoundTrack.dispose(); <mask> <mask> for (var scIndex = 0; scIndex < this.soundTracks.length; scIndex++) { ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90
Babylon/babylon.scene.js
Scene.prototype._getByTags = function (list, tagsQuery) {
<mask> } <mask> }; <mask> <mask> // Tags <mask> Scene.prototype._getByTags = function (list, tagsQuery, forEach) { <mask> if (tagsQuery === undefined) { <mask> // returns the complete list (could be done with BABYLON.Tags.MatchesQuery but no need t...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90
Babylon/babylon.scene.js
<mask> } <mask> <mask> var listByTags = []; <mask> <mask> forEach = forEach || (function (item) { <mask> return; <mask> }); <mask> <mask> for (var i in list) { <mask> var item = list[i]; <mask> if (...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90
Babylon/babylon.scene.js
<mask> for (var i in list) { <mask> var item = list[i]; <mask> if (BABYLON.Tags.MatchesQuery(item, tagsQuery)) { <mask> listByTags.push(item); <mask> forEach(item); <mask> } <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90
Babylon/babylon.scene.js
Scene.prototype.getMeshesByTags = function (tagsQuery) { return this._getByTags(this.meshes, tagsQuery);
<mask> <mask> return listByTags; <mask> }; <mask> <mask> Scene.prototype.getMeshesByTags = function (tagsQuery, forEach) { <mask> return this._getByTags(this.meshes, tagsQuery, forEach); <mask> }; <mask> <mask> Scene.prototype.getCamerasByTags = functi...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90
Babylon/babylon.scene.js
Scene.prototype.getCamerasByTags = function (tagsQuery) { return this._getByTags(this.cameras, tagsQuery);
<mask> Scene.prototype.getMeshesByTags = function (tagsQuery, forEach) { <mask> return this._getByTags(this.meshes, tagsQuery, forEach); <mask> }; <mask> <mask> Scene.prototype.getCamerasByTags = function (tagsQuery, forEach) { <mask> return this._getByTags(this.ca...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90
Babylon/babylon.scene.js
Scene.prototype.getLightsByTags = function (tagsQuery) { return this._getByTags(this.lights, tagsQuery);
<mask> Scene.prototype.getCamerasByTags = function (tagsQuery, forEach) { <mask> return this._getByTags(this.cameras, tagsQuery, forEach); <mask> }; <mask> <mask> Scene.prototype.getLightsByTags = function (tagsQuery, forEach) { <mask> return this._getByTags(this.l...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90
Babylon/babylon.scene.js
Scene.prototype.getMaterialByTags = function (tagsQuery) { return this._getByTags(this.materials, tagsQuery).concat(this._getByTags(this.multiMaterials, tagsQuery));
<mask> Scene.prototype.getLightsByTags = function (tagsQuery, forEach) { <mask> return this._getByTags(this.lights, tagsQuery, forEach); <mask> }; <mask> <mask> Scene.prototype.getMaterialByTags = function (tagsQuery, forEach) { <mask> return this._getByTags(this.m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90
Babylon/babylon.scene.js
/** * Returns true if the mesh can be rendered, otherwise false. * @param mesh The mesh to render * @param material The material used on the mesh * @returns true if it can be rendered otherwise false */ protected _canRenderMesh(mesh: AbstractMesh, mater...
<mask> } <mask> <mask> /** <mask> * Returns true if the mesh should render, otherwise false. <mask> * @param mesh The mesh to render <mask> * @returns true if it should render otherwise false </s> Add GlowLayer alpha support Former-commit-id: c7933906980608adf6216a07...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9773456a3243f08acc3d7d5503e6af95d1b255
src/Layers/effectLayer.ts
if (this._canRenderMesh(mesh, material)) {
<mask> return; <mask> } <mask> <mask> // Do not block in blend mode. <mask> if (material.needAlphaBlendingForMesh(mesh)) { <mask> return; <mask> } <mask> <mask> // Culling <mask> engine.setState(material....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9773456a3243f08acc3d7d5503e6af95d1b255
src/Layers/effectLayer.ts
const needAlphaTest = material.needAlphaTesting(); const diffuseTexture = material.getAlphaTestTexture(); const needAlphaBlendFromDiffuse = diffuseTexture && diffuseTexture.hasAlpha && ((material as any).useAlphaFromDiffuseTexture || (material as ...
<mask> this._emissiveTextureAndColor.color.g, <mask> this._emissiveTextureAndColor.color.b, <mask> this._emissiveTextureAndColor.color.a); <mask> <mask> // Alpha test <mask> if (material && material.needAlphaTesting()) { ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9773456a3243f08acc3d7d5503e6af95d1b255
src/Layers/effectLayer.ts
const opacityTexture = (material as any).opacityTexture; if (opacityTexture) { this._effectLayerMapGenerationEffect.setTexture("opacitySampler", opacityTexture); this._effectLayerMapGenerationEffect.setFloat("opacityIntensity", opacityTexture.le...
<mask> if (alphaTexture) { <mask> this._effectLayerMapGenerationEffect.setTexture("diffuseSampler", alphaTexture); <mask> let textureMatrix = alphaTexture.getTextureMatrix(); <mask> <mask> if (textureMatrix) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9773456a3243f08acc3d7d5503e6af95d1b255
src/Layers/effectLayer.ts
/** * Returns true if the mesh can be rendered, otherwise false. * @param mesh The mesh to render * @param material The material used on the mesh * @returns true if it can be rendered otherwise false */ protected _canRenderMesh(mesh: AbstractMesh, mater...
<mask> } <mask> <mask> /** <mask> * Implementation specific of rendering the generating effect on the main canvas. <mask> * @param effect The effect used to render through <mask> */ <mask> protected _internalRender(effect: Effect): void { <mask> //...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9773456a3243f08acc3d7d5503e6af95d1b255
src/Layers/glowLayer.ts
<mask> <mask> // Default emitter type <mask> this.particleEmitterType = new BoxParticleEmitter(); <mask> <mask> // Default update function <mask> this.updateFunction = (particles: Particle[]): void => { <mask> for (var index = 0; index < particles...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9ed6a644451af8923fff84e1bb4a25d86f75b8
src/Particles/babylon.particleSystem.ts
particle.direction.scaleToRef(this._scaledUpdateSpeed, this._scaledDirection);
<mask> } <mask> } <mask> particle.angle += particle.angularSpeed * this._scaledUpdateSpeed; <mask> <mask> particle.direction.scaleToRef(this._scaledUpdateSpeed * particle._emitPower, this._scaledDirection); <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9ed6a644451af8923fff84e1bb4a25d86f75b8
src/Particles/babylon.particleSystem.ts
this.gravity.scaleToRef(this._scaledUpdateSpeed, this._scaledGravity);
<mask> <mask> particle.direction.scaleToRef(this._scaledUpdateSpeed * particle._emitPower, this._scaledDirection); <mask> particle.position.addInPlace(this._scaledDirection); <mask> <mask> this.gravity.scaleToRef(this._scaledUpdateSpeed / pa...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9ed6a644451af8923fff84e1bb4a25d86f75b8
src/Particles/babylon.particleSystem.ts
if (particle._initialDirection) { this._vertexData[offset++] = particle._initialDirection.x; this._vertexData[offset++] = particle._initialDirection.y; this._vertexData[offset++] = particle._initialDirection.z; } else { ...
<mask> this._vertexData[offset++] = particle.cellIndex; <mask> } <mask> <mask> if (!this._isBillboardBased) { <mask> this._vertexData[offset++] = particle.direction.x; <mask> this._vertexData[offset++] = particle.direction.y; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9ed6a644451af8923fff84e1bb4a25d86f75b8
src/Particles/babylon.particleSystem.ts
let emitPower = Scalar.RandomRange(this.minEmitPower, this.maxEmitPower);
<mask> <mask> this._particles.push(particle); <mask> <mask> // Emitter <mask> particle._emitPower = Scalar.RandomRange(this.minEmitPower, this.maxEmitPower); <mask> <mask> if (this.startPositionFunction) { <mask> this.startPo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9ed6a644451af8923fff84e1bb4a25d86f75b8
src/Particles/babylon.particleSystem.ts
if (emitPower === 0) { if (!particle._initialDirection) { particle._initialDirection = particle.direction.clone(); } else { particle._initialDirection.copyFrom(particle.direction); } ...
<mask> } <mask> <mask> // Life time <mask> if (this.targetStopDuration && this._lifeTimeGradients && this._lifeTimeGradients.length > 0) { <mask> let ratio = Scalar.Clamp(this._actualFrame / this.targetStopDuration); <mask> T...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fb9ed6a644451af8923fff84e1bb4a25d86f75b8
src/Particles/babylon.particleSystem.ts
<mask> set superSampleFactor(value: number) { <mask> } <mask> } <mask> <mask> export enum TextAlign { <mask> Left = 1, <mask> Top, <mask> Right, <mask> Bottom, <mask> Center <mask> } <mask> <mask> @className("Text2D", "BABYLON") <ma...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
* - textAlignH: align text horizontally (Text2D.AlignLeft, Text2D.AlignCenter, Text2D.AlignRight) * - textAlignV: align text vertically (Text2D.AlignTop, Text2D.AlignCenter, Text2D.AlignBottom)
<mask> * - paddingLeft: left padding, can be a number (will be pixels) or a string (see PrimitiveThickness.fromString) <mask> * - paddingRight: right padding, can be a number (will be pixels) or a string (see PrimitiveThickness.fromString) <mask> * - paddingBottom: bottom padding, can be a...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
textAlignH ?: number, textAlignV ?: number,
<mask> paddingLeft ?: number | string, <mask> paddingRight ?: number | string, <mask> paddingBottom ?: number | string, <mask> padding ?: string, <mask> textAlignH ?: TextAlign, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
this.textAlignH = (settings.textAlignH==null) ? Text2D.AlignLeft : settings.textAlignH; this.textAlignV = (settings.textAlignV==null) ? Text2D.AlignTop : settings.textAlignV; this._wordWrap = (settings.wordWrap==null) ? false : true;
<mask> this._tabulationSize = (settings.tabulationSize == null) ? 4 : settings.tabulationSize; <mask> this._textSize = null; <mask> this.text = text; <mask> this.size = (settings.size==null) ? null : settings.size; <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
<mask> this._textSize = null; <mask> this.text = text; <mask> this.size = (settings.size==null) ? null : settings.size; <mask> <mask> if(settings.textAlignH != null){ <mask> this.textAlignH = setti...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
if (alignH == Text2D.AlignRight || alignH == Text2D.AlignCenter) {
<mask> let alignV = this.textAlignV; <mask> <mask> offset.x = 0; <mask> <mask> if (alignH == TextAlign.Right || alignH == TextAlign.Center) { <mask> for (let i = 0; i < lineLengths.length; i++) { <mask> if (lineLengths[...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
if (alignH == Text2D.AlignRight) {
<mask> <mask> let textHeight = lineLengths.length * lh; <mask> let offsetX = this.padding.leftPixels; <mask> <mask> if (alignH == TextAlign.Right) { <mask> offsetX += contentAreaWidth - maxLineLen; <mask> } else...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
} else if (alignH == Text2D.AlignCenter) {
<mask> let offsetX = this.padding.leftPixels; <mask> <mask> if (alignH == TextAlign.Right) { <mask> offsetX += contentAreaWidth - maxLineLen; <mask> } else if (alignH == TextAlign.Center) { <mask> offsetX += (...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
if (alignV == Text2D.AlignBottom) {
<mask> <mask> offset.y += contentAreaHeight + textHeight - lh; <mask> offset.y += this.padding.bottomPixels; <mask> <mask> if (alignV == TextAlign.Bottom) { <mask> offset.y -= contentAreaHeight; <mask> }else if (alignV == TextA...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
}else if (alignV == Text2D.AlignCenter) {
<mask> offset.y += this.padding.bottomPixels; <mask> <mask> if (alignV == TextAlign.Bottom) { <mask> offset.y -= contentAreaHeight; <mask> }else if (alignV == TextAlign.Center) { <mask> offset.y -= (contentAreaHeight - textHe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
if (alignH == Text2D.AlignRight) {
<mask> for (let i = 0; i < lineLengths.length; i++) { <mask> let numChars = charsPerLine[i]; <mask> let lineLength = lineLengths[i]; <mask> <mask> if (alignH == TextAlign.Right) { <mask> offset.x += maxLineLen - l...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
}else if (alignH == Text2D.AlignCenter) {
<mask> let lineLength = lineLengths[i]; <mask> <mask> if (alignH == TextAlign.Right) { <mask> offset.x += maxLineLen - lineLength; <mask> }else if (alignH == TextAlign.Center) { <mask> offset.x += (maxLine...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
public textAlignH: number; public textAlignV: number;
<mask> private _text: string; <mask> private _textSize: Size; <mask> private _wordWrap: boolean; <mask> <mask> public textAlignH: TextAlign; <mask> public textAlignV: TextAlign; <mask> <mask> } <mask> } </s> replaced TextAlign enum with Text2D static readon...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fbe57698d413e8bbf0b1a00dc3c5b0b926b4c1b6
canvas2D/src/Engine/babylon.text2d.ts
//const keyAlreadyExists = this._getKeyAtFrame(newClipLength) !== null; const keyAlreadyExists = this.props.context.getKeyAtFrame(newClipLength) !== null;
<mask> // New clip length is greater than current clip length: add a key frame at the new clip length location with the same value as the previous frame <mask> this.props.context.clipLength = newClipLength; <mask> <mask> this.props.context.onMoveToFrameRequired.notifyObservers(n...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/bottomBar/bottomBarComponent.tsx
const keyAlreadyExists = this.props.context.getKeyAtFrame(newClipLength) !== null;
<mask> // New clip length is smaller than current clip length: move the playing range to the new clip length <mask> this.props.context.clipLength = newClipLength; <mask> <mask> this.props.context.onMoveToFrameRequired.notifyObservers(newClipLength); <mask> const key...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/bottomBar/bottomBarComponent.tsx
/*private _getKeyAtFrame(frameNumber : number) {
<mask> } <mask> this.setState({ clipLength: newClipLength.toFixed(0) }); <mask> } <mask> <mask> private _getKeyAtFrame(frameNumber: number) { <mask> const keys = this.props.context.activeAnimations[0].getKeys(); <mask> for (let key of keys) { <mask> if (Math....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/bottomBar/bottomBarComponent.tsx
}*/
<mask> return key; <mask> } <mask> } <mask> return null; <mask> } <mask> <mask> componentWillUnmount() { <mask> if (this._onAnimationsLoadedObserver) { <mask> this.props.context.onAnimationsLoaded.remove(this._onAnimationsLoadedObserver);...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/bottomBar/bottomBarComponent.tsx
activeChannels: { [key: number]: string } = {};
<mask> scene: Scene; <mask> target: Nullable<IAnimatable>; <mask> rootAnimationGroup: Nullable<AnimationGroup>; <mask> activeAnimations: Animation[] = []; <mask> activeChannels: {[key: number]: string} = {}; <mask> activeKeyPoints: Nullable<KeyPointComponent[]>; <mask> mainKeyPoint: N...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/context.ts
onInterpolationModeSet = new Observable<{ keyId: number; value: AnimationKeyInterpolation }>();
<mask> <mask> onClipLengthIncreased = new Observable<number>(); <mask> onClipLengthDecreased = new Observable<number>(); <mask> <mask> onInterpolationModeSet = new Observable<{keyId: number, value: AnimationKeyInterpolation}>(); <mask> <mask> onSelectToActivated = new Observable<{from:number, ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/context.ts
onSelectToActivated = new Observable<{ from: number; to: number }>();
<mask> onClipLengthDecreased = new Observable<number>(); <mask> <mask> onInterpolationModeSet = new Observable<{keyId: number, value: AnimationKeyInterpolation}>(); <mask> <mask> onSelectToActivated = new Observable<{from:number, to:number}>(); <mask> <mask> public prepare() { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/context.ts
const animation = this.useTargetAnimations ? (animationEntry as TargetedAnimation).animation : (animationEntry as Animation);
<mask> } <mask> } <mask> <mask> for (var animationEntry of this.animations) { <mask> const animation = this.useTargetAnimations ? (animationEntry as TargetedAnimation).animation : animationEntry as Animation; <mask> if (!animation.hasRunningRuntimeAnimations) {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/context.ts
public getPrevKey(): Nullable<number> {
<mask> <mask> return -1; <mask> } <mask> <mask> public getPrevKey() : Nullable<number> { <mask> if (!this.animations || !this.animations.length || this.activeAnimations.length === 0) { <mask> return null; <mask> } <mask> <mask> let prevKey = -Number.MAX_V...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/context.ts
public getNextKey(): Nullable<number> {
<mask> <mask> return prevKey; <mask> } <mask> <mask> public getNextKey() : Nullable<number> { <mask> if (!this.animations || !this.animations.length) { <mask> return null; <mask> } <mask> <mask> let nextKey = Number.MAX_VALUE; </s> * If new key button is...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/context.ts
<mask> } <mask> <mask> return nextKey; <mask> } <mask> } </s> * If new key button is pressed but key already exists on that frame, update the existing frame. Former-commit-id: 5b70aab0df7efc3a28379aee4ed9fc29864cea14 </s> remove } </s> add }*/ </s> remove public getNextKey() : ...
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/context.ts
id="new-key" globalState={this.props.globalState} context={this.props.context} icon={newKeyIcon} onClick={() => this._onNewKeyButton()}/> <ActionButtonComponent
<mask> /> <mask> <ActionButtonComponent <mask> className={hasActiveAnimations ? "" : "disabled"} <mask> tooltip="New key" <mask> id="new-key" <mask> globalState={this.props.globalState} <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fc16252157e9cde5bdedc2b407b407653864f949
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/topBarComponent.tsx
<mask> <mask> // Samplers <mask> varying vec2 vUV; <mask> uniform sampler2D textureSampler; <mask> uniform sampler2D rightSampler; <mask> uniform sampler2D leftSampler; <mask> <mask> void main(void) <mask> { <mask> vec4 leftFrag = texture2D(leftSampler, vUV); </s> Adding to AnaglyphFreeCamera Cameras n...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fcdb0ff63bfd7e7b9b4945798970212fc29dead5
Babylon/Shaders/anaglyph.fragment.fx
vec4 rightFrag = texture2D(textureSampler, vUV);
<mask> { <mask> vec4 leftFrag = texture2D(leftSampler, vUV); <mask> leftFrag = vec4(1.0, leftFrag.g, leftFrag.b, 1.0); <mask> <mask> vec4 rightFrag = texture2D(rightSampler, vUV); <mask> rightFrag = vec4(rightFrag.r, 1.0, 1.0, 1.0); <mask> <mask> gl_FragColor = vec4(rightFrag.rgb * leftFra...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fcdb0ff63bfd7e7b9b4945798970212fc29dead5
Babylon/Shaders/anaglyph.fragment.fx
BABYLON.Scene.prototype._renderForCamera = function (camera) {
<mask> } <mask> this._particlesDuration += new Date() - beforeParticlesDate; <mask> }; <mask> <mask> BABYLON.Scene.prototype._renderForCamera = function (camera, mustClearDepth) { <mask> var engine = this._engine; <mask> <mask> this.activeCamera = camera; <mask> <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fcdb0ff63bfd7e7b9b4945798970212fc29dead5
Babylon/babylon.scene.js
<mask> <mask> // Viewport <mask> engine.setViewport(this.activeCamera.viewport); <mask> <mask> // Clear <mask> if (mustClearDepth) { <mask> this._engine.clear(this.clearColor, false, true); <mask> } <mask> <mask> // Camera <mask> this._re...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fcdb0ff63bfd7e7b9b4945798970212fc29dead5
Babylon/babylon.scene.js
this.postProcessManager._finalizeFrame(camera.isIntermediate);
<mask> <mask> this._renderDuration += new Date() - beforeRenderDate; <mask> <mask> // Finalize frame <mask> this.postProcessManager._finalizeFrame(); <mask> <mask> // Update camera <mask> this.activeCamera._updateFromScene(); <mask> <mask> // Reset some spec...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fcdb0ff63bfd7e7b9b4945798970212fc29dead5
Babylon/babylon.scene.js
this._processSubCameras(this.activeCameras[cameraIndex]);
<mask> if (this.activeCameras.length > 0) { <mask> var currentRenderId = this._renderId; <mask> for (var cameraIndex = 0; cameraIndex < this.activeCameras.length; cameraIndex++) { <mask> this._renderId = currentRenderId; <mask> this._renderForCamera(t...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fcdb0ff63bfd7e7b9b4945798970212fc29dead5
Babylon/babylon.scene.js
this._processSubCameras(this.activeCamera);
<mask> this._renderId = currentRenderId; <mask> this._renderForCamera(this.activeCameras[cameraIndex], cameraIndex != 0); <mask> } <mask> } else { <mask> this._renderForCamera(this.activeCamera); <mask> } <mask> <mask> // After ren...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fcdb0ff63bfd7e7b9b4945798970212fc29dead5
Babylon/babylon.scene.js
this._targetDragStart(virtualMeshesInfo.pivotMesh.position, virtualMeshesInfo.pivotMesh.rotationQuaternion!, pointerId); this.onDragStartObservable.notifyObservers({ position: virtualMeshesInfo.pivotMesh.position });
<mask> this._attachedToElement = false; <mask> } <mask> } <mask> <mask> this._targetDragStart(virtualMeshesInfo.dragMesh.position, virtualMeshesInfo.dragMesh.rotationQuaternion!, pointerId); <mask> thi...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fd2c621c4c09597507e995838e2304b5dc905e97
src/Behaviors/Meshes/baseSixDofDragBehavior.ts
if (controllerData.pick) {
<mask> controllerData.onFrameObserver = this._xrSessionManager.onXRFrameObservable.add(() => { <mask> if (!this._options.enableNearInteractionOnAllControllers && xrController.uniqueId !== this._attachedController) { <mask> return; <mask> } <mask> if (cont...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fd2c621c4c09597507e995838e2304b5dc905e97
src/XR/features/WebXRNearInteraction.ts
} if (controllerData.pick && !this._farInteractionFeature?.attached) {
<mask> if (controllerData.pick) { <mask> controllerData.pick.ray = controllerData.grabRay; <mask> this._scene.simulatePointerMove(controllerData.pick, pointerEventInit); <mask> } <mask> <mask> // Near pick pointer event <mask> if (c...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fd2c621c4c09597507e995838e2304b5dc905e97
src/XR/features/WebXRNearInteraction.ts
if (controllerData.pick) { controllerData.pick.ray = controllerData.grabRay; }
<mask> const grabCheck = (pressed: boolean) => { <mask> if (this._options.enableNearInteractionOnAllControllers || (xrController.uniqueId === this._attachedController && !this._farInteractionFeature?.attached)) { <mask> if (pressed && controllerData.pick && controllerData.meshUnde...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fd2c621c4c09597507e995838e2304b5dc905e97
src/XR/features/WebXRNearInteraction.ts
@serialize("coordinatesMode") private _coordinatesMode = Texture.EXPLICIT_MODE;
<mask> <mask> @serialize() <mask> public coordinatesIndex = 0; <mask> <mask> /** <mask> * How a texture is mapped. <mask> * <mask> * | Value | Type | Description | <mask> * | ----- | -------------------------------...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fdf66e173016c34335fa26b431fb5309d09d3573
src/Materials/Textures/babylon.baseTexture.ts
<mask> * | 7 | EQUIRECTANGULAR_MODE | | <mask> * | 8 | FIXED_EQUIRECTANGULAR_MODE | | <mask> * | 9 | FIXED_EQUIRECTANGULAR_MIRRORED_MODE | | <mask> */ <mask> @serialize("coordinatesMode") <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fdf66e173016c34335fa26b431fb5309d09d3573
src/Materials/Textures/babylon.baseTexture.ts
/** * | Value | Type | Description | * | ----- | ------------------ | ----------- | * | 0 | CLAMP_ADDRESSMODE | | * | 1 | WRAP_ADDRESSMODE | | * | 2 | MIRROR_ADDRESSMODE | | */
<mask> * | 2 | MIRROR_ADDRESSMODE | | <mask> */ <mask> @serialize() <mask> public wrapU = Texture.WRAP_ADDRESSMODE; <mask> <mask> @serialize() <mask> public wrapV = Texture.WRAP_ADDRESSMODE; <mask> <mask> @serialize() <mask> pub...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fdf66e173016c34335fa26b431fb5309d09d3573
src/Materials/Textures/babylon.baseTexture.ts
/** * | Value | Type | Description | * | ----- | ------------------ | ----------- | * | 0 | CLAMP_ADDRESSMODE | | * | 1 | WRAP_ADDRESSMODE | | * | 2 | MIRROR_ADDRESSMODE | | */
<mask> public wrapU = Texture.WRAP_ADDRESSMODE; <mask> <mask> @serialize() <mask> public wrapV = Texture.WRAP_ADDRESSMODE; <mask> <mask> @serialize() <mask> public wrapR = Texture.WRAP_ADDRESSMODE; <mask> <mask> @serialize() <mask> public anisotropicF...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fdf66e173016c34335fa26b431fb5309d09d3573
src/Materials/Textures/babylon.baseTexture.ts
import { Observable, Observer } from '../../Misc/observable';
<mask> <mask> import "../../Shaders/shadowMap.fragment"; <mask> import "../../Shaders/shadowMap.vertex"; <mask> import "../../Shaders/depthBoxBlur.fragment"; <mask> import { Observable } from '../../Misc/observable'; <mask> import { _DevTools } from '../../Misc/devTools'; <mask> import { EffectFallbacks } from ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
import { BoundingInfo } from '../../Culling/boundingInfo';
<mask> import { IShadowGenerator } from './shadowGenerator'; <mask> import { DirectionalLight } from '../directionalLight'; <mask> <mask> import { BoundingSphere } from "../../Culling/boundingSphere"; <mask> <mask> /** <mask> * A CSM implementation allowing casting shadows on large scenes. <mask> * Document...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
public lightSizeCorrection: boolean = true; public depthCorrection: boolean = true; public penumbraDarkness: number = 1.0;
<mask> this._contactHardeningLightSizeUVRatio = contactHardeningLightSizeUVRatio; <mask> } <mask> <mask> private _darkness = 0; <mask> <mask> /** Gets or sets the actual darkness of a shadow */ <mask> public get darkness() { <mask> return this._darkness; <mask> } </s> Mor...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
private _lightMinExtents: Array<Vector3>; private _lightMaxExtents: Array<Vector3>;
<mask> private _effect: Effect; <mask> <mask> private _viewMatrix: Array<Matrix>; <mask> private _cachedPosition: Vector3 = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE); <mask> private _cachedDirection: Vector3 = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
private _shadowMaxZ: number;
<mask> private _viewSpaceBoundingSpheres: Array<BoundingSphere>; <mask> private _transformMatrices: Array<Matrix>; <mask> private _transformMatricesAsArray: Float32Array; <mask> <mask> private _frustumLength: number; <mask> /** <mask> * Gets the csmFrustumLength value: furthest range of...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
public get shadowMaxZ(): number {
<mask> private _frustumLength: number; <mask> /** <mask> * Gets the csmFrustumLength value: furthest range of the frustum for the CSM mode. <mask> */ <mask> public get frustumLength(): number { <mask> if (!this._scene || !this._scene.activeCamera) { <mask> return 0; <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
return this._shadowMaxZ;
<mask> public get frustumLength(): number { <mask> if (!this._scene || !this._scene.activeCamera) { <mask> return 0; <mask> } <mask> return this._frustumLength; <mask> } <mask> /** <mask> * Sets the csmFrustumLength: furthest range of the frustum for the CSM ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
public set shadowMaxZ(value: number) {
<mask> } <mask> /** <mask> * Sets the csmFrustumLength: furthest range of the frustum for the CSM mode. <mask> */ <mask> public set frustumLength(value: number) { <mask> if (!this._scene || !this._scene.activeCamera) { <mask> this._frustumLength = value; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
this._shadowMaxZ = value;
<mask> * Sets the csmFrustumLength: furthest range of the frustum for the CSM mode. <mask> */ <mask> public set frustumLength(value: number) { <mask> if (!this._scene || !this._scene.activeCamera) { <mask> this._frustumLength = value; <mask> return; <mask> } ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
if (this._shadowMaxZ === value || value < this._scene.activeCamera.minZ || value > this._scene.activeCamera.maxZ) {
<mask> if (!this._scene || !this._scene.activeCamera) { <mask> this._frustumLength = value; <mask> return; <mask> } <mask> if (this._frustumLength === value || value < this._scene.activeCamera.minZ || value > this._scene.activeCamera.maxZ) { <mask> retur...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
this._shadowMaxZ = value;
<mask> } <mask> if (this._frustumLength === value || value < this._scene.activeCamera.minZ || value > this._scene.activeCamera.maxZ) { <mask> return; <mask> } <mask> this._frustumLength = value; <mask> this._initCascades(); <mask> } <mask> <mask> pro...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
public cascadeBlendPercentage: number = 0.1;
<mask> } <mask> <mask> public depthClamp: boolean = false; <mask> <mask> public splitBlendPercentage: number = 0.1; <mask> <mask> private _lambda = 0.5; <mask> <mask> /** <mask> * Gets csmLambda: parameter used for calculating the frustum in CSM. </s> More updates (notably PCSS s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
if (!this._shadowMaxZ) { this._shadowMaxZ = camera.maxZ;
<mask> if (!camera) { <mask> return; <mask> } <mask> <mask> if (!this._frustumLength) { <mask> this._frustumLength = camera.maxZ; <mask> } <mask> <mask> this._currentRenderID = new Array(this._cascades); <mask> <mask> // inits and set...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
let breaks = this._frustumSplit();
<mask> let farx = 0; <mask> let fary = 0; <mask> <mask> // get all internal camera cascaded frustum points <mask> let breaks = this._frustumSplit(this.cascades, camera.minZ, this._frustumLength, this._lambda); <mask> if (camera.fovMode === 0) { <mask> nearx = ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
farx = this._shadowMaxZ * Math.tan(camera.fov / 2) * engine.getAspectRatio(camera); fary = this._shadowMaxZ * Math.tan(camera.fov / 2);
<mask> let breaks = this._frustumSplit(this.cascades, camera.minZ, this._frustumLength, this._lambda); <mask> if (camera.fovMode === 0) { <mask> nearx = camera.minZ * Math.tan(camera.fov / 2) * engine.getAspectRatio(camera); <mask> neary = camera.minZ * Math.tan(camera.fov / ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
farx = this._shadowMaxZ * Math.tan(camera.fov / 2); fary = this._shadowMaxZ * Math.tan(camera.fov / 2) * engine.getAspectRatio(camera);
<mask> fary = this._frustumLength * Math.tan(camera.fov / 2); <mask> } else if (camera.fovMode === 1) { <mask> nearx = camera.minZ * Math.tan(camera.fov / 2); <mask> neary = camera.minZ * Math.tan(camera.fov / 2) * engine.getAspectRatio(camera); <mask> farx =...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
this._viewSpaceFrustums[i].push(Vector3.Lerp(new Vector3(nearx, neary, camera.minZ), new Vector3(farx, fary, this._shadowMaxZ), breaks[i])); this._viewSpaceFrustums[i].push(Vector3.Lerp(new Vector3(nearx, -neary, camera.minZ), new Vector3(farx, -fary, this._shadowMaxZ), breaks[i])); ...
<mask> <mask> // populate the viewSpaceFrustums array <mask> for (let i = 0; i < this.cascades + 1; i++) { <mask> this._viewSpaceFrustums[i] = []; <mask> this._viewSpaceFrustums[i].push(Vector3.Lerp(new Vector3(nearx, neary, camera.minZ), new Vector3(farx, fary, this._frust...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
this._lightMinExtents = []; this._lightMaxExtents = [];
<mask> <mask> // initialize the CSM transformMatrices <mask> this._viewMatrix = []; <mask> this._transformMatrices = []; <mask> for (let index = 0; index < this.cascades; index++) { <mask> this._viewMatrix[index] = Matrix.Zero(); <mask> this._transformMatr...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
this._lightMinExtents[index] = new Vector3(); this._lightMaxExtents[index] = new Vector3();
<mask> this._transformMatrices = []; <mask> for (let index = 0; index < this.cascades; index++) { <mask> this._viewMatrix[index] = Matrix.Zero(); <mask> this._transformMatrices[index] = Matrix.Zero(); <mask> } <mask> this._transformMatricesAsArray = new Floa...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
private _frustumSplit(): Array<number> { let camera = this._scene.activeCamera; if (!camera) { return [];
<mask> } <mask> this._transformMatricesAsArray = new Float32Array(this.cascades * 16); <mask> } <mask> <mask> private _uniformSplit(amount: number, near: number, far: number): Array<number> { <mask> let r = []; <mask> for (let i = 1; i < amount; i++) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
<mask> let r = []; <mask> for (let i = 1; i < amount; i++) { <mask> r.push(i / amount); <mask> } <mask> r.push(1); <mask> return r; <mask> } <mask> <mask> private _logarithmicSplit(amount: number, near: number, far: number): Array<number> { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
const near = camera.minZ, far = camera.maxZ, cameraRange = far - near, minDistance = 0, maxDistance = this._shadowMaxZ < far && this._shadowMaxZ >= near ? (this._shadowMaxZ - near) / (far - near) : 1; const minZ = near + minDistance * camera...
<mask> r.push(1); <mask> return r; <mask> } <mask> <mask> private _logarithmicSplit(amount: number, near: number, far: number): Array<number> { <mask> let r = []; <mask> for (let i = 1; i < amount; i++) { <mask> r.push((near * (far / near) ** (i / amount) - n...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
<mask> r.push(1); <mask> return r; <mask> } <mask> <mask> private _frustumSplit(amount: number, near: number, far: number, lambda: number): Array<number> { <mask> let log = this._logarithmicSplit(amount, near, far); <mask> let uni = this._uniformSplit(amount, near, far); ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
r.push(minDistance); for (let cascadeIndex = 0; cascadeIndex < this._cascades; ++cascadeIndex) { const p = (cascadeIndex + 1) / this._cascades, log = minZ * (ratio ** p), uniform = minZ + range * p; const d = this._lambda * (log - unifor...
<mask> private _frustumSplit(amount: number, near: number, far: number, lambda: number): Array<number> { <mask> let log = this._logarithmicSplit(amount, near, far); <mask> let uni = this._uniformSplit(amount, near, far); <mask> let r = []; <mask> r.push(0); <mask> for (...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
<mask> r.push(0); <mask> for (let i = 1; i < amount; i++) { <mask> r.push(lambda * log[i - 1] + (1 - lambda) * uni[i - 1]); <mask> } <mask> r.push(1); <mask> return r; <mask> } <mask> <mask> /** <mask> * Gets the CSM transformation matrix used ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
let minx = -bs.radius, miny = -bs.radius, minz = 0; let maxx = bs.radius, maxy = bs.radius, maxz = 2 * bs.radius; // Try to tighten minZ and maxZ based on the bounding box of the shadow casters const boundingInfo = this._shadowCastersBoundingInfo; boun...
<mask> // get view matrix <mask> let shadowCamPos = bs.centerWorld.subtract(this._lightDirection.scale(bs.radius)); <mask> Matrix.LookAtLHToRef(shadowCamPos, bs.centerWorld, Vector3.Up(), this._viewMatrix[mapIndex]); <mask> // get ortho matrix <mask> let ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
this._shadowMaxZ = this._scene.activeCamera?.maxZ ?? 10000; this._shadowCastersBoundingInfo = new BoundingInfo(new Vector3(0, 0, 0), new Vector3(0, 0, 0)); this.freezeShadowCastersBoundingInfo = false;
<mask> <mask> this._light = light; <mask> this._mapSize = mapSize; <mask> light._shadowGenerator = this; <mask> this._frustumLength = this._scene.activeCamera?.maxZ ?? 10000; <mask> <mask> CascadedShadowGenerator._SceneComponentInitialization(this._scene); <mask> <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
const lightSizeUVCorrection: Array<number> = [], depthCorrection: Array<number> = []; for (let i = 0; i < this._cascades; ++i) { lightSizeUVCorrection.push(i === 0 || !this.lightSizeCorrection ? 1 : (this._lightMaxExtents[0].x - this._lightMinExtents[0].x) / (this._lightMa...
<mask> const width = shadowMap.getSize().width; <mask> <mask> effect.setMatrices("lightMatrix" + lightIndex, this._transformMatricesAsArray); <mask> effect.setArray("viewFrustumZ" + lightIndex, this._viewSpaceFrustumsZ); <mask> effect.setFloat("cascadeBlendFactor" + lightIndex, thi...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
effect.setFloat("cascadeBlendFactor" + lightIndex, this.cascadeBlendPercentage === 0 ? 10000 : 1 / this.cascadeBlendPercentage);
<mask> const width = shadowMap.getSize().width; <mask> <mask> effect.setMatrices("lightMatrix" + lightIndex, this._transformMatricesAsArray); <mask> effect.setArray("viewFrustumZ" + lightIndex, this._viewSpaceFrustumsZ); <mask> effect.setFloat("splitBlendFactor" + lightIndex, this....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
effect.setArray2("lightSizeUVCorrection" + lightIndex, lightSizeUVCorrection); effect.setArray("depthCorrection" + lightIndex, depthCorrection); effect.setFloat("penumbraDarkness" + lightIndex, this.penumbraDarkness);
<mask> light._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), width, 1 / width, this.frustumEdgeFalloff, lightIndex); <mask> } else if (this._filter === CascadedShadowGenerator.FILTER_PCSS) { <mask> effect.setDepthStencilTexture("shadowSampler" + lightIndex, shadowMap); ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
if (this._freezeShadowCastersBoundingInfoObservable) { this._scene.onBeforeRenderObservable.remove(this._freezeShadowCastersBoundingInfoObservable); this._freezeShadowCastersBoundingInfoObservable = null; }
<mask> this.onBeforeShadowMapRenderMeshObservable.clear(); <mask> this.onBeforeShadowMapRenderObservable.clear(); <mask> this.onAfterShadowMapRenderMeshObservable.clear(); <mask> this.onAfterShadowMapRenderObservable.clear(); <mask> } <mask> <mask> /** <mask> * Seri...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Lights/Shadows/cascadedShadowGenerator.ts
"cascadeBlendFactor" + lightIndex, "lightSizeUVCorrection" + lightIndex, "depthCorrection" + lightIndex, "penumbraDarkness" + lightIndex,
<mask> samplersList.push("depthSampler" + lightIndex); <mask> <mask> uniformsList.push( <mask> "viewFrustumZ" + lightIndex, <mask> "splitBlendFactor" + lightIndex, <mask> ); <mask> <mask> if (projectedLightTexture) { <mask> samplersList.push...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Materials/materialHelper.ts
int index{X} = -1;
<mask> ); <mask> vec3 shadowDebug{X}; <mask> #endif <mask> <mask> int index{X} = SHADOWCSMNUM_CASCADES{X} - 1; <mask> <mask> float diff{X} = 0.; <mask> float frustrumLength{X} = 0.; <mask> float previousFrustrumMax{X}...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx
for (int i = 0; i < SHADOWCSMNUM_CASCADES{X}; i++) {
<mask> <mask> float diff{X} = 0.; <mask> float frustrumLength{X} = 0.; <mask> float previousFrustrumMax{X} = 0.; <mask> for (int i = 0; i < SHADOWCSMNUM_CASCADES{X} - 1; i++) { <mask> diff{X} = viewFrustumZ{X}[i] - vPositionFromCamera{X}.z; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx
if (diff{X} >= 0.) {
<mask> diff{X} = viewFrustumZ{X}[i] - vPositionFromCamera{X}.z; <mask> frustrumLength{X} = viewFrustumZ{X}[i] - previousFrustrumMax{X}; <mask> previousFrustrumMax{X} = viewFrustumZ{X}[i]; <mask> <mask> if (diff{X} >= 0.){ <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx
if (index{X} >= 0) {
<mask> break; <mask> } <mask> } <mask> <mask> #if defined(SHADOWPCF{X}) <mask> #if defined(SHADOWLOWQUALITY{X}) <mask> shadow = computeShadowWithCSMPCF1(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{...
[ "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/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx
shadow = computeShadowWithCSMPCF1(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);
<mask> index{X} += 1; <mask> float nextShadow = 0.; <mask> #if defined(SHADOWPCF{X}) <mask> #if defined(SHADOWLOWQUALITY{X}) <mask> nextShadow = computeShadowWithCSMPCF1(float(index{X}), vPositionFromLight{X}[index{X}], vDe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx
shadow = computeShadowWithCSMPCF3(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);
<mask> #if defined(SHADOWPCF{X}) <mask> #if defined(SHADOWLOWQUALITY{X}) <mask> nextShadow = computeShadowWithCSMPCF1(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx
shadow = computeShadowWithCSMPCF5(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w);
<mask> nextShadow = computeShadowWithCSMPCF1(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w); <mask> #elif defined(SHADOWMEDIUMQUALITY{X}) <mask> nextShad...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx
shadow = computeShadowWithCSMPCSS16(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w, lightSizeUVCorrection{X}[index{X}], depthCorrection{...
<mask> nextShadow = computeShadowWithCSMPCF5(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], shadowSampler{X}, light{X}.shadowsInfo.yz, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w); <mask> #endif <mask> #elif defined(SHADOWPC...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx
shadow = computeShadowWithCSMPCSS32(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y, light{X}.shadowsInfo.z, light{X}.shadowsInfo.x, light{X}.shadowsInfo.w, lightSizeUVCorrection{X}[index{X}], depthCorrection{...
<mask> #elif defined(SHADOWPCSS{X}) <mask> #if defined(SHADOWLOWQUALITY{X}) <mask> nextShadow = computeShadowWithCSMPCSS16(float(index{X}), vPositionFromLight{X}[index{X}], vDepthMetric{X}[index{X}], depthSampler{X}, shadowSampler{X}, light{X}.shadowsInfo.y...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/fe07b3491c0c7572d0b6df03541de8bc026cf59c
src/Shaders/ShadersInclude/lightFragment.fx