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
if(key === "Custom_Frames") { return <DraggableLineWithButtonComponent key={block} data={block} tooltip={this._customFrameList[block] || ""} iconImage={deleteButton} iconTitle="Delete" onIconClick={ value => this.removeItem(value)}/>;
<mask> for (var key in allBlocks) { <mask> var blockList = (allBlocks as any)[key].filter((b: string) => !this.state.filter || b.toLowerCase().indexOf(this.state.filter.toLowerCase()) !== -1) <mask> .sort((a: string, b: string) => a.localeCompare(b)) <mask> .map((block: a...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/40170012ea22421262482e827f492b5cdf3ba204
nodeEditor/src/components/nodeList/nodeListComponent.tsx
return <DraggableLineComponent key={block} data={block} tooltip={ NodeListComponent._Tooltips[block] || ""}/>;
<mask> if(key != "Custom_Frames") { <mask> <mask> return <DraggableLineComponent key={block} data={block} tooltip={tooltip}/>; <mask> } <mask> return <DraggableLineWithButtonComponent key={block} data={block} tooltip={tooltip} icon...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/40170012ea22421262482e827f492b5cdf3ba204
nodeEditor/src/components/nodeList/nodeListComponent.tsx
.navbar .select span { width: 100%; height: 55px; line-height: 55px; font-family: "acumin-pro-extra-condensed"; font-size: 20px; }
<mask> <mask> .navbar .select { <mask> position: relative; <mask> } <mask> <mask> .navbar .select .subSelect { <mask> position: relative; <mask> } <mask> .navbar .select .toDisplay { </s> Playground v4.4 : QRcode is back. Version selector too. Former-commit-id: 5c22e448bc5fb12a54fdff0e4451906a211...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/css/index.css
.navbar .select .toDisplay.currentVersionDisplay { width: 100%; display: none; }
<mask> display: none; <mask> text-transform: uppercase; <mask> background-color: #201936; <mask> } <mask> .navbar .select .toDisplay .option { <mask> font-size: 20px; <mask> height: 35px; <mask> line-height: 35px; <mask> padding: 1px 5px 1px 15px; </s> Playground v4.4 : QRcode is b...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/css/index.css
<mask> } <mask> .navbar .select .toDisplay.languageTS .option:hover { <mask> background-color: #ff7656; <mask> } <mask> .navbar .select .toDisplay.currentVersionDisplay { <mask> width: auto; <mask> } <mask> <mask> .navbar .select .subSelect .toDisplaySub { <mask> position: absolute; <mask> z...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/css/index.css
.navbar .select .subSelect .qrCodeImage div { width: 256px; height: 256px; padding: 2px; } .navbar .select .subSelect .qrCodeImage.languageJS div { background-color: #9379e6; } .navbar .select .subSelect .qrCodeImage.languageTS div { background-color: #e0684b; }
<mask> .navbar .select .subSelect .toDisplaySub.languageTS .option.selected { <mask> color: white; <mask> background-color: #ff7656; <mask> } <mask> <mask> <mask> .navbar .select .toDisplayBig.dark { <mask> background-color: #333; <mask> color:white; <mask> } </s> Playground v4.4 : QRco...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/css/index.css
<mask> font-family: 'FontAwesome', sans-serif; <mask> content: "\00a0 \00a0 \00a0 \f096"; <mask> } <mask> <mask> #qrCodeImage div { <mask> width: 256px; <mask> height: 256px; <mask> } <mask> <mask> #errorZone { <mask> display:none; <mask> position: absolute; <mask> width: 50%;...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/css/index.css
<mask> .navBar1280 { display: block; } <mask> .navBar1024 { display: none; } <mask> .navBarMobile { display: none; } <mask> <mask> #qrCodeImage { <mask> height:auto; <mask> padding: 20px; <mask> padding-bottom: 10px; <mask> } <mask> <mask> .navbar .select .to...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/css/index.css
<mask> // Editor fullScreen <mask> this.parent.utils.setToMultipleID("editorFullscreenButton", "click", this.parent.menuPG.editorGoFullscreen.bind(this.parent.menuPG)); <mask> // Format <mask> this.parent.utils.setToMultipleID("formatButton", "click", this.parent.monacoCreator.format...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/main.js
// Restore font size this.parent.settingsPG.restoreFont();
<mask> // Restore theme <mask> this.parent.settingsPG.restoreTheme(); <mask> // Restore language <mask> this.parent.settingsPG.setScriptLanguage(); <mask> // Check if it's mobile mode. If true, switch to full canvas by default <mask> this.parent.menuPG.resizeBigCanv...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/main.js
<mask> if (queryString) { <mask> var query = queryString.replace("?", ""); <mask> index = parseInt(query); <mask> if (!isNaN(index)) { <mask> // TO DO - Should we remove this ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/main.js
this.parent.menuPG.hideWaitDiv();
<mask> * Compile the script in the editor, and run the preview in the canvas <mask> */ <mask> compileAndRun() { <mask> try { <mask> var waitRing = document.getElementById("waitDiv"); <mask> if (waitRing) { <mask> waitRing.style.display = "none...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/main.js
<mask> this.switchWrapperCanvas.addEventListener('click', this.resizeBigCanvas.bind(this)); <mask> document.getElementById('runButtonMobile').addEventListener('click', this.resizeBigCanvas.bind(this)); <mask> <mask> // Code editor by default. <mask> // TO DO - Check why it doesn't ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/menuPG.js
showQRCodes() { for (var i = 0; i < this.parent.utils.multipleSize.length; i++) { $("#qrCodeImage" + this.parent.utils.multipleSize[i]).empty(); var playgroundCode = window.location.href.split("#"); playgroundCode.shift(); $("#qrCodeImage" + this.parent.u...
<mask> } <mask> }; <mask> <mask> // TO DO - Make it work with all sizes <mask> showQRCode() { <mask> console.log("Plop"); <mask> $("#qrCodeImage1280").empty(); <mask> var playgroundCode = window.location.href.split("#"); <mask> playgroundCode.shift(); <mask...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/menuPG.js
* When running code, display the loader
<mask> $("#qrCodeImage1280").qrcode({ text: "https://playground.babylonjs.com/frame.html#" + (playgroundCode.join("#")) }); <mask> }; <mask> <mask> /** <mask> * Comes from "pbt.js" <mask> */ <mask> // TO DO - Comment this correctly <mask> showBJSPGMenu() { <mask> var ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/menuPG.js
<mask> <mask> /** <mask> * Comes from "pbt.js" <mask> */ <mask> // TO DO - Comment this correctly <mask> showBJSPGMenu() { <mask> var headings = document.getElementsByClassName('category'); <mask> for (var i = 0; i < headings.length; i++) { <mask> headings[i]....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/menuPG.js
<mask> class SettingsPG { <mask> constructor(parent) { <mask> this.parent = parent; <mask> <mask> // TO DO - Set the fond in the localStorage (same as theme and language) <mask> <mask> // The elements that will color with languages <mask> this.elementForscriptLanguage = [ ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/settingsPG.js
this.fontSize = localStorage.getItem("bjs-playground-font") || 14;
<mask> '.wrapper #jsEditor', <mask> '.wrapper .gutter' <mask> ]; <mask> // Editor font size <mask> this.fontSize = 14; <mask> // Editor theme <mask> this.vsTheme = localStorage.getItem("bjs-playground-theme") || 'light'; <mask> // Editor la...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/settingsPG.js
if (this.scriptLanguage == "JS") {
<mask> this.vsTheme = localStorage.getItem("bjs-playground-theme") || 'light'; <mask> // Editor language <mask> this.scriptLanguage = localStorage.getItem("bjs-playground-scriptLanguage") || 'JS'; <mask> this.defaultScene = "scripts/basic scene.js"; <mask> if(this.scriptLang...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/settingsPG.js
else if (this.scriptLanguage == "TS") {
<mask> if(this.scriptLanguage == "JS") { <mask> this.defaultScene = "scripts/basic scene.js"; <mask> this.parent.monacoCreator.monacoMode = "javascript"; <mask> } <mask> else if(this.scriptLanguage == "TS") { <mask> this.defaultScene = "scripts/basic sce...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/settingsPG.js
// Last BJS version this.lastBJSversionURL = "";
<mask> else if (this.scriptLanguage == "TS") { <mask> this.defaultScene = "scripts/basic scene.txt"; <mask> this.parent.monacoCreator.monacoMode = "typescript"; <mask> } <mask> } <mask> <mask> get ScriptLanguage() { <mask> return this.scriptLanguage; <ma...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/settingsPG.js
localStorage.setItem("bjs-playground-font", size);
<mask> */ <mask> setFontSize(size) { <mask> this.fontSize = size; <mask> this.parent.monacoCreator.jsEditor.updateOptions({ fontSize: size }); <mask> var array = document.getElementsByClassName("displayFontSize"); <mask> for (var i = 0; i < array.length; i++) { <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/settingsPG.js
restoreFont() { this.setFontSize(this.fontSize); };
<mask> } <mask> } <mask> }; <mask> /** <mask> * Toggle Typescript / Javascript language <mask> */ <mask> setScriptLanguage() { <mask> for (var index = 0; index < this.elementForscriptLanguage.length; index++) { <mask> var obj = this.elementForscript...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/settingsPG.js
/** * When something is written in the editor, it reset the safe mode */
<mask> <mask> this.multipleSize = [1280, 1024, 'Mobile']; <mask> } <mask> <mask> // TO DO - Comment this correctly <mask> markDirty() { <mask> if (this.parent.monacoCreator.BlockEditorChange) return; <mask> <mask> this.setToMultipleID("safemodeToggle", "addClass",...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/41427c66e6ff858ffe1e0019a82d087638582f4c
Playground/js/utils.js
import { ICanvasGraphServiceSettings, IPerfMinMax, IGraphDrawableArea, IPerfMousePanningPosition, IPerfIndexBounds, IPerfTooltip, IPerfTextMeasureCache, IPerfLayoutSize, IPerfTicker } from "./graphSupportingTypes";
<mask> import { ICanvasGraphServiceSettings, IPerfMinMax, IGraphDrawableArea, IPerfMousePanningPosition, IPerfIndexBounds, IPerfTooltip, IPerfTextMeasureCache, IPerfLayoutSize } from "./graphSupportingTypes"; <mask> import { IPerfDatasets, IPerfMetadata } from "babylonjs/Misc/interfaces/iPerfViewer"; <mask> import {...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
const tickerHorizontalPadding = 10;
<mask> const spaceBetweenTextAndBox = 5; <mask> <mask> const playheadSize = 8; <mask> const dividerSize = 2; <mask> <mask> const axisLineLength = 10; </s> Added ticker support Former-commit-id: 4bcd6531b5159fa4e8ab159c9288c04da0b53017 </s> remove const pixelsPerItem = this._width / this._sizeOfWindow...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
const maximumDatasetsAllowed = 64;
<mask> // A string containing the alphabet, used in line height calculation for the font. <mask> const alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; <mask> <mask> // Arbitrary maximum used to make some GC optimizations. <mask> const maximumDatasetsAllowed = 32; <mask> <mask> // time in ms ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
private _tooltipTextCache: IPerfTextMeasureCache; private _tickerTextCache: IPerfTextMeasureCache; private _tickerItems: IPerfTicker[];
<mask> private _hoverPosition: number | null; <mask> private _drawableArea: IGraphDrawableArea; <mask> private _axisHeight: number; <mask> private _tooltipItems: IPerfTooltip[]; <mask> private _textCache: IPerfTextMeasureCache; <mask> <mask> private readonly _tooltipLineHeight: number; ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
this._tooltipTextCache = {text: "", width: 0}; this._tickerTextCache = {text: "", width: 0};
<mask> this._position = null; <mask> this._datasetBounds = { start: 0, end: 0 }; <mask> this._globalTimeMinMax = {min: Infinity, max: 0}; <mask> this._drawableArea = {top: 0, left: 0, right: 0, bottom: 0}; <mask> this._textCache = {text: "", width: 0}; <mask> this._...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
this._tickerItems = [];
<mask> this._tooltipTextCache = {text: "", width: 0}; <mask> this._tickerTextCache = {text: "", width: 0}; <mask> this._tooltipItems = []; <mask> <mask> for (let i = 0; i < maximumDatasetsAllowed; i++) { <mask> this._tooltipItems.push({text: "", color: ""}); <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
this._tooltipItems.push({text: "", color: ""}); this._tickerItems.push({id: "", max: 0, min: 0});
<mask> this._textCache = {text: "", width: 0}; <mask> this._tooltipItems = []; <mask> <mask> for (let i = 0; i < maximumDatasetsAllowed; i++) { <mask> this._tooltipItems.push({ text: "", color: "" }); <mask> } <mask> <mask> if (!this._ctx) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
const numberOfTickers = this._drawTickers(this._drawableArea, this._datasetBounds);
<mask> this._drawableArea.bottom = this._height; <mask> this._drawableArea.right = this._width; <mask> <mask> this._drawTimeAxis(this._globalTimeMinMax, this._drawableArea); <mask> this._drawPlayheadRegion(this._drawableArea, updatedScaleFactor); <mask> <mask> const {lef...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
let valueMinMax: IPerfMinMax | undefined; // we have already calculated the min and max while getting the tickers, so use those. for (let i = 0; i < numberOfTickers; i++) { if (this._tickerItems[i].id === id) { valueMinMax = this._tickerItem...
<mask> this._drawPlayheadRegion(this._drawableArea, updatedScaleFactor); <mask> const {left, right, bottom, top} = this._drawableArea; <mask> // process, and then draw our points <mask> this.datasets.ids.forEach((id, idOffset) => { <mask> // we don't want to draw hidden ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
// if we could not find the min max object it must be hidden so we skip. if (!valueMinMax) { return; }
<mask> if (!!this.metadata.get(id)?.hidden) { <mask> return; <mask> } <mask> <mask> const valueMinMax = this._getMinMax(this._datasetBounds, idOffset); <mask> <mask> ctx.beginPath(); <mask> ctx.strokeStyle = this.metadata.get(id)?.col...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
if (longestText === this._tooltipTextCache.text) { width = this._tooltipTextCache.width;
<mask> const textHeight = this._tooltipLineHeight + Math.floor(tooltipHorizontalPadding / 2); <mask> <mask> // initialize width with cached value or measure width of longest text and update cache. <mask> let width: number; <mask> if (longestText === this._textCache.text) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
this._tooltipTextCache.text = longestText; this._tooltipTextCache.width = width;
<mask> if (longestText === this._textCache.text) { <mask> width = this._textCache.width; <mask> } else { <mask> width = ctx.measureText(longestText).width + boxLength + 2 * tooltipHorizontalPadding + spaceBetweenTextAndBox; <mask> this._textCache.text = longestTe...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
const pixelsPerItem = (this._drawableArea.right - this._drawableArea.left) / this._sizeOfWindow;
<mask> return; <mask> } <mask> <mask> const pixelDelta = this._panPosition.delta + event.clientX - this._panPosition.xPos; <mask> const pixelsPerItem = this._width / this._sizeOfWindow; <mask> const itemsDelta = pixelDelta / pixelsPerItem | 0; <mask> const pos...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/canvasGraphService.ts
/** * Defines the structure representing necessary ticker information. */ export interface IPerfTicker extends IPerfMinMax { id: string; }
<mask> right: number; <mask> } <mask> <mask> /** <mask> * Defines what settings our canvas graphing service accepts <mask> */ <mask> export interface ICanvasGraphServiceSettings { </s> Added ticker support Former-commit-id: 4bcd6531b5159fa4e8ab159c9288c04da0b53017 </s> remove if (longestText ==...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/418157b0e3109e770e578adae76f71eb9d96acb8
inspector/src/components/graph/graphSupportingTypes.ts
private _callbackGamepadDisconnected: (gamepad: Gamepad) => void;
<mask> navigator.webkitGetGamepads || navigator.msGetGamepads || navigator.webkitGamepads); <mask> <mask> private _callbackGamepadConnected: (gamepad: T) => void; <mask> <mask> private _onGamepadConnectedEvent: (evt) => void; <mask> private _onGamepadDisonnectedEvent: (evt) =...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
private _onGamepadDisonnectedEvent: (evt) => void;
<mask> <mask> private _callbackGamepadConnected: (gamepad: T) => void; <mask> <mask> private _onGamepadConnectedEvent: (evt) => void; <mask> private _onGamepadDisonnectedEvent: (evt: Event) => void; <mask> <mask> constructor(ongamedpadconnected: (gamepad: T) => void) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
constructor(ongamedpadconnected: (gamepad: T) => void, ongamedpaddisconnected?: (gamepad: T) => void) {
<mask> <mask> private _onGamepadConnectedEvent: (evt) => void; <mask> private _onGamepadDisonnectedEvent: (evt: Event) => void; <mask> <mask> constructor(ongamedpadconnected: (gamepad: T) => void) { <mask> this._callbackGamepadConnected = ongamedpadconnected; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
this._callbackGamepadDisconnected = ongamedpaddisconnected;
<mask> <mask> constructor(ongamedpadconnected: (gamepad: T) => void, ongamedpaddisconnected?: (gamepad: T) => void) { <mask> this._callbackGamepadConnected = ongamedpadconnected; <mask> if (this.gamepadSupport) { <mask> //first add already-connected gamepads <mask>...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
this._onGamepadDisconnected(evt.gamepad);
<mask> this._onGamepadConnectedEvent = (evt) => { <mask> this._onGamepadConnected(evt.gamepad); <mask> }; <mask> this._onGamepadDisonnectedEvent = (evt) => { <mask> this._onGamepadDisconnected(evt); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
this.oneGamepadConnected = false; this._stopMonitoringGamepads(); this.babylonGamepads = [];
<mask> this._onGamepadConnectedEvent = null; <mask> this._onGamepadDisonnectedEvent = null; <mask> } <mask> } <mask> <mask> private _onGamepadConnected(gamepad: Gamepad) { <mask> // Protection code for Chrome which has a very buggy gamepad ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
private _onGamepadConnected(gamepad: Gamepad) { // Protection code for Chrome which has a very buggy gamepad implementation... // And raises a connected event on disconnection for instance if(gamepad.index in this.babylonGamepads) { return; } ...
<mask> this._onGamepadDisonnectedEvent = null; <mask> } <mask> } <mask> <mask> private _onGamepadConnected(gamepad) { <mask> var newGamepad = this._addNewGamepad(gamepad); <mask> if (this._callbackGamepadConnected) this._callbackGamepadConnecte...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
private _onGamepadDisconnected(gamepad: Gamepad) {
<mask> this.babylonGamepads.push(newGamepad); <mask> return newGamepad; <mask> } <mask> <mask> private _onGamepadDisconnected(evt) { <mask> // Remove the gamepad from the list of gamepads to monitor. <mask> for (var i in this.babylonGamepads) { <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
if (this.babylonGamepads[i].index == gamepad.index) {
<mask> <mask> private _onGamepadDisconnected(evt) { <mask> // Remove the gamepad from the list of gamepads to monitor. <mask> for (var i in this.babylonGamepads) { <mask> if (this.babylonGamepads[i].index == evt.gamepad.index) { <mask> this.baby...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
console.log("gamepad removed from collection");
<mask> for (var i in this.babylonGamepads) { <mask> if (this.babylonGamepads[i].index == gamepad.index) { <mask> this.babylonGamepads.splice(+i, 1); <mask> break; <mask> } <mask> } <mask> <mask> // If no...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
console.log("No more gamepad connected. Collection empty.");
<mask> } <mask> <mask> // If no gamepads are left, stop the polling loop. <mask> if (this.babylonGamepads.length == 0) { <mask> this._stopMonitoringGamepads(); <mask> this.oneGamepadConnected = false; <mask> } <mask> if...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
this.oneGamepadConnected = false;
<mask> console.log("No more gamepad connected. Collection empty."); <mask> this._stopMonitoringGamepads(); <mask> } <mask> if (this._callbackGamepadDisconnected) this._callbackGamepadDisconnected(gamepad); <mask> } <mask> </s> Cleaning & improving ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
if (this._callbackGamepadDisconnected) this._callbackGamepadDisconnected(gamepad);
<mask> console.log("No more gamepad connected. Collection empty."); <mask> this._stopMonitoringGamepads(); <mask> this.oneGamepadConnected = false; <mask> } <mask> } <mask> <mask> private _startMonitoringGamepads() { <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
// Hack to be compatible Chrome
<mask> this.isMonitoring = false; <mask> } <mask> <mask> private _checkGamepadsStatus() { <mask> // updating gamepad objects <mask> this._updateGamepadObjects(); <mask> <mask> for (var i in this.babylonGamepads) { <mask> this.bab...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
// This function is called only on Chrome, which does not properly support // connection/disconnection events and forces you to recopy again the gamepad object
<mask> } <mask> } <mask> } <mask> <mask> // This function is called only on Chrome, which does not yet support <mask> // connection/disconnection events, but requires you to monitor <mask> // an array for changes. <mask> private _updateGamepad...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
// Forced to copy again this object for Chrome for unknown reason
<mask> } <mask> } <mask> else { <mask> this.babylonGamepads[i].browserGamepad = gamepads[i]; <mask> } <mask> } <mask> } <mask> } <mask> } </s> Cleaning & improvin...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
constructor(id: string, index: number, browserGamepad) { super(id, index, browserGamepad);
<mask> public onbuttonup(callback: (buttonReleased: number) => void) { <mask> this._onbuttonup = callback; <mask> } <mask> <mask> constructor(public id: string, public index: number, public gamepad) { <mask> super(id, index, gamepad); <mask> this.type ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
this._buttons = new Array(browserGamepad.buttons.length);
<mask> <mask> constructor(public id: string, public index: number, public gamepad) { <mask> super(id, index, gamepad); <mask> this.type = Gamepad.GENERIC; <mask> this._buttons = new Array(gamepad.buttons.length); <mask> } <mask> <mask> private _setBu...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
this._buttons[index] = this._setButtonValue(this.browserGamepad.buttons[index].value, this._buttons[index], index);
<mask> <mask> public update() { <mask> super.update(); <mask> for (var index = 0; index < this._buttons.length; index++) { <mask> this._buttons[index] = this._setButtonValue(this.gamepad.buttons[index].value, this._buttons[index], index); <mask> } <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4235bfdb560028f0cf7002f3f49dc78020cda318
src/Tools/babylon.gamepads.ts
state.sharedData.blocksWithDefines.push(this); state.sharedData.bindableBlocks.push(this);
<mask> super._buildBlock(state); <mask> <mask> state.sharedData.blockingBlocks.push(this); <mask> state.sharedData.textureBlocks.push(this); <mask> <mask> this._samplerName = state._getFreeVariableName(this.name + "Sampler"); <mask> state.samplers.push(this._samplerName)...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4320f7a98baf4ad8d974f112ea2933ba494ad274
src/Materials/Node/Blocks/Dual/textureBlock.ts
this._samplerName = state._getFreeVariableName(this.name + "Sampler"); state._samplerDeclaration += `uniform sampler2D ${this._samplerName};\r\n`; state.samplers.push(this._samplerName);
<mask> state.sharedData.blocksWithDefines.push(this); <mask> state.sharedData.bindableBlocks.push(this); <mask> <mask> if (state.target !== NodeMaterialBlockTargets.Fragment) { <mask> // Vertex <mask> this._injectVertexCode(state); <mask> return; <mas...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4320f7a98baf4ad8d974f112ea2933ba494ad274
src/Materials/Node/Blocks/Dual/textureBlock.ts
state._samplerDeclaration += `uniform sampler2D ${this._samplerName};\r\n`; state.samplers.push(this._samplerName);
<mask> return; <mask> } <mask> <mask> this._linearDefineName = state._getFreeDefineName("ISLINEAR"); <mask> <mask> let comments = `//${this.name}`; <mask> state._emitFunctionFromInclude("helperFunctions", comments); <mask> <mask> if (this._isMixed) { </s>...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4320f7a98baf4ad8d974f112ea2933ba494ad274
src/Materials/Node/Blocks/Dual/textureBlock.ts
<mask> return; <mask> } <mask> <mask> this._linearDefineName = state._getFreeDefineName("ISLINEAR"); <mask> state.sharedData.blocksWithDefines.push(this); <mask> state.sharedData.bindableBlocks.push(this); <mask> <mask> let comments = `//${this.name}`; <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4320f7a98baf4ad8d974f112ea2933ba494ad274
src/Materials/Node/Blocks/Dual/textureBlock.ts
case NodeMaterialBlockConnectionPointTypes.Color3:
<mask> state.compilationString += this._declareOutput(output, state) + ` = ${transform.associatedVariableName} * vec4(${vector.associatedVariableName}, ${this._writeFloat(this.complementZ)}, ${this._writeFloat(this.complementW)});\r\n`; <mask> break; <mask> cas...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4320f7a98baf4ad8d974f112ea2933ba494ad274
src/Materials/Node/Blocks/transformBlock.ts
Scene.prototype.attachControl = function (attachUp, attachDown, attachMove) {
<mask> this._pointerY = this._pointerY - this.cameraToUseForPointers.viewport.y * this._engine.getRenderHeight(); <mask> } <mask> }; <mask> // Pointers handling <mask> Scene.prototype.attachControl = function () { <mask> var _this = this; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4378dc1de850cb542471ce455e82e3c6893756c2
src/babylon.scene.js
if (attachUp === void 0) { attachUp = true; } if (attachDown === void 0) { attachDown = true; } if (attachMove === void 0) { attachMove = true; }
<mask> Scene.prototype.attachControl = function (attachUp, attachDown, attachMove) { <mask> var _this = this; <mask> var spritePredicate = function (sprite) { <mask> return sprite.isPickable && sprite.actionManager && sprite.actionManager.hasPointerTriggers; <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4378dc1de850cb542471ce455e82e3c6893756c2
src/babylon.scene.js
if (attachMove) { this._engine.getRenderingCanvas().addEventListener(eventPrefix + "move", this._onPointerMove, false); // Wheel this._engine.getRenderingCanvas().addEventListener('mousewheel', this._onPointerMove, false); this._engine.getRende...
<mask> _this.actionManager.processTrigger(BABYLON.ActionManager.OnKeyUpTrigger, BABYLON.ActionEvent.CreateNewFromScene(_this, evt)); <mask> } <mask> }; <mask> var eventPrefix = BABYLON.Tools.GetPointerPrefix(); <mask> this._engine.getRendering...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4378dc1de850cb542471ce455e82e3c6893756c2
src/babylon.scene.js
/** * Attach events to the canvas (To handle actionManagers triggers and raise onPointerMove, onPointerDown and onPointerUp * @param attachUp defines if you want to attach events to pointerup * @param attachDown defines if you want to attach events to pointerdown * @param a...
<mask> } <mask> } <mask> <mask> // Pointers handling <mask> public attachControl() { <mask> var spritePredicate = (sprite: Sprite): boolean => { <mask> return sprite.isPickable && sprite.actionManager && sprite.actionManager.hasPointerTriggers; <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4378dc1de850cb542471ce455e82e3c6893756c2
src/babylon.scene.ts
<mask> }; <mask> <mask> <mask> var eventPrefix = Tools.GetPointerPrefix(); <mask> this._engine.getRenderingCanvas().addEventListener(eventPrefix + "move", this._onPointerMove, false); <mask> this._engine.getRenderingCanvas().addEventListener(eventPrefix + "down", ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4378dc1de850cb542471ce455e82e3c6893756c2
src/babylon.scene.ts
if (attachMove) { this._engine.getRenderingCanvas().addEventListener(eventPrefix + "move", this._onPointerMove, false); // Wheel this._engine.getRenderingCanvas().addEventListener('mousewheel', this._onPointerMove, false); this._engine.getR...
<mask> this._engine.getRenderingCanvas().addEventListener(eventPrefix + "move", this._onPointerMove, false); <mask> this._engine.getRenderingCanvas().addEventListener(eventPrefix + "down", this._onPointerDown, false); <mask> this._engine.getRenderingCanvas().addEventListener(event...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4378dc1de850cb542471ce455e82e3c6893756c2
src/babylon.scene.ts
"install": "cd ../../ && npm install && cd Playground/ && npm install && cd ../tests/unit/ && npm install && cd ../../Viewer/tests/ && npm install && cd ../../Viewer && npm install && cd ../Tools/Gulp/"
<mask> "webpack": "^4.20.2", <mask> "webpack-stream": "5.0.0" <mask> }, <mask> "scripts": { <mask> "install": "cd ../../proceduralTexturesLibrary && npm install && cd ../materialsLibrary && npm install && cd ../postProcessLibrary && npm install && cd ../gui && npm install && cd ../i...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/460e23f9ba184594a6559cf548cd71f759b52f63
Tools/Gulp/package.json
"typescript": "~3.0.1", "@types/node": "^10.5.3", "clean-webpack-plugin": "^0.1.19", "ts-loader": "^5.2.1", "webpack": "^4.20.2", "webpack-cli": "^3.1.1", "webpack-dev-server": "^3.1.5", "dts-bundle-webpack": "^1.0.0", "css-loader": "^1.0.0", ...
<mask> "readmeFilename": "README.md", <mask> "dependencies": {}, <mask> "devDependencies": { <mask> "base64-font-loader": "0.0.4", <mask> "typescript": "~3.0.1" <mask> } <mask> } </s> Remove Satellites pckg.json Former-commit-id: 4c06de29c11f758781b9918631104dc6361e1031 </s> rem...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/460e23f9ba184594a6559cf548cd71f759b52f63
package.json
<mask> "devDependencies": { <mask> "base64-font-loader": "0.0.4", <mask> "typescript": "~3.0.1" <mask> } <mask> } </s> Remove Satellites pckg.json Former-commit-id: 4c06de29c11f758781b9918631104dc6361e1031 </s> remove "typescript": "~3.0.1" </s> add "typescript": "~3.0.1"...
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/BabylonJS/Babylon.js/commit/460e23f9ba184594a6559cf548cd71f759b52f63
package.json
pbrMaterial.subSurface.intensityTexture = texture;
<mask> if (extension.transmissionTexture) { <mask> (extension.transmissionTexture as ITextureInfo).nonColorData = true; <mask> return this._loader.loadTextureInfoAsync(`${context}/transmissionTexture`, extension.transmissionTexture, undefined) <mask> .then((texture: B...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
loaders/src/glTF/2.0/Extensions/KHR_materials_transmission.ts
public SS_INTENSITY_TEXTURE = false; public SS_INTENSITY_TEXTUREDIRECTUV = 0;
<mask> public SS_THICKNESSANDMASK_TEXTUREDIRECTUV = 0; <mask> public SS_HAS_THICKNESS = false; <mask> <mask> public SS_REFRACTIONMAP_3D = false; <mask> public SS_REFRACTIONMAP_OPPOSITEZ = false; <mask> public SS_LODINREFRACTIONALPHA = false; </s> Add intensityTexture to PBR sub surface For...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrBaseMaterial.ts
SS_INTENSITY_TEXTURE: boolean; SS_INTENSITY_TEXTUREDIRECTUV: number;
<mask> <mask> SS_THICKNESSANDMASK_TEXTURE: boolean; <mask> SS_THICKNESSANDMASK_TEXTUREDIRECTUV: number; <mask> SS_HAS_THICKNESS: boolean; <mask> <mask> SS_REFRACTIONMAP_3D: boolean; <mask> SS_REFRACTIONMAP_OPPOSITEZ: boolean; <mask> SS_LODINREFRACTIONALPHA: boolean; <mask> SS_GAMM...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
* The red (or green if useGltfStyleThicknessTexture=true) channel of the texture should contain the thickness remapped between 0 and 1.
<mask> <mask> private _thicknessTexture: Nullable<BaseTexture> = null; <mask> /** <mask> * Stores the average thickness of a mesh in a texture (The texture is holding the values linearly). <mask> * The red channel of the texture should contain the thickness remapped between 0 and 1. <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
* Note that if intensityTexture is provided it takes precedence over thicknessTexture + useMaskFromThicknessTexture * * the green channel is the refraction intensity. * * the blue channel is the translucency intensity. * If useGltfStyleThicknessTexture = true, the red channel is used for both ref...
<mask> <mask> private _useMaskFromThicknessTexture = false; <mask> /** <mask> * Stores the intensity of the different subsurface effects in the thickness texture. <mask> * * the green channel is the translucency intensity. <mask> * * the blue channel is the scattering intensity. <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
private _intensityTexture: Nullable<BaseTexture> = null; /** * Stores the intensity of the different subsurface effects. If provided, it takes precedence over thicknessTexture + useMaskFromThicknessTexture * * the green channel is the refraction intensity. * * the blue channel is the transluc...
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty") <mask> public useMaskFromThicknessTexture: boolean = false; <mask> <mask> private _scene: Scene; <mask> private _useGltfStyleThicknessTexture = false; <mask> /** <mask> * Stores the intensity of the different subsurface effect...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
* * the red channel is the transmission/translucency intensity (read from intensityTexture if provided, else from thicknessTexture)
<mask> private _useGltfStyleThicknessTexture = false; <mask> /** <mask> * Stores the intensity of the different subsurface effects in the thickness texture. This variation <mask> * matches the channel-packing that is used by glTF. <mask> * * the red channel is the transmission/translucency i...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
defines.SS_INTENSITY_TEXTURE = false;
<mask> defines.SS_TRANSLUCENCY = this._isTranslucencyEnabled; <mask> defines.SS_SCATTERING = this._isScatteringEnabled; <mask> defines.SS_THICKNESSANDMASK_TEXTURE = false; <mask> defines.SS_HAS_THICKNESS = false; <mask> defines.SS_MASK_FROM_THICKNESS_TEXT...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
const hasSeparateIntensityTexture = this._intensityTexture && !(this._thicknessTexture && this._intensityTexture.checkTransformsAreIdentical(this._thicknessTexture) && this._intensityTexture._texture === this._thicknessTexture._texture); ...
<mask> if (this._isRefractionEnabled || this._isTranslucencyEnabled || this._isScatteringEnabled) { <mask> defines.SUBSURFACE = true; <mask> <mask> if (defines._areTexturesDirty) { <mask> if (scene.texturesEnabled) { <mask> i...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
if (hasSeparateIntensityTexture && MaterialFlags.IntensityTextureEnabled) { MaterialHelper.PrepareDefinesForMergedUV(this._intensityTexture!, defines, "SS_INTENSITY_TEXTURE"); }
<mask> if (this._thicknessTexture && MaterialFlags.ThicknessTextureEnabled) { <mask> MaterialHelper.PrepareDefinesForMergedUV(this._thicknessTexture, defines, "SS_THICKNESSANDMASK_TEXTURE"); <mask> } <mask> } <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
defines.SS_MASK_FROM_THICKNESS_TEXTURE = this._useMaskFromThicknessTexture && !hasSeparateIntensityTexture;
<mask> } <mask> } <mask> <mask> defines.SS_HAS_THICKNESS = (this.maximumThickness - this.minimumThickness) !== 0.0; <mask> defines.SS_MASK_FROM_THICKNESS_TEXTURE = this._useMaskFromThicknessTexture; <mask> defines.SS_USE_GLTF_THI...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
const defines = subMesh!._materialDefines as unknown as IMaterialSubSurfaceDefines;
<mask> * @param subMesh the submesh to bind data for <mask> */ <mask> public bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: Engine, isFrozen: boolean, lodBasedMicrosurface: boolean, realTimeFiltering: boolean, subMesh: SubMesh): void { <mask> var refractionTexture = this._ge...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
if (this._intensityTexture && MaterialFlags.IntensityTextureEnabled && defines.SS_INTENSITY_TEXTURE) { uniformBuffer.updateFloat2("vIntensityInfos", this._intensityTexture.coordinatesIndex, this._intensityTexture.level); MaterialHelper.BindTextureMatrix(this._intensityTextu...
<mask> MaterialHelper.BindTextureMatrix(this._thicknessTexture, uniformBuffer, "thickness"); <mask> } <mask> <mask> subMesh.getRenderingMesh().getWorldMatrix().decompose(TmpVectors.Vector3[0]); <mask> <mask> const thicknessScale = Math.max(Math.abs(TmpVectors....
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
if (this._intensityTexture && MaterialFlags.IntensityTextureEnabled) { uniformBuffer.setTexture("intensitySampler", this._intensityTexture); }
<mask> uniformBuffer.setTexture("thicknessSampler", this._thicknessTexture); <mask> } <mask> <mask> if (refractionTexture && MaterialFlags.RefractionTextureEnabled) { <mask> if (lodBasedMicrosurface) { <mask> uniformBuffer.setTexture("re...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
"vRefractionInfos", "vThicknessInfos", "vIntensityInfos", "vThicknessParam",
<mask> public static AddUniforms(uniforms: string[]): void { <mask> uniforms.push( <mask> "vDiffusionDistance", "vTintColor", "vSubSurfaceIntensity", <mask> "vRefractionMicrosurfaceInfos", "vRefractionFilteringInfo", <mask> "vRefractionInfos", "vThicknessInfos", "vTh...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
"refractionMatrix", "thicknessMatrix", "intensityMatrix", "scatteringDiffusionProfile");
<mask> "vDiffusionDistance", "vTintColor", "vSubSurfaceIntensity", <mask> "vRefractionMicrosurfaceInfos", "vRefractionFilteringInfo", <mask> "vRefractionInfos", "vThicknessInfos", "vThicknessParam", <mask> "vRefractionPosition", "vRefractionSize", <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
samplers.push("thicknessSampler", "intensitySampler",
<mask> * Add the required samplers to the current list. <mask> * @param samplers defines the current sampler list. <mask> */ <mask> public static AddSamplers(samplers: string[]): void { <mask> samplers.push("thicknessSampler", <mask> "refractionSampler", "refractionSamplerLo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
uniformBuffer.addUniform("vIntensityInfos", 2);
<mask> uniformBuffer.addUniform("vRefractionInfos", 4); <mask> uniformBuffer.addUniform("refractionMatrix", 16); <mask> uniformBuffer.addUniform("vThicknessInfos", 2); <mask> uniformBuffer.addUniform("thicknessMatrix", 16); <mask> uniformBuffer.addUniform("intensityMatrix", ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
uniformBuffer.addUniform("intensityMatrix", 16);
<mask> uniformBuffer.addUniform("refractionMatrix", 16); <mask> uniformBuffer.addUniform("vThicknessInfos", 2); <mask> uniformBuffer.addUniform("vIntensityInfos", 2); <mask> uniformBuffer.addUniform("thicknessMatrix", 16); <mask> uniformBuffer.addUniform("vThicknessParam", 2...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Materials/PBR/pbrSubSurfaceConfiguration.ts
#ifdef SS_INTENSITY_TEXTURE const in vec4 intensityMap, #endif
<mask> const in vec3 specularEnvironmentReflectance, <mask> #ifdef SS_THICKNESSANDMASK_TEXTURE <mask> const in vec4 thicknessMap, <mask> #endif <mask> #ifdef REFLECTION <mask> #ifdef SS_TRANSLUCENCY <mask> const in mat4 reflectionMatrix, <mask> #ifdef ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/ShadersInclude/pbrBlockSubSurface.fx
#ifdef SS_INTENSITY_TEXTURE uniform vec2 vIntensityInfos; uniform mat4 intensityMatrix; #endif
<mask> #endif <mask> <mask> uniform vec2 vThicknessParam; <mask> uniform vec3 vDiffusionDistance; <mask> uniform vec4 vTintColor; <mask> uniform vec3 vSubSurfaceIntensity; <mask> #endif <mask> </s> Add intensityTexture to PBR sub surface Former-commit-id: 82956cb8c26b7d2468940d33cf13354...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/ShadersInclude/pbrFragmentDeclaration.fx
#ifdef SS_INTENSITY_TEXTURE #if SS_INTENSITY_TEXTUREDIRECTUV == 1 #define vIntensityUV vMainUV1 #elif SS_INTENSITY_TEXTUREDIRECTUV == 2 #define vIntensityUV vMainUV2 #else varying vec2 vIntensityUV; #endif uniform sampler2D intens...
<mask> #endif <mask> uniform sampler2D thicknessSampler; <mask> #endif <mask> #endif </s> Add intensityTexture to PBR sub surface Former-commit-id: 82956cb8c26b7d2468940d33cf1335446da8c447
[ "keep", "keep", "add", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.fx
vec2 vIntensityInfos;
<mask> mat4 refractionMatrix; <mask> vec2 vThicknessInfos; <mask> mat4 thicknessMatrix; <mask> mat4 intensityMatrix; <mask> vec2 vThicknessParam; <mask> vec3 vDiffusionDistance; <mask> vec4 vTintColor; </s> Add intensityTexture to PBR sub surface Former-commit-id: 82956cb8c26b7d246...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/ShadersInclude/pbrUboDeclaration.fx
mat4 intensityMatrix;
<mask> mat4 refractionMatrix; <mask> vec2 vThicknessInfos; <mask> vec2 vIntensityInfos; <mask> mat4 thicknessMatrix; <mask> vec2 vThicknessParam; <mask> vec3 vDiffusionDistance; <mask> vec4 vTintColor; <mask> vec3 vSubSurfaceIntensity; <mask> vec3 vRefractionPosition; </s> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/ShadersInclude/pbrUboDeclaration.fx
#ifdef SS_INTENSITY_TEXTURE uniform vec2 vIntensityInfos; uniform mat4 intensityMatrix; #endif
<mask> uniform mat4 thicknessMatrix; <mask> #endif <mask> #endif <mask> <mask> #ifdef NORMAL <mask> #if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX) <mask> #ifdef USESPHERICALFROMREFLECTIONMAP </s> Add intensityTexture to PBR sub surface Former-commit-id: 82...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/ShadersInclude/pbrVertexDeclaration.fx
#ifdef SS_INTENSITY_TEXTURE vec4 intensityMap = texture2D(intensitySampler, vIntensityUV + uvOffset); #endif
<mask> vec4 thicknessMap = texture2D(thicknessSampler, vThicknessUV + uvOffset); <mask> #endif <mask> <mask> subSurfaceBlock( <mask> vSubSurfaceIntensity, <mask> vThicknessParam, <mask> vTintColor, <mask> normalW, </s> Add intensityTe...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/pbr.fragment.fx
#ifdef SS_INTENSITY_TEXTURE intensityMap, #endif
<mask> thicknessMap, <mask> #endif <mask> #ifdef REFLECTION <mask> #ifdef SS_TRANSLUCENCY <mask> reflectionMatrix, <mask> #ifdef USESPHERICALFROMREFLECTIONMAP <mask> #if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/pbr.fragment.fx
#if defined(SS_INTENSITY_TEXTURE) && SS_INTENSITY_TEXTUREDIRECTUV == 0 varying vec2 vIntensityUV; #endif
<mask> varying vec2 vThicknessUV; <mask> #endif <mask> #endif <mask> <mask> // Output <mask> varying vec3 vPositionW; </s> Add intensityTexture to PBR sub surface Former-commit-id: 82956cb8c26b7d2468940d33cf1335446da8c447
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/pbr.vertex.fx
#if defined(SS_INTENSITY_TEXTURE) && SS_INTENSITY_TEXTUREDIRECTUV == 0 if (vIntensityInfos.x == 0.) { vIntensityUV = vec2(intensityMatrix * vec4(uvUpdated, 1.0, 0.0)); } else { vIntensityUV = vec2(intensityMatrix * vec4(uv2, 1.0, 0.0)); ...
<mask> { <mask> vThicknessUV = vec2(thicknessMatrix * vec4(uv2, 1.0, 0.0)); <mask> } <mask> #endif <mask> #endif <mask> <mask> // TBN <mask> #include<bumpVertex> </s> Add intensityTexture to PBR sub surface Former-commit-id: 82956cb8c26b7d2468940d33cf1335446da8c447
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/463a54a8a250b57bc4ebc5fcb7b5b794e5d5671f
src/Shaders/pbr.vertex.fx