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 |
|---|---|---|---|---|
* An event triggered after the text is changed
*/
| <mask> private _outlineColor: string = "white";
<mask> private _underline: boolean = false;
<mask> private _lineThrough: boolean = false;
<mask> /**
<mask> * An event triggered after the text is changed
<mask> */
<mask> public onTextChangedObservable = new Observable<TextBlock>();
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
* An event triggered after the text was broken up into lines
*/
| <mask> */
<mask> public onTextChangedObservable = new Observable<TextBlock>();
<mask>
<mask> /**
<mask> * An event triggered after the text was broken up into lines
<mask> */
<mask> public onLinesReadyObservable = new Observable<TextBlock>();
<mask>
<mask> /**
<mask> * Funct... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
text: string = ""
) {
| <mask> /**
<mask> * Defines the name of the control
<mask> */
<mask> public name?: string,
<mask> text: string = "") {
<mask> super(name);
<mask>
<mask> this.text = text;
<mask> }
<mask>
</s> Fix text block split using Array.from.
closing #8822
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
lineSpacing = this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);
| <mask> let lineSpacing = 0;
<mask> if (this._lineSpacing.isPixel) {
<mask> lineSpacing = this._lineSpacing.getValue(this._host);
<mask> } else {
<mask> lineSpacing = (this._lineSpacing.getValue(this._host) * this._height.getVal... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
protected _parseLine(line: string = "", context: CanvasRenderingContext2D): object {
| <mask>
<mask> return lines;
<mask> }
<mask>
<mask> protected _parseLine(line: string = '', context: CanvasRenderingContext2D): object {
<mask> return { text: line, width: context.measureText(line).width };
<mask> }
<mask>
<mask> protected _parseLineEllipsis(line: string = '',... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
protected _parseLineWordWrap(line: string = "", width: number, context: CanvasRenderingContext2D): object[] {
| <mask>
<mask> return { text: line, width: lineWidth };
<mask> }
<mask>
<mask> protected _parseLineWordWrap(line: string = '', width: number,
<mask> context: CanvasRenderingContext2D): object[] {
<mask> var lines = [];
<mask> var words = this.wordSplittingFunction ? this... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
var words = this.wordSplittingFunction ? this.wordSplittingFunction(line) : line.split(" ");
| <mask>
<mask> protected _parseLineWordWrap(line: string = '', width: number,
<mask> context: CanvasRenderingContext2D): object[] {
<mask> var lines = [];
<mask> var words = this.wordSplittingFunction ? this.wordSplittingFunction(line) : line.split(' ');
<mask> var lineWidth = ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
} else {
| <mask> if (testWidth > width && n > 0) {
<mask> lines.push({ text: line, width: lineWidth });
<mask> line = words[n];
<mask> lineWidth = context.measureText(line).width;
<mask> }
<mask> else {
<mask> lineWidth = t... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
rootY = rootY + this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);
| <mask>
<mask> if (this._lineSpacing.isPixel) {
<mask> rootY += this._lineSpacing.getValue(this._host);
<mask> } else {
<mask> rootY = rootY + (this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParen... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
const context = document.createElement("canvas").getContext("2d");
| <mask> * @returns expected height
<mask> */
<mask> public computeExpectedHeight(): number {
<mask> if (this.text && this.widthInPixels) {
<mask> const context = document.createElement('canvas').getContext('2d');
<mask> if (context) {
<mask> this._appl... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
const lines = this._lines ? this._lines : this._breakLines(this.widthInPixels - this.paddingLeftInPixels - this.paddingRightInPixels, context);
| <mask> this._applyStates(context);
<mask> if (!this._fontOffset) {
<mask> this._fontOffset = Control._GetFontOffset(context.font);
<mask> }
<mask> const lines = this._lines ? this._lines : this._breakLines(
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
lineSpacing = this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);
| <mask> let lineSpacing = 0;
<mask> if (this._lineSpacing.isPixel) {
<mask> lineSpacing = this._lineSpacing.getValue(this._host);
<mask> } else {
<mask> lineSpacing = (this._lineSpacing.getValue(this._host) *... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts |
<mask>
<mask> this.onTextChangedObservable.clear();
<mask> }
<mask> }
<mask> _TypeStore.RegisteredTypes["BABYLON.GUI.TextBlock"] = TextBlock; </s> Fix text block split using Array.from.
closing #8822
Former-commit-id: efcc66b39996b9ee9f215eb677539fbe516059ce </s> remove }
els... | [
"keep",
"keep",
"keep",
"keep",
"replace"
] | https://github.com/BabylonJS/Babylon.js/commit/a359030966be34342b0ead9ffb1df167712e88bf | gui/src/2D/controls/textBlock.ts | |
public recordVertexArrayObject(vertexBuffers: { [key: string]: VertexBuffer; }, indexBuffer: Nullable<WebGLBuffer>, effect: Effect): WebGLVertexArrayObject {
| <mask> }
<mask> }
<mask> }
<mask>
<mask> public recordVertexArrayObject(vertexBuffers: { [key: string]: VertexBuffer; }, indexBuffer: WebGLBuffer, effect: Effect): WebGLVertexArrayObject {
<mask> var vao = this._gl.createVertexArray();
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Engine/babylon.engine.ts |
public bindVertexArrayObject(vertexArrayObject: WebGLVertexArrayObject, indexBuffer: Nullable<WebGLBuffer>): void {
| <mask>
<mask> return vao;
<mask> }
<mask>
<mask> public bindVertexArrayObject(vertexArrayObject: WebGLVertexArrayObject, indexBuffer: WebGLBuffer): void {
<mask> if (this._cachedVertexArrayObject !== vertexArrayObject) {
<mask> this._cachedVertexArrayObje... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Engine/babylon.engine.ts |
public bindBuffers(vertexBuffers: { [key: string]: Nullable<VertexBuffer> }, indexBuffer: Nullable<WebGLBuffer>, effect: Effect): void {
| <mask> this._cachedVertexArrayObject = null;
<mask> this._gl.bindVertexArray(null);
<mask> }
<mask>
<mask> public bindBuffers(vertexBuffers: { [key: string]: Nullable<VertexBuffer>; }, indexBuffer: Nullable<WebGLBuffer>, effect: Effect): void {
<mask> if (this.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Engine/babylon.engine.ts |
if (!this._blurPostProcesses || !this._blurPostProcesses.length) {
| <mask> if (!this.useBlurExponentialShadowMap && !this.useBlurCloseExponentialShadowMap) {
<mask> return;
<mask> }
<mask>
<mask> if (!this._blurPostProcesses) {
<mask> this._initializeBlurRTTAndPostProcesses();
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Lights/Shadows/babylon.shadowGenerator.ts |
public _boundingInfo: Nullable<BoundingInfo>;
| <mask> private _collisionsScalingMatrix = Matrix.Zero();
<mask> private _isDirty = false;
<mask> public _masterMesh: AbstractMesh;
<mask>
<mask> public _boundingInfo: BoundingInfo;
<mask> private _pivotMatrix = Matrix.Identity();
<mask> private _pivotMatrixInverse... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
public setIndices(indices: IndicesArray, totalVertices: Nullable<number>): AbstractMesh {
| <mask> * If the mesh has no geometry, a new Geometry object is created and set to the mesh.
<mask> * This method creates a new index buffer each call.
<mask> * Returns the Mesh.
<mask> */
<mask> public setIndices(indices: IndicesArray, totalVertices?: number): Abstr... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
public getBoundingInfo(): Nullable<BoundingInfo> {
| <mask> /**
<mask> * Returns the mesh BoundingInfo object or creates a new one and returns it if undefined.
<mask> * Returns a BoundingInfo
<mask> */
<mask> public getBoundingInfo(): BoundingInfo {
<mask> if (this._masterMesh) {
<mask> return ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
let boundingInfo = this.getBoundingInfo();
| <mask>
<mask> let min: Vector3;
<mask> let max: Vector3;
<mask>
<mask> if (!this.subMeshes || !boundingInfo) {
<mask> min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
<mask> max = new Vector3(-Number.MAX_VAL... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
if (!this.subMeshes || !boundingInfo) {
| <mask>
<mask> let min: Vector3;
<mask> let max: Vector3;
<mask>
<mask> if (!this.subMeshes) {
<mask> min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
<mask> max = new Vector3(-Number.MAX_VALUE, -Number.MAX_V... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
min = boundingInfo.boundingBox.minimumWorld;
max = boundingInfo.boundingBox.maximumWorld;
| <mask> if (!this.subMeshes) {
<mask> min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
<mask> max = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
<mask> } else {
<mask> min = this.getBoundingInfo(... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
let childBoundingInfo = childMesh.getBoundingInfo();
| <mask>
<mask> childMesh.computeWorldMatrix(true);
<mask>
<mask> if (childMesh.getTotalVertices() === 0 || !childBoundingInfo) {
<mask> continue;
<mask> }
<mask> let boundingBox = childBoundingInfo.boundingBox;
<mask>
</s> "S... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
if (childMesh.getTotalVertices() === 0 || !childBoundingInfo) {
| <mask> let childMesh = <AbstractMesh>descendant;
<mask>
<mask> childMesh.computeWorldMatrix(true);
<mask>
<mask> if (childMesh.getTotalVertices() === 0) {
<mask> continue;
<mask> }
<mask> let boundingBox = chil... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
let boundingBox = childBoundingInfo.boundingBox;
| <mask>
<mask> if (childMesh.getTotalVertices() === 0) {
<mask> continue;
<mask> }
<mask> let boundingBox = childMesh.getBoundingInfo().boundingBox;
<mask>
<mask> var minBox = boundingBox.minimumWorld;
<mask> va... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
return this._boundingInfo !== null && this._boundingInfo.isInFrustum(frustumPlanes);
| <mask> * A mesh is in the frustum if its bounding box intersects the frustum.
<mask> * Boolean returned.
<mask> */
<mask> public isInFrustum(frustumPlanes: Plane[]): boolean {
<mask> return this._boundingInfo.isInFrustum(frustumPlanes);
<mask> }
<mask>
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
return this._boundingInfo !== null && this._boundingInfo.isCompletelyInFrustum(frustumPlanes);;
| <mask> * A mesh is completely in the frustum if its bounding box it completely inside the frustum.
<mask> * Boolean returned.
<mask> */
<mask> public isCompletelyInFrustum(frustumPlanes: Plane[]): boolean {
<mask> return this._boundingInfo.isCompletelyInFrustum(fr... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
let boundingInfo = this.getBoundingInfo();
| <mask>
<mask> this.computeWorldMatrix(true);
<mask>
<mask> // Update octree
<mask> if (boundingInfo) {
<mask> var bbox = boundingInfo.boundingBox;
<mask> this._submeshesOctree.update(bbox.minimumWorld, bbox.maximumWorld, this.subMeshes);
<mas... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
if (boundingInfo) {
var bbox = boundingInfo.boundingBox;
this._submeshesOctree.update(bbox.minimumWorld, bbox.maximumWorld, this.subMeshes);
}
| <mask>
<mask> this.computeWorldMatrix(true);
<mask>
<mask> // Update octree
<mask> var bbox = this.getBoundingInfo().boundingBox;
<mask> this._submeshesOctree.update(bbox.minimumWorld, bbox.maximumWorld, this.subMeshes);
<mask>
<mask> return this._s... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
if (!this._boundingInfo || !this._boundingInfo._checkCollision(collider))
| <mask> }
<mask>
<mask> public _checkCollision(collider: Collider): AbstractMesh {
<mask> // Bounding box test
<mask> if (!this._boundingInfo._checkCollision(collider))
<mask> return this;
<mask>
<mask> // Transformation matrix
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
if (!bInfo) {
return this;
}
| <mask> var normals = this.getVerticesData(VertexBuffer.NormalKind);
<mask> var bInfo = this.getBoundingInfo();
<mask> this._bbSize.x = (bInfo.maximum.x - bInfo.minimum.x > Epsilon) ? bInfo.maximum.x - bInfo.minimum.x : Epsilon;
<mask> this._bbSize.y = (bInfo.maximum.y... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
if (!bInfo) {
return null;
}
| <mask> public getFacetsAtLocalCoordinates(x: number, y: number, z: number): Nullable<number[]> {
<mask> var bInfo = this.getBoundingInfo();
<mask> var ox = Math.floor((x - bInfo.minimum.x * this._partitioningBBoxRatio) * this._subDiv.X * this._partitioningBBoxRatio / this._bbSize.x);
... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.abstractMesh.ts |
constructor(engine: any, data: number[] | Float32Array, updatable: boolean, stride: number, postponeInternalCreation?: boolean, instanced: boolean = false) {
| <mask> private _strideSize: number;
<mask> private _instanced: boolean;
<mask> private _instanceDivisor: number;
<mask>
<mask> constructor(engine: any, data: number[] | Float32Array, updatable: boolean, stride: number, postponeInternalCreation?: boolean, instanced?: boolean) {
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.buffer.ts |
public getData(): Nullable<number[] | Float32Array> {
| <mask> public isUpdatable(): boolean {
<mask> return this._updatable;
<mask> }
<mask>
<mask> public getData(): number[] | Float32Array {
<mask> return this._data;
<mask> }
<mask>
<mask> public getBuffer(): WebGLBuffer {
<mask> retur... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.buffer.ts |
public getBuffer(): Nullable<WebGLBuffer> {
| <mask> public getData(): number[] | Float32Array {
<mask> return this._data;
<mask> }
<mask>
<mask> public getBuffer(): WebGLBuffer {
<mask> return this._buffer;
<mask> }
<mask>
<mask> public getStrideSize(): number {
<mask> return ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.buffer.ts |
public create(data: Nullable<number[] | Float32Array> = null): void {
| <mask> }
<mask> }
<mask>
<mask> // Methods
<mask> public create(data?: number[] | Float32Array): void {
<mask> if (!data && this._buffer) {
<mask> return; // nothing to do
<mask> }
<mask>
<mask> data = data || this._data... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.buffer.ts |
if (!data) {
return;
}
| <mask> }
<mask>
<mask> data = data || this._data;
<mask>
<mask> if (!this._buffer) { // create buffer
<mask> if (this._updatable) {
<mask> this._buffer = this._engine.createDynamicVertexBuffer(data);
<mask> this._data ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.buffer.ts |
public static FromPoints(a: Vector3, b: Vector3, c: Vector3): Nullable<Plane> {
| <mask> // `BABYLON.CSG.Plane.EPSILON` is the tolerance used by `splitPolygon()` to decide if a
<mask> // point is on the plane.
<mask> static EPSILON = 1e-5;
<mask>
<mask> public static FromPoints(a: Vector3, b: Vector3, c: Vector3): Plane {
<mask> var v0 = c.subtract(... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.csg.ts |
this.plane = <Plane>Plane.FromPoints(vertices[0].pos, vertices[1].pos, vertices[2].pos);
| <mask>
<mask> constructor(vertices: Vertex[], shared: any) {
<mask> this.vertices = vertices;
<mask> this.shared = shared;
<mask> this.plane = Plane.FromPoints(vertices[0].pos, vertices[1].pos, vertices[2].pos);
<mask>
<mask> }
<mask>
<mask> public... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.csg.ts |
private plane: Nullable<Plane> = null;
private front: Nullable<Node> = null;
private back: Nullable<Node> = null;
| <mask> // polygons) are added directly to that node and the other polygons are added to
<mask> // the front and/or back subtrees. This is not a leafy BSP tree since there is
<mask> // no distinction between internal and leaf nodes.
<mask> class Node {
<mask> private plane: Plane = null;
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.csg.ts |
public rotationQuaternion: Nullable<Quaternion>;
| <mask> private polygons = new Array<Polygon>();
<mask> public matrix: Matrix;
<mask> public position: Vector3;
<mask> public rotation: Vector3;
<mask> public rotationQuaternion: Quaternion;
<mask> public scaling: Vector3;
<mask>
<mask> // Convert BABYLON.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.csg.ts |
meshRotationQuaternion: Nullable<Quaternion> = null,
| <mask> vertices;
<mask> var matrix : Matrix,
<mask> meshPosition : Vector3,
<mask> meshRotation : Vector3,
<mask> meshRotationQuaternion: Quaternion,
<mask> meshScaling: Vector3;
<mask>
<mask> if (mesh instanceof Mesh) {
<mask> mesh.computeWo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.csg.ts |
SubMesh.CreateFromIndices(subMesh_obj.materialIndex + materialIndexOffset, subMesh_obj.indexStart, subMesh_obj.indexEnd - subMesh_obj.indexStart + 1, <AbstractMesh>mesh);
| <mask> for (var m in subMesh_dict) {
<mask> materialMaxIndex = -1;
<mask> for (var sm in (<any>subMesh_dict)[m]) {
<mask> subMesh_obj = (<any>subMesh_dict)[m][sm];
<mask> SubMesh.CreateFromIndices(subMesh_obj.ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.csg.ts |
public delayLoadingFile: Nullable<string>;
| <mask> export class Geometry implements IGetSetVerticesData {
<mask> // Members
<mask> public id: string;
<mask> public delayLoadState = Engine.DELAYLOADSTATE_NONE;
<mask> public delayLoadingFile: string;
<mask> public onGeometryUpdated: (geometry: Geometry, kind?: stri... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
private _indexBuffer: Nullable<WebGLBuffer>;
| <mask> private _isDisposed = false;
<mask> private _extend: { minimum: Vector3, maximum: Vector3 };
<mask> private _boundingBias: Vector2;
<mask> public _delayInfo: Array<string>;
<mask> private _indexBuffer: WebGLBuffer;
<mask> private _indexBufferIsUpdatable = fal... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public _boundingInfo: Nullable<BoundingInfo>;
public _delayLoadingFunction: Nullable<(any: any, geometry: Geometry) => void>;
| <mask> private _boundingBias: Vector2;
<mask> public _delayInfo: Array<string>;
<mask> private _indexBuffer: WebGLBuffer;
<mask> private _indexBufferIsUpdatable = false;
<mask> public _boundingInfo: BoundingInfo;
<mask> public _delayLoadingFunction: (any: any, geome... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public _positions: Nullable<Vector3[]>;
| <mask> private _vertexArrayObjects: { [key: string]: WebGLVertexArrayObject; };
<mask> private _updatable: boolean;
<mask>
<mask> // Cache
<mask> public _positions: Vector3[];
<mask>
<mask> /**
<mask> * The Bias Vector to apply on the bounding elements (box/sp... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
constructor(id: string, scene: Scene, vertexData?: VertexData, updatable: boolean = false, mesh: Nullable<Mesh> = null) {
| <mask>
<mask> this.updateBoundingInfo(true, null);
<mask> }
<mask>
<mask> constructor(id: string, scene: Scene, vertexData?: VertexData, updatable?: boolean, mesh?: Mesh) {
<mask> this.id = id;
<mask> this._engine = scene.getEngine();
<mask> this... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public setVerticesData(kind: string, data: number[] | Float32Array, updatable: boolean = false, stride?: number): void {
| <mask> vertexData.applyToGeometry(this, updatable);
<mask> this.notifyUpdate();
<mask> }
<mask>
<mask> public setVerticesData(kind: string, data: number[] | Float32Array, updatable?: boolean, stride?: number): void {
<mask> var buffer = new VertexBuffer(this._e... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public updateVerticesData(kind: string, data: number[] | Float32Array, updateExtends: boolean = false): void {
| <mask> vertexBuffer.updateDirectly(data, offset);
<mask> this.notifyUpdate(kind);
<mask> }
<mask>
<mask> public updateVerticesData(kind: string, data: number[] | Float32Array, updateExtends?: boolean): void {
<mask> var vertexBuffer = this.getVertexBuffer(kind)... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
private updateBoundingInfo(updateExtends: boolean, data: Nullable<number[] | Float32Array>) {
| <mask> }
<mask> this.notifyUpdate(kind);
<mask> }
<mask>
<mask> private updateBoundingInfo(updateExtends: boolean, data: number[] | Float32Array) {
<mask> if (updateExtends) {
<mask> this.updateExtend(data);
<mask> }
<mask>
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public _bind(effect: Effect, indexToBind?: Nullable<WebGLBuffer>): void {
| <mask> }
<mask> }
<mask> }
<mask>
<mask> public _bind(effect: Effect, indexToBind: WebGLBuffer = undefined): void {
<mask> if (indexToBind === undefined) {
<mask> indexToBind = this._indexBuffer;
<mask> }
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
let vbs = this.getVertexBuffers();
if (!vbs) {
return;
}
| <mask> public _bind(effect: Effect, indexToBind?: Nullable<WebGLBuffer>): void {
<mask> if (indexToBind === undefined) {
<mask> indexToBind = this._indexBuffer;
<mask> }
<mask>
<mask> if (indexToBind != this._indexBuffer || !this._vertexArrayObjects) {
... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
this._engine.bindBuffers(vbs, indexToBind, effect);
| <mask> indexToBind = this._indexBuffer;
<mask> }
<mask>
<mask> if (indexToBind != this._indexBuffer || !this._vertexArrayObjects) {
<mask> this._engine.bindBuffers(this.getVertexBuffers(), indexToBind, effect);
<mask> return;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
this._vertexArrayObjects[effect.key] = this._engine.recordVertexArrayObject(vbs, indexToBind, effect);
| <mask> }
<mask>
<mask> // Using VAO
<mask> if (!this._vertexArrayObjects[effect.key]) {
<mask> this._vertexArrayObjects[effect.key] = this._engine.recordVertexArrayObject(this.getVertexBuffers(), indexToBind, effect);
<mask> }
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public getVerticesData(kind: string, copyWhenShared?: boolean, forceCopy?: boolean): Nullable<number[] | Float32Array> {
| <mask>
<mask> return this._totalVertices;
<mask> }
<mask>
<mask> public getVerticesData(kind: string, copyWhenShared?: boolean, forceCopy?: boolean): number[] | Float32Array {
<mask> var vertexBuffer = this.getVertexBuffer(kind);
<mask> if (!vertexBuffer) {
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public isVertexBufferUpdatable(kind: string): boolean {
let vb = this._vertexBuffers[kind];
if (!vb) {
return false;
}
return vb.isUpdatable();
}
public getVertexBuffer(kind: string): Nullable<VertexBuffer> {
| <mask> return copy;
<mask> }
<mask> }
<mask>
<mask> public getVertexBuffer(kind: string): VertexBuffer {
<mask> if (!this.isReady()) {
<mask> return null;
<mask> }
<mask> return this._vertexBuffers[kind];
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public getVertexBuffers(): Nullable<{ [key: string]: VertexBuffer; }> {
| <mask> }
<mask> return this._vertexBuffers[kind];
<mask> }
<mask>
<mask> public getVertexBuffers(): { [key: string]: VertexBuffer; } {
<mask> if (!this.isReady()) {
<mask> return null;
<mask> }
<mask> return this._vert... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public setIndices(indices: IndicesArray, totalVertices: Nullable<number> = null, updatable: boolean = false): void {
| <mask> this._engine.updateDynamicIndexBuffer(this._indexBuffer, indices, offset);
<mask> }
<mask> }
<mask>
<mask> public setIndices(indices: IndicesArray, totalVertices?: number, updatable?: boolean): void {
<mask> if (this._indexBuffer) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public getIndices(copyWhenShared?: boolean): Nullable<IndicesArray> {
| <mask> }
<mask> return this._indices.length;
<mask> }
<mask>
<mask> public getIndices(copyWhenShared?: boolean): IndicesArray {
<mask> if (!this.isReady()) {
<mask> return null;
<mask> }
<mask> var orig = this._indices... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public getIndexBuffer(): Nullable<WebGLBuffer> {
| <mask> return copy;
<mask> }
<mask> }
<mask>
<mask> public getIndexBuffer(): WebGLBuffer {
<mask> if (!this.isReady()) {
<mask> return null;
<mask> }
<mask> return this._indexBuffer;
<mask> }
</s> "Such a... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
private updateExtend(data: Nullable<number[] | Float32Array> = null, stride? : number) {
| <mask> mesh._boundingInfo = this._boundingInfo;
<mask> }
<mask> }
<mask>
<mask> private updateExtend(data: number[] | Float32Array = null, stride? : number) {
<mask> if (!data) {
<mask> data = this._vertexBuffers[VertexBuffer.PositionKind].... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (!this.delayLoadingFile) {
return;
}
| <mask> this._queueLoad(scene, onLoaded);
<mask> }
<mask>
<mask> private _queueLoad(scene: Scene, onLoaded?: () => void): void {
<mask> scene._addPendingData(this);
<mask> Tools.LoadFile(this.delayLoadingFile, data => {
<mask> if (!this._delayLo... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (!this._delayLoadingFunction) {
return;
}
| <mask> scene._addPendingData(this);
<mask> Tools.LoadFile(this.delayLoadingFile, data => {
<mask> this._delayLoadingFunction(JSON.parse(data), this);
<mask>
<mask> this.delayLoadState = Engine.DELAYLOADSTATE_LOADED;
<mask> this._delayInfo = ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (indices) {
for (var index = 0; index < indices.length; index++) {
(<number[]>vertexData.indices).push(indices[index]);
}
| <mask>
<mask> vertexData.indices = [];
<mask>
<mask> var indices = this.getIndices();
<mask> for (var index = 0; index < indices.length; index++) {
<mask> (<number[]>vertexData.indices).push(indices[index]);
<mask> }
<mask>
<mask> v... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
let vb = this.getVertexBuffer(kind);
if (vb) {
updatable = vb.isUpdatable();
stopChecking = !updatable;
}
| <mask> } else {
<mask> vertexData.set((<number[]>data).slice(0), kind);
<mask> }
<mask> if (!stopChecking) {
<mask> updatable = this.getVertexBuffer(kind).isUpdatable();
<mask> stopChecking = !updatable;
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
var geometry = new Geometry(id, this._scene, vertexData, updatable);
| <mask> stopChecking = !updatable;
<mask> }
<mask> }
<mask>
<mask> var geometry = new Geometry(id, this._scene, vertexData, updatable, null);
<mask>
<mask> geometry.delayLoadState = this.delayLoadState;
<mask> geometry.delayLoa... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
private toNumberArray(origin: Nullable<Float32Array | IndicesArray>) : number[] {
| <mask>
<mask> return serializationObject;
<mask> }
<mask>
<mask> private toNumberArray(origin: Float32Array | IndicesArray) : number[] {
<mask> if (Array.isArray(origin)) {
<mask> return origin;
<mask> } else {
<mask> return ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.PositionKind)) {
| <mask> var serializationObject = this.serialize();
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.PositionKind)) {
<mask> serializationObject.positions = this.toNumberArray(this.getVerticesData(VertexBuffer.PositionKind));
<mask> if (this.getVerte... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.NormalKind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.NormalKind)) {
<mask> serializationObject.normals = this.toNumberArray(this.getVerticesData(VertexBuffer.NormalKind));
<mask> if (this.getVertexBuffer(VertexBuffer.NormalKind).isUpdatable) {
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.UVKind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.UVKind)) {
<mask> serializationObject.uvs = this.toNumberArray(this.getVerticesData(VertexBuffer.UVKind));
<mask> if (this.getVertexBuffer(VertexBuffer.UVKind).isUpdatable) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.UV2Kind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.UV2Kind)) {
<mask> serializationObject.uv2s = this.toNumberArray(this.getVerticesData(VertexBuffer.UV2Kind));
<mask> if (this.getVertexBuffer(VertexBuffer.UV2Kind).isUpdatable) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.UV3Kind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.UV3Kind)) {
<mask> serializationObject.uv3s = this.toNumberArray(this.getVerticesData(VertexBuffer.UV3Kind));
<mask> if (this.getVertexBuffer(VertexBuffer.UV3Kind).isUpdatable) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.UV4Kind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.UV4Kind)) {
<mask> serializationObject.uv4s = this.toNumberArray(this.getVerticesData(VertexBuffer.UV4Kind));
<mask> if (this.getVertexBuffer(VertexBuffer.UV4Kind).isUpdatable) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.UV5Kind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.UV5Kind)) {
<mask> serializationObject.uv5s = this.toNumberArray(this.getVerticesData(VertexBuffer.UV5Kind));
<mask> if (this.getVertexBuffer(VertexBuffer.UV5Kind).isUpdatable) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.UV6Kind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.UV6Kind)) {
<mask> serializationObject.uv6s = this.toNumberArray(this.getVerticesData(VertexBuffer.UV6Kind));
<mask> if (this.getVertexBuffer(VertexBuffer.UV6Kind).isUpdatable) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.ColorKind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.ColorKind)) {
<mask> serializationObject.colors = this.toNumberArray(this.getVerticesData(VertexBuffer.ColorKind));
<mask> if (this.getVertexBuffer(VertexBuffer.ColorKind).isUpdatable) {
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.MatricesIndicesKind)) {
| <mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) {
<mask> serializationObject.matricesIndices = this.toNumberArray(this.getVerticesData(VertexBuffer.MatricesIndicesKind));
<mask> serializationObject.matricesIndices._isExpanded = true;
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (this.isVertexBufferUpdatable(VertexBuffer.MatricesWeightsKind)) {
| <mask> }
<mask>
<mask> if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {
<mask> serializationObject.matricesWeights = this.toNumberArray(this.getVerticesData(VertexBuffer.MatricesWeightsKind));
<mask> if (this.getVertexBuffer(VertexBuffer.M... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public static ExtractFromMesh(mesh: Mesh, id: string): Nullable<Geometry> {
| <mask> return serializationObject;
<mask> }
<mask>
<mask> // Statics
<mask> public static ExtractFromMesh(mesh: Mesh, id: string): Geometry {
<mask> var geometry = mesh._geometry;
<mask>
<mask> if (!geometry) {
<mask> return null;
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
SubMesh.AddToMesh(materialIndex, verticesStart, verticesCount, indexStart, indexCount, <AbstractMesh>mesh);
| <mask> var verticesCount = subMeshesData[(i * 5) + 2];
<mask> var indexStart = subMeshesData[(i * 5) + 3];
<mask> var indexCount = subMeshesData[(i * 5) + 4];
<mask>
<mask> SubMesh.AddToMesh(materialIndex, verticesStar... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
SubMesh.AddToMesh(parsedSubMesh.materialIndex, parsedSubMesh.verticesStart, parsedSubMesh.verticesCount, parsedSubMesh.indexStart, parsedSubMesh.indexCount, <AbstractMesh>mesh);
| <mask> mesh.subMeshes = [];
<mask> for (var subIndex = 0; subIndex < parsedGeometry.subMeshes.length; subIndex++) {
<mask> var parsedSubMesh = parsedGeometry.subMeshes[subIndex];
<mask>
<mask> SubMesh.AddToMesh(parsedSubMesh.materialIndex, pa... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
scene['_selectionOctree'].addMesh(<AbstractMesh>mesh);
| <mask> mesh.computeWorldMatrix(true);
<mask>
<mask> // Octree
<mask> if (scene['_selectionOctree']) {
<mask> scene['_selectionOctree'].addMesh(mesh);
<mask> }
<mask> }
<mask>
<mask> private static _CleanMatricesWeights(parsedGeom... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
if (!skeleton) {
return;
}
| <mask> }
<mask> let noInfluenceBoneIndex = 0.0;
<mask> if (parsedGeometry.skeletonId > -1) {
<mask> let skeleton = mesh.getScene().getLastSkeletonByID(parsedGeometry.skeletonId);
<mask> noInfluenceBoneIndex = skeleton.bones.length;
<mask> ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public static Parse(parsedVertexData: any, scene: Scene, rootUrl: string): Nullable<Geometry> {
| <mask> mesh.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, matricesIndicesExtra);
<mask> }
<mask> }
<mask>
<mask> public static Parse(parsedVertexData: any, scene: Scene, rootUrl: string): Geometry {
<mask> if (scene.getGeometryByID(parsedVertexData... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
var geometry = new Geometry(parsedVertexData.id, scene, undefined, parsedVertexData.updatable);
| <mask> if (scene.getGeometryByID(parsedVertexData.id)) {
<mask> return null; // null since geometry could be something else than a box...
<mask> }
<mask>
<mask> var geometry = new Geometry(parsedVertexData.id, scene, null, parsedVertexData.updatable);
<mask>
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
constructor(id: string, scene: Scene, private _canBeRegenerated: boolean = false, mesh: Nullable<Mesh> = null) {
super(id, scene, undefined, false, mesh); // updatable = false to be sure not to update vertices
| <mask> export class _Primitive extends Geometry {
<mask>
<mask> private _beingRegenerated: boolean;
<mask>
<mask> constructor(id: string, scene: Scene, private _canBeRegenerated?: boolean, mesh?: Mesh) {
<mask> super(id, scene, null, false, mesh); // updatable = f... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
return new Ribbon(id, this.getScene(), this.pathArray, this.closeArray, this.closePath, this.offset, this.canBeRegenerated(), undefined, this.side);
| <mask> return VertexData.CreateRibbon({ pathArray: this.pathArray, closeArray: this.closeArray, closePath: this.closePath, offset: this.offset, sideOrientation: this.side });
<mask> }
<mask>
<mask> public copy(id: string): Geometry {
<mask> return new Ribbon... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
constructor(id: string, scene: Scene, public size: number, canBeRegenerated?: boolean, mesh: Nullable<Mesh> = null, public side: number = Mesh.DEFAULTSIDE) {
| <mask> }
<mask>
<mask> export class Box extends _Primitive {
<mask> // Members
<mask> constructor(id: string, scene: Scene, public size: number, canBeRegenerated?: boolean, mesh?: Mesh, public side: number = Mesh.DEFAULTSIDE) {
<mask> super(id, scene, canBe... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
return new Box(id, this.getScene(), this.size, this.canBeRegenerated(), undefined, this.side);
| <mask> return VertexData.CreateBox({ size: this.size, sideOrientation: this.side });
<mask> }
<mask>
<mask> public copy(id: string): Geometry {
<mask> return new Box(id, this.getScene(), this.size, this.canBeRegenerated(), null, this.side);
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public static Parse(parsedBox: any, scene: Scene): Nullable<Box> {
| <mask>
<mask> return serializationObject;
<mask> }
<mask>
<mask> public static Parse(parsedBox: any, scene: Scene): Box {
<mask> if (scene.getGeometryByID(parsedBox.id)) {
<mask> return null; // null since geometry could be something e... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
constructor(id: string, scene: Scene, public segments: number, public diameter: number, canBeRegenerated?: boolean, mesh: Nullable<Mesh> = null, public side: number = Mesh.DEFAULTSIDE) {
| <mask> }
<mask>
<mask> export class Sphere extends _Primitive {
<mask>
<mask> constructor(id: string, scene: Scene, public segments: number, public diameter: number, canBeRegenerated?: boolean, mesh?: Mesh, public side: number = Mesh.DEFAULTSIDE) {
<mask> super(id, sc... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public static Parse(parsedSphere: any, scene: Scene): Nullable<Geometry.Primitives.Sphere> {
| <mask>
<mask> return serializationObject;
<mask> }
<mask>
<mask> public static Parse(parsedSphere: any, scene: Scene): Geometry.Primitives.Sphere {
<mask> if (scene.getGeometryByID(parsedSphere.id)) {
<mask> return null; // null since ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
constructor(id: string, scene: Scene, public radius: number, public tessellation: number, canBeRegenerated?: boolean, mesh: Nullable<Mesh> = null, public side: number = Mesh.DEFAULTSIDE) {
| <mask>
<mask> export class Disc extends _Primitive {
<mask> // Members
<mask>
<mask> constructor(id: string, scene: Scene, public radius: number, public tessellation: number, canBeRegenerated?: boolean, mesh?: Mesh, public side: number = Mesh.DEFAULTSIDE) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
constructor(id: string, scene: Scene, public height: number, public diameterTop: number, public diameterBottom: number, public tessellation: number, public subdivisions: number = 1, canBeRegenerated?: boolean, mesh: Nullable<Mesh> = null, public side: number = Mesh.DEFAULTSIDE) {
| <mask>
<mask>
<mask> export class Cylinder extends _Primitive {
<mask>
<mask> constructor(id: string, scene: Scene, public height: number, public diameterTop: number, public diameterBottom: number, public tessellation: number, public subdivisions: number = 1, canBeRegenerated?: boolean, mesh... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public static Parse(parsedCylinder: any, scene: Scene): Nullable<Geometry.Primitives.Cylinder> {
| <mask>
<mask> return serializationObject;
<mask> }
<mask>
<mask> public static Parse(parsedCylinder: any, scene: Scene): Geometry.Primitives.Cylinder {
<mask> if (scene.getGeometryByID(parsedCylinder.id)) {
<mask> return null; // null ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
constructor(id: string, scene: Scene, public diameter: number, public thickness: number, public tessellation: number, canBeRegenerated?: boolean, mesh: Nullable<Mesh> = null, public side: number = Mesh.DEFAULTSIDE) {
| <mask> }
<mask>
<mask> export class Torus extends _Primitive {
<mask>
<mask> constructor(id: string, scene: Scene, public diameter: number, public thickness: number, public tessellation: number, canBeRegenerated?: boolean, mesh?: Mesh, public side: number = Mesh.DEFAULTSIDE) {
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
public static Parse(parsedTorus: any, scene: Scene): Nullable<Geometry.Primitives.Torus> {
| <mask>
<mask> return serializationObject;
<mask> }
<mask>
<mask> public static Parse(parsedTorus: any, scene: Scene): Geometry.Primitives.Torus {
<mask> if (scene.getGeometryByID(parsedTorus.id)) {
<mask> return null; // null since geo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
constructor(id: string, scene: Scene, public width: number, public height: number, public subdivisions: number, canBeRegenerated?: boolean, mesh: Nullable<Mesh> = null) {
| <mask> }
<mask>
<mask> export class Ground extends _Primitive {
<mask>
<mask> constructor(id: string, scene: Scene, public width: number, public height: number, public subdivisions: number, canBeRegenerated?: boolean, mesh?: Mesh) {
<mask> super(id, scene, canBeRegene... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/a3672f8c94c194d5104dcc3c0827457f8718c5fa | src/Mesh/babylon.geometry.ts |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.