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
import { GreasedLineMeshColorDistribution, GreasedLineMeshWidthDistribution, GreasedLineMesh, } from "../greasedLineMesh";
<mask> import type { Vector2 } from "./../../Maths/math.vector"; <mask> import { Vector3 } from "./../../Maths/math.vector"; <mask> import type { Nullable } from "../../types"; <mask> import type { GreasedLineParameters, GreasedLinePoints } from "../greasedLineMesh"; <mask> import { GreasedLineMeshColorDistributio...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
/** * Parameter for GreasedLineBuilder */ export interface GreasedLineBuilderParameters { // mesh related /** * Points of the line. */ points: GreasedLinePoints; /** * Line width. */ width?: number; /** * If false then width units = scene units. If true...
<mask> import { GreasedLineMeshColorDistribution, GreasedLineMeshColorMode, GreasedLineMeshWidthDistribution, GreasedLineMesh , GreasedLineMeshMaterialType} from "../greasedLineMesh"; <mask> import type { Scene } from "../../scene"; <mask> import { EngineStore } from "../../Engines/engineStore"; <mask> <mask> exp...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
export class GreasedLineMeshBuilder {
<mask> */ <mask> resolution?: Vector2; // TODO: This should be somewhere in the original shaders already?! <mask> } <mask> <mask> /** <mask> * Creates a GreasedLine mesh <mask> * @param name name of the mesh <mask> * @param parameters parameters for the mesh </s> Tiding up interfac...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
public static CreateGreasedLine(name: string, parameters: GreasedLineBuilderParameters, scene: Nullable<Scene>) {
<mask> * @param parameters parameters for the mesh <mask> * @param scene scene where the mesh will be created <mask> * @returns instance of GreasedLineMesh <mask> */ <mask> export function CreateGreasedLine(name: string, parameters: GreasedLineBuilderParameters, scene: Nullable<Scene>) { <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
const allPoints = GreasedLineMeshBuilder.ConvertPoints(parameters.points);
<mask> export function CreateGreasedLine(name: string, parameters: GreasedLineBuilderParameters, scene: Nullable<Scene>) { <mask> scene = <Scene>(scene ?? EngineStore.LastCreatedScene); <mask> <mask> let instance; <mask> const allPoints = ConvertPoints(parameters.points); <mask> <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
const widths = GreasedLineMeshBuilder.NormalizeWidthTable(length, parameters.widths ?? [], GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START);
<mask> length += points.length / 3; <mask> }); <mask> } <mask> <mask> const widths = NormalizeWidthTable(length, parameters.widths ?? [], GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START); <mask> <mask> const colors = parameters.colors ? NormalizeCol...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
const colors = parameters.colors ? GreasedLineMeshBuilder.NormalizeColorTable(length, parameters.colors, GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_START, parameters.color) : undefined;
<mask> } <mask> <mask> const widths = NormalizeWidthTable(length, parameters.widths ?? [], GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START); <mask> <mask> const colors = parameters.colors ? NormalizeColorTable(length, parameters.colors, GreasedLineMeshColorDistribution.COLOR_DIS...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
<mask> if (!parameters.instance) { <mask> const initialGreasedLineParameters: GreasedLineParameters = { <mask> points: allPoints, <mask> offsets: parameters.offsets, <mask> materialType: parameters.materialType, <mask> updatable: ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
materialType: parameters.materialType,
<mask> <mask> const initialMaterialParameters: GreasedLineMaterialParameters = { <mask> colorDistribution: parameters.colorDistribution, <mask> dashArray: parameters.dashArray, <mask> dashOffset: parameters.dashOffset, <mask> dashRatio: ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
initialMaterialParameters.colors = GreasedLineMeshBuilder.Color3toUint8(colors);
<mask> colorMode: parameters.colorMode ?? GreasedLineMeshColorMode.COLOR_MODE_SET, <mask> }; <mask> <mask> if (colors) { <mask> initialMaterialParameters.colors = Color3toUint8(colors); <mask> } <mask> <mask> const material = para...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
GreasedLineMeshBuilder._SetSegmentWidths(instance, widths);
<mask> instance.material = material; <mask> } else { <mask> // update the data on the mesh instance <mask> instance = parameters.instance; <mask> _setSegmentWidths(instance, widths); <mask> instance.addPoints(allPoints); <mask> } <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
GreasedLineMeshBuilder._SetColors(instance, colors);
<mask> instance.addPoints(allPoints); <mask> } <mask> <mask> if (colors) { <mask> _setColors(instance, colors); <mask> } <mask> <mask> return instance; <mask> } <mask> </s> Tiding up interfaces & JDoc </s> remove _setSegmentWidths(ins...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
public static Color3toUint8(colors: Color3[]) {
<mask> * Converts an array of Color3 to Uint8Array <mask> * @param colors Arrray of Color3 <mask> * @returns Uin8Array of colors [r, g, b, r, g, b, ...] <mask> */ <mask> export function Color3toUint8(colors: Color3[]) { <mask> const colorTable: Uint8Array = new Uint8Array(colors.le...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
public static ConvertPoints(points: GreasedLinePoints): number[][] {
<mask> * Converts GreasedLinePoints to number[][] <mask> * @param points GreasedLinePoints <mask> * @returns number[][] with x, y, z coordinates of the points, like [[x, y, z, x, y, z, ...], [x, y, z, ...]] <mask> */ <mask> export function ConvertPoints(points: GreasedLinePoints): number[][...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
public static NormalizeWidthTable( pointCount: number, widths: number[], widthsDistribution: GreasedLineMeshWidthDistribution, defaultWidthUpper = 1, defaultWidthLower = 1 ): number[] {
<mask> * @param defaultWidthUpper the default value which will be used to fill empty witdth entries - upper width <mask> * @param defaultWidthLower the default value which will be used to fill empty witdth entries - lower width <mask> * @returns normalizes <mask> */ <mask> export function N...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
public static NormalizeColorTable(pointCount: number, colors: Color3[], colorDistribution: GreasedLineMeshColorDistribution, defaultColor: Color3 = Color3.White()): Color3[] {
<mask> * @param colorDistribution how to distribute colors if the colors array has fewer entries than pointCount <mask> * @param defaultColor default color to be used to fill empty entries in the color table <mask> * @returns normalized array of Color3 <mask> */ <mask> export function Norma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
/** * Appends the colors to the existing colors of the line instance or sets for the first time. * @param instance line instance * @param colors array of colors */ private static _SetColors(instance: GreasedLineMesh, colors: Color3[]) {
<mask> // colorsTexture.name = name; <mask> // return colorsTexture; <mask> // } <mask> <mask> // eslint-disable-next-line no-inner-declarations <mask> function _setColors(instance: GreasedLineMesh, colors: Color3[]) { <mask> if (instance.material instanceof StandardMaterial ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
const colorsUint8 = GreasedLineMeshBuilder.Color3toUint8(colors); const newColors = GreasedLineMeshBuilder._MergeColorTables(currentColors, colorsUint8);
<mask> if (instance.material instanceof StandardMaterial || instance.material instanceof PBRMaterial) { <mask> if (instance.greasedLineMaterial) { <mask> const currentColors = instance.greasedLineMaterial.getParameters().colors; <mask> if (currentColors) { <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
/** * Merges two color tables. * @param existingColors existing color table * @param colorsToAppend color table to append * @returns */ private static _MergeColorTables(existingColors: Uint8Array, colorsToAppend: Uint8Array) {
<mask> } <mask> } <mask> } <mask> <mask> // eslint-disable-next-line no-inner-declarations <mask> function _appendColorsToExistingColors(existingColors: Uint8Array, colorsToAppend: Uint8Array) { <mask> const tmp = new Uint8Array(existingColors.byteLength + colorsToAppend....
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
/** * Adds or sets the widths on the line instance. * @param instance line instance * @param segmentWidths width table */ private static _SetSegmentWidths(instance: GreasedLineMesh, segmentWidths: number[]) {
<mask> tmp.set(new Uint8Array(colorsToAppend), existingColors.byteLength); <mask> return tmp; <mask> } <mask> <mask> // eslint-disable-next-line no-inner-declarations <mask> function _setSegmentWidths(instance: GreasedLineMesh, segmentWidths: number[]) { <mask> const currentW...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/Builders/graesedLineBuilder.ts
// import { DeepCopier } from "../Misc/deepCopier";
<mask> import { Mesh } from "./mesh"; <mask> import type { Ray, TrianglePickingPredicate } from "../Culling/ray"; <mask> import { Buffer, VertexBuffer } from "../Buffers/buffer"; <mask> import { VertexData } from "./mesh.vertexData"; <mask> import { DeepCopier } from "../Misc/deepCopier"; <mask> import { PickingI...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
import type { Nullable } from "../types"; import type { Node } from "../node";
<mask> import { VertexData } from "./mesh.vertexData"; <mask> // import { DeepCopier } from "../Misc/deepCopier"; <mask> import { PickingInfo } from "../Collisions/pickingInfo"; <mask> <mask> export type GreasedLinePoints = Vector3[] | Vector3[][] | Float32Array | Float32Array[] | number[][]; <mask> <mask> exp...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
<mask> widthsDistribution?: number; <mask> offsets?: number[]; <mask> instance?: GreasedLineMesh; <mask> updatable?: boolean; <mask> materialType?: GreasedLineMeshMaterialType; <mask> } <mask> <mask> export enum GreasedLineMeshColorDistribution { <mask> COLOR_DISTRIBUTION_NONE = 0, <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
<mask> WIDTH_DISTRIBUTION_END = 4, <mask> WIDTH_DISTRIBUTION_START_END = 5, <mask> } <mask> <mask> export enum GreasedLineMeshMaterialType { <mask> MATERIAL_TYPE_STANDARD = 0, <mask> MATERIAL_TYPE_PBR = 1, <mask> } <mask> <mask> export enum GreasedLineMeshColorMode { <mask> COLOR_MODE_S...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
<mask> MATERIAL_TYPE_STANDARD = 0, <mask> MATERIAL_TYPE_PBR = 1, <mask> } <mask> <mask> export enum GreasedLineMeshColorMode { <mask> COLOR_MODE_SET = 0, <mask> COLOR_MODE_ADD = 1, <mask> COLOR_MODE_MULTIPLY = 2, <mask> } <mask> <mask> export class GreasedLineMesh extends Mesh { <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
private _offsets?: number[];
<mask> } <mask> <mask> export class GreasedLineMesh extends Mesh { <mask> private _vertexPositions: number[]; <mask> private _offset?: number[]; <mask> private _previous: number[]; <mask> private _next: number[]; <mask> private _side: number[]; <mask> private _widths: number[]; <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
this._offsets = [..._parameters.offsets];
<mask> this._indices = []; <mask> this._uvs = []; <mask> <mask> if (_parameters.offsets) { <mask> this._offset = [..._parameters.offsets]; <mask> } <mask> this._previous = []; <mask> this._next = []; <mask> this._side = []; <mask> th...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
<mask> } <mask> } <mask> <mask> public dispose() { <mask> super.dispose(); <mask> this.greasedLineMaterial?.dispose(); <mask> } <mask> <mask> public isLazy() { <mask> return this._lazy; </s> Tiding up interfaces & JDoc </s> remove return this._widths;...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
this.material?.dispose(); super.dispose();
<mask> <mask> public dispose() { <mask> this.greasedLineMaterial?.dispose(); <mask> } <mask> <mask> public isLazy() { <mask> return this._lazy; <mask> } </s> Tiding up interfaces & JDoc </s> remove super.dispose(); </s> add </s> remove return this._widths; <...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
return this._widths; // TODO: clone?
<mask> return this._lazy; <mask> } <mask> <mask> public getSegmentWidths() { <mask> return this._widths; <mask> } <mask> <mask> public get positions() { <mask> return this._vertexPositions; <mask> } </s> Tiding up interfaces & JDoc </s> remove return this...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
return this._vertexPositions; // TODO: clone?
<mask> return this._widths; <mask> } <mask> <mask> public get positions() { <mask> return this._vertexPositions; <mask> } <mask> <mask> public get points() { <mask> return this._points; <mask> } </s> Tiding up interfaces & JDoc </s> remove return this._wi...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
return this._points; // TODO: clone?
<mask> return this._vertexPositions; <mask> } <mask> <mask> public get points() { <mask> return this._points; <mask> } <mask> <mask> public set points(points: number[][]) { <mask> this.setPoints(points); <mask> } </s> Tiding up interfaces & JDoc </s> remove p...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
// public set points(points: number[][]) { // this.setPoints(points); // }
<mask> public get points() { <mask> return this._points; <mask> } <mask> <mask> public set points(points: number[][]) { <mask> this.setPoints(points); <mask> } <mask> <mask> public addPoints(points: number[][]) { <mask> const numberPoints = points; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
this._uvs = [] } public clone(name: string = "", newParent?:Nullable<Node>) { return this; // TODO: implement
<mask> this._previous = []; <mask> this._next = []; <mask> this._side = []; <mask> this._indices = []; <mask> this._uvs = []; <mask> } <mask> <mask> /** <mask> * Serializes this ground mesh <mask> * @param serializationObject object to write serializa...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
serializationObject.parameters.points = this._points; serializationObject.parameters.offsets = this._offsets;
<mask> public serialize(serializationObject: any): void { <mask> super.serialize(serializationObject); <mask> serializationObject.parameters = this._parameters; <mask> <mask> const serializedPluginMaterial = this._pluginMaterial.serialize(); <mask> serializationObject.pluginMa...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
// public static Parse(serializedMesh: any, scene: Scene): Mesh {
<mask> * @param serializedMesh the serialized mesh <mask> * @param scene the scene to create the ground mesh in <mask> * @returns the created ground mesh <mask> */ <mask> // public static Parse2(serializedMesh: any, scene: Scene): Mesh { <mask> // const pluginMaterial = GreasedLine...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
if (intersections?.length === 1) {
<mask> skipBoundingInfo?: boolean <mask> ): PickingInfo { <mask> const pickingInfo = new PickingInfo(); <mask> const intersections = this.intersections(ray); <mask> if (intersections) { <mask> const intersection = intersections[0]; <mask> pickingInfo.hi...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
public intersections(ray: Ray, firstOnly = true):{distance: number, point: Vector3, object: GreasedLineMesh}[] | undefined {
<mask> * @param ray <mask> * @param firstOnly <mask> * @returns <mask> */ <mask> public intersections(ray: Ray, firstOnly = true):{distance: number, point: Vector3, index: number, object: GreasedLineMesh}[] | undefined { <mask> if (this._boundingSphere && ray.intersectsSphere(this....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
if (this._offsets) { vOffsetStart.fromArray(this._offsets, a * 3); vOffsetEnd.fromArray(this._offsets, b * 3);
<mask> <mask> vStart.fromArray(positions, a * 3); <mask> vEnd.fromArray(positions, b * 3); <mask> <mask> if (this._offset) { <mask> vOffsetStart.fromArray(this._offset, a * 3); <mask> vOffsetEnd.fromArray(this._offset, b * ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
<mask> if (distance !== -1) { <mask> intersects.push({ <mask> distance: distance, <mask> point: ray.direction.normalize().multiplyByFloats(distance, distance, distance).add(ray.origin), <mask> index: i, <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
if (firstOnly) { return intersects; }
<mask> object: this, <mask> }); <mask> } <mask> } <mask> i = l; <mask> } <mask> <mask> return intersects; </s> Tiding up interfaces & JDoc </s> remove index: i, </s> add </s> remove ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
private static _CompareV3(positionIdx1: number, positionIdx2: number, positions: number[]) {
<mask> const boundingInfo = this.getBoundingInfo(); <mask> this._boundingSphere.reConstruct(boundingInfo.minimum, boundingInfo.maximum, this._matrixWorld); <mask> } <mask> <mask> private _compareV3(positionIdx1: number, positionIdx2: number, positions: number[]) { <mask> const arr...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
private static _CopyV3(positionIdx: number, positions: number[]) {
<mask> const arrayIdx2 = positionIdx2 * 6; <mask> return positions[arrayIdx1] === positions[arrayIdx2] && positions[arrayIdx1 + 1] === positions[arrayIdx2 + 1] && positions[arrayIdx1 + 2] === positions[arrayIdx2 + 2]; <mask> } <mask> <mask> private _copyV3(positionIdx: number, positions: n...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
if (GreasedLineMesh._CompareV3(0, l - 1, positions)) { v = GreasedLineMesh._CopyV3(l - 2, positions);
<mask> const next = []; <mask> const side = []; <mask> const uvs = []; <mask> <mask> if (this._compareV3(0, l - 1, positions)) { <mask> v = this._copyV3(l - 2, positions); <mask> } else { <mask> v = this._copyV3(0, positions); <mask> } <...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
v = GreasedLineMesh._CopyV3(0, positions);
<mask> <mask> if (this._compareV3(0, l - 1, positions)) { <mask> v = this._copyV3(l - 2, positions); <mask> } else { <mask> v = this._copyV3(0, positions); <mask> } <mask> previous.push(v[0], v[1], v[2]); <mask> previous.push(v[0], v[1], v[2]); <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
v = GreasedLineMesh._CopyV3(j, positions);
<mask> uvs.push(j / (l - 1), 0); <mask> uvs.push(j / (l - 1), 1); <mask> <mask> if (j < l - 1) { <mask> v = this._copyV3(j, positions); <mask> previous.push(v[0], v[1], v[2]); <mask> previous.push(v[0], v[1], v[2]); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
v = GreasedLineMesh._CopyV3(j, positions);
<mask> previous.push(v[0], v[1], v[2]); <mask> previous.push(v[0], v[1], v[2]); <mask> } <mask> if (j > 0) { <mask> v = this._copyV3(j, positions); <mask> next.push(v[0], v[1], v[2]); <mask> next.push(v[0], v[...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
if (GreasedLineMesh._CompareV3(l - 1, 0, positions)) { v = GreasedLineMesh._CopyV3(1, positions);
<mask> next.push(v[0], v[1], v[2]); <mask> } <mask> } <mask> <mask> if (this._compareV3(l - 1, 0, positions)) { <mask> v = this._copyV3(1, positions); <mask> } else { <mask> v = this._copyV3(l - 1, positions); <mask> } <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
v = GreasedLineMesh._CopyV3(l - 1, positions);
<mask> <mask> if (this._compareV3(l - 1, 0, positions)) { <mask> v = this._copyV3(1, positions); <mask> } else { <mask> v = this._copyV3(l - 1, positions); <mask> } <mask> next.push(v[0], v[1], v[2]); <mask> next.push(v[0], v[1], v[2]); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
if (this._offsets) { const offsetBuffer = new Buffer(engine, this._offsets, this._updatable, 3);
<mask> const widthBuffer = new Buffer(engine, this._widths, this._updatable, 1); <mask> this.setVerticesBuffer(widthBuffer.createVertexBuffer("widths", 0, 1)); <mask> this._widthsBuffer = widthBuffer; <mask> <mask> if (this._offset) { <mask> const offsetBuffer = new Bu...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
// const parameters = {}; // DeepCopier.DeepCopy(this._parameters, parameters); return this._parameters; // TODO: DeepCopy
<mask> } <mask> } <mask> <mask> public getParameters() { <mask> const parameters = {}; <mask> DeepCopier.DeepCopy(this._parameters, parameters); <mask> return parameters; <mask> } <mask> <mask> public setOffsets(offsets: number[]) { <mask> this._offse...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69ab20ba592409b6dcd6b1a0d2723ddfa8a08055
packages/dev/core/src/Meshes/greasedLineMesh.ts
try {
<mask> if (this._teleportationRequested && !this._teleportationEnabledOnRightController) { <mask> this._enableTeleportationOnController(webVRController); <mask> } <mask> } <mask> if (this.onControllerMeshLoaded) { <mask> t...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
} catch (err) { Tools.Warn("Error in your custom logic onControllerMeshLoaded: " + err);
<mask> } <mask> } <mask> try { <mask> this.onControllerMeshLoaded.notifyObservers(webVRController); <mask> } <mask> } <mask> <mask> private _onFullscreenChange() { <mask> if (document.fullscreen !== undefined) { <...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
try { this.onEnteringVR.notifyObservers({}); } catch (err) { Tools.Warn("Error in your custom logic onEnteringVR: " + err); }
<mask> this._position = this._scene.activeCamera.position.clone(); <mask> } <mask> <mask> if (this.onEnteringVR) { <mask> this.onEnteringVR.notifyObservers({}); <mask> } <mask> if (this._webVRrequesting) <mask> retu...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
try { this.onExitingVR.notifyObservers({}); } catch (err) { Tools.Warn("Error in your custom logic onExitingVR: " + err); }
<mask> * Attempt to exit VR, or fullscreen. <mask> */ <mask> public exitVR() { <mask> if (this.onExitingVR) { <mask> this.onExitingVR.notifyObservers({}); <mask> } <mask> if (this._webVRpresenting) { <mask> this._scene...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
public enableInteractions() { if (!this._interactionsEnabled) { this._interactionsRequested = true;
<mask> this._scene.activeCamera.position = value; <mask> } <mask> } <mask> <mask> public enableTeleportation(vrTeleportationOptions: VRTeleportationOptions = {}) { <mask> this._teleportationRequested = true; <mask> <mask> if (vrTeleportationO...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._leftControllerReady && this._webVRCamera.leftController) { this._enableInteractionOnController(this._webVRCamera.leftController) } if (this._rightControllerReady && this._webVRCamera.rightController) { this._enableInte...
<mask> <mask> public enableTeleportation(vrTeleportationOptions: VRTeleportationOptions = {}) { <mask> this._teleportationRequested = true; <mask> <mask> if (vrTeleportationOptions) { <mask> if (vrTeleportationOptions.floorMeshName) { <mask> t...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
<mask> if (vrTeleportationOptions) { <mask> if (vrTeleportationOptions.floorMeshName) { <mask> this._floorMeshName = vrTeleportationOptions.floorMeshName; <mask> } <mask> } <mask> <mask> if (this._leftControllerReady && this...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this._createGazeTracker();
<mask> this._floorMeshName = vrTeleportationOptions.floorMeshName; <mask> } <mask> } <mask> <mask> if (this._leftControllerReady && this._webVRCamera.leftController) { <mask> this._enableTeleportationOnController(this._webVRCamera.leftCo...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this.raySelectionPredicate = (mesh) => { return true; }
<mask> if (this._rightControllerReady && this._webVRCamera.rightController) { <mask> this._enableTeleportationOnController(this._webVRCamera.rightController) <mask> } <mask> <mask> this._scene.gamepadManager.onGamepadConnectedObservable.add((pad) => this._onNewG...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this.meshSelectionPredicate = (mesh) => { return true; }
<mask> } <mask> <mask> this._scene.gamepadManager.onGamepadConnectedObservable.add((pad) => this._onNewGamepadConnected(pad)); <mask> <mask> // Creates an image processing post process for the vignette not relying <mask> // on the main scene configuration for imag...
[ "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/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this._raySelectionPredicate = (mesh) => { if (this._isTeleportationFloor(mesh) || (mesh.isVisible && mesh.name.indexOf("gazeTracker") === -1 && mesh.name.indexOf("teleportationCircle") === -1 && mesh.name.indexOf("torusTelep...
<mask> imageProcessingConfiguration); <mask> <mask> this._webVRCamera.detachPostProcess(this._postProcessMove) <mask> <mask> this._passProcessMove = new BABYLON.PassPostProcess("pass", 1.0, this._webVRCamera); <mask> <mask> this._createGazeTracke...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this._scene.registerBeforeRender(() => { this._castRayAndSelectObject(); });
<mask> this._webVRCamera.detachPostProcess(this._postProcessMove) <mask> <mask> this._passProcessMove = new BABYLON.PassPostProcess("pass", 1.0, this._webVRCamera); <mask> <mask> this._createGazeTracker(); <mask> this._createTeleportationCircles(); <mask> <mask...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this._interactionsEnabled = true;
<mask> <mask> this._createGazeTracker(); <mask> this._createTeleportationCircles(); <mask> <mask> this.raySelectionPredicate = (mesh) => { <mask> return true; <mask> } <mask> <mask> this.meshSelectionPredicate = (mesh) => { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
}
<mask> }); <mask> <mask> this._interactionsEnabled = true; <mask> } <mask> <mask> private _isTeleportationFloor(mesh: AbstractMesh): boolean { <mask> for (var i=0; i<this._floorMeshesCollection.length; i++) { <mask> if (this._floo...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
private _isTeleportationFloor(mesh: AbstractMesh): boolean { for (var i=0; i<this._floorMeshesCollection.length; i++) { if (this._floorMeshesCollection[i].id === mesh.id) { return true; } } if (this._floorMeshName && m...
<mask> this.raySelectionPredicate = (mesh) => { <mask> return true; <mask> } <mask> <mask> this.meshSelectionPredicate = (mesh) => { <mask> return true; <mask> } <mask> <mask> this._raySelectionPredicate = (mesh) => {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
return false; } public enableTeleportation(vrTeleportationOptions: VRTeleportationOptions = {}) { if (!this._teleportationEnabled) { this._teleportationRequested = true;
<mask> if (this._floorMeshName && mesh.name.indexOf(this._floorMeshName) !== -1) { <mask> return true; <mask> } <mask> <mask> this.enableInteractions(); <mask> <mask> if (vrTeleportationOptions) { <mask> if...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this.enableInteractions(); if (vrTeleportationOptions) { if (vrTeleportationOptions.floorMeshName) { this._floorMeshName = vrTeleportationOptions.floorMeshName; } if (vrTeleportationOpt...
<mask> this.meshSelectionPredicate = (mesh) => { <mask> return true; <mask> } <mask> <mask> this._raySelectionPredicate = (mesh) => { <mask> if (mesh.name.indexOf(this._floorMeshName) !== -1 || (mesh.isVisible && mesh.name.indexOf("gazeTracker")...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
<mask> && mesh.name.indexOf("torusTeleportation") === -1 <mask> && mesh.name.indexOf("laserPointer") === -1)) { <mask> return this.raySelectionPredicate(mesh); <mask> } <mask> return false; <mask> } <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._leftControllerReady && this._webVRCamera.leftController) { this._enableTeleportationOnController(this._webVRCamera.leftController) } if (this._rightControllerReady && this._webVRCamera.rightController) { this._enableTe...
<mask> } <mask> return false; <mask> } <mask> <mask> this._scene.registerBeforeRender(() => { <mask> this._castRayAndSelectObject(); <mask> }); <mask> } <mask> <mask> private _onNewGamepadConnected(gamepad: G...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._teleportationEnabled) { // Listening to classic/xbox gamepad only if no VR controller is active if ((!this._leftLaserPointer && !this._rightLaserPointer) || ((this._leftLaserPointer && !this._le...
<mask> private _onNewGamepadConnected(gamepad: Gamepad) { <mask> if (gamepad.type !== BABYLON.Gamepad.POSE_ENABLED) { <mask> if (gamepad.leftStick) { <mask> gamepad.onleftstickchanged((stickValues) => { <mask> // Listening to classic/x...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
else { if (stickValues.y > -this._padSensibilityDown) { if (this._teleportationAllowed) { this._teleportCamera(); } ...
<mask> if (!this._teleportationRequestInitiated) { <mask> if (stickValues.y < -this._padSensibilityUp) { <mask> this._teleportationRequestInitiated = true; <mask> } <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
<mask> if (stickValues.y > -this._padSensibilityDown) { <mask> if (this._teleportationAllowed) { <mask> this._teleportCamera(); <mask> } <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._teleportationEnabled) { if (!this._rotationLeftAsked) { if (stickValues.x < -this._padSensibilityUp) { this._rotationLeftAsked = true; if (this._rotat...
<mask> }); <mask> } <mask> if (gamepad.rightStick) { <mask> gamepad.onrightstickchanged((stickValues) => { <mask> if (!this._rotationLeftAsked) { <mask> if (stickValues.x < -this._padSensibi...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
else { if (stickValues.x > -this._padSensibilityDown) { this._rotationLeftAsked = false; }
<mask> if (this._rotationAllowed) { <mask> this._rotateCamera(false); <mask> } <mask> } <mask> } <mask> else { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (!this._rotationRightAsked) { if (stickValues.x > this._padSensibilityUp) { this._rotationRightAsked = true; if (this._rotationAllowed) { thi...
<mask> else { <mask> if (stickValues.x > -this._padSensibilityDown) { <mask> this._rotationLeftAsked = false; <mask> } <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
else { if (stickValues.x < this._padSensibilityDown) { this._rotationRightAsked = false; }
<mask> if (this._rotationAllowed) { <mask> this._rotateCamera(true); <mask> } <mask> } <mask> } <mask> else { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._interactionsEnabled && buttonPressed === Xbox360Button.A) {
<mask> }); <mask> } <mask> if (gamepad.type === BABYLON.Gamepad.XBOX) { <mask> (<Xbox360Pad>gamepad).onbuttondown((buttonPressed: Xbox360Button) => { <mask> if (buttonPressed === Xbox360Button.A) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._interactionsEnabled && buttonPressed === Xbox360Button.A) {
<mask> } <mask> } <mask> }); <mask> (<Xbox360Pad>gamepad).onbuttonup((buttonPressed: Xbox360Button) => { <mask> if (buttonPressed === Xbox360Button.A) { <mask> if (this._...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
private _enableInteractionOnController(webVRController: WebVRController) {
<mask> } <mask> } <mask> } <mask> <mask> private _enableTeleportationOnController(webVRController: WebVRController) { <mask> var controllerMesh = webVRController.mesh; <mask> if (controllerMesh) { <mask> var childMeshes = contr...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this._interactionsEnabledOnLeftController = true;
<mask> laserPointer.isVisible = false; <mask> if (webVRController.hand === "left") { <mask> this._leftLaserPointer = laserPointer; <mask> } <mask> else { <mask> this._rightLaserPointer = laserPointer; <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this._interactionsEnabledOnRightController = true;
<mask> } <mask> else { <mask> this._rightLaserPointer = laserPointer; <mask> } <mask> webVRController.onMainButtonStateChangedObservable.add((stateObject) => { <mask> // Enabling / disabling laserPointer <mas...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._displayLaserPointer && stateObject.value === 1) {
<mask> this._rightLaserPointer = laserPointer; <mask> } <mask> webVRController.onMainButtonStateChangedObservable.add((stateObject) => { <mask> // Enabling / disabling laserPointer <mask> if (stateObject.value === 1) { <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._displayLaserPointer && webVRController.hand === "left" && this._leftLaserPointer) {
<mask> webVRController.onPadValuesChangedObservable.add((stateObject) => { <mask> if (!this._teleportationRequestInitiated) { <mask> if (stateObject.y < -this._padSensibilityUp) { <mask> // If laser pointer wasn't enabled yet <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
else if (this._displayLaserPointer && this._rightLaserPointer) {
<mask> if (this._rightLaserPointer) { <mask> this._rightLaserPointer.isVisible = false; <mask> } <mask> } <mask> else if (this._rightLaserPointer) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
<mask> this._rotationRightAsked = false; <mask> } <mask> } <mask> }); <mask> webVRController.onTriggerStateChangedObservable.add((stateObject) => { <mask> if (!this._pointerDownOnMeshAsked) ...
[ "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/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
this._gazeTracker.isVisible = false;
<mask> this._gazeTracker.bakeCurrentTransformIntoVertices(); <mask> this._gazeTracker.isPickable = false; <mask> <mask> var targetMat = new BABYLON.StandardMaterial("targetMat", this._scene); <mask> targetMat.specularColor = BABYLON.Color3.Black(); <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
if (this._teleportationEnabled) { this._teleportationCircle.isVisible = true; (<Mesh>this._teleportationCircle.getChildren()[0]).isVisible = true; }
<mask> this._hideTeleportationCircle(); <mask> } <mask> <mask> private _displayTeleportationCircle() { <mask> this._teleportationCircle.isVisible = true; <mask> (<Mesh>this._teleportationCircle.getChildren()[0]).isVisible = true; <mask> } <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/69dce8d907be81a846a0e9ec3b02f1f9d547d61a
src/Cameras/VR/babylon.vrExperienceHelper.ts
<mask> // Draw order <mask> engine.draw(false, subMesh.indexStart, subMesh.indexCount); <mask> } <mask> <mask> public intersects(ray: Ray, fastCheck?: boolean) { <mask> return null; <mask> } <mask> <mask> public dispose(doNotRecurse?: boolea...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Mesh/babylon.linesMesh.ts
extend = Tools.ExtractMinAndMaxIndexed(data, indices, this.indexStart, this.indexCount, this._renderingMesh.geometry.boundingBias);
<mask> if (this.indexStart === 0 && this.indexCount === indices.length) { <mask> //the rendering mesh's bounding info can be used, it is the standard submesh for all indices. <mask> extend = { minimum: this._renderingMesh.getBoundingInfo().minimum.clone(), maximum: this._r...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Mesh/babylon.subMesh.ts
// LineMesh first as it's also a Mesh... if (this._mesh instanceof LinesMesh) { var lineMesh = <LinesMesh>this._mesh;
<mask> <mask> public intersects(ray: Ray, positions: Vector3[], indices: number[] | Int32Array, fastCheck?: boolean): IntersectionInfo { <mask> var intersectInfo: IntersectionInfo = null; <mask> <mask> // Triangles test <mask> for (var index = this.indexStart; index <...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Mesh/babylon.subMesh.ts
// Line test for (var index = this.indexStart; index < this.indexStart + this.indexCount; index += 2) { var p0 = positions[indices[index]]; var p1 = positions[indices[index + 1]];
<mask> var p0 = positions[indices[index]]; <mask> var p1 = positions[indices[index + 1]]; <mask> var p2 = positions[indices[index + 2]]; <mask> <mask> var currentIntersectInfo = ray.intersectsTriangle(p0, p1, p2); <mask> <mask> if ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Mesh/babylon.subMesh.ts
var length = ray.intersectionSegment(p0, p1, lineMesh.intersectionThreshold); if (!length) {
<mask> var p2 = positions[indices[index + 2]]; <mask> <mask> var currentIntersectInfo = ray.intersectsTriangle(p0, p1, p2); <mask> <mask> if (currentIntersectInfo) { <mask> if (currentIntersectInfo.distance < 0) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Mesh/babylon.subMesh.ts
if (fastCheck || !intersectInfo || length < intersectInfo.distance) { intersectInfo = new IntersectionInfo(null, null, length);
<mask> if (currentIntersectInfo.distance < 0) { <mask> continue; <mask> } <mask> <mask> if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) { <mask> intersectInfo = c...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Mesh/babylon.subMesh.ts
public static ExtractMinAndMaxIndexed(positions: number[] | Float32Array, indices: number[] | Int32Array, indexStart: number, indexCount: number, bias: Vector2 = null): { minimum: Vector3; maximum: Vector3 } {
<mask> <mask> return "data:image/png;base64," + output; <mask> } <mask> <mask> public static ExtractMinAndMaxIndexed(positions: number[] | Float32Array, indices: number[] | Int32Array, indexStart: number, indexCount: number): { minimum: Vector3; maximum: Vector3 } { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Tools/babylon.tools.ts
if (bias) { minimum.x -= minimum.x * bias.x + bias.y; minimum.y -= minimum.y * bias.x + bias.y; minimum.z -= minimum.z * bias.x + bias.y; maximum.x += maximum.x * bias.x + bias.y; maximum.y += maximum.y * bias.x + bias.y; ...
<mask> } <mask> <mask> return { <mask> minimum: minimum, <mask> maximum: maximum <mask> }; <mask> } </s> LinesMesh intersection is now supported. Former-commit-id: e7df1ddc0263887c8c4e135b8f7fe06f397b2df6 </s> remove public i...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Tools/babylon.tools.ts
public static ExtractMinAndMax(positions: number[] | Float32Array, start: number, count: number, bias: Vector2 = null): { minimum: Vector3; maximum: Vector3 } {
<mask> maximum: maximum <mask> }; <mask> } <mask> <mask> public static ExtractMinAndMax(positions: number[] | Float32Array, start: number, count: number): { minimum: Vector3; maximum: Vector3 } { <mask> var minimum = new Vector3(Number.MAX_VALUE, Number.MAX...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Tools/babylon.tools.ts
if (bias) { minimum.x -= minimum.x * bias.x + bias.y; minimum.y -= minimum.y * bias.x + bias.y; minimum.z -= minimum.z * bias.x + bias.y; maximum.x += maximum.x * bias.x + bias.y; maximum.y += maximum.y * bias.x + bias.y; ...
<mask> maximum = Vector3.Maximize(current, maximum); <mask> } <mask> <mask> return { <mask> minimum: minimum, <mask> maximum: maximum <mask> }; </s> LinesMesh intersection is now supported. Former-commit-id: e7df1ddc0263887c8...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a057ba059c923b29d206f4365b8c9b4db55ba5c
src/Tools/babylon.tools.ts
const promise = GLTFLoaderExtension._LoadTextureAsync(this, context, textureInfo, assign); if (promise) { return promise; }
<mask> } <mask> <mask> /** @hidden */ <mask> public _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Promise<void> { <mask> const texture = GLTFLoader._GetProperty(`${context}/index`, this._gltf.textures, textureInfo.index); <m...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a214aa7076cc633c45d2b14462097b1bc22276d
loaders/src/glTF/2.0/babylon.glTFLoader.ts
/** Override this method to modify the default behavior for loading textures. */ protected _loadTextureAsync(context: string, textureInfo: ITextureInfo, assign: (texture: Texture) => void): Nullable<Promise<void>> { return null; }
<mask> protected _loadMaterialAsync(context: string, material: _ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> { return null; } <mask> <mask> /** Override this method to modify the default behavior for loading uris. ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/6a214aa7076cc633c45d2b14462097b1bc22276d
loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts