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.owner.addUpdateGlobalTransformCounter(1);
| <mask>
<mask> // Check if we must update this prim
<mask> if (this === <any>this.owner || this._globalTransformProcessStep !== this.owner._globalTransformProcessStep) {
<mask> let curVisibleState = this.isVisible;
<mask> this.isVisible = (!this._parent || th... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
let parentPaddingChanged = false;
let parentPaddingOffset: Vector2 = Prim2DBase._v0;
if (this._parent) {
parentPaddingOffset = this._parent._paddingOffset;
parentPaddingChanged = !parentPaddingOffset.equals(this._parentPaddingOf... | <mask>
<mask> // Get/compute the localTransform
<mask> let localDirty = this._updateLocalTransform();
<mask>
<mask> // Check if there are changes in the parent that will force us to update the global matrix
<mask> let parentDirty = (this._parent !=... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
if (!this._globalTransform || localDirty || parentDirty || parentPaddingChanged) {
| <mask> // Check if there are changes in the parent that will force us to update the global matrix
<mask> let parentDirty = (this._parent != null) ? (this._parent._globalTransformStep !== this._parentTransformStep) : false;
<mask>
<mask> // Check if we have to update ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
let localTransform: Matrix;
Prim2DBase._transMtx.copyFrom(this._localTransform);
Prim2DBase._transMtx.m[12] += this._layoutAreaPos.x + this._marginOffset.x + parentPaddingOffset.x;
Prim2DBase._transMtx.m[13] += this._layoutAreaPos.y + ... | <mask>
<mask> // Check if we have to update the globalTransform
<mask> if (!this._globalTransform || localDirty || parentDirty) {
<mask> let globalTransform = this._parent ? this._parent._globalTransform : null;
<mask> this._globalTransform =... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
this.owner.addUpdatePositioningCounter(1);
| <mask> private static _icArea = Size.Zero();
<mask> private static _size = Size.Zero();
<mask>
<mask> private _updatePositioning() {
<mask> // From this point we assume that the primitive layoutArea is computed and up to date.
<mask> // We know have to :
<mask> ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
this.actualSize = Prim2DBase._size.clone();
| <mask>
<mask> // Apply margin
<mask> if (this._hasMargin) {
<mask> this.margin.computeWithAlignment(this.layoutArea, this.size, this.marginAlignment, this._marginOffset, Prim2DBase._size);
<mask>
<mask> this.actualPosition = this._marginOffset.add(this._la... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
let isSizeAuto = this.isSizeAuto;
| <mask> }
<mask>
<mask> if (this._hasPadding) {
<mask> // Two cases from here: the size of the Primitive is Auto, its content can't be shrink, so me resize the primitive itself
<mask> if (isSizeAuto) {
<mask> let content = this.size.clone... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
// Two cases from here: the size of the Primitive is Auto, its content can't be shrink, so me resize the primitive itself
if (isSizeAuto) {
let content = this.size.clone();
this._getActualSizeFromContentToRef(content, Prim2DBase._icArea);
... | <mask> this.actualSize.copyFrom(Prim2DBase._size.clone());
<mask> }
<mask>
<mask> if (this._hasPadding) {
<mask> this._getInitialContentAreaToRef(this.actualSize, Prim2DBase._icPos, Prim2DBase._icArea);
<mask> Prim2DBase._icArea.width = Math... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
this._paddingOffset.copyFrom(Prim2DBase._icPos);
| <mask> } else {
<mask> this._getInitialContentAreaToRef(this.actualSize, Prim2DBase._icPos, Prim2DBase._icArea);
<mask> Prim2DBase._icArea.width = Math.max(0, Prim2DBase._icArea.width);
<mask> Prim2DBase._icArea.height = Math.max(0, Prim2DBase._icArea.heig... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
let aPos = new Vector2(this._layoutAreaPos.x + this._marginOffset.x, this._layoutAreaPos.y + this._marginOffset.y);
this.actualPosition = aPos;
if (isSizeAuto) {
this._lastAutoSizeArea = this.size;
}
| <mask> this._contentArea.copyFrom(Prim2DBase._icArea);
<mask> }
<mask> }
<mask>
<mask> /**
<mask> * Get the content are of this primitive, this area is computed using the padding property and also possibly the primitive type itself.
<mask> * Children... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
initialContentArea.copyFrom(primSize);
| <mask> * @param initialContentPosition the position of the initial content area to compute, a valid object is passed, you have to set its properties. PLEASE ROUND the values, we're talking about pixels and fraction of them is not a good thing!
<mask> * @param initialContentArea the size of the initi... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
/**
* This method is used to calculate the new size of the primitive based on the content which must stay the same
* Check the Rectangle2D implementation for a concrete application.
* @param primSize the current size of the primitive
* @param newPrimSize the new size of t... | <mask> }
<mask>
<mask> private _owner: Canvas2D;
<mask> private _parent: Prim2DBase;
<mask> private _actionManager: ActionManager;
<mask> protected _children: Array<Prim2DBase>;
<mask> private _renderGroup: Group2D;
<mask> private _hierarchyDepth: number;... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
private _paddingOffset: Vector2;
private _parentPaddingOffset: Vector2;
| <mask> protected _maxSize: Size;
<mask> protected _desiredSize: Size;
<mask> private _layoutEngine: LayoutEngineBase;
<mask> private _marginOffset: Vector2;
<mask> private _parentMargingOffset: Vector2;
<mask> private _parentContentArea: Size;
<mask> privat... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
private _lastAutoSizeArea: Size;
| <mask> private _marginOffset: Vector2;
<mask> private _paddingOffset: Vector2;
<mask> private _parentPaddingOffset: Vector2;
<mask> private _parentContentArea: Size;
<mask> private _layoutAreaPos: Vector2;
<mask> private _layoutArea: Size;
<mask> private _c... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.prim2dBase.ts |
let canvas = instanceInfo.owner.owner;
var engine = canvas.engine;
| <mask> return false;
<mask> }
<mask> this.effectsReady = true;
<mask> }
<mask>
<mask> var engine = instanceInfo.owner.owner.engine;
<mask>
<mask> let depthFunction = 0;
<mask> if (this.effectFill && this.effec... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.rectangle2d.ts |
canvas._addDrawCallCount(1, context.renderMode);
| <mask> }
<mask>
<mask> engine.updateAndBindInstancesBuffer(pid._partBuffer, null, this.instancingFillAttributes);
<mask> engine.draw(true, 0, this.fillIndicesCount, pid._partData.usedElementCount);
<mask> engine.unbindInstanceAttribut... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.rectangle2d.ts |
canvas._addDrawCallCount(context.partDataEndIndex - context.partDataStartIndex, context.renderMode);
| <mask> engine.unbindInstanceAttributes();
<mask> } else {
<mask> for (let i = context.partDataStartIndex; i < context.partDataEndIndex; i++) {
<mask> this.setupUniforms(effect, partIndex, pid._partData, i);
<mask> ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.rectangle2d.ts |
canvas._addDrawCallCount(1, context.renderMode);
| <mask> if (!this.instancingBorderAttributes) {
<mask> this.instancingBorderAttributes = this.loadInstancingAttributes(Shape2D.SHAPE2D_BORDERPARTID, effect);
<mask> }
<mask>
<mask> engine.updateAndBindInstancesBuffer(pid._partBuffe... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.rectangle2d.ts |
canvas._addDrawCallCount(context.partDataEndIndex - context.partDataStartIndex, context.renderMode);
| <mask> engine.unbindInstanceAttributes();
<mask> } else {
<mask> for (let i = context.partDataStartIndex; i < context.partDataEndIndex; i++) {
<mask> this.setupUniforms(effect, partIndex, pid._partData, i);
<mask> ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.rectangle2d.ts |
protected _getActualSizeFromContentToRef(primSize: Size, newPrimSize: Size) {
// Fall back to default implementation if there's no round Radius
if (this._notRounded) {
super._getActualSizeFromContentToRef(primSize, newPrimSize);
} else {
l... | <mask> }
<mask>
<mask> protected createInstanceDataParts(): InstanceDataBase[] {
<mask> var res = new Array<InstanceDataBase>();
<mask> if (this.border) {
<mask> res.push(new Rectangle2DInstanceData(Shape2D.SHAPE2D_BORDERPARTID));
<mask> }
</s... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.rectangle2d.ts |
curprim._setFlags(SmartPropertyPrim.flagPositioningDirty);
| <mask> curprim._setFlags(SmartPropertyPrim.flagBoundingInfoDirty);
<mask> if (curprim.isSizeAuto) {
<mask> curprim.onPrimitivePropertyDirty(Prim2DBase.sizeProperty.flagId);
<mask> }
<mask>
<mask> if (curprim i... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.smartPropertyPrim.ts |
let canvas = instanceInfo.owner.owner;
var engine = canvas.engine;
| <mask> this.effectsReady = true;
<mask> }
<mask>
<mask> // Compute the offset locations of the attributes in the vertex shader that will be mapped to the instance buffer data
<mask> var engine = instanceInfo.owner.owner.engine;
<mask>
<mask> let e... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.sprite2d.ts |
canvas._addDrawCallCount(1, context.renderMode);
| <mask> if (context.useInstancing) {
<mask> if (!this.instancingAttributes) {
<mask> this.instancingAttributes = this.loadInstancingAttributes(Sprite2D.SPRITE2D_MAINPARTID, effect);
<mask> }
<mask> engine.updateAndBindInstancesBuffer(pi... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.sprite2d.ts |
canvas._addDrawCallCount(context.partDataEndIndex - context.partDataStartIndex, context.renderMode);
| <mask> engine.draw(true, 0, 6, pid._partData.usedElementCount);
<mask> engine.unbindInstanceAttributes();
<mask> } else {
<mask> for (let i = context.partDataStartIndex; i < context.partDataEndIndex; i++) {
<mask> this.setupUniforms(ef... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.sprite2d.ts |
let canvas = instanceInfo.owner.owner;
var engine = canvas.engine;
| <mask> return false;
<mask> }
<mask> this.effectsReady = true;
<mask> }
<mask>
<mask> var engine = instanceInfo.owner.owner.engine;
<mask>
<mask> this.fontTexture.update();
<mask>
<mask> let effect = context... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.text2d.ts |
canvas._addDrawCallCount(1, context.renderMode);
| <mask> if (!this.instancingAttributes) {
<mask> this.instancingAttributes = this.loadInstancingAttributes(Text2D.TEXT2D_MAINPARTID, effect);
<mask> }
<mask>
<mask> engine.updateAndBindInstancesBuffer(pid._partBuffer, null, this.instancingAttribut... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.text2d.ts |
canvas._addDrawCallCount(context.partDataEndIndex - context.partDataStartIndex, context.renderMode);
| <mask> engine.draw(true, 0, 6, pid._partData.usedElementCount);
<mask> engine.unbindInstanceAttributes();
<mask> } else {
<mask> for (let i = context.partDataStartIndex; i < context.partDataEndIndex; i++) {
<mask> this.setupUniforms(ef... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Canvas2d/babylon.text2d.ts |
public get total(): number {
return this._totalAccumulated;
}
| <mask> return this._current;
<mask> }
<mask>
<mask> constructor() {
<mask> this._startMonitoringTime = 0;
<mask> this._min = 0;
<mask> this._max = 0;
<mask> this._average = 0;
</s> Canvas2D:... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Tools/babylon.tools.ts |
this._lastSecValueCount++;
| <mask> public fetchNewFrame() {
<mask> this._totalValueCount++;
<mask> this._current = 0;
<mask> }
<mask>
<mask> /**
<mask> * Call this method to monitor a count of something (e.g. mesh drawn in viewport count)
<mask> * @param newCount the count... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Tools/babylon.tools.ts |
this._lastSecAccumulated += this._current;
| <mask>
<mask> private _fetchResult() {
<mask> this._totalAccumulated += this._current;
<mask>
<mask> // Min/Max update
<mask> this._min = Math.min(this._min, this._current);
<mask> this._max = Math.max(this._max, this._current);
<mask> this._... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Tools/babylon.tools.ts |
let now = Tools.Now;
if ((now - this._lastSecTime) > 1000) {
| <mask> this._max = Math.max(this._max, this._current);
<mask> this._average = this._totalAccumulated / this._totalValueCount;
<mask>
<mask> // Reset last sec?
<mask> if ((this._startMonitoringTime - this._lastSecTime) > 1000) {
<mask> this._lastSecA... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Tools/babylon.tools.ts |
this._lastSecTime = now;
| <mask>
<mask> // Reset last sec?
<mask> if ((this._startMonitoringTime - this._lastSecTime) > 1000) {
<mask> this._lastSecAverage = this._lastSecAccumulated / this._lastSecValueCount;
<mask> this._lastSecTime = this._startMonitoringTime;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9c42863378929baad6515fca9d8dfeef477743f4 | src/Tools/babylon.tools.ts |
<mask> import { InternalTexture } from "../../Materials/Textures/internalTexture";
<mask>
<mask> import { ThinEngine } from '../../Engines/thinEngine';
<mask> import { IRenderTargetTexture, RenderTargetWrapper } from "../../Engines/renderTargetWrapper";
<mask> import { RenderTargetTextureSize } from "../../Engine... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9d5dc9dc72d2d376e01338e96adec9f7abc51a96 | src/Materials/Textures/thinRenderTargetTexture.ts | |
import { TextureSize, RenderTargetCreationOptions } from "./textureCreationOptions";
| <mask> import { ThinEngine } from '../../Engines/thinEngine';
<mask> import { IRenderTargetTexture, RenderTargetWrapper } from "../../Engines/renderTargetWrapper";
<mask> import { ThinTexture } from "./thinTexture";
<mask>
<mask> /**
<mask> * This is a tiny helper class to wrap a RenderTargetWrapper in a textur... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9d5dc9dc72d2d376e01338e96adec9f7abc51a96 | src/Materials/Textures/thinRenderTargetTexture.ts |
private _size: TextureSize;
| <mask> export class ThinRenderTargetTexture extends ThinTexture implements IRenderTargetTexture {
<mask> private readonly _renderTargetOptions: RenderTargetCreationOptions;
<mask>
<mask> private _renderTarget: Nullable<RenderTargetWrapper> = null;
<mask> private _size: RenderTargetTextureSize;
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9d5dc9dc72d2d376e01338e96adec9f7abc51a96 | src/Materials/Textures/thinRenderTargetTexture.ts |
constructor(engine: ThinEngine, size: TextureSize, options: RenderTargetCreationOptions) {
| <mask> * @param engine Define the internalTexture to wrap
<mask> * @param size Define the size of the RTT to create
<mask> * @param options Define rendertarget options
<mask> */
<mask> constructor(engine: ThinEngine, size: RenderTargetTextureSize, options: RenderTargetCreationOptions) {
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9d5dc9dc72d2d376e01338e96adec9f7abc51a96 | src/Materials/Textures/thinRenderTargetTexture.ts |
public resize(size: TextureSize): void {
| <mask> * @param size Define the new size. It can be:
<mask> * - a number for squared texture,
<mask> * - an object containing { width: number, height: number }
<mask> */
<mask> public resize(size: RenderTargetTextureSize): void {
<mask> this._renderTarget?.dispose();
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9d5dc9dc72d2d376e01338e96adec9f7abc51a96 | src/Materials/Textures/thinRenderTargetTexture.ts |
import { ArcRotateCamera, Camera } from 'core/Cameras';
import type { Engine } from 'core/Engines';
| <mask> import { ArcRotateCamera } from 'core/Cameras';
<mask> import type { Engine} from 'core/Engines';
<mask> import { NullEngine } from 'core/Engines';
<mask> import { Vector3 } from 'core/Maths';
<mask> import type { Mesh} from 'core/Meshes';
<mask> import { MeshBuilder } from 'core/Meshes';
<mask> import { ... | [
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9db924109d60ebcf69901fd1cc9bbb5f7ff9b7a7 | packages/dev/core/test/unit/Meshes/babylon.mesh.lod.test.ts |
import type { Mesh } from 'core/Meshes';
| <mask> import { ArcRotateCamera } from 'core/Cameras';
<mask> import type { Engine} from 'core/Engines';
<mask> import { NullEngine } from 'core/Engines';
<mask> import { Vector3 } from 'core/Maths';
<mask> import type { Mesh} from 'core/Meshes';
<mask> import { MeshBuilder } from 'core/Meshes';
<mask> import { ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9db924109d60ebcf69901fd1cc9bbb5f7ff9b7a7 | packages/dev/core/test/unit/Meshes/babylon.mesh.lod.test.ts |
let cameraOrthographic: ArcRotateCamera;
| <mask> let scene: Scene;
<mask> let cameraArc: ArcRotateCamera;
<mask>
<mask> let knot0: Mesh;
<mask> let knot1: Mesh;
<mask> let knot2: Mesh;
</s> (test) Mesh.getLOD(). Add basic test case for orthographic camera
Former-commit-id: c9a9052ae62d412e62522f9800470d4dffa241... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9db924109d60ebcf69901fd1cc9bbb5f7ff9b7a7 | packages/dev/core/test/unit/Meshes/babylon.mesh.lod.test.ts |
cameraArc = new ArcRotateCamera('Camera', 0, 0, 5, new Vector3(0, 0, 0), scene);
cameraOrthographic = new ArcRotateCamera('Camera', 0, 0, 5, new Vector3(0, 0, 0), scene);
cameraOrthographic.mode = Camera.ORTHOGRAPHIC_CAMERA;
| <mask> let knot2: Mesh;
<mask>
<mask> beforeEach(() => {
<mask> scene = new Scene(subject);
<mask> cameraArc = new ArcRotateCamera("Camera", 0, 0, 5, new Vector3(0, 0, 0), scene);
<mask>
<mask> knot0 = MeshBuilder.CreateTorusKnot('Knot0', {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9db924109d60ebcf69901fd1cc9bbb5f7ff9b7a7 | packages/dev/core/test/unit/Meshes/babylon.mesh.lod.test.ts |
scene.render();
| <mask> expect(knot0.getLOD(cameraArc)).not.toBeNull();
<mask> expect(knot0.getLOD(cameraArc)!.name).toEqual('Knot0');
<mask>
<mask> cameraArc.radius = 15;
<mask> scene.render()
<mask> expect(knot0.getLOD(cameraArc)!.name).toEqual('Knot1');
<mask>
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9db924109d60ebcf69901fd1cc9bbb5f7ff9b7a7 | packages/dev/core/test/unit/Meshes/babylon.mesh.lod.test.ts |
scene.render();
| <mask> scene.render()
<mask> expect(knot0.getLOD(cameraArc)!.name).toEqual('Knot1');
<mask>
<mask> cameraArc.radius = 25;
<mask> scene.render()
<mask> expect(knot0.getLOD(cameraArc)!.name).toEqual('Knot2');
<mask> });
<mask> });
<mask> })... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9db924109d60ebcf69901fd1cc9bbb5f7ff9b7a7 | packages/dev/core/test/unit/Meshes/babylon.mesh.lod.test.ts |
it('should select lod with correct distance for orthographic camera', () => {
expect(knot0.getLOD(cameraOrthographic)).not.toBeNull();
expect(knot0.getLOD(cameraOrthographic)!.name).toEqual('Knot0');
cameraOrthographic.minZ = 15;
scene.render();
... | <mask> expect(knot0.getLOD(cameraArc)!.name).toEqual('Knot2');
<mask> });
<mask> });
<mask> });
</s> (test) Mesh.getLOD(). Add basic test case for orthographic camera
Former-commit-id: c9a9052ae62d412e62522f9800470d4dffa2417b </s> remove scene.render()
</s> add sc... | [
"keep",
"add",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9db924109d60ebcf69901fd1cc9bbb5f7ff9b7a7 | packages/dev/core/test/unit/Meshes/babylon.mesh.lod.test.ts |
import { GeometryBufferRenderer } from "../../../Rendering/geometryBufferRenderer";
| <mask> import { _TypeStore } from '../../../Misc/typeStore';
<mask> import { EngineStore } from '../../../Engines/engineStore';
<mask> import { SSAO2Configuration } from "../../../Rendering/ssao2Configuration";
<mask> import { PrePassRenderer } from "../../../Rendering/prePassRenderer";
<mask> import { Constants }... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts |
import { Nullable } from "../../../types";
| <mask> import { GeometryBufferRenderer } from "../../../Rendering/geometryBufferRenderer";
<mask> import { Constants } from "../../../Engines/constants";
<mask>
<mask> import "../../../PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent";
<mask>
<mask> import "../../../Shaders/ssao2.frag... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts |
private _forceGeometryBuffer: boolean = false;
private get _geometryBufferRenderer(): Nullable<GeometryBufferRenderer> {
if (!this._forceGeometryBuffer) {
return null;
}
return this._scene.geometryBufferRenderer;
}
private get _prePassRenderer(): ... | <mask>
<mask> /**
<mask> * Force rendering the geometry through geometry buffer
<mask> */
<mask> private _forceGeometryBuffer: boolean = false;
<mask>
<mask> /**
<mask> * Ratio object used for SSAO ratio and blur ratio
<mask> */
<mask> @serialize()
<mask> private _ra... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts |
<mask> private _blurHPostProcess: PostProcess;
<mask> private _blurVPostProcess: PostProcess;
<mask> private _ssaoCombinePostProcess: PostProcess;
<mask>
<mask> private _prePassRenderer: PrePassRenderer;
<mask>
<mask> /**
<mask> * Gets active scene
<mask> */
<mask> public g... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts | |
scene.enablePrePassRenderer();
| <mask> // Set up assets
<mask> if (this._forceGeometryBuffer) {
<mask> scene.enableGeometryBufferRenderer();
<mask> } else {
<mask> this._prePassRenderer = <PrePassRenderer>scene.enablePrePassRenderer();
<mask> }
<mask>
<mask> this._createRandomTe... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts |
if (this._geometryBufferRenderer) {
effect.setTexture("depthSampler", this._geometryBufferRenderer.getGBuffer().textures[0]);
} else if (this._prePassRenderer) {
| <mask> effect.setFloat("outSize", this._ssaoCombinePostProcess.width > 0 ? this._ssaoCombinePostProcess.width : this._originalColorPostProcess.width);
<mask> effect.setFloat("near", this._scene.activeCamera.minZ);
<mask> effect.setFloat("far", this._scene.activeCamera.maxZ);
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts |
if (this._geometryBufferRenderer) {
effect.setTexture("depthSampler", this._geometryBufferRenderer.getGBuffer().textures[0]);
} else if (this._prePassRenderer) {
| <mask> effect.setFloat("outSize", this._ssaoCombinePostProcess.height > 0 ? this._ssaoCombinePostProcess.height : this._originalColorPostProcess.height);
<mask> effect.setFloat("near", this._scene.activeCamera.minZ);
<mask> effect.setFloat("far", this._scene.activeCamera.maxZ);
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts |
if (this._geometryBufferRenderer) {
effect.setTexture("depthSampler", this._geometryBufferRenderer.getGBuffer().textures[0]);
effect.setTexture("normalSampler", this._geometryBufferRenderer.getGBuffer().textures[1]);
} else if (this._prePassRenderer) {
| <mask> effect.setFloat("yViewport", (orthoTop - orthoBottom) * 0.5);
<mask> }
<mask> effect.setMatrix("projection", this._scene.getProjectionMatrix());
<mask>
<mask> if (this._forceGeometryBuffer) {
<mask> effect.setTexture("depthSampler", this.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts |
private get _geometryBufferRenderer(): Nullable<GeometryBufferRenderer> {
if (!this._forceGeometryBuffer) {
return null;
}
return this._scene.geometryBufferRenderer;
}
private get _prePassRenderer(): Nullable<PrePassRenderer> {
if (this._forceGeometryBu... | <mask>
<mask> private _isObjectBased: boolean = true;
<mask>
<mask> private _forceGeometryBuffer: boolean = false;
<mask> private _geometryBufferRenderer: Nullable<GeometryBufferRenderer> = null;
<mask> private _prePassRenderer: Nullable<PrePassRenderer> = null;
<mask>
<mask> private _inv... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/motionBlurPostProcess.ts |
scene.enableGeometryBufferRenderer();
| <mask> this._forceGeometryBuffer = forceGeometryBuffer;
<mask>
<mask> // Set up assets
<mask> if (this._forceGeometryBuffer) {
<mask> this._geometryBufferRenderer = scene.enableGeometryBufferRenderer();
<mask>
<mask> if (this._geometryBufferRenderer) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/motionBlurPostProcess.ts |
scene.enablePrePassRenderer();
| <mask> if (this._geometryBufferRenderer) {
<mask> this._geometryBufferRenderer.enableVelocity = true;
<mask> }
<mask> } else {
<mask> this._prePassRenderer = scene.enablePrePassRenderer();
<mask>
<mask> if (this._prePassRenderer) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/motionBlurPostProcess.ts |
private get _geometryBufferRenderer(): Nullable<GeometryBufferRenderer> {
if (!this._forceGeometryBuffer) {
return null;
}
return this._scene.geometryBufferRenderer;
}
private get _prePassRenderer(): Nullable<PrePassRenderer> {
if (this._forceGeometryBu... | <mask> @serialize()
<mask> public roughnessFactor: number = 0.2;
<mask>
<mask> private _forceGeometryBuffer: boolean = false;
<mask> private _geometryBufferRenderer: Nullable<GeometryBufferRenderer>;
<mask> private _prePassRenderer: PrePassRenderer;
<mask> private _enableSmoothReflection... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/screenSpaceReflectionPostProcess.ts |
<mask> if (geometryBufferRenderer) {
<mask> if (geometryBufferRenderer.isSupported) {
<mask> geometryBufferRenderer.enablePosition = true;
<mask> geometryBufferRenderer.enableReflectivity = true;
<mask> this._geometryBufferRend... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/screenSpaceReflectionPostProcess.ts | |
const prePassRenderer = scene.enablePrePassRenderer();
prePassRenderer?.markAsDirty();
| <mask> this._geometryBufferRenderer = geometryBufferRenderer;
<mask> }
<mask> }
<mask> } else {
<mask> this._prePassRenderer = <PrePassRenderer>scene.enablePrePassRenderer();
<mask> this._prePassRenderer.markAsDirty();
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/screenSpaceReflectionPostProcess.ts |
} else if (prePassRenderer) {
| <mask>
<mask> effect.setTexture("normalSampler", geometryBufferRenderer.getGBuffer().textures[1]);
<mask> effect.setTexture("positionSampler", geometryBufferRenderer.getGBuffer().textures[positionIndex]);
<mask> effect.setTexture("reflectivitySampler", geometryBuffer... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9dd7bb43911efb062c9e2196240a7b2d262c0882 | src/PostProcesses/screenSpaceReflectionPostProcess.ts |
"files": [],
"noBundleInName": true,
"output": "babylon.postProcesses.min.js",
"webpack": "../../postProcessLibrary/webpack.config.js",
"bundle": "true",
"babylonIncluded": false,
"useOutputForDebugging": tru... | <mask> },
<mask> "postProcessesLibrary": {
<mask> "libraries": [
<mask> {
<mask> "files": [
<mask> "../../postProcessLibrary/src/asciiArt/babylon.asciiArtPostProcess.ts"
<mask> ],
<mask> "shaderFiles": [
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"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/9e2bec72b2d8e953dcad11865666514540ed6beb | Tools/Gulp/config.json |
"srcOutputDirectory": "../../postProcessLibrary/src/", | <mask> "output": "babylon.digitalRainPostProcess.js"
<mask> }
<mask> ],
<mask> "build": {
<mask> "srcOutputDirectory": "../../postProcessLibrary/",
<mask> "distOutputDirectory": "/postProcessesLibrary/",
<mask> "buildAsModule": true,... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9e2bec72b2d8e953dcad11865666514540ed6beb | Tools/Gulp/config.json |
"dtsBundle": {
"name": "babylonjs-postProcessLibrary",
"main": "../../dist/preview release/postProcessesLibrary/build/index.d.ts",
"out": "../babylon.postProcesses.module.d.ts",
"baseDir": "../../dist/preview release/postProcessesLibrary/build/... | <mask> ],
<mask> "build": {
<mask> "srcOutputDirectory": "../../postProcessLibrary/",
<mask> "distOutputDirectory": "/postProcessesLibrary/",
<mask> "buildAsModule": true,
<mask> "moduleName": "babylonjs-post-process",
<mask> "outputFile... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9e2bec72b2d8e953dcad11865666514540ed6beb | Tools/Gulp/config.json |
"processDeclaration": {
"filename": "babylon.postProcesses.module.d.ts",
"packageName": "babylonjs-postProcessLibrary",
"moduleName": "BABYLON",
"importsToRemove": [],
"classMap": {
"babylonjs": "BABYLON",
... | <mask> "moduleDeclaration": {
<mask> "name": "PostProcesses",
<mask> "module": "babylonjs-post-process"
<mask> },
<mask> "extendsRoot": true
<mask> }
<mask> },
<mask> "proceduralTexturesLibrary": {
<mask> "libraries": [... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9e2bec72b2d8e953dcad11865666514540ed6beb | Tools/Gulp/config.json |
"install": "cd ../../postProcessLibrary && npm install && cd ../../gui && npm install && cd ../Tools/Gulp/ && cd ../../inspector && npm install && cd ../Tools/Gulp/ && npm --prefix ../../Playground/ install ../../Playground/ && npm --prefix ../../tests/unit/ install ../../tests/unit/ && npm --prefix ../../View... | <mask> "webpack": "^4.16.3",
<mask> "webpack-stream": "5.0.0"
<mask> },
<mask> "scripts": {
<mask> "install": "cd ../../gui && npm install && cd ../Tools/Gulp/ && cd ../../inspector && npm install && cd ../Tools/Gulp/ && npm --prefix ../../Playground/ install ../../Playground/ && n... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9e2bec72b2d8e953dcad11865666514540ed6beb | Tools/Gulp/package.json |
"description": "The GUI library is an extension you can use to generate interactive user interface.\r It is build on top of the DynamicTexture.", | <mask> {
<mask> "name": "babylonjs-gui",
<mask> "version": "1.0.0",
<mask> "description": "The js GUI library is an extension you can use to generate interactive user interface.\r It is build on top of the DynamicTexture.",
<mask> "scripts": {
<mask> "start:server": "webpack-dev-server",
... | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9e2bec72b2d8e953dcad11865666514540ed6beb | gui/package.json |
public _onBeforeDrawObservable: Nullable<Observable<Mesh>>;
public _onBetweenPassObservable: Nullable<Observable<Mesh>>;
| <mask> // Events
<mask> public _onBeforeRenderObservable: Nullable<Observable<Mesh>>;
<mask> public _onBeforeBindObservable: Nullable<Observable<Mesh>>;
<mask> public _onAfterRenderObservable: Nullable<Observable<Mesh>>;
<mask> public _onBeforeDrawObservable: Nullable<Observable<Mesh>>;
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9eee9397f96f4c0a9ab858b09ebdde7175af8382 | src/Meshes/mesh.ts |
/**
* An event triggeredbetween rendering pass wneh using separateCullingPass = true
*/
public get onBetweenPassObservable(): Observable<Mesh> {
if (!this._internalMeshDataInfo._onBetweenPassObservable) {
this._internalMeshDataInfo._onBetweenPassObservable = new Observable<Mesh>();
... | <mask>
<mask> return this._internalMeshDataInfo._onAfterRenderObservable;
<mask> }
<mask>
<mask> /**
<mask> * An event triggered before drawing the mesh
<mask> */
<mask> public get onBeforeDrawObservable(): Observable<Mesh> {
<mask> if (!this._internalMeshDataInfo._onBefor... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9eee9397f96f4c0a9ab858b09ebdde7175af8382 | src/Meshes/mesh.ts |
if (this._internalMeshDataInfo._onBetweenPassObservable) {
this._internalMeshDataInfo._onBetweenPassObservable.notifyObservers(this);
}
| <mask> if (!this._effectiveMaterial.backFaceCulling && this._effectiveMaterial.separateCullingPass) {
<mask> engine.setState(true, this._effectiveMaterial.zOffset, false, !reverse);
<mask> this._processRendering(this, subMesh, effect, fillMode, batch, hardwareInstancedRendering, this.... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9eee9397f96f4c0a9ab858b09ebdde7175af8382 | src/Meshes/mesh.ts |
if (internalDataInfo._onBetweenPassObservable) {
internalDataInfo._onBetweenPassObservable.clear();
}
| <mask> if (internalDataInfo._onAfterRenderObservable) {
<mask> internalDataInfo._onAfterRenderObservable.clear();
<mask> }
<mask>
<mask> // Sources
<mask> if (this._scene.useClonedMeshMap) {
<mask> if (internalDataInfo.meshMap) {
<mask> fo... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9eee9397f96f4c0a9ab858b09ebdde7175af8382 | src/Meshes/mesh.ts |
const movementController = xrController.motionController.getComponentOfType(WebXRControllerComponent.THUMBSTICK) || xrController.motionController.getComponentOfType(WebXRControllerComponent.TOUCHPAD);
| <mask> const controllerData = this._controllers[xrController.uniqueId];
<mask> // motion controller support
<mask> xrController.onMotionControllerProfileLoaded.addOnce(() => {
<mask> if (xrController.motionController) {
<mask> const movementController = xrControl... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/features/WebXRControllerTeleportation.ts |
this.getComponentIds().forEach((id) => this.getComponent(id).update(this.gamepadObject));
| <mask> * Update this model using the current XRFrame
<mask> * @param xrFrame the current xr frame to use and update the model
<mask> */
<mask> public updateFromXRFrame(xrFrame: XRFrame): void {
<mask> this.getComponentTypes().forEach((id) => this.getComponent(id).update(this.gamepadObjec... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRAbstractController.ts |
public getComponentIds(): string[] {
| <mask> /**
<mask> * Get the list of components available in this motion controller
<mask> * @returns an array of strings correlating to available components
<mask> */
<mask> public getComponentTypes(): string[] {
<mask> return Object.keys(this.components);
<mask> }
<mask>
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRAbstractController.ts |
this.getComponentIds().forEach((id) => this.getComponent(id).dispose());
| <mask> /**
<mask> * Dispose this controller, the model mesh and all its components
<mask> */
<mask> public dispose(): void {
<mask> this.getComponentTypes().forEach((id) => this.getComponent(id).dispose());
<mask> if (this.rootMesh) {
<mask> this.rootMesh.dispose();
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRAbstractController.ts |
public static THUMBSTICK: MotionControllerComponentType = "thumbstick";
| <mask>
<mask> /**
<mask> * Thumbstick component type
<mask> */
<mask> public static THUMBSTICK = "xr-standard-thumbstick";
<mask> /**
<mask> * Touchpad component type
<mask> */
<mask> public static TOUCHPAD = "xr-standard-touchpad";
<mask> /**
</s> diffrentiate betwee... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRControllerComponent.ts |
public static TOUCHPAD: MotionControllerComponentType = "touchpad";
| <mask> public static THUMBSTICK = "xr-standard-thumbstick";
<mask> /**
<mask> * Touchpad component type
<mask> */
<mask> public static TOUCHPAD = "xr-standard-touchpad";
<mask> /**
<mask> * trigger component type
<mask> */
<mask> public static TRIGGER = "xr-standard-trig... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRControllerComponent.ts |
public static TRIGGER: MotionControllerComponentType = "trigger";
| <mask> public static TOUCHPAD = "xr-standard-touchpad";
<mask> /**
<mask> * trigger component type
<mask> */
<mask> public static TRIGGER = "xr-standard-trigger";
<mask> /**
<mask> * squeeze component type
<mask> */
<mask> public static SQUEEZE = "xr-standard-squeeze";
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRControllerComponent.ts |
public static SQUEEZE: MotionControllerComponentType = "squeeze";
/**
* squeeze component type
*/
public static BUTTON: MotionControllerComponentType = "button";
| <mask> public static TRIGGER = "xr-standard-trigger";
<mask> /**
<mask> * squeeze component type
<mask> */
<mask> public static SQUEEZE = "xr-standard-squeeze";
<mask> /**
<mask> * Observers registered here will be triggered when the state of a button changes
<mask> * State c... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRControllerComponent.ts |
this.getComponentIds().forEach((id) => {
const comp = id && this.getComponent(id);
| <mask> super(scene, HTCViveLayout[handness], gamepadObject, handness);
<mask> }
<mask>
<mask> protected _processLoadedModel(_meshes: AbstractMesh[]): void {
<mask> this.getComponentTypes().forEach((type) => {
<mask> const comp = type && this.getComponent(type);
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRHTCViveMotionController.ts |
switch (id) {
| <mask> comp.onButtonStateChanged.add((component) => {
<mask>
<mask> if (!this.rootMesh || this.disableAnimation) { return; }
<mask>
<mask> switch (type) {
<mask> case "xr-standard-trigger":
<mask> (<Abst... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRHTCViveMotionController.ts |
this.getComponentIds().forEach((id, i) => {
| <mask> protected _processLoadedModel(_meshes: AbstractMesh[]): void {
<mask> if (!this.rootMesh) { return; }
<mask>
<mask> // Button Meshes
<mask> this.getComponentTypes().forEach((buttonName, i) => {
<mask> if (this.disableAnimation) {
<mask> return;
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRMicrosoftMixedRealityController.ts |
if (id && this.rootMesh) {
const buttonMap = (<any>this._mapping.buttons)[id];
| <mask> this.getComponentTypes().forEach((buttonName, i) => {
<mask> if (this.disableAnimation) {
<mask> return;
<mask> }
<mask> if (buttonName && this.rootMesh) {
<mask> const buttonMap = (<any>this._mapping.buttons)[buttonName];
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRMicrosoftMixedRealityController.ts |
Logger.Log('Skipping unknown button at index: ' + i + ' with mapped name: ' + id);
| <mask> if (buttonName && this.rootMesh) {
<mask> const buttonMap = (<any>this._mapping.buttons)[buttonName];
<mask> const buttonMeshName = buttonMap.rootNodeName;
<mask> if (!buttonMeshName) {
<mask> Logger.Log('Skipping unknown button... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRMicrosoftMixedRealityController.ts |
const comp = this.getComponent(id);
| <mask> buttonMap.pressedMesh = this._getImmediateChildByName(buttonMesh, this._mapping.defaultButton.pressedNodeName);
<mask> buttonMap.unpressedMesh = this._getImmediateChildByName(buttonMesh, this._mapping.defaultButton.unpressedNodeName);
<mask>
<mask> if (buttonM... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRMicrosoftMixedRealityController.ts |
this.getComponentIds().forEach((id, i) => {
const comp = this.getComponent(id);
| <mask>
<mask> });
<mask>
<mask> // Axis Meshes
<mask> this.getComponentTypes().forEach((type, i) => {
<mask> const comp = this.getComponent(type);
<mask> if (!comp.isAxes()) {
<mask> return;
<mask> }
<mask>
<mask> ["x-... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRMicrosoftMixedRealityController.ts |
const axisMap = (<any>this._mapping.axes)[id][axis];
| <mask> }
<mask>
<mask> ["x-axis", "y-axis"].forEach((axis) => {
<mask> if (!this.rootMesh) { return; }
<mask> const axisMap = (<any>this._mapping.axes)[type][axis];
<mask>
<mask> var axisMesh = this._getChildByName(this.rootMesh, axisMap.r... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRMicrosoftMixedRealityController.ts |
this.getComponentIds().forEach((id) => {
const comp = id && this.getComponent(id);
| <mask>
<mask> const isQuest = this._isQuest();
<mask> const triggerDirection = this.handness === 'right' ? -1 : 1;
<mask>
<mask> this.getComponentTypes().forEach((buttonName) => {
<mask> const comp = buttonName && this.getComponent(buttonName);
<mask> if (comp) {... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXROculusTouchMotionController.ts |
switch (id) {
| <mask> comp.onButtonStateChanged.add((component) => {
<mask>
<mask> if (!this.rootMesh || this.disableAnimation) { return; }
<mask>
<mask> switch (buttonName) {
<mask> case "xr-standard-trigger": // index trigger
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXROculusTouchMotionController.ts |
this.getComponentIds().forEach((type) => {
| <mask> }
<mask> private _touchDots: { [visKey: string]: AbstractMesh } = {};
<mask>
<mask> protected _processLoadedModel(_meshes: AbstractMesh[]): void {
<mask> this.getComponentTypes().forEach((type) => {
<mask> const componentInLayout = this.layout.components[type];
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRProfiledMotionController.ts |
if (componentInLayout.type === WebXRControllerComponent.TOUCHPAD && !this._touchDots[visualResponseKey]) {
| <mask> ? componentInLayout.touchPointNodeName : visResponse.valueNodeName!;
<mask> this._buttonMeshMapping[type].states[visualResponseKey] = {
<mask> valueMesh: this._getChildByName(this.rootMesh!, nameOfMesh)
<mask> };
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRProfiledMotionController.ts |
this.getComponentIds().forEach((id) => {
const component = this.getComponent(id);
| <mask> protected _updateModel(_xrFrame: XRFrame): void {
<mask> if (this.disableAnimation) {
<mask> return;
<mask> }
<mask> this.getComponentTypes().forEach((type) => {
<mask> const component = this.getComponent(type);
<mask> if (!component.hasChang... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRProfiledMotionController.ts |
const meshes = this._buttonMeshMapping[id];
const componentInLayout = this.layout.components[id];
| <mask> }
<mask> this.getComponentTypes().forEach((type) => {
<mask> const component = this.getComponent(type);
<mask> if (!component.hasChanges) { return; }
<mask> const meshes = this._buttonMeshMapping[type];
<mask> const componentInLayout = this.la... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9efd553a968726437ecf5a814d7fd1aba67ba607 | src/Cameras/XR/motionController/webXRProfiledMotionController.ts |
public transform(matrix: Matrix2D): BoundingInfo2D {
| <mask> * Apply a transformation matrix to this BoundingInfo2D and return a new instance containing the result
<mask> * @param matrix the transformation matrix to apply
<mask> * @return the new instance containing the result of the transformation applied on this BoundingInfo2D
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.bounding2d.ts |
public transformToRef(matrix: Matrix2D, result: BoundingInfo2D) {
| <mask> * This is a GC friendly version, try to use it as much as possible, specially if your transformation is inside a loop, allocate the result object once for good outside of the loop and use it every time.
<mask> * @param matrix The matrix to use to compute the transformation
<mask> * ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.bounding2d.ts |
matrix.transformPointToRef(p[i], p[i]);
| <mask> p[3].y = this.center.y + this.extent.y;
<mask>
<mask> // Transform the four points of the bounding box with the matrix
<mask> for (let i = 0; i < 4; i++) {
<mask> Vector2.TransformToRef(p[i], matrix, p[i]);
<mask> }
<mask> Boundi... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.bounding2d.ts |
private _updateWorldAABB(worldMatrix: Matrix2D) {
| <mask> }
<mask> BoundingInfo2D.CreateFromPointsToRef(p, result);
<mask> }
<mask>
<mask> private _updateWorldAABB(worldMatrix: Matrix) {
<mask> // Construct a bounding box based on the extent values
<mask> let p = BoundingInfo2D._transform;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.bounding2d.ts |
worldMatrix.transformPointToRef(p[i], p[i]);
| <mask> p[3].y = this.center.y + this.extent.y;
<mask>
<mask> // Transform the four points of the bounding box with the matrix
<mask> for (let i = 0; i < 4; i++) {
<mask> Vector2.TransformToRef(p[i], worldMatrix, p[i]);
<mask> }
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.bounding2d.ts |
public worldMatrixAccess: () => Matrix2D;
| <mask> this._worldAABB.z = Math.max(Math.max(p[0].x, p[1].x), Math.max(p[2].x, p[3].x));
<mask> this._worldAABB.w = Math.max(Math.max(p[0].y, p[1].y), Math.max(p[2].y, p[3].y));
<mask> }
<mask>
<mask> public worldMatrixAccess: () => Matrix;
<mask>
<mask> public g... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.bounding2d.ts |
let targetPointerPos = capturedPrim ? this._primPointerInfo.canvasPointerPos.subtract(new Vector2(targetPrim.globalTransform.m[4], targetPrim.globalTransform.m[5])) : this._actualOverPrimitive.intersectionLocation;
| <mask>
<mask> // Update the relatedTarget info with the over primitive or the captured one (if any)
<mask> let targetPrim = capturedPrim || this._actualOverPrimitive.prim;
<mask>
<mask> let targetPointerPos = capturedPrim ? this._primPointerInfo.canvasPointerPos.subtract(new V... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.canvas2d.ts |
this._localTransform = new Matrix2D();
this._localLayoutTransform = new Matrix2D();
| <mask> this._padding = null;
<mask> this._marginAlignment = null;
<mask> this._id = settings.id;
<mask> this._children = new Array<Prim2DBase>();
<mask> this._localTransform ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.prim2dBase.ts |
public get globalTransform(): Matrix2D {
| <mask>
<mask> /**
<mask> * Get the global transformation matrix of the primitive
<mask> */
<mask> public get globalTransform(): Matrix {
<mask> if (!this._globalTransform || (this._globalTransformProcessStep !== this.owner._globalTransformProcessStep)) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/9f3268821e5df395cf6a81f592edcf595938a0b7 | canvas2D/src/Engine/babylon.prim2dBase.ts |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.