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 |
|---|---|---|---|---|
export { ${exportedItems} };`*/
/*if (moduleName === "core") {
exportsText = `(function() {
var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : this);
globalObject["BABYLON"] = BABYLON;
})();
`*/
| <mask> }
<mask> });
<mask>
<mask> exportsText += `
<mask> export { ${exportedItems} };`
<mask>
<mask> if (file.isNull()) {
<mask> cb(null, file);
<mask> return;
<mask> }
</s> major changes to the way modules are built
Former-commit-id: 0... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulp-es6ModuleExports.js |
file.contents = new Buffer(dependenciesText.concat(new Buffer(String(content).concat(exportsText))));
| <mask> return;
<mask> }
<mask>
<mask> try {
<mask> file.contents = new Buffer(dependenciesText.concat(new Buffer(String(file.contents).concat(exportsText))));
<mask> this.push(file);
<mask> } catch (err) {
<mask> this.emit('error', new gut... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulp-es6ModuleExports.js |
function processDependency(kind, dependency, filesToLoad, firstLevelOnly) {
if (!firstLevelOnly && dependency.dependUpon) { | <mask> var commandLineOptions = minimist(process.argv.slice(2), {
<mask> boolean: "public"
<mask> });
<mask>
<mask> function processDependency(kind, dependency, filesToLoad) {
<mask> if (dependency.dependUpon) {
<mask> for (var i = 0; i < dependency.dependUpon.length; i++) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulpfile.js |
processDependency("shaders", config.workloads[moduleName], shadersFiles, true); | <mask>
<mask> Object.keys(config.workloads)
<mask> .forEach((moduleName) => {
<mask> let shadersFiles = [];
<mask> processDependency("shaders", config.workloads[moduleName], shadersFiles);
<mask> for (var index = 0; index < shadersFiles.length; index++) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulpfile.js |
processDependency("shaderIncludes", config.workloads[moduleName], shaderIncludeFiles, true); | <mask> shadersFiles[index] = "../../src/Shaders/" + shadersFiles[index] + ".fx";
<mask> }
<mask>
<mask> let shaderIncludeFiles = [];
<mask> processDependency("shaderIncludes", config.workloads[moduleName], shaderIncludeFiles);
<mask> for (var index ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulpfile.js |
/*let jsTask = merge2([ | <mask> shaderIncludeFiles[index] = "../../src/Shaders/ShadersInclude/" + shaderIncludeFiles[index] + ".fx";
<mask> }
<mask>
<mask> //commonjs js generation task
<mask> let jsTask = merge2([
<mask> gulp.src(config.workloads[moduleName].files),
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulpfile.js |
.pipe(gulp.dest(config.build.outputDirectory + '/modules/' + moduleName + '/'));*/
| <mask> .pipe(replace(extendsSearchRegex, ""))
<mask> .pipe(replace(decorateSearchRegex, ""))
<mask> .pipe(replace(referenceSearchRegex, ""))
<mask> .pipe(babylonModuleExports(moduleName, config.workloads[moduleName].dependUpon))
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulpfile.js |
/*let es6Task = merge2([ | <mask> .pipe(babylonModuleExports(moduleName, config.workloads[moduleName].dependUpon))
<mask> .pipe(gulp.dest(config.build.outputDirectory + '/modules/' + moduleName + '/'));
<mask>
<mask> // es6 modules generation task
<mask> let es6Task = merge2([
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulpfile.js |
*/
tasks.push(commonJsTask, es6Tasks); | <mask> .pipe(replace(/declare module BABYLON {/g, `declare module 'babylonjs/${moduleName}' {`))
<mask> .pipe(replace(/\ninterface /g, `\nexport interface `))
<mask> .pipe(dtsModuleSupport(moduleName, true, declared, perFile, dependencyTree))
<mask> .p... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f8ff650e620a101cc541a96277fcdb5d503c4fae | Tools/Gulp/gulpfile.js |
mesh = GroundMesh.Parse(parsedMesh, scene);
| <mask> public static Parse(parsedMesh: any, scene: Scene, rootUrl: string): Mesh {
<mask> var mesh : Mesh;
<mask>
<mask> if (parsedMesh.type && parsedMesh.type === "GroundMesh") {
<mask> mesh = new GroundMesh(parsedMesh.name, scene);
<mask> } else {
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f965af501c7e936487421c272bd754f87a6110f2 | src/Mesh/babylon.mesh.ts |
// Geometry
var geometry = mesh._geometry;
| <mask>
<mask> var serializeMesh = (mesh: Mesh, serializationScene: any): any => {
<mask> var serializationObject: any = {};
<mask>
<mask> serializationObject.name = mesh.name;
<mask> serializationObject.id = mesh.id;
<mask> serializationObject.type = mesh.getClassName();
<m... | [
"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/f965af501c7e936487421c272bd754f87a6110f2 | src/Tools/babylon.sceneSerializer.ts |
if (!mesh.getScene().getGeometryByID(geometry.id)) {
// Geometry was in the memory but not added to the scene, nevertheless it's better to serialize to be able to reload the mesh with its geometry
| <mask>
<mask> // Geometry
<mask> var geometry = mesh._geometry;
<mask> if (geometry) {
<mask> var geometryId = geometry.id;
<mask> serializationObject.geometryId = geometryId;
<mask>
<mask> if (!mesh.getScene().getGeometryByID(geometryId)) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f965af501c7e936487421c272bd754f87a6110f2 | src/Tools/babylon.sceneSerializer.ts |
<mask> if (!mesh.getScene().getGeometryByID(geometryId)) {
<mask> // geometry was in the memory but not added to the scene, nevertheless it's better to serialize to be able to reload the mesh with its geometry
<mask> serializeGeometry(geometry, serializationScene.geometrie... | [
"keep",
"keep",
"keep",
"keep",
"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/f965af501c7e936487421c272bd754f87a6110f2 | src/Tools/babylon.sceneSerializer.ts | |
// Custom
if (mesh.serialize) {
mesh.serialize(serializationObject);
| <mask> });
<mask> }
<mask> }
<mask>
<mask> // Material
<mask> if (mesh.material) {
<mask> serializationObject.materialId = mesh.material.id;
<mask> } else {
<mask> mesh.material = null;
<mask> }
<mask>
<mask> ... | [
"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/f965af501c7e936487421c272bd754f87a6110f2 | src/Tools/babylon.sceneSerializer.ts |
@serialize()
public get autoGenerateTime(): boolean {
return this._autoGenerateTime;
}
public set autoGenerateTime(value: boolean) {
this._autoGenerateTime = value;
}
| <mask> new Color3(0.0, 0.2, 0.9)
<mask> ];
<mask> }
<mask>
<mask> @serializeAsColor3()
<mask> public get fireColors(): Color3[] {
<mask> return this._fireColors;
<mask> }
<mask>
<mask> public set fireColors(value: Color3[]) {
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/fa451edde5bfd065139a530a181543aa8acb7cc5 | proceduralTexturesLibrary/src/fire/babylon.fireProceduralTexture.ts |
serializationObject.fireColors = [];
for (var i = 0; i < this._fireColors.length; i++) {
serializationObject.fireColors.push(this._fireColors[i].asArray());
}
| <mask> var serializationObject = SerializationHelper.Serialize(this, super.serialize());
<mask> serializationObject.customType = "BABYLON.FireProceduralTexture";
<mask>
<mask> return serializationObject;
<mask> }
<mask>
<mask> /**
<mask> * Creates a... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/fa451edde5bfd065139a530a181543aa8acb7cc5 | proceduralTexturesLibrary/src/fire/babylon.fireProceduralTexture.ts |
var colors: Color3[] = [];
for (var i = 0; i < parsedTexture.fireColors.length; i++) {
colors.push(Color3.FromArray(parsedTexture.fireColors[i]));
}
texture.fireColors = colors;
| <mask> public static Parse(parsedTexture: any, scene: Scene, rootUrl: string): FireProceduralTexture {
<mask> var texture = SerializationHelper.Parse(() => new FireProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, ro... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/fa451edde5bfd065139a530a181543aa8acb7cc5 | proceduralTexturesLibrary/src/fire/babylon.fireProceduralTexture.ts |
<mask> this.setColor3("herb3Color", this._grassColors[2]);
<mask> this.setColor3("groundColor", this._groundColor);
<mask> }
<mask>
<mask> @serializeAsColor3()
<mask> public get grassColors(): Color3[] {
<mask> return this._grassColors;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/fa451edde5bfd065139a530a181543aa8acb7cc5 | proceduralTexturesLibrary/src/grass/babylon.grassProceduralTexture.ts | |
serializationObject.grassColors = [];
for (var i = 0; i < this._grassColors.length; i++) {
serializationObject.grassColors.push(this._grassColors[i].asArray());
}
| <mask> serializationObject.customType = "BABYLON.GrassProceduralTexture";
<mask>
<mask> return serializationObject;
<mask> }
<mask>
<mask> /**
<mask> * Creates a Grass Procedural Texture from parsed grass procedural texture data
<mask> * @param parsedT... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/fa451edde5bfd065139a530a181543aa8acb7cc5 | proceduralTexturesLibrary/src/grass/babylon.grassProceduralTexture.ts |
var colors: Color3[] = [];
for (var i = 0; i < parsedTexture.grassColors.length; i++) {
colors.push(Color3.FromArray(parsedTexture.grassColors[i]));
}
texture.grassColors = colors;
| <mask> */
<mask> public static Parse(parsedTexture: any, scene: Scene, rootUrl: string): GrassProceduralTexture {
<mask> var texture = SerializationHelper.Parse(() => new GrassProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), pa... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/fa451edde5bfd065139a530a181543aa8acb7cc5 | proceduralTexturesLibrary/src/grass/babylon.grassProceduralTexture.ts |
public timeScale: number = 1.0; | <mask> @serialize()
<mask> public time: number = 0.0;
<mask>
<mask> @serialize()
<mask> public speed: number = 1.0;
<mask>
<mask> @serialize()
<mask> public translationSpeed: number = 1.0;
<mask>
<mask> private _currentTranslation: number = 0;
</s> F... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/fa451edde5bfd065139a530a181543aa8acb7cc5 | proceduralTexturesLibrary/src/perlinNoise/babylon.perlinNoiseProceduralTexture.ts |
this.setFloat("time", this.time * this.timeScale / 1000); | <mask> }
<mask> var deltaTime = scene.getEngine().getDeltaTime();
<mask>
<mask> this.time += deltaTime;
<mask> this.setFloat("time", this.time * this.speed / 1000);
<mask>
<mask> this._currentTranslation += deltaTime * this.translationSpeed / 1000.0;
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/fa451edde5bfd065139a530a181543aa8acb7cc5 | proceduralTexturesLibrary/src/perlinNoise/babylon.perlinNoiseProceduralTexture.ts |
effect.setTextureFromPostProcessOutput("originalColor", this._originalColorPostProcess);
| <mask>
<mask> this._ssaoCombinePostProcess.onApply = (effect: Effect) => {
<mask> let viewport = this._scene.activeCamera!.viewport;
<mask> effect.setVector4("viewport", TmpVectors.Vector4[0].copyFromFloats(viewport.x, viewport.y, viewport.width, viewport.height));
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/facf3dda8ec5f2d494eb1ea95bee557ebed00eb4 | src/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.ts |
if (firstCameraPP && this._postProcesses.length) {
| <mask> */
<mask> public _afterCameraDraw() {
<mask> if (this._enabled) {
<mask> const firstCameraPP = this._scene.activeCamera && this._scene.activeCamera._getFirstPostProcess();
<mask> if (firstCameraPP) {
<mask> this._scene.postProcessManager._prepareFram... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/facf3dda8ec5f2d494eb1ea95bee557ebed00eb4 | src/Rendering/prePassRenderer.ts |
let isIPPAlreadyPresent = false;
if (this._scene.activeCamera?._postProcesses) {
for (let i = 0; i < this._scene.activeCamera._postProcesses.length; i++) {
if (this._scene.activeCamera._postProcesses[i] instanceof ImageProcessingPostProcess) {
isIPPAlr... | <mask> if (!this.imageProcessingPostProcess) {
<mask> this._createCompositionEffect();
<mask> }
<mask>
<mask> this._postProcesses.push(this.imageProcessingPostProcess);
<mask> this._bindPostProcessChain();
<mask> this._setState(true);
<mask> }
<mask>
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/facf3dda8ec5f2d494eb1ea95bee557ebed00eb4 | src/Rendering/prePassRenderer.ts |
if (this._postProcesses.length) {
this._postProcesses[0].inputTexture = this.prePassRT.getInternalTexture()!;
} else {
const pp = this._scene.activeCamera?._getFirstPostProcess();
if (pp) {
pp.inputTexture = this.prePassRT.getInternalTexture()!;
... | <mask> }
<mask> }
<mask>
<mask> private _bindPostProcessChain() {
<mask> this._postProcesses[0].inputTexture = this.prePassRT.getInternalTexture()!;
<mask> }
<mask>
<mask> /**
<mask> * Marks the prepass renderer as dirty, triggering a check if the prepass is necessary for... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/facf3dda8ec5f2d494eb1ea95bee557ebed00eb4 | src/Rendering/prePassRenderer.ts |
this._debugCanvasWidth = 320;
this._debugCanvasHeight = 200; | <mask> function Analyser(scene) {
<mask> this.SMOOTHING = 0.75;
<mask> this.FFT_SIZE = 512;
<mask> this.BARGRAPHAMPLITUDE = 256;
<mask> this.DEBUGCANVASPOS = { x: 20, y: 20 };
<mask> this.DEBUGCANVASSIZE = { width: 320, height: 200 };
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.js |
this._debugCanvas.width = this._debugCanvasWidth;
this._debugCanvas.height = this._debugCanvasHeight; | <mask> var _this = this;
<mask> if (this._audioEngine.canUseWebAudio) {
<mask> if (!this._debugCanvas) {
<mask> this._debugCanvas = document.createElement("canvas");
<mask> this._debugCanvas.width = this.DEBUGCANVASSIZE.width;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.js |
this._debugCanvas.style.top = "30px";
this._debugCanvas.style.left = "10px"; | <mask> this._debugCanvas = document.createElement("canvas");
<mask> this._debugCanvas.width = this.DEBUGCANVASSIZE.width;
<mask> this._debugCanvas.height = this.DEBUGCANVASSIZE.height;
<mask> this._debugCanvas.style.position = "absolute... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.js |
this._debugCanvasContext.fillRect(0, 0, this._debugCanvasWidth, this._debugCanvasHeight); | <mask> if (this._registerFunc) {
<mask> var workingArray = this.getByteFrequencyData();
<mask>
<mask> this._debugCanvasContext.fillStyle = 'rgb(0, 0, 0)';
<mask> this._debugCanvasContext.fillRect(0, 0, this.DEBUGCANVASSIZE.width, this.DEB... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.js |
var height = this._debugCanvasHeight * percent;
var offset = this._debugCanvasHeight - height - 1;
var barWidth = this._debugCanvasWidth / this.getFrequencyBinCount(); | <mask>
<mask> for (var i = 0; i < this.getFrequencyBinCount(); i++) {
<mask> var value = workingArray[i];
<mask> var percent = value / this.BARGRAPHAMPLITUDE;
<mask> var height = this.DEBUGCANVASSIZE.height * percent;
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.js |
if (this._audioEngine.canUseWebAudio) {
return this._webAudioAnalyser.frequencyBinCount;
}
else {
return 0;
} | <mask> }
<mask> }
<mask>
<mask> public getFrequencyBinCount(): number {
<mask> return this._webAudioAnalyser.frequencyBinCount;
<mask> }
<mask>
<mask> public getByteFrequencyData(): Uint8Array {
<mask> this._webAudioAnalyser.smoothingTimeCon... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.ts |
if (this._audioEngine.canUseWebAudio) {
this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING;
this._webAudioAnalyser.fftSize = this.FFT_SIZE;
this._webAudioAnalyser.getByteFrequencyData(this._byteFreqs);
} | <mask> return this._webAudioAnalyser.frequencyBinCount;
<mask> }
<mask>
<mask> public getByteFrequencyData(): Uint8Array {
<mask> this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING;
<mask> this._webAudioAnalyser.fftSize = this.FFT_SIZE;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.ts |
if (this._audioEngine.canUseWebAudio) {
this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING;
this._webAudioAnalyser.fftSize = this.FFT_SIZE;
this._webAudioAnalyser.getByteTimeDomainData(this._byteTime);
} | <mask> return this._byteFreqs;
<mask> }
<mask>
<mask> public getByteTimeDomainData(): Uint8Array {
<mask> this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING;
<mask> this._webAudioAnalyser.fftSize = this.FFT_SIZE;
<mask> this._webAudioAna... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.ts |
if (this._audioEngine.canUseWebAudio) {
this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING;
this._webAudioAnalyser.fftSize = this.FFT_SIZE;
this._webAudioAnalyser.getFloatFrequencyData(this._floatFreqs);
} | <mask> return this._byteTime;
<mask> }
<mask>
<mask> public getFloatFrequencyData(): Uint8Array {
<mask> this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING;
<mask> this._webAudioAnalyser.fftSize = this.FFT_SIZE;
<mask> this._webAudioAnal... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.analyser.ts |
<mask> this.masterGain.gain.value = 1;
<mask> this.masterGain.connect(this.audioContext.destination);
<mask> }
<mask> }
<mask> AudioEngine.prototype.dispose = function () {
<mask> if (this.canUseWebAudio) {
<mask> if (this._c... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.audioengine.js | |
<mask> }
<mask> };
<mask>
<mask> AudioEngine.prototype.connectToAnalyser = function (analyser) {
<mask> if (this._connectedAnalyser) {
<mask> this._connectedAnalyser.stopDebugCanvas();
<mask> }
<mask> this._connectedAnalyser = anal... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.audioengine.js | |
analyser.connectAudioNodes(this.masterGain, this.audioContext.destination); | <mask> }
<mask> this._connectedAnalyser = analyser;
<mask> if (this.canUseWebAudio) {
<mask> this.masterGain.disconnect();
<mask> this._connectedAnalyser.connectAudioNodes(this.masterGain, this.audioContext.destination);
<mask> }
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.audioengine.js |
this.startTime = 0;
this.startOffset = 0; | <mask> this.rolloffFactor = 1;
<mask> this.maxDistance = 100;
<mask> this.distanceModel = "linear";
<mask> this.panningModel = "HRTF";
<mask> this._startTime = 0;
<mask> this._startOffset = 0;
<mask> this._position = BABYLON.Vect... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.js |
this._name = name; | <mask> // If not set, the sound will be omnidirectional
<mask> this._coneInnerAngle = 360;
<mask> this._coneOuterAngle = 360;
<mask> this._coneOuterGain = 0;
<mask> this.name = name;
<mask> this._scene = scene;
<mask> this._audio... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.js |
<mask> }
<mask> }
<mask> }
<mask> }
<mask> Sound.prototype.dispose = function () {
<mask> if (this._audioEngine.canUseWebAudio && this._isReadyToPlay) {
<mask> if (this._isPlaying) {
<mask> this.stop(... | [
"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/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.js | |
this.startTime = startTime;
this._soundSource.start(startTime, this.startOffset % this._soundSource.buffer.duration); | <mask> }
<mask> }
<mask> this._soundSource.connect(this._audioNode);
<mask> this._soundSource.loop = this.loop;
<mask> this._startTime = startTime;
<mask> this._soundSource.start(startTime, ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.js |
BABYLON.Tools.Error("Error while trying to play audio: " + this._name + ", " + ex.message); | <mask> this._startTime = startTime;
<mask> this._soundSource.start(startTime, this._startOffset % this._soundSource.buffer.duration);
<mask> this._isPlaying = true;
<mask> } catch (ex) {
<mask> BABYLON.Tools.Error("Erro... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.js |
this.startOffset += this._audioEngine.audioContext.currentTime - this.startTime; | <mask>
<mask> Sound.prototype.pause = function () {
<mask> if (this._isPlaying) {
<mask> this._soundSource.stop(0);
<mask> this._startOffset += this._audioEngine.audioContext.currentTime - this._startTime;
<mask> }
<mask> };
<mask>
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.js |
meshToConnectTo.registerAfterWorldMatrixUpdate(function (connectedMesh) { | <mask> this.stop();
<mask> this.play();
<mask> }
<mask> }
<mask> this._registerFunc = function (connectedMesh) {
<mask> return _this._onRegisterAfterWorldMatrixUpdate(connectedMesh);
<mask> };
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.js |
}); | <mask> }
<mask> }
<mask> this._registerFunc = function (connectedMesh) {
<mask> return _this._onRegisterAfterWorldMatrixUpdate(connectedMesh);
<mask> };
<mask> meshToConnectTo.registerAfterWorldMatrixUpdate(this._registerFunc);
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.js |
private _audioEngine: AudioEngine; | <mask> private _isLoaded: boolean = false;
<mask> private _isReadyToPlay: boolean = false;
<mask> private _isPlaying: boolean = false;
<mask> private _isDirectional: boolean = false;
<mask> private _audioEngine: BABYLON.AudioEngine;
<mask> private _readyToPlayCallba... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
private _scene: Scene;
private _connectedMesh: AbstractMesh; | <mask> // If not set, the sound will be omnidirectional
<mask> private _coneInnerAngle: number = 360;
<mask> private _coneOuterAngle: number = 360;
<mask> private _coneOuterGain: number = 0;
<mask> private _scene: BABYLON.Scene;
<mask> private _connectedMesh: BABYLO... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
constructor(name: string, urlOrArrayBuffer: any, scene: Scene, readyToPlayCallback?: () => void, options?) { | <mask> * @param urlOrArrayBuffer Url to the sound to load async or ArrayBuffer
<mask> * @param readyToPlayCallback Provide a callback function if you'd like to load your code once the sound is ready to be played
<mask> * @param options Objects to provide with the current available options: a... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
Tools.LoadFile(urlOrArrayBuffer, (data) => { this._soundLoaded(data); }, null, null, true); | <mask> this._audioNode = this._soundGain;
<mask> }
<mask> this._scene.mainSoundTrack.AddSound(this);
<mask> if (typeof (urlOrArrayBuffer) === "string") {
<mask> BABYLON.Tools.LoadFile(urlOrArrayBuffer,(data) => { this._soundLoa... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
Tools.Error("Parameter must be a URL to the sound or an ArrayBuffer of the sound."); | <mask> if (urlOrArrayBuffer instanceof ArrayBuffer) {
<mask> this._soundLoaded(urlOrArrayBuffer);
<mask> }
<mask> else {
<mask> BABYLON.Tools.Error("Parameter must be a URL to the sound or an ArrayBuffer of ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
this._audioEngine.audioContext.decodeAudioData(audioData, (buffer) => { | <mask> }
<mask>
<mask> private _soundLoaded(audioData: ArrayBuffer) {
<mask> this._isLoaded = true;
<mask> this._audioEngine.audioContext.decodeAudioData(audioData,(buffer) => {
<mask> this._audioBuffer = buffer;
<mask> this._isReadyToPlay ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
}, (error) => { Tools.Error("Error while decoding audio data: " + error.err); }); | <mask> this._audioBuffer = buffer;
<mask> this._isReadyToPlay = true;
<mask> if (this.autoplay) { this.play(); }
<mask> if (this._readyToPlayCallback) { this._readyToPlayCallback(); }
<mask> }, function (error) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
Tools.Error("setDirectionalCone(): outer angle of the cone must be superior or equal to the inner angle."); | <mask> * @param coneOuterGain Volume of the sound outside the outer cone (between 0.0 and 1.0)
<mask> */
<mask> public setDirectionalCone(coneInnerAngle: number, coneOuterAngle: number, coneOuterGain: number) {
<mask> if (coneOuterAngle < coneInnerAngle) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
var direction = Vector3.TransformNormal(this._localDirection, mat); | <mask> }
<mask>
<mask> private _updateDirection() {
<mask> var mat = this._connectedMesh.getWorldMatrix();
<mask> var direction = BABYLON.Vector3.TransformNormal(this._localDirection, mat);
<mask> direction.normalize();
<mask> this._soundPanner.set... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
Tools.Error("Error while trying to play audio: " + this.name + ", " + ex.message); | <mask> this._soundSource.start(startTime, this._startOffset % this._soundSource.buffer.duration);
<mask> this._isPlaying = true;
<mask> }
<mask> catch (ex) {
<mask> BABYLON.Tools.Error("Error while trying to play audio: " +... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
public attachToMesh(meshToConnectTo: AbstractMesh) { | <mask> public getVolume(): number {
<mask> return this._volume;
<mask> }
<mask>
<mask> public attachToMesh(meshToConnectTo: BABYLON.AbstractMesh) {
<mask> this._connectedMesh = meshToConnectTo;
<mask> if (!this.spatialSound) {
<mask> t... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
this._registerFunc = (connectedMesh: AbstractMesh) => this._onRegisterAfterWorldMatrixUpdate(connectedMesh); | <mask> this.stop();
<mask> this.play();
<mask> }
<mask> }
<mask> this._registerFunc = (connectedMesh: BABYLON.AbstractMesh) => this._onRegisterAfterWorldMatrixUpdate(connectedMesh);
<mask> meshToConnectTo.registerAfterWorl... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
private _onRegisterAfterWorldMatrixUpdate(connectedMesh: AbstractMesh) { | <mask> this._registerFunc = (connectedMesh: BABYLON.AbstractMesh) => this._onRegisterAfterWorldMatrixUpdate(connectedMesh);
<mask> meshToConnectTo.registerAfterWorldMatrixUpdate(this._registerFunc);
<mask> }
<mask>
<mask> private _onRegisterAfterWorldMatrixUpdate(connectedM... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.sound.ts |
//this._trackConvolver = this._audioEngine.audioContext.createConvolver();
//this._trackConvolver.connect(this._trackGain); | <mask> this.soundCollection = new Array();
<mask> if (this._audioEngine.canUseWebAudio) {
<mask> this._trackGain = this._audioEngine.audioContext.createGain();
<mask> this._trackGain.connect(this._audioEngine.masterGain);
<mask>
<mask> if (o... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.soundtrack.js |
<mask> this._scene.soundTracks.push(this);
<mask> this.id = this._scene.soundTracks.length - 1;
<mask> }
<mask> }
<mask> SoundTrack.prototype.dispose = function () {
<mask> if (this._audioEngine.canUseWebAudio) {
<mask> if (t... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.soundtrack.js | |
<mask> if (this._audioEngine.canUseWebAudio) {
<mask> this._trackGain.gain.value = newVolume;
<mask> }
<mask> };
<mask>
<mask> SoundTrack.prototype.connectToAnalyser = function (analyser) {
<mask> if (this._connectedAnalyser) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Audio/babylon.soundtrack.js | |
<mask> traverse(trigger.children[j], triggerParams, null, null);
<mask> }
<mask> };
<mask>
<mask> var parseSound = function (parsedSound, scene, rootUrl) {
<mask> var soundName = parsedSound.name;
<mask> var soundUrl = rootUrl + soundName;
... | [
"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/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Loading/Plugins/babylon.babylonFileLoader.js | |
<mask> parseShadowGenerator(parsedShadowGenerator, scene);
<mask> }
<mask> }
<mask>
<mask> // Sounds
<mask> if (parsedData.sounds && scene.getEngine().getAudioEngine().canUseWebAudio) {
<mask> for (in... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Loading/Plugins/babylon.babylonFileLoader.js | |
var newSound = new BABYLON.Sound(soundName, soundUrl, scene, () => { scene._removePendingData(newSound); }, options); | <mask> distanceModel: parsedSound.distanceModel,
<mask> panningModel: parsedSound.panningModel
<mask> };
<mask>
<mask> var newSound = new BABYLON.Sound(soundName, soundUrl, scene, function () {
<mask> scene._removePendingData(newSound);
<mask> }, optio... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Loading/Plugins/babylon.babylonFileLoader.ts |
if (this.refreshRate == this._currentRefreshId) { | <mask> this._currentRefreshId = 1;
<mask> return true;
<mask> }
<mask>
<mask> if (this.refreshRate === this._currentRefreshId) {
<mask> this._currentRefreshId = 1;
<mask> return true;
<mask> }
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Materials/Textures/babylon.renderTargetTexture.js |
if (!this.renderList) { | <mask>
<mask> delete this._waitingRenderList;
<mask> }
<mask>
<mask> if (this.renderList && this.renderList.length === 0) {
<mask> return;
<mask> }
<mask>
<mask> // Bind
<mask> if (!useCameraPostProcess || !scene.po... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Materials/Textures/babylon.renderTargetTexture.js |
for (var meshIndex = 0; meshIndex < this.renderList.length; meshIndex++) {
var mesh = this.renderList[meshIndex]; | <mask> engine.clear(scene.clearColor, true, true);
<mask>
<mask> this._renderingManager.reset();
<mask>
<mask> var currentRenderList = this.renderList ? this.renderList : scene.getActiveMeshes().data;
<mask>
<mask> for (var meshIndex = 0; meshIndex < currentRend... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Materials/Textures/babylon.renderTargetTexture.js |
if (mesh.isEnabled() && mesh.isVisible && mesh.subMeshes && ((mesh.layerMask & scene.activeCamera.layerMask) != 0)) { | <mask> this.resetRefreshCounter();
<mask> continue;
<mask> }
<mask>
<mask> if (mesh.isEnabled() && mesh.isVisible && mesh.subMeshes && ((mesh.layerMask & scene.activeCamera.layerMask) !== 0)) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Materials/Textures/babylon.renderTargetTexture.js |
this._renderingManager.render(this.customRenderFunction, this.renderList, this.renderParticles, this.renderSprites); | <mask> this.onBeforeRender();
<mask> }
<mask>
<mask> // Render
<mask> this._renderingManager.render(this.customRenderFunction, currentRenderList, this.renderParticles, this.renderSprites);
<mask>
<mask> if (useCameraPostProcess) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Materials/Textures/babylon.renderTargetTexture.js |
var newTexture = new BABYLON.RenderTargetTexture(this.name, textureSize.width, this.getScene(), this._generateMipMaps); | <mask> };
<mask>
<mask> RenderTargetTexture.prototype.clone = function () {
<mask> var textureSize = this.getSize();
<mask> var newTexture = new RenderTargetTexture(this.name, textureSize.width, this.getScene(), this._generateMipMaps);
<mask>
<mask> // Base t... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Materials/Textures/babylon.renderTargetTexture.js |
<mask> d.prototype = new __();
<mask> };
<mask> var BABYLON;
<mask> (function (BABYLON) {
<mask> /**
<mask> * Creates an instance based on a source mesh.
<mask> */
<mask> var InstancedMesh = (function (_super) {
<mask> __extends(InstancedMesh, _super);
<mask> function Insta... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.InstancedMesh.js | |
if (mesh.parent == this) { | <mask> if (!doNotCloneChildren) {
<mask> for (var index = 0; index < this.getScene().meshes.length; index++) {
<mask> var mesh = this.getScene().meshes[index];
<mask>
<mask> if (mesh.parent === this) {
<mask> mesh.clone(m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.InstancedMesh.js |
<mask> __extends(AbstractMesh, _super);
<mask> function AbstractMesh(name, scene) {
<mask> _super.call(this, name, scene);
<mask> // Properties
<mask> this.definedFacingForward = true;
<mask> this.position = new BABYLON.Vector3(0, 0, 0);
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.abstractMesh.js | |
<mask> this.position.z = absolutePositionZ;
<mask> }
<mask> };
<mask>
<mask> // ================================== Point of View Movement =================================
<mask> /**
<mask> * Perform relative position change from the point of view of b... | [
"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/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.abstractMesh.js | |
<mask>
<mask> var Mesh = (function (_super) {
<mask> __extends(Mesh, _super);
<mask> /**
<mask> * @constructor
<mask> * @param {string} name - The value used by scene.getMeshByName() to do a lookup.
<mask> * @param {Scene} scene - The scene to add this mesh to.
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.mesh.js | |
Mesh.prototype._clone = function () {
};
| <mask> }
<mask> }
<mask> Object.defineProperty(Mesh.prototype, "hasLODLevels", {
<mask> // Methods
<mask> get: function () {
<mask> return this._LODLevels.length > 0;
<mask> },
<mask> enumerable: true,
</s> Fixing issue... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.mesh.js |
<mask> return 0;
<mask> });
<mask> };
<mask>
<mask> /**
<mask> * Add a mesh as LOD level triggered at the given distance.
<mask> * @param {number} distance - the distance from the center of the object to show this level
<mask> * @param {BABYLO... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.mesh.js | |
<mask>
<mask> return this;
<mask> };
<mask>
<mask> /**
<mask> * Remove a mesh from the LOD array
<mask> * @param {BABYLON.Mesh} mesh - the mesh to be removed.
<mask> * @return {BABYLON.Mesh} this mesh (for chaining)
<mask> */
<mask> Mesh.pr... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.mesh.js | |
Mesh.prototype.applyDisplacementMap = function (url, minHeight, maxHeight) {
| <mask> _super.prototype.dispose.call(this, doNotRecurse);
<mask> };
<mask>
<mask> // Geometric tools
<mask> Mesh.prototype.applyDisplacementMap = function (url, minHeight, maxHeight, onSuccess) {
<mask> var _this = this;
<mask> var scene = this.getScen... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.mesh.js |
<mask> // Create VertexData from map data
<mask> var buffer = context.getImageData(0, 0, heightMapWidth, heightMapHeight).data;
<mask>
<mask> _this.applyDisplacementMapFromBuffer(buffer, heightMapWidth, heightMapHeight, minHeight, maxHeight);
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.mesh.js | |
Mesh.CreateGroundFromHeightMap = function (name, url, width, height, subdivisions, minHeight, maxHeight, scene, updatable) {
| <mask>
<mask> return tiledGround;
<mask> };
<mask>
<mask> Mesh.CreateGroundFromHeightMap = function (name, url, width, height, subdivisions, minHeight, maxHeight, scene, updatable, onReady) {
<mask> var ground = new BABYLON.GroundMesh(name, scene);
<mask> gro... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.mesh.js |
<mask>
<mask> vertexData.applyToMesh(ground, updatable);
<mask>
<mask> ground._setReady(true);
<mask>
<mask> //execute ready callback, if set
<mask> if (onReady) {
<mask> onReady(ground);
<mask> }
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Mesh/babylon.mesh.js | |
if (renderSprites) {
this._renderSprites(index);
} | <mask> if (!renderingGroup.render(customRenderFunction)) {
<mask> this._renderingGroups.splice(index, 1);
<mask> }
<mask> }
<mask> this._renderSprites(index);
<mask> if (renderParticles) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Rendering/babylon.renderingManager.js |
if (renderSprites) {
this._renderSprites(index);
}
| <mask> if (!renderingGroup.render(customRenderFunction)) {
<mask> this._renderingGroups.splice(index, 1);
<mask> }
<mask> }
<mask> this._renderSprites(index);
<mask> if (renderParticles) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/Rendering/babylon.renderingManager.ts |
<mask> return EngineCapabilities;
<mask> })();
<mask> BABYLON.EngineCapabilities = EngineCapabilities;
<mask>
<mask> /**
<mask> * The engine class is responsible for interfacing with all lower-level APIs such as WebGL and Audio.
<mask> */
<mask> var Engine = (function () {
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask> /**
<mask> * The engine class is responsible for interfacing with all lower-level APIs such as WebGL and Audio.
<mask> */
<mask> var Engine = (function () {
<mask> /**
<mask> * @constructor
<mask> * @param {HTMLCanvasElement} canvas - the canvas to be used for rende... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask> Engine.prototype.setDepthFunctionToLessOrEqual = function () {
<mask> this._depthCullingState.depthFunc = this._gl.LEQUAL;
<mask> };
<mask>
<mask> /**
<mask> * stop executing a render loop function and remove it from the execution array
<mask> * @param ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask> this._renderingQueueLaunched = false;
<mask> }
<mask> };
<mask>
<mask> /**
<mask> * Register and execute a render loop. The engine can have more than one render function.
<mask> * @param {Function} renderFunction - the function to continuesly ex... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask> });
<mask> }
<mask> };
<mask>
<mask> /**
<mask> * Toggle full screen mode.
<mask> * @param {boolean} requestPointerLock - should a pointer lock be requested from the user
<mask> */
<mask> Engine.prototype.switchFullscreen = fun... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask>
<mask> this._gl.clear(mode);
<mask> };
<mask>
<mask> /**
<mask> * Set the WebGL's viewport
<mask> * @param {BABYLON.Viewport} viewport - the viewport element to be used.
<mask> * @param {number} [requiredWidth] - the width required for rendering. If n... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask> Engine.prototype.endFrame = function () {
<mask> this.flushFramebuffer();
<mask> };
<mask>
<mask> /**
<mask> * resize the view according to the canvas' size.
<mask> * @example
<mask> * window.addEventListener("resize", function () {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask> Engine.prototype.resize = function () {
<mask> this.setSize(this._renderingCanvas.clientWidth / this._hardwareScalingLevel, this._renderingCanvas.clientHeight / this._hardwareScalingLevel);
<mask> };
<mask>
<mask> /**
<mask> * force a specific size of the canvas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask> while (this.scenes.length) {
<mask> this.scenes[0].dispose();
<mask> }
<mask>
<mask> // Release audio engine
<mask> this._audioEngine.dispose();
<mask>
<mask> for (var name in this._compiledEffects) {
<mask> th... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.engine.js | |
<mask>
<mask> return null;
<mask> };
<mask>
<mask> Scene.prototype.getSoundByName = function (name) {
<mask> for (var index = 0; index < this.mainSoundTrack.soundCollection.length; index++) {
<mask> if (this.mainSoundTrack.soundCollection[index].name === ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"k... | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.scene.js | |
<mask> }
<mask> }
<mask> }
<mask>
<mask> // Depth renderer
<mask> if (this._depthRenderer) {
<mask> this._renderTargets.push(this._depthRenderer.getDepthMap());
<mask> }
<mask>
<mask> // RenderPip... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.scene.js | |
for (var i = 0; i < this.soundTracks.length; i++) {
| <mask> if (sound.useCustomAttenuation) {
<mask> sound.updateDistanceFromListener();
<mask> }
<mask> }
<mask> for (i = 0; i < this.soundTracks.length; i++) {
<mask> for (var j = 0; j < this.soundTrac... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.scene.js |
var sound = this.soundTracks[i].soundCollection[j];
| <mask> }
<mask> }
<mask> for (i = 0; i < this.soundTracks.length; i++) {
<mask> for (var j = 0; j < this.soundTracks[i].soundCollection.length; j++) {
<mask> sound = this.soundTracks[i].soundCollection[j];
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.scene.js |
<mask> }
<mask> }
<mask> };
<mask>
<mask> Scene.prototype.enableDepthRenderer = function () {
<mask> if (this._depthRenderer) {
<mask> return this._depthRenderer;
<mask> }
<mask>
<mask> this._depthRenderer = new ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
... | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.scene.js | |
<mask> this.skeletons = [];
<mask>
<mask> this._boundingBoxRenderer.dispose();
<mask>
<mask> if (this._depthRenderer) {
<mask> this._depthRenderer.dispose();
<mask> }
<mask>
<mask> // Debug layer
<mask> this.debugLayer.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/faea9971e5132c3fa04bdd8dbc50ae8e6bb40c90 | Babylon/babylon.scene.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.