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
// Fullscreen document.getElementById("renderCanvas").addEventListener("webkitfullscreenchange", function () { if (document.webkitIsFullScreen) this.goFullPage(); else this.exitFullPage(); }.bind(this), false); // Message before unload window.onb...
<mask> for (var i = 0; i < examplesButton.length; i++) { <mask> examplesButton[i].addEventListener("click", this.removeallOptions); <mask> } <mask> } <mask> <mask> /** <mask> * Display children menu of the caller <mask> */ </s> Playground v4.2 : - Bug fixes - New ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/menuPG.js
var target = evt.target; if (target.nodeName == "IMG") target = evt.target.parentNode; var toDisplay = target.querySelector('.toDisplaySub');
<mask> // If it's in mobile mode, avoid the "mouseenter" bug <mask> if (evt.type == "mouseenter" && this.navBarMobile.offsetHeight > 0) return; <mask> this.removeAllSubItems(); <mask> <mask> var toDisplay = evt.target.querySelector('.toDisplaySub'); <mask> if (toDisplay) {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/menuPG.js
<mask> if (toDisplay) { <mask> toDisplay.style.display = 'block'; <mask> <mask> if (document.getElementsByClassName('navBarMobile')[0].offsetHeight > 0) { <mask> <mask> var topBarHeight = 40; <mask> var height = toDisplay.children.length * 33; <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/menuPG.js
}; /** * Canvas full page */ goFullPage () { var canvasElement = document.getElementById("renderCanvas"); canvasElement.style.position = "absolute"; canvasElement.style.top = 0; canvasElement.style.left = 0; canvasElement.style.zIndex = 100; ...
<mask> this.switchWrapperCanvas.style.display = 'block'; <mask> this.canvasZoneElement.style.width = '50%'; <mask> this.switchWrapperCode.style.display = 'block'; <mask> this.fpsLabelElement.style.display = 'block'; <mask> } <mask> }; </s> Playground v4.2 : - Bug fixes - New cl...
[ "keep", "keep", "keep", "keep", "replace", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/menuPG.js
this.compilerTriggerTimeoutID = null;
<mask> constructor() { <mask> this.jsEditor = null; <mask> this.monacoMode = "javascript"; <mask> this.blockEditorChange = false; <mask> <mask> this.loadMonaco(); <mask> } <mask> <mask> // ACCESSORS <mask> </s> Playground v4.2 : - Bug fixes - New class f...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/monacoCreator.js
if (this.monacoMode != "javascript" && this.monacoMode != "typescript")
<mask> get MonacoMode() { <mask> return this.monacoMode; <mask> }; <mask> set MonacoMode(mode) { <mask> if(this.monacoMode != "javascript" <mask> && this.monacoMode != "typescript") <mask> console.warn("Error while defining Monaco Mode"); <mask> this.monac...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/monacoCreator.js
if (this.jsEditor) {
<mask> * Function to (re)create the editor <mask> */ <mask> createMonacoEditor() { <mask> var oldCode = ""; <mask> if(this.jsEditor) { <mask> oldCode = this.jsEditor.getValue(); <mask> this.jsEditor.dispose(); <mask> } <mask> <mask> var ed...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/monacoCreator.js
utils.setToMultipleID("toJSbutton", "removeClass", "floatLeft");
<mask> domObj.classList.add("language" + this.scriptLanguage); <mask> } <mask> } <mask> if (this.scriptLanguage == "JS") { <mask> setToMultipleID("toJSbutton", "removeClass", "floatLeft"); <mask> } <mask> else if (this.scriptLanguage == "TS"...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/settingsPG.js
utils.setToMultipleID("toJSbutton", "addClass", "floatLeft");
<mask> if (this.scriptLanguage == "JS") { <mask> setToMultipleID("toJSbutton", "removeClass", "floatLeft"); <mask> } <mask> else if (this.scriptLanguage == "TS") { <mask> setToMultipleID("toJSbutton", "addClass", "floatLeft"); <mask> } <mask> }; <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/settingsPG.js
utils.setToMultipleID("darkTheme", "removeClass", "selected"); utils.setToMultipleID("lightTheme", "removeClass", "selected");
<mask> setTheme(theme) { <mask> localStorage.setItem("bjs-playground-theme", theme); <mask> // Get the Monaco theme name. <mask> // Change the selected button style <mask> setToMultipleID("darkTheme", "removeClass", "selected"); <mask> setToMultipleID("lightTheme", "rem...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/settingsPG.js
utils.setToMultipleID("darkTheme", "addClass", "selected");
<mask> setToMultipleID("darkTheme", "removeClass", "selected"); <mask> setToMultipleID("lightTheme", "removeClass", "selected"); <mask> if (theme == 'dark') { <mask> this.vsTheme = 'vs-dark'; <mask> setToMultipleID("darkTheme", "addClass", "selected"); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/settingsPG.js
utils.setToMultipleID("lightTheme", "addClass", "selected");
<mask> setToMultipleID("darkTheme", "addClass", "selected"); <mask> } <mask> else { <mask> this.vsTheme = 'vs'; <mask> setToMultipleID("lightTheme", "addClass", "selected"); <mask> } <mask> <mask> this.monacoCreator.createMonacoEditor(); <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/settingsPG.js
this.multipleSize = [1280, 1024, 'Mobile'];
<mask> class Utils { <mask> constructor() { <mask> } <mask> <mask> // TO DO - Comment this <mask> markDirty() { </s> Playground v4.2 : - Bug fixes - New class for zipTool - Rewriting the index.js in progress [|||| ] 80% Former-commit-id: 8a8c4c087df9f57dd9f453ccb6c9cfd9be46d3aa </s> remove ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/utils.js
this.setToMultipleID("safemodeToggle", "addClass", "checked");
<mask> markDirty() { <mask> if (monacoCreator.BlockEditorChange) return; <mask> <mask> // setToMultipleID("currentScript", "innerHTML", "Custom"); <mask> setToMultipleID("safemodeToggle", "addClass", "checked"); <mask> // setToMultipleID("minimapToggle", "addClass", "checked")...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/utils.js
this.setToMultipleID('safemodeToggle', 'innerHTML', 'Safe mode <i class="fa fa-check-square" aria-hidden="true"></i>');
<mask> <mask> // setToMultipleID("currentScript", "innerHTML", "Custom"); <mask> setToMultipleID("safemodeToggle", "addClass", "checked"); <mask> // setToMultipleID("minimapToggle", "addClass", "checked"); // Why ?! <mask> setToMultipleID('safemodeToggle', 'innerHTML', 'Safe mode <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0889458d6c8ec349ff32c208642c28497a4f6133
Playground/js/utils.js
<mask> public get shaderPlatformName(): string { <mask> return this._shaderPlatformName; <mask> } <mask> <mask> /** <mask> * Observable raised when a screenshot has been taken <mask> * Note that a screenshot will be taken only if the observable is not empty! <mask> */ <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0a37a571f852fb71d09e09b12775b53f8064bfb2
src/Engines/thinEngine.ts
<mask> // Force a flush in case we are using a bad OS. <mask> if (this._badOS) { <mask> this.flushFramebuffer(); <mask> } <mask> <mask> if (this.onScreenshotObservable.hasObservers()) { <mask> const observers = this.onScreenshotObservable.observers; <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/0a37a571f852fb71d09e09b12775b53f8064bfb2
src/Engines/thinEngine.ts
public scope: any = null) {
<mask> public mask: number, <mask> /** <mask> * Defines the current scope used to restore the JS context <mask> */ <mask> public scope: any = null, <mask> /** <mask> * Defines custom data attached to this observer <mask> */ <mask> publ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0a37a571f852fb71d09e09b12775b53f8064bfb2
src/Misc/observable.ts
public add(callback: (eventData: T, eventState: EventState) => void, mask: number = -1, insertFirst = false, scope: any = null, unregisterOnFirstCall = false): Nullable<Observer<T>> {
<mask> * @param scope optional scope for the callback to be called from <mask> * @param unregisterOnFirstCall defines if the observer as to be unregistered after the next notification <mask> * @returns the new observer created for the callback <mask> */ <mask> public add(callback: (eventDat...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0a37a571f852fb71d09e09b12775b53f8064bfb2
src/Misc/observable.ts
var observer = new Observer(callback, mask, scope);
<mask> if (!callback) { <mask> return null; <mask> } <mask> <mask> var observer = new Observer(callback, mask, scope, customData); <mask> observer.unregisterOnNextCall = unregisterOnFirstCall; <mask> <mask> if (insertFirst) { <mask> this._observ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0a37a571f852fb71d09e09b12775b53f8064bfb2
src/Misc/observable.ts
public addOnce(callback: (eventData: T, eventState: EventState) => void): Nullable<Observer<T>> { return this.add(callback, undefined, undefined, undefined, true);
<mask> * Create a new Observer with the specified callback and unregisters after the next notification <mask> * @param callback the callback that will be executed for that Observer <mask> * @returns the new observer created for the callback <mask> */ <mask> public addOnce(callback: (eventDa...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0a37a571f852fb71d09e09b12775b53f8064bfb2
src/Misc/observable.ts
engine.onEndFrameObservable.addOnce(async () => { let data = engine.readPixels(0, 0, width, height); if ((data as Uint8Array).byteLength === undefined) { data = await data; } data = data as Uint8Array;
<mask> // Read the contents of the framebuffer <mask> var numberOfChannelsByLine = width * 4; <mask> var halfHeight = height / 2; <mask> <mask> engine.onScreenshotObservable.addOnce((data) => { <mask> // TODO WEBGPU Would be better to test ThinEngine.Features.framebuff...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0a37a571f852fb71d09e09b12775b53f8064bfb2
src/Misc/tools.ts
<mask> context.putImageData(imageData, 0, 0); <mask> <mask> Tools.EncodeScreenshotCanvasData(successCallback, mimeType, fileName); <mask> } <mask> }, { <mask> width, height <mask> }); <mask> } <mask> <mask> /** <mask> * Co...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0a37a571f852fb71d09e09b12775b53f8064bfb2
src/Misc/tools.ts
- task: PublishTestResults@2 condition: succeededOrFailed() inputs: testRunner: JUnit testResultsFiles: '.temp/testResults/UnitTests.xml'
<mask> workingDirectory: Tools/Gulp <mask> displayName: 'Unit Tests' <mask> - script: | <mask> export DISPLAY=:99 <mask> Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & <mask> sleep 3 # give xvfb some time to start <mask> gulp tests-validation-virtualscreen <mask> working...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0abc77d1550b510d4af511fd72472c7695cbbd50
azure-pipelines.yml
"karma": "^4.0.1",
<mask> "gulp-replace": "~1.0.0", <mask> "gulp-tslint": "^8.1.3", <mask> "gulp-typedoc": "^2.2.1", <mask> "gulp-typescript": "4.0.2", <mask> "karma": "^3.1.1", <mask> "karma-browserstack-launcher": "^1.4.0", <mask> "karma-chai": "^0.1.0", <mask> "ka...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0abc77d1550b510d4af511fd72472c7695cbbd50
package.json
"karma-junit-reporter": "^1.2.0",
<mask> "karma-chai": "^0.1.0", <mask> "karma-chrome-launcher": "^2.2.0", <mask> "karma-firefox-launcher": "^1.1.0", <mask> "karma-mocha": "^1.3.0", <mask> "karma-sinon": "^1.0.5", <mask> "merge2": "~1.2.2", <mask> "mini-css-extract-plugin": "^0.4.1", <mask...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0abc77d1550b510d4af511fd72472c7695cbbd50
package.json
<mask> "webpack-dev-server": "^3.1.14", <mask> "webpack-stream": "5.0.0", <mask> "xhr2": "^0.1.4" <mask> } <mask> } </s> unit tests results Former-commit-id: 498daa3659a8a2cbe7ad446c64e9d95f0fb4aedd </s> remove "karma": "^3.1.1", </s> add "karma": "^4.0.1",
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/BabylonJS/Babylon.js/commit/0abc77d1550b510d4af511fd72472c7695cbbd50
package.json
reporters: ['progress', 'junit'], junitReporter: { outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml outputFile: 'UnitTests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile suite: 'Unit Test...
<mask> logLevel: config.LOG_INFO, <mask> <mask> browsers: ['ChromeHeadless'] <mask> }) <mask> } </s> unit tests results Former-commit-id: 498daa3659a8a2cbe7ad446c64e9d95f0fb4aedd </s> remove } </s> add </s> remove "karma": "^3.1.1", </s> add "karma": "^4.0.1",
[ "keep", "add", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0abc77d1550b510d4af511fd72472c7695cbbd50
tests/unit/karma.conf.js
@serialize() public animationParameters: Vector4;
<mask> <mask> /** <mask> * The animation parameters for the mesh. See setAnimationParameters() <mask> */ <mask> @serialize() <mask> public animationParameters: Vector4; <mask> <mask> /** <mask> * The time counter, to pick the correct animation frame. <mask> */ <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0bd540916650f550db1c487e71888138d80da4ec
src/BakedVertexAnimation/bakedVertexAnimationManager.ts
@serialize() public time = 0;
<mask> <mask> /** <mask> * The time counter, to pick the correct animation frame. <mask> */ <mask> @serialize() <mask> public time = 0; <mask> <mask> /** <mask> * Creates a new BakedVertexAnimationManager <mask> * @param scene defines the current scene <mask> */ ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0bd540916650f550db1c487e71888138d80da4ec
src/BakedVertexAnimation/bakedVertexAnimationManager.ts
this.animationParameters = new Vector4(0, 0, 0, 30);
<mask> constructor(scene: Scene) { <mask> this._scene = scene; <mask> } <mask> <mask> /** @hidden */ <mask> public _markSubMeshesAsAttributesDirty(): void { </s> fixes crash with no default value Former-commit-id: fc163606c35dfee97c23c09c8c4090ae6bb30c49 </s> remove @serialize() ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0bd540916650f550db1c487e71888138d80da4ec
src/BakedVertexAnimation/bakedVertexAnimationManager.ts
// effect.setVector4("bakedVertexAnimationSettings", this.animationParameters);
<mask> ); <mask> effect.setFloat("bakedVertexAnimationTime", this.time); <mask> <mask> if (!useInstances) { <mask> effect.setVector4("bakedVertexAnimationSettings", this.animationParameters); <mask> } <mask> <mask> effect.setTexture("bakedVertexAnimationText...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0bd540916650f550db1c487e71888138d80da4ec
src/BakedVertexAnimation/bakedVertexAnimationManager.ts
/** Indicates that the engine supports sprite instancing */ supportSpriteInstancing: boolean;
<mask> <mask> /** Indicates that the engine supports render passes */ <mask> supportRenderPasses: boolean; <mask> <mask> /** @hidden */ <mask> _collectUbosUpdatedInFrame: boolean; <mask> } </s> Fix babylon native sprites (#12819) * fix native sprites * Babylon Native Sprites Former-commi...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0c46d7ccb750221510a76ffb3d254879614a2425
packages/dev/core/src/Engines/engineFeatures.ts
supportSpriteInstancing: false,
<mask> needToAlwaysBindUniformBuffers: false, <mask> supportRenderPasses: true, <mask> _collectUbosUpdatedInFrame: false, <mask> }; <mask> <mask> Tools.Log("Babylon Native (v" + Engine.Version + ") launched"); <mask> </s> Fix babylon native sprites (#12819) ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0c46d7ccb750221510a76ffb3d254879614a2425
packages/dev/core/src/Engines/nativeEngine.ts
supportSpriteInstancing: false,
<mask> needShaderCodeInlining: false, <mask> needToAlwaysBindUniformBuffers: false, <mask> supportRenderPasses: true, <mask> _collectUbosUpdatedInFrame: false, <mask> }; <mask> <mask> Logger.Log(`Babylon.js v${Engine.Version} - Null engine`); <mas...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0c46d7ccb750221510a76ffb3d254879614a2425
packages/dev/core/src/Engines/nullEngine.ts
supportSpriteInstancing: true,
<mask> needShaderCodeInlining: false, <mask> needToAlwaysBindUniformBuffers: false, <mask> supportRenderPasses: false, <mask> _collectUbosUpdatedInFrame: false, <mask> }; <mask> } <mask> </s> Fix babylon native sprites (#12819) * fix native sprites ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0c46d7ccb750221510a76ffb3d254879614a2425
packages/dev/core/src/Engines/thinEngine.ts
supportSpriteInstancing: true,
<mask> needShaderCodeInlining: true, <mask> needToAlwaysBindUniformBuffers: true, <mask> supportRenderPasses: true, <mask> _collectUbosUpdatedInFrame: false, <mask> }; <mask> } <mask> </s> Fix babylon native sprites (#12819) * fix native sprites *...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0c46d7ccb750221510a76ffb3d254879614a2425
packages/dev/core/src/Engines/webgpuEngine.ts
this._useInstancing = engine.getCaps().instancedArrays && engine._features.supportSpriteInstancing;
<mask> this._capacity = capacity; <mask> this._epsilon = epsilon; <mask> <mask> this._engine = engine; <mask> this._useInstancing = engine.getCaps().instancedArrays; <mask> this._useVAO = engine.getCaps().vertexArrayObject && !engine.disableVertexArrayObjects; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0c46d7ccb750221510a76ffb3d254879614a2425
packages/dev/core/src/Sprites/spriteRenderer.ts
if (!this._vertexBuffers) { if (this._delayInfo) { return this._delayInfo.indexOf(kind) !== -1; } return false;
<mask> return this._vertexBuffers[kind]; <mask> }; <mask> <mask> BABYLON.Mesh.prototype.isVerticesDataPresent = function (kind) { <mask> if (!this._vertexBuffers && this._delayInfo) { <mask> return this._delayInfo.indexOf(kind) !== -1; <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Babylon/Mesh/babylon.mesh.js
BABYLON.ParticleSystem.prototype.forceDepthWrite = false;
<mask> BABYLON.ParticleSystem.prototype.onDispose = null; <mask> <mask> BABYLON.ParticleSystem.prototype.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE; <mask> <mask> // Methods <mask> BABYLON.ParticleSystem.prototype.isAlive = function () { <mask> return this._alive; <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Babylon/Particles/babylon.particleSystem.js
if (this.forceDepthWrite) { this.setDepthWrite(true); }
<mask> engine.setAlphaMode(BABYLON.Engine.ALPHA_COMBINE); <mask> } <mask> engine.draw(true, 0, this.particles.length * 6); <mask> engine.setAlphaMode(BABYLON.Engine.ALPHA_DISABLE); <mask> <mask> return this.particles.length; </s> New particleSystem.forceDepthWrite New...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Babylon/Particles/babylon.particleSystem.js
mesh._shouldGenerateFlatShading = parsedMesh.useFlatShading;
<mask> mesh.visibility = parsedMesh.visibility; <mask> } <mask> <mask> mesh.checkCollisions = parsedMesh.checkCollisions; <mask> <mask> // Parent <mask> if (parsedMesh.parentId) { <mask> mesh.parent = scene.getLastEntryByID(parsedMesh.parentId); <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Babylon/Tools/babylon.sceneLoader.js
// Flat shading if (mesh._shouldGenerateFlatShading) { mesh.convertToFlatShadedMesh(); delete mesh._shouldGenerateFlatShading; }
<mask> mesh.computeWorldMatrix(true); <mask> <mask> var scene = mesh.getScene(); <mask> if (scene._selectionOctree) { <mask> scene._selectionOctree.addMesh(mesh); <mask> } <mask> }, </s> New particleSystem.forceDepthWrite New custom parame...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Babylon/Tools/babylon.sceneLoader.js
// Local animations if (target.animations) { for (var index = 0; index < this._activeAnimatables.length; index++) { if (this._activeAnimatables[index].target === target) { this._activeAnimatables.splice(index, 1); return; ...
<mask> <mask> }; <mask> <mask> BABYLON.Scene.prototype.stopAnimation = function (target) { <mask> for (var index = 0; index < this._activeAnimatables.length; index++) { <mask> if (this._activeAnimatables[index].target === target) { <mask> this._activeAnimatables.spli...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Babylon/babylon.scene.js
Export_babylon.write_bool(file_handler, "useFlatShading", object.data.useFlatShading)
<mask> Export_babylon.write_vectorScaled(file_handler, "rotation", rot.to_euler("XYZ"), -1) <mask> Export_babylon.write_vector(file_handler, "scaling", scale) <mask> Export_babylon.write_bool(file_handler, "isVisible", object.is_visible(scene)) <mask> Export_babylon.write_bool(file_h...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Exporters/Blender/io_export_babylon.py
bpy.types.Mesh.useFlatShading = BoolProperty( name="Use Flat Shading", default = False)
<mask> return {'FINISHED'} <mask> <mask> # UI <mask> bpy.types.Mesh.checkCollisions = BoolProperty( <mask> name="Check Collisions", <mask> default = False) <mask> <mask> bpy.types.Mesh.castShadows = BoolProperty( </s> New particleSystem.forceDepthWrite New custom parameter for activating...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Exporters/Blender/io_export_babylon.py
if isMesh: layout.prop(ob.data, 'useFlatShading')
<mask> isMesh = isinstance(ob.data, bpy.types.Mesh) <mask> isCamera = isinstance(ob.data, bpy.types.Camera) <mask> isLight = isinstance(ob.data, bpy.types.Lamp) <mask> <mask> if isMesh: <mask> layout.prop(ob.data, 'checkCollisions') <mask> lay...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0cdb266f43a89c48a33856bde2c745664f7eafc0
Exporters/Blender/io_export_babylon.py
private static _lightRadiuses = [1, 1, 1, 1];
<mask> private static _scaledAlbedo = new Color3(); <mask> private static _scaledReflectivity = new Color3(); <mask> private static _scaledEmissive = new Color3(); <mask> private static _scaledReflection = new Color3(); <mask> <mask> public static BindLights(scene: Scene, ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/babylon.pbrMaterial.ts
this._lightRadiuses[lightIndex] = light.radius;
<mask> <mask> if (!light.canAffectMesh(mesh)) { <mask> continue; <mask> } <mask> <mask> if (light instanceof PointLight) { <mask> // Point Light <mask> light.transferToEffect(effect, "vLightData" + ligh...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/babylon.pbrMaterial.ts
<mask> <mask> // GAMMA CORRECTION. <mask> light.diffuse.toLinearSpaceToRef(PBRMaterial._scaledAlbedo); <mask> PBRMaterial._scaledAlbedo.scaleToRef(light.intensity, PBRMaterial._scaledAlbedo); <mask> <mask> light.diffuse.scaleToRef(light.intensity, ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/babylon.pbrMaterial.ts
effect.setFloat4("vLightRadiuses", this._lightRadiuses[0], this._lightRadiuses[1], this._lightRadiuses[2], this._lightRadiuses[3]);
<mask> break; <mask> } <mask> } <mask> <mask> public isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean { <mask> <mask> if (this.checkReadyOnlyOnce) { <mask> if (this._wasPreviouslyReady) { </s> Add Light Radius and Invers...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/babylon.pbrMaterial.ts
"vMicrosurfaceTextureLods", "vLightRadiuses"
<mask> "logarithmicDepthConstant", <mask> "vSphericalX", "vSphericalY", "vSphericalZ", <mask> "vSphericalXX", "vSphericalYY", "vSphericalZZ", <mask> "vSphericalXY", "vSphericalYZ", "vSphericalZX", <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/babylon.pbrMaterial.ts
uniform vec4 vLightRadiuses;
<mask> uniform vec3 vReflectionColor; <mask> uniform vec4 vAlbedoColor; <mask> <mask> // CUSTOM CONTROLS <mask> uniform vec4 vLightingIntensity; <mask> uniform vec4 vCameraInfos; <mask> </s> Add Light Radius and Inverse Squared Falloff Former-commit-id: 2557310be40030ee6f2a0d568d13bf10b0a17936 </s> remove l...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 computeSpecularTerm(float NdotH, float NdotL, float NdotV, float VdotH, float roughness, vec3 specularColor)
<mask> return reflectance0 + weight * (reflectance90 - reflectance0) * pow(clamp(1.0 - VdotN, 0., 1.), 5.0); <mask> } <mask> <mask> // Cook Torance Specular computation. <mask> vec3 computeSpecularTerm(float NdotH, float NdotL, float NdotV, float VdotH, float alphaG, vec3 specularColor) <mask> { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
float alphaG = convertRoughnessToAverageSlope(roughness);
<mask> <mask> // Cook Torance Specular computation. <mask> vec3 computeSpecularTerm(float NdotH, float NdotL, float NdotV, float VdotH, float roughness, vec3 specularColor) <mask> { <mask> float distribution = normalDistributionFunction_TrowbridgeReitzGGX(NdotH, alphaG); <mask> float visibility = smithVi...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
float adjustRoughnessFromLightProperties(float roughness, float lightRadius, float lightDistance) { // At small angle this approximation works. float lightRoughness = lightRadius / lightDistance; // Distribution can sum. float totalRoughness = clamp(lightRoughness + roughness, 0., 1.); return total...
<mask> } <mask> <mask> float computeDefaultMicroSurface(float microSurface, vec3 reflectivityColor) <mask> { <mask> float kReflectivityNoAlphaWorkflow_SmoothnessMax = 0.95; <mask> </s> Add Light Radius and Inverse Squared Falloff Former-commit-id: 2557310be40030ee6f2a0d568d13bf10b0a17936 </s> remove ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
lightingInfo computeLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec3 diffuseColor, vec3 specularColor, float range, float roughness, float NdotV, float lightRadius) {
<mask> vec3 specular; <mask> #endif <mask> }; <mask> <mask> lightingInfo computeLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec3 diffuseColor, vec3 specularColor, float range, float roughness, float alphaG, float NdotV) { <mask> lightingInfo result; <mask> <mask> vec3 lightVectorW;...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 lightDirection;
<mask> <mask> lightingInfo computeLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec3 diffuseColor, vec3 specularColor, float range, float roughness, float alphaG, float NdotV) { <mask> lightingInfo result; <mask> <mask> vec3 lightVectorW; <mask> float attenuation = 1.0; <mask> if ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
float lightDistance; // Point
<mask> vec3 lightDirection; <mask> float attenuation = 1.0; <mask> if (lightData.w == 0.) <mask> { <mask> vec3 lightOffset = lightData.xyz - vPositionW; <mask> </s> Add Light Radius and Inverse Squared Falloff Former-commit-id: 2557310be40030ee6f2a0d568d13bf10b0a17936 </s> remo...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 lightOffset = lightData.xyz - vPositionW; // Inverse squared falloff. float lightDistanceSquared = dot(lightOffset, lightOffset); float lightDistanceFalloff = 1.0 / ((lightDistanceSquared + 0.0001) * range); attenuation = lightDistanceFalloff; light...
<mask> vec3 lightVectorW; <mask> float attenuation = 1.0; <mask> if (lightData.w == 0.) <mask> { <mask> vec3 direction = lightData.xyz - vPositionW; <mask> <mask> attenuation = max(0., 1.0 - length(direction) / range); <mask> lightVectorW = normalize(direction); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
// Directional
<mask> lightDistance = sqrt(lightDistanceSquared); <mask> lightDirection = normalize(lightOffset); <mask> } <mask> else <mask> { <mask> lightDistance = length(-lightData.xyz); <mask> lightDirection = normalize(-lightData.xyz); <mask> } <mask> </s> Add Light...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
lightDistance = length(-lightData.xyz); lightDirection = normalize(-lightData.xyz);
<mask> lightVectorW = normalize(direction); <mask> } <mask> else <mask> { <mask> lightVectorW = normalize(-lightData.xyz); <mask> } <mask> <mask> // diffuse <mask> vec3 H = normalize(viewDirectionW + lightVectorW); <mask> float NdotL = max(0.00000000001, dot(vNorma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
// Roughness roughness = adjustRoughnessFromLightProperties(roughness, lightRadius, lightDistance);
<mask> else <mask> { <mask> lightVectorW = normalize(-lightData.xyz); <mask> } <mask> <mask> // diffuse <mask> vec3 H = normalize(viewDirectionW + lightVectorW); <mask> float NdotL = max(0.00000000001, dot(vNormal, lightVectorW)); <mask> float VdotH = clamp(0.00000000001, 1...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 H = normalize(viewDirectionW + lightDirection); float NdotL = max(0.00000000001, dot(vNormal, lightDirection));
<mask> lightVectorW = normalize(-lightData.xyz); <mask> } <mask> <mask> // diffuse <mask> vec3 H = normalize(viewDirectionW + lightVectorW); <mask> float NdotL = max(0.00000000001, dot(vNormal, lightVectorW)); <mask> float VdotH = clamp(0.00000000001, 1.0, dot(viewDirectionW, H)); <...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 specTerm = computeSpecularTerm(NdotH, NdotL, NdotV, VdotH, roughness, specularColor);
<mask> #ifdef SPECULARTERM <mask> // Specular <mask> float NdotH = max(0.00000000001, dot(vNormal, H)); <mask> <mask> vec3 specTerm = computeSpecularTerm(NdotH, NdotL, NdotV, VdotH, alphaG, specularColor); <mask> result.specular = specTerm * attenuation; <mask> #endif <mask> <mask> return...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
lightingInfo computeSpotLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec4 lightDirection, vec3 diffuseColor, vec3 specularColor, float range, float roughness, float NdotV, float lightRadius) {
<mask> <mask> return result; <mask> } <mask> <mask> lightingInfo computeSpotLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec4 lightDirection, vec3 diffuseColor, vec3 specularColor, float range, float roughness, float alphaG, float NdotV) { <mask> lightingInfo result; <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 lightOffset = lightData.xyz - vPositionW; vec3 lightVectorW = normalize(lightOffset);
<mask> <mask> lightingInfo computeSpotLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec4 lightDirection, vec3 diffuseColor, vec3 specularColor, float range, float roughness, float alphaG, float NdotV) { <mask> lightingInfo result; <mask> <mask> vec3 direction = lightData.xyz - vPositionW; ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
float cosAngle = max(0.000000000000001, dot(-lightDirection.xyz, lightVectorW));
<mask> vec3 lightVectorW = normalize(direction); <mask> float attenuation = max(0., 1.0 - length(direction) / range); <mask> <mask> // diffuse <mask> float cosAngle = max(0.0000001, dot(-lightDirection.xyz, lightVectorW)); <mask> float spotAtten = 0.0; <mask> <mask> if (cosAngle >= lig...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
// Inverse squared falloff. float lightDistanceSquared = dot(lightOffset, lightOffset); float lightDistanceFalloff = 1.0 / ((lightDistanceSquared + 0.0001) * range); float attenuation = lightDistanceFalloff; // Directional falloff. attenuation *= cosAngl...
<mask> <mask> if (cosAngle >= lightDirection.w) <mask> { <mask> cosAngle = max(0., pow(cosAngle, lightData.w)); <mask> spotAtten = clamp((cosAngle - lightDirection.w) / (1. - cosAngle), 0.0, 1.0); <mask> <mask> // Diffuse <mask> vec3 H = normalize(viewDirectionW - light...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
result.diffuse = diffuseTerm * diffuseColor * attenuation;
<mask> float NdotL = max(0.00000000001, dot(vNormal, -lightDirection.xyz)); <mask> float VdotH = clamp(dot(viewDirectionW, H), 0.00000000001, 1.0); <mask> <mask> float diffuseTerm = computeDiffuseTerm(NdotL, NdotV, VdotH, roughness); <mask> result.diffuse = diffuseTerm * diffuseCol...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 specTerm = computeSpecularTerm(NdotH, NdotL, NdotV, VdotH, roughness, specularColor); result.specular = specTerm * attenuation;
<mask> #ifdef SPECULARTERM <mask> // Specular <mask> float NdotH = max(0.00000000001, dot(vNormal, H)); <mask> <mask> vec3 specTerm = computeSpecularTerm(NdotH, NdotL, NdotV, VdotH, alphaG, specularColor); <mask> result.specular = specTerm * attenuation * spotAtten; <mask> #endi...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
lightingInfo computeHemisphericLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec3 diffuseColor, vec3 specularColor, vec3 groundColor, float roughness, float NdotV, float lightRadius) {
<mask> <mask> return result; <mask> } <mask> <mask> lightingInfo computeHemisphericLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec3 diffuseColor, vec3 specularColor, vec3 groundColor, float roughness, float alphaG, float NdotV) { <mask> lightingInfo result; <mask> <mask> vec3 ligh...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
// Roughness // Do not touch roughness on hemispheric.
<mask> <mask> lightingInfo computeHemisphericLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec3 diffuseColor, vec3 specularColor, vec3 groundColor, float roughness, float alphaG, float NdotV) { <mask> lightingInfo result; <mask> <mask> vec3 lightVectorW = normalize(lightData.xyz); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 lightVectorW = normalize(lightData.xyz);
<mask> result.diffuse = mix(groundColor, diffuseColor, ndl); <mask> <mask> #ifdef SPECULARTERM <mask> // Specular <mask> vec3 H = normalize(viewDirectionW + lightVectorW); <mask> float NdotH = max(0.00000000001, dot(vNormal, H)); <mask> float NdotL = max(0.00000000001, ndl); <mask> floa...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
vec3 specTerm = computeSpecularTerm(NdotH, NdotL, NdotV, VdotH, roughness, specularColor);
<mask> float NdotH = max(0.00000000001, dot(vNormal, H)); <mask> float NdotL = max(0.00000000001, ndl); <mask> float VdotH = clamp(0.00000000001, 1.0, dot(viewDirectionW, H)); <mask> <mask> vec3 specTerm = computeSpecularTerm(NdotH, NdotL, NdotV, VdotH, alphaG, specularColor); <mask> result.s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
// Compute roughness.
<mask> <mask> // Adapt microSurface. <mask> microSurface = clamp(microSurface, 0., 1.) * 0.98; <mask> <mask> // Compute roughness and average slope. <mask> float roughness = clamp(1. - microSurface, 0.000001, 1.0); <mask> float alphaG = convertRoughnessToAverageSlope(roughness); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
<mask> microSurface = clamp(microSurface, 0., 1.) * 0.98; <mask> <mask> // Compute roughness and average slope. <mask> float roughness = clamp(1. - microSurface, 0.000001, 1.0); <mask> float alphaG = convertRoughnessToAverageSlope(roughness); <mask> <mask> // Lighting <mask> vec3 l...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
lightingInfo info = computeSpotLighting(viewDirectionW, normalW, vLightData0, vLightDirection0, vLightDiffuse0.rgb, vLightSpecular0, vLightDiffuse0.a, roughness, NdotV, vLightRadiuses[0]);
<mask> #ifndef SPECULARTERM <mask> vec3 vLightSpecular0 = vec3(0.0); <mask> #endif <mask> #ifdef SPOTLIGHT0 <mask> lightingInfo info = computeSpotLighting(viewDirectionW, normalW, vLightData0, vLightDirection0, vLightDiffuse0.rgb, vLightSpecular0, vLightDiffuse0.a, roughness, alphaG, NdotV); <mask> #endif...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
lightingInfo info = computeHemisphericLighting(viewDirectionW, normalW, vLightData0, vLightDiffuse0.rgb, vLightSpecular0, vLightGround0, roughness, NdotV, vLightRadiuses[0]);
<mask> #ifdef SPOTLIGHT0 <mask> lightingInfo info = computeSpotLighting(viewDirectionW, normalW, vLightData0, vLightDirection0, vLightDiffuse0.rgb, vLightSpecular0, vLightDiffuse0.a, roughness, alphaG, NdotV); <mask> #endif <mask> #ifdef HEMILIGHT0 <mask> lightingInfo info = computeHemisphericLighting(view...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
lightingInfo info = computeLighting(viewDirectionW, normalW, vLightData0, vLightDiffuse0.rgb, vLightSpecular0, vLightDiffuse0.a, roughness, NdotV, vLightRadiuses[0]);
<mask> #ifdef HEMILIGHT0 <mask> lightingInfo info = computeHemisphericLighting(viewDirectionW, normalW, vLightData0, vLightDiffuse0.rgb, vLightSpecular0, vLightGround0, roughness, alphaG, NdotV); <mask> #endif <mask> #if defined(POINTLIGHT0) || defined(DIRLIGHT0) <mask> lightingInfo info = computeLighting(...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeSpotLighting(viewDirectionW, normalW, vLightData1, vLightDirection1, vLightDiffuse1.rgb, vLightSpecular1, vLightDiffuse1.a, roughness, NdotV, vLightRadiuses[1]);
<mask> #ifndef SPECULARTERM <mask> vec3 vLightSpecular1 = vec3(0.0); <mask> #endif <mask> #ifdef SPOTLIGHT1 <mask> info = computeSpotLighting(viewDirectionW, normalW, vLightData1, vLightDirection1, vLightDiffuse1.rgb, vLightSpecular1, vLightDiffuse1.a, roughness, alphaG, NdotV); <mask> #endif <mask> #ifd...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeHemisphericLighting(viewDirectionW, normalW, vLightData1, vLightDiffuse1.rgb, vLightSpecular1, vLightGround1, roughness, NdotV, vLightRadiuses[1]);
<mask> #ifdef SPOTLIGHT1 <mask> info = computeSpotLighting(viewDirectionW, normalW, vLightData1, vLightDirection1, vLightDiffuse1.rgb, vLightSpecular1, vLightDiffuse1.a, roughness, alphaG, NdotV); <mask> #endif <mask> #ifdef HEMILIGHT1 <mask> info = computeHemisphericLighting(viewDirectionW, normalW, vLigh...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeLighting(viewDirectionW, normalW, vLightData1, vLightDiffuse1.rgb, vLightSpecular1, vLightDiffuse1.a, roughness, NdotV, vLightRadiuses[1]);
<mask> #ifdef HEMILIGHT1 <mask> info = computeHemisphericLighting(viewDirectionW, normalW, vLightData1, vLightDiffuse1.rgb, vLightSpecular1, vLightGround1, roughness, alphaG, NdotV); <mask> #endif <mask> #if defined(POINTLIGHT1) || defined(DIRLIGHT1) <mask> info = computeLighting(viewDirectionW, normalW, v...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeSpotLighting(viewDirectionW, normalW, vLightData2, vLightDirection2, vLightDiffuse2.rgb, vLightSpecular2, vLightDiffuse2.a, roughness, NdotV, vLightRadiuses[2]);
<mask> #ifndef SPECULARTERM <mask> vec3 vLightSpecular2 = vec3(0.0); <mask> #endif <mask> #ifdef SPOTLIGHT2 <mask> info = computeSpotLighting(viewDirectionW, normalW, vLightData2, vLightDirection2, vLightDiffuse2.rgb, vLightSpecular2, vLightDiffuse2.a, roughness, alphaG, NdotV); <mask> #endif <mask> #ifd...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeHemisphericLighting(viewDirectionW, normalW, vLightData2, vLightDiffuse2.rgb, vLightSpecular2, vLightGround2, roughness, NdotV, vLightRadiuses[2]);
<mask> #ifdef SPOTLIGHT2 <mask> info = computeSpotLighting(viewDirectionW, normalW, vLightData2, vLightDirection2, vLightDiffuse2.rgb, vLightSpecular2, vLightDiffuse2.a, roughness, alphaG, NdotV); <mask> #endif <mask> #ifdef HEMILIGHT2 <mask> info = computeHemisphericLighting(viewDirectionW, normalW, vLigh...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeLighting(viewDirectionW, normalW, vLightData2, vLightDiffuse2.rgb, vLightSpecular2, vLightDiffuse2.a, roughness, NdotV, vLightRadiuses[2]);
<mask> #ifdef HEMILIGHT2 <mask> info = computeHemisphericLighting(viewDirectionW, normalW, vLightData2, vLightDiffuse2.rgb, vLightSpecular2, vLightGround2, roughness, alphaG, NdotV); <mask> #endif <mask> #if defined(POINTLIGHT2) || defined(DIRLIGHT2) <mask> info = computeLighting(viewDirectionW, normalW, v...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeSpotLighting(viewDirectionW, normalW, vLightData3, vLightDirection3, vLightDiffuse3.rgb, vLightSpecular3, vLightDiffuse3.a, roughness, NdotV, vLightRadiuses[3]);
<mask> #ifndef SPECULARTERM <mask> vec3 vLightSpecular3 = vec3(0.0); <mask> #endif <mask> #ifdef SPOTLIGHT3 <mask> info = computeSpotLighting(viewDirectionW, normalW, vLightData3, vLightDirection3, vLightDiffuse3.rgb, vLightSpecular3, vLightDiffuse3.a, roughness, alphaG, NdotV); <mask> #endif <mask> #ifd...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeHemisphericLighting(viewDirectionW, normalW, vLightData3, vLightDiffuse3.rgb, vLightSpecular3, vLightGround3, roughness, NdotV, vLightRadiuses[3]);
<mask> #ifdef SPOTLIGHT3 <mask> info = computeSpotLighting(viewDirectionW, normalW, vLightData3, vLightDirection3, vLightDiffuse3.rgb, vLightSpecular3, vLightDiffuse3.a, roughness, alphaG, NdotV); <mask> #endif <mask> #ifdef HEMILIGHT3 <mask> info = computeHemisphericLighting(viewDirectionW, normalW, vLigh...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
info = computeLighting(viewDirectionW, normalW, vLightData3, vLightDiffuse3.rgb, vLightSpecular3, vLightDiffuse3.a, roughness, NdotV, vLightRadiuses[3]);
<mask> #ifdef HEMILIGHT3 <mask> info = computeHemisphericLighting(viewDirectionW, normalW, vLightData3, vLightDiffuse3.rgb, vLightSpecular3, vLightGround3, roughness, alphaG, NdotV); <mask> #endif <mask> #if defined(POINTLIGHT3) || defined(DIRLIGHT3) <mask> info = computeLighting(viewDirectionW, normalW, v...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
#else float alphaG = convertRoughnessToAverageSlope(roughness);
<mask> // Go mat -> blurry reflexion according to microSurface <mask> #ifndef LODBASEDMICROSFURACE <mask> float bias = 20. * (1.0 - microSurface); <mask> #endif <mask> <mask> #ifdef REFRACTION <mask> vec3 refractionVector = normalize(refract(-viewDirectionW, normalW, vRefractionInfos.y)); <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/materials/pbr/pbr.fragment.fx
lightRange: 1000, lightRadius: 0.0000001
<mask> spotLight: false, <mask> fog: false, <mask> skybox: false, <mask> lightIntensity: 1.0, <mask> lightRange: 1000 <mask> } <mask> <mask> var registeredUIs = {}; <mask> var materialgui; <mask> </s> Add Light Radius and Inverse Squared Falloff Former-commit-id: 2557310be40030ee6f2a0d568d13bf...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
materialsLibrary/test/index.js
// PBR Properties. public radius = 0.00001;
<mask> public excludedMeshes = new Array<AbstractMesh>(); <mask> public excludeWithLayerMask = 0; <mask> <mask> public _shadowGenerator: ShadowGenerator; <mask> private _parentedWorldMatrix: Matrix; <mask> public _excludedMeshesIds = new Array<string>(); <mask> pu...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
src/Lights/babylon.light.ts
serializationObject.radius = this.radius;
<mask> serializationObject.parentId = this.parent.id; <mask> } <mask> <mask> serializationObject.range = this.range; <mask> <mask> serializationObject.diffuse = this.diffuse.asArray(); <mask> serializationObject.specular = this.specular.asArray();...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
src/Lights/babylon.light.ts
if (parsedLight.radius) { light.radius = parsedLight.radius; }
<mask> if (parsedLight.range) { <mask> light.range = parsedLight.range; <mask> } <mask> <mask> light.diffuse = Color3.FromArray(parsedLight.diffuse); <mask> light.specular = Color3.FromArray(parsedLight.specular); <mask> <mask> if (pa...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d1d2de2464b9c6e4d9659daf35918e324b875b5
src/Lights/babylon.light.ts
import { GUIEditor } from "gui-editor/index";
<mask> import { GUIEditor } from "@tools/gui-editor"; <mask> <mask> const globalObject = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : undefined; <mask> if (typeof globalObject !== "undefined") { <mask> (<any>globalObject).BABYLON = (<any>globalObject).BABYLON || {}; <mask...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d77b19875f55637a0dc10e2c151bf139e4a4206
packages/tools/babylonServer/src/guiEditor/index.ts
export * from "gui-editor/index";
<mask> (<any>globalObject).BABYLON.GuiEditor = GUIEditor; <mask> (<any>globalObject).GUIEDITOR = GUIEditor; <mask> } <mask> <mask> export * from "@tools/gui-editor"; </s> Watch editors directories correctly Former-commit-id: dccfcc3f1be223048aa351572a406d6a0971a624 </s> remove export * from "@tools/nod...
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/BabylonJS/Babylon.js/commit/0d77b19875f55637a0dc10e2c151bf139e4a4206
packages/tools/babylonServer/src/guiEditor/index.ts
import { NodeEditor } from "node-editor/index";
<mask> import { NodeEditor } from "@tools/node-editor"; <mask> <mask> const globalObject = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : undefined; <mask> if (typeof globalObject !== "undefined") { <mask> (<any>globalObject).BABYLON = (<any>globalObject).BABYLON || {}; <ma...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d77b19875f55637a0dc10e2c151bf139e4a4206
packages/tools/babylonServer/src/nodeEditor/index.ts
export * from "node-editor/index";
<mask> (<any>globalObject).BABYLON.NodeEditor = NodeEditor; <mask> (<any>globalObject).NODEEDITOR = { NodeEditor }; <mask> } <mask> <mask> export * from "@tools/node-editor"; </s> Watch editors directories correctly Former-commit-id: dccfcc3f1be223048aa351572a406d6a0971a624 </s> remove import { NodeEdi...
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/BabylonJS/Babylon.js/commit/0d77b19875f55637a0dc10e2c151bf139e4a4206
packages/tools/babylonServer/src/nodeEditor/index.ts
const basePathForTools = path.resolve(__dirname, "../../", "tools");
<mask> <mask> module.exports = (env) => { <mask> const source = env.source || process.env.SOURCE || "dev"; // || "lts"; <mask> const basePathForSources = path.resolve(__dirname, "../../", source); <mask> const externals = externalsFunction(); <mask> const production = env.mode === "production" ||...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d77b19875f55637a0dc10e2c151bf139e4a4206
packages/tools/babylonServer/webpack.config.js
"node-editor": path.resolve(basePathForTools, "nodeEditor", outputDirectoryForAliases), "gui-editor": path.resolve(basePathForTools, "guiEditor", outputDirectoryForAliases),
<mask> "shared-ui-components": path.resolve(__dirname, "../../", "dev", "sharedUiComponents", outputDirectoryForAliases), <mask> "post-processes": path.resolve(basePathForSources, "postProcesses", outputDirectoryForAliases), <mask> "procedural-textures": path.resolve(b...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/0d77b19875f55637a0dc10e2c151bf139e4a4206
packages/tools/babylonServer/webpack.config.js