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
} else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {
<mask> if (predicate) { <mask> if (!predicate(mesh)) { <mask> continue; <mask> } <mask> } <mask> else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) { <mask> continue; <mask> } <mask> var world = mesh.getWorldMatrix(); <mask> var ray = rayFunction(world); <mask> var result = mesh.intersects(ray, fastCheck); </s> Update after project rebuild Former-commit-id: a2d5c6a94ad4c31a48c189703e1214d6166528bf </s> remove } else { </s> add } else { </s> remove } else { </s> add } else { </s> remove } else { </s> add } else { </s> remove } else if (material.needAlphaTesting()) { </s> add } else if (material.needAlphaTesting()) { </s> remove } else { </s> add } else {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/edcbda493d762fc8ea70d9f619197c04976ad87e
Babylon/babylon.scene.js
return this._internalPick(function (world) { return _this.createPickingRay(x, y, world, camera); }, predicate, fastCheck);
<mask> /// <param name="y">Y position on screen</param> <mask> /// <param name="predicate">Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true</param> <mask> /// <param name="fastCheck">Launch a fast check only using the bounding boxes. Can be set to null.</param> <mask> /// <param name="camera">camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used</param> <mask> return this._internalPick(function (world) { return _this.createPickingRay(x, y, world, camera); }, predicate, fastCheck); <mask> }; <mask> Scene.prototype.pickWithRay = function (ray, predicate, fastCheck) { <mask> var _this = this; <mask> return this._internalPick(function (world) { <mask> if (!_this._pickWithRayInverseMatrix) { </s> Update after project rebuild Former-commit-id: a2d5c6a94ad4c31a48c189703e1214d6166528bf </s> remove } else { </s> add } else { </s> remove } else { </s> add } else { </s> remove * Constroctor. * @param iterations the number of iterations. * @param _fn the function to run each iteration * @param _successCallback the callback that will be called upon succesful execution * @param offset starting offset. */ </s> add * Constroctor. * @param iterations the number of iterations. * @param _fn the function to run each iteration * @param _successCallback the callback that will be called upon succesful execution * @param offset starting offset. */ </s> remove this.cameraToUseForPointers = null; // Define this parameter if you are using multiple cameras and you want to specify which one should be used for pointer position </s> add this.cameraToUseForPointers = null; </s> remove } else { </s> add } else {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/edcbda493d762fc8ea70d9f619197c04976ad87e
Babylon/babylon.scene.js
<mask> }; <mask> Scene.prototype.getMaterialByTags = function (tagsQuery) { <mask> return this._getByTags(this.materials, tagsQuery).concat(this._getByTags(this.multiMaterials, tagsQuery)); <mask> }; <mask> // Statics <mask> Scene.FOGMODE_NONE = 0; <mask> Scene.FOGMODE_EXP = 1; <mask> Scene.FOGMODE_EXP2 = 2; <mask> Scene.FOGMODE_LINEAR = 3; <mask> Scene.MinDeltaTime = 1.0; </s> Update after project rebuild Former-commit-id: a2d5c6a94ad4c31a48c189703e1214d6166528bf </s> remove // Statics </s> add </s> remove // Statics </s> add </s> remove // Statics </s> add </s> remove // Constants </s> add </s> remove // Statics </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/edcbda493d762fc8ea70d9f619197c04976ad87e
Babylon/babylon.scene.js
<mask> return Scene; <mask> })(); <mask> BABYLON.Scene = Scene; <mask> })(BABYLON || (BABYLON = {})); <mask> //# sourceMappingURL=babylon.scene.js.map </s> Update after project rebuild Former-commit-id: a2d5c6a94ad4c31a48c189703e1214d6166528bf </s> remove //# sourceMappingURL=babylon.smartArray.js.map </s> add </s> remove //# sourceMappingURL=babylon.pickingInfo.js.map </s> add </s> remove //# sourceMappingURL=babylon.octree.js.map </s> add </s> remove //# sourceMappingURL=babylon.octreeBlock.js.map </s> add </s> remove //# sourceMappingURL=babylon.boundingBox.js.map </s> add
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/BabylonJS/Babylon.js/commit/edcbda493d762fc8ea70d9f619197c04976ad87e
Babylon/babylon.scene.js
target.addInPlace(new Vector3(0, 0, 1));
<mask> mesh.lookAt(target); <mask> break; <mask> case Container3D.FACEFORWARDREVERSED_ORIENTATION: <mask> case Container3D.FACEORIGINREVERSED_ORIENTATION: <mask> target.addInPlace(new BABYLON.Vector3(0, 0, 1)); <mask> mesh.lookAt(target); <mask> break; <mask> } <mask> <mask> } </s> Moving a bit more towards full build Former-commit-id: 5449ad9fcb95754e6c74b67f554f448d9d7e0877 </s> remove import { Observable, Scene, BaseTexture, Nullable, Vector3 } from "babylonjs"; </s> add import { Observable, Scene, BaseTexture, Nullable, Vector3, CubeTexture, Tools, ImageProcessingConfiguration } from "babylonjs"; </s> remove import { TransformNode } from "babylonjs"; </s> add import { TransformNode, Vector3, Tmp, AxesViewer } from "babylonjs"; </s> remove this.state.mode === BABYLON.Scene.FOGMODE_LINEAR && </s> add this.state.mode === Scene.FOGMODE_LINEAR && </s> remove const pickInfo = scene.pick(pickPosition.x, pickPosition.y, mesh => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0); </s> add const pickInfo = scene.pick(pickPosition.x, pickPosition.y, (mesh) => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/eed96854f54cb6581207f1530d00d59b2d296f6f
gui/src/3D/controls/planePanel.ts
this.state.mode === Scene.FOGMODE_LINEAR &&
<mask> this.state.mode === BABYLON.Scene.FOGMODE_LINEAR && <mask> <FloatLineComponent lockObject={this.props.lockObject} label="Fog start" target={scene} propertyName="fogStart" onPropertyChangedObservable={this.props.onPropertyChangedObservable} /> <mask> } <mask> { <mask> this.state.mode === BABYLON.Scene.FOGMODE_LINEAR && <mask> <FloatLineComponent lockObject={this.props.lockObject} label="Fog end" target={scene} propertyName="fogEnd" onPropertyChangedObservable={this.props.onPropertyChangedObservable} /> <mask> } <mask> </div> <mask> ); <mask> } </s> Moving a bit more towards full build Former-commit-id: 5449ad9fcb95754e6c74b67f554f448d9d7e0877 </s> remove const pickInfo = scene.pick(pickPosition.x, pickPosition.y, mesh => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0); </s> add const pickInfo = scene.pick(pickPosition.x, pickPosition.y, (mesh) => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0); </s> remove import { Observable, Scene, BaseTexture, Nullable, Vector3 } from "babylonjs"; </s> add import { Observable, Scene, BaseTexture, Nullable, Vector3, CubeTexture, Tools, ImageProcessingConfiguration } from "babylonjs"; </s> remove import { TransformNode } from "babylonjs"; </s> add import { TransformNode, Vector3, Tmp, AxesViewer } from "babylonjs"; </s> remove target.addInPlace(new BABYLON.Vector3(0, 0, 1)); </s> add target.addInPlace(new Vector3(0, 0, 1));
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/eed96854f54cb6581207f1530d00d59b2d296f6f
inspector/src/components/actionTabs/tabs/propertyGrids/fogPropertyGridComponent.tsx
import { TransformNode, Vector3, Tmp, AxesViewer } from "babylonjs";
<mask> import * as React from "react"; <mask> import { TransformNode } from "babylonjs"; <mask> import { CheckBoxLineComponent } from "../../../lines/checkBoxLineComponent"; <mask> <mask> interface IAxisViewerComponentProps { <mask> node: TransformNode <mask> } </s> Moving a bit more towards full build Former-commit-id: 5449ad9fcb95754e6c74b67f554f448d9d7e0877 </s> remove import { Observable, Scene, BaseTexture, Nullable, Vector3 } from "babylonjs"; </s> add import { Observable, Scene, BaseTexture, Nullable, Vector3, CubeTexture, Tools, ImageProcessingConfiguration } from "babylonjs"; </s> remove this.state.mode === BABYLON.Scene.FOGMODE_LINEAR && </s> add this.state.mode === Scene.FOGMODE_LINEAR && </s> remove const pickInfo = scene.pick(pickPosition.x, pickPosition.y, mesh => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0); </s> add const pickInfo = scene.pick(pickPosition.x, pickPosition.y, (mesh) => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0); </s> remove target.addInPlace(new BABYLON.Vector3(0, 0, 1)); </s> add target.addInPlace(new Vector3(0, 0, 1));
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/eed96854f54cb6581207f1530d00d59b2d296f6f
inspector/src/components/actionTabs/tabs/propertyGrids/meshes/axesViewerComponent.tsx
import { Observable, Scene, BaseTexture, Nullable, Vector3, CubeTexture, Tools, ImageProcessingConfiguration } from "babylonjs";
<mask> import * as React from "react"; <mask> import { Observable, Scene, BaseTexture, Nullable, Vector3 } from "babylonjs"; <mask> import { PropertyChangedEvent } from "../../../propertyChangedEvent"; <mask> import { LineContainerComponent } from "../../lineContainerComponent"; <mask> import { RadioButtonLineComponent } from "../../lines/radioLineComponent"; <mask> import { Color3LineComponent } from "../../lines/color3LineComponent"; <mask> import { CheckBoxLineComponent } from "../../lines/checkBoxLineComponent"; </s> Moving a bit more towards full build Former-commit-id: 5449ad9fcb95754e6c74b67f554f448d9d7e0877 </s> remove import { TransformNode } from "babylonjs"; </s> add import { TransformNode, Vector3, Tmp, AxesViewer } from "babylonjs"; </s> remove this.state.mode === BABYLON.Scene.FOGMODE_LINEAR && </s> add this.state.mode === Scene.FOGMODE_LINEAR && </s> remove const pickInfo = scene.pick(pickPosition.x, pickPosition.y, mesh => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0); </s> add const pickInfo = scene.pick(pickPosition.x, pickPosition.y, (mesh) => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0); </s> remove target.addInPlace(new BABYLON.Vector3(0, 0, 1)); </s> add target.addInPlace(new Vector3(0, 0, 1));
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/eed96854f54cb6581207f1530d00d59b2d296f6f
inspector/src/components/actionTabs/tabs/propertyGrids/scenePropertyGridComponent.tsx
const pickInfo = scene.pick(pickPosition.x, pickPosition.y, (mesh) => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0);
<mask> <mask> if (!this.state.isInPickingMode) { <mask> this._onPointerObserver = scene.onPointerObservable.add(() => { <mask> const pickPosition = scene.unTranslatedPointer; <mask> const pickInfo = scene.pick(pickPosition.x, pickPosition.y, mesh => mesh.isEnabled() && mesh.isVisible && mesh.getTotalVertices() > 0); <mask> <mask> if (pickInfo && pickInfo.hit && this.props.onSelectionChangedObservable) { <mask> this.props.onSelectionChangedObservable.notifyObservers(pickInfo.pickedMesh); <mask> } <mask> }, BABYLON.PointerEventTypes.POINTERTAP) </s> Moving a bit more towards full build Former-commit-id: 5449ad9fcb95754e6c74b67f554f448d9d7e0877 </s> remove this.state.mode === BABYLON.Scene.FOGMODE_LINEAR && </s> add this.state.mode === Scene.FOGMODE_LINEAR && </s> remove import { Observable, Scene, BaseTexture, Nullable, Vector3 } from "babylonjs"; </s> add import { Observable, Scene, BaseTexture, Nullable, Vector3, CubeTexture, Tools, ImageProcessingConfiguration } from "babylonjs"; </s> remove import { TransformNode } from "babylonjs"; </s> add import { TransformNode, Vector3, Tmp, AxesViewer } from "babylonjs"; </s> remove target.addInPlace(new BABYLON.Vector3(0, 0, 1)); </s> add target.addInPlace(new Vector3(0, 0, 1));
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/eed96854f54cb6581207f1530d00d59b2d296f6f
inspector/src/components/sceneExplorer/entities/sceneTreeItemComponent.tsx
step?: string;
<mask> onChange?: (newValue: number) => void; <mask> isInteger?: boolean; <mask> onPropertyChangedObservable?: Observable<PropertyChangedEvent>; <mask> additionalClass?: string; <mask> step?: string, <mask> digits?: number; <mask> globalState: GlobalState <mask> } <mask> <mask> export class FloatLineComponent extends React.Component<IFloatLineComponentProps, { value: string }> { </s> Fix input of decimal digits that are fixed at 2 Former-commit-id: b865b75f1dbe6a02eb8eda36f74b34dd638a684a </s> remove globalState: GlobalState </s> add globalState: GlobalState; </s> remove valueString = valueString.replace(/(.+\...).+/, "$1"); </s> add valueString = valueString.replace(this._regExp, "$1"); </s> remove value={this.state.value} onChange={evt => this.updateValue(evt.target.value)} /> </s> add value={this.state.value} onChange={(evt) => this.updateValue(evt.target.value)} /> </s> remove <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={evt => { </s> add <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={(evt) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ef94b49f3670c2503b811eab143c08531866dfcf
nodeEditor/src/sharedComponents/floatLineComponent.tsx
globalState: GlobalState;
<mask> onPropertyChangedObservable?: Observable<PropertyChangedEvent>; <mask> additionalClass?: string; <mask> step?: string, <mask> digits?: number; <mask> globalState: GlobalState <mask> } <mask> <mask> export class FloatLineComponent extends React.Component<IFloatLineComponentProps, { value: string }> { <mask> private _localChange = false; <mask> private _store: number; </s> Fix input of decimal digits that are fixed at 2 Former-commit-id: b865b75f1dbe6a02eb8eda36f74b34dd638a684a </s> remove step?: string, </s> add step?: string; </s> remove valueString = valueString.replace(/(.+\...).+/, "$1"); </s> add valueString = valueString.replace(this._regExp, "$1"); </s> remove value={this.state.value} onChange={evt => this.updateValue(evt.target.value)} /> </s> add value={this.state.value} onChange={(evt) => this.updateValue(evt.target.value)} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ef94b49f3670c2503b811eab143c08531866dfcf
nodeEditor/src/sharedComponents/floatLineComponent.tsx
private _regExp: RegExp;
<mask> private _localChange = false; <mask> private _store: number; <mask> <mask> constructor(props: IFloatLineComponentProps) { <mask> super(props); <mask> <mask> let currentValue = this.props.target[this.props.propertyName]; </s> Fix input of decimal digits that are fixed at 2 Former-commit-id: b865b75f1dbe6a02eb8eda36f74b34dd638a684a </s> remove globalState: GlobalState </s> add globalState: GlobalState; </s> remove valueString = valueString.replace(/(.+\...).+/, "$1"); </s> add valueString = valueString.replace(this._regExp, "$1"); </s> remove value={this.state.value} onChange={evt => this.updateValue(evt.target.value)} /> </s> add value={this.state.value} onChange={(evt) => this.updateValue(evt.target.value)} /> </s> remove <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={evt => { </s> add <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={(evt) => {
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ef94b49f3670c2503b811eab143c08531866dfcf
nodeEditor/src/sharedComponents/floatLineComponent.tsx
let rexp = "(.*\\."; let numDigits = this.props.digits || 2; while (numDigits--) { rexp += "."; } rexp += ").+"; this._regExp = new RegExp(rexp);
<mask> this.state = { value: currentValue ? (this.props.isInteger ? currentValue.toFixed(0) : currentValue.toFixed(this.props.digits || 2)) : "0" }; <mask> this._store = currentValue; <mask> } <mask> <mask> shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: { value: string }) { <mask> if (this._localChange) { <mask> this._localChange = false; <mask> return true; </s> Fix input of decimal digits that are fixed at 2 Former-commit-id: b865b75f1dbe6a02eb8eda36f74b34dd638a684a </s> remove valueString = valueString.replace(/(.+\...).+/, "$1"); </s> add valueString = valueString.replace(this._regExp, "$1"); </s> remove <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={evt => { </s> add <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={(evt) => { </s> remove globalState: GlobalState </s> add globalState: GlobalState; </s> remove value={this.state.value} onChange={evt => this.updateValue(evt.target.value)} /> </s> add value={this.state.value} onChange={(evt) => this.updateValue(evt.target.value)} />
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ef94b49f3670c2503b811eab143c08531866dfcf
nodeEditor/src/sharedComponents/floatLineComponent.tsx
valueString = valueString.replace(this._regExp, "$1");
<mask> if (/[^0-9\.\-]/g.test(valueString)) { <mask> return; <mask> } <mask> <mask> valueString = valueString.replace(/(.+\...).+/, "$1"); <mask> <mask> let valueAsNumber: number; <mask> <mask> if (this.props.isInteger) { <mask> valueAsNumber = parseInt(valueString); </s> Fix input of decimal digits that are fixed at 2 Former-commit-id: b865b75f1dbe6a02eb8eda36f74b34dd638a684a </s> remove globalState: GlobalState </s> add globalState: GlobalState; </s> remove value={this.state.value} onChange={evt => this.updateValue(evt.target.value)} /> </s> add value={this.state.value} onChange={(evt) => this.updateValue(evt.target.value)} /> </s> remove <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={evt => { </s> add <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={(evt) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ef94b49f3670c2503b811eab143c08531866dfcf
nodeEditor/src/sharedComponents/floatLineComponent.tsx
<input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={(evt) => {
<mask> <div className="label"> <mask> {this.props.label} <mask> </div> <mask> <div className="value"> <mask> <input type="number" step={this.props.step || "0.01"} className="numeric-input" <mask> onBlur={evt => { <mask> this.props.globalState.blockKeyboardEvents = false; <mask> }} <mask> onFocus={() => this.props.globalState.blockKeyboardEvents = true} <mask> value={this.state.value} onChange={evt => this.updateValue(evt.target.value)} /> <mask> </div> </s> Fix input of decimal digits that are fixed at 2 Former-commit-id: b865b75f1dbe6a02eb8eda36f74b34dd638a684a </s> remove value={this.state.value} onChange={evt => this.updateValue(evt.target.value)} /> </s> add value={this.state.value} onChange={(evt) => this.updateValue(evt.target.value)} /> </s> remove valueString = valueString.replace(/(.+\...).+/, "$1"); </s> add valueString = valueString.replace(this._regExp, "$1"); </s> remove globalState: GlobalState </s> add globalState: GlobalState;
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ef94b49f3670c2503b811eab143c08531866dfcf
nodeEditor/src/sharedComponents/floatLineComponent.tsx
value={this.state.value} onChange={(evt) => this.updateValue(evt.target.value)} />
<mask> onBlur={evt => { <mask> this.props.globalState.blockKeyboardEvents = false; <mask> }} <mask> onFocus={() => this.props.globalState.blockKeyboardEvents = true} <mask> value={this.state.value} onChange={evt => this.updateValue(evt.target.value)} /> <mask> </div> <mask> </div> <mask> } <mask> </div> <mask> ); </s> Fix input of decimal digits that are fixed at 2 Former-commit-id: b865b75f1dbe6a02eb8eda36f74b34dd638a684a </s> remove <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={evt => { </s> add <input type="number" step={this.props.step || "0.01"} className="numeric-input" onBlur={(evt) => { </s> remove valueString = valueString.replace(/(.+\...).+/, "$1"); </s> add valueString = valueString.replace(this._regExp, "$1"); </s> remove globalState: GlobalState </s> add globalState: GlobalState;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ef94b49f3670c2503b811eab143c08531866dfcf
nodeEditor/src/sharedComponents/floatLineComponent.tsx
"../../loaders/src/glTF/2.0/Extensions/KHR_materials_unlit.ts",
<mask> "../../loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts", <mask> "../../loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts", <mask> "../../loaders/src/glTF/2.0/Extensions/KHR_lights.ts" <mask> ], <mask> "doNotIncludeInBundle": true, <mask> "output": "babylon.glTF2FileLoader.js" </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (context: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>> { </s> add protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (extensionContext: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>> { </s> remove const materialLODs = this._getLODs(context, material, this._loader._gltf.materials, extension.ids); </s> add const materialLODs = this._getLODs(extensionContext, material, this._loader._gltf.materials, extension.ids); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => { </s> remove const nodeLODs = this._getLODs(context, node, this._loader._gltf.nodes, extension.ids); </s> add const nodeLODs = this._getLODs(extensionContext, node, this._loader._gltf.nodes, extension.ids);
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
Tools/Gulp/config.json
"../../loaders/src/glTF/2.0/Extensions/KHR_materials_unlit.ts",
<mask> "../../loaders/src/glTF/2.0/Extensions/MSFT_lod.ts", <mask> "../../loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts", <mask> "../../loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts", <mask> "../../loaders/src/glTF/2.0/Extensions/KHR_lights.ts" <mask> ], <mask> "output": "babylon.glTFFileLoader.js" <mask> } <mask> ], <mask> "build": { </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove throw new Error(`${context}: Ambient lights are not allowed on a node`); </s> add throw new Error(`${extensionContext}: Ambient lights are not allowed on a node`); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => { </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => { </s> remove throw new Error(`${context}: Invalid light type (${light.type})`); </s> add throw new Error(`${extensionContext}: Invalid light type (${light.type})`);
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
Tools/Gulp/config.json
return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene);
<mask> export class KHR_lights extends GLTFLoaderExtension { <mask> public readonly name = NAME; <mask> <mask> protected _loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>> { <mask> return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { <mask> const promise = this._loader._loadSceneAsync(context, scene); <mask> <mask> const light = GLTFLoader._GetProperty(context, this._lights, extension.light); <mask> if (light.type !== LightType.AMBIENT) { <mask> throw new Error(`${context}: Only ambient lights are allowed on a scene`); <mask> } </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove throw new Error(`${context}: Only ambient lights are allowed on a scene`); </s> add throw new Error(`${extensionContext}: Only ambient lights are allowed on a scene`); </s> remove return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (extensionContext, extension) => { </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove throw new Error(`${context}: Ambient lights are not allowed on a node`); </s> add throw new Error(`${extensionContext}: Ambient lights are not allowed on a node`);
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_lights.ts
const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light);
<mask> protected _loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>> { <mask> return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { <mask> const promise = this._loader._loadSceneAsync(context, scene); <mask> <mask> const light = GLTFLoader._GetProperty(context, this._lights, extension.light); <mask> if (light.type !== LightType.AMBIENT) { <mask> throw new Error(`${context}: Only ambient lights are allowed on a scene`); <mask> } <mask> <mask> this._loader._babylonScene.ambientColor = light.color ? Color3.FromArray(light.color) : Color3.Black(); </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove throw new Error(`${context}: Only ambient lights are allowed on a scene`); </s> add throw new Error(`${extensionContext}: Only ambient lights are allowed on a scene`); </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene); </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove throw new Error(`${context}: Ambient lights are not allowed on a node`); </s> add throw new Error(`${extensionContext}: Ambient lights are not allowed on a node`); </s> remove return this._loadExtensionAsync<ILightReference>(context, node, (context, extension) => { const promise = this._loader._loadNodeAsync(context, node); </s> add return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => { const promise = this._loader._loadNodeAsync(extensionContext, node);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_lights.ts
throw new Error(`${extensionContext}: Only ambient lights are allowed on a scene`);
<mask> const promise = this._loader._loadSceneAsync(context, scene); <mask> <mask> const light = GLTFLoader._GetProperty(context, this._lights, extension.light); <mask> if (light.type !== LightType.AMBIENT) { <mask> throw new Error(`${context}: Only ambient lights are allowed on a scene`); <mask> } <mask> <mask> this._loader._babylonScene.ambientColor = light.color ? Color3.FromArray(light.color) : Color3.Black(); <mask> <mask> return promise; </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene); </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove throw new Error(`${context}: Ambient lights are not allowed on a node`); </s> add throw new Error(`${extensionContext}: Ambient lights are not allowed on a node`); </s> remove throw new Error(`${context}: Invalid light type (${light.type})`); </s> add throw new Error(`${extensionContext}: Invalid light type (${light.type})`);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_lights.ts
return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => { const promise = this._loader._loadNodeAsync(extensionContext, node);
<mask> }); <mask> } <mask> <mask> protected _loadNodeAsync(context: string, node: ILoaderNode): Nullable<Promise<void>> { <mask> return this._loadExtensionAsync<ILightReference>(context, node, (context, extension) => { <mask> const promise = this._loader._loadNodeAsync(context, node); <mask> <mask> let babylonLight: Light; <mask> <mask> const light = GLTFLoader._GetProperty(context, this._lights, extension.light); <mask> const name = node._babylonMesh!.name; </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => { </s> remove const nodeLODs = this._getLODs(context, node, this._loader._gltf.nodes, extension.ids); </s> add const nodeLODs = this._getLODs(extensionContext, node, this._loader._gltf.nodes, extension.ids); </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene); </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light);
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_lights.ts
const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light);
<mask> const promise = this._loader._loadNodeAsync(context, node); <mask> <mask> let babylonLight: Light; <mask> <mask> const light = GLTFLoader._GetProperty(context, this._lights, extension.light); <mask> const name = node._babylonMesh!.name; <mask> switch (light.type) { <mask> case LightType.AMBIENT: { <mask> throw new Error(`${context}: Ambient lights are not allowed on a node`); <mask> } </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove throw new Error(`${context}: Ambient lights are not allowed on a node`); </s> add throw new Error(`${extensionContext}: Ambient lights are not allowed on a node`); </s> remove return this._loadExtensionAsync<ILightReference>(context, node, (context, extension) => { const promise = this._loader._loadNodeAsync(context, node); </s> add return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => { const promise = this._loader._loadNodeAsync(extensionContext, node); </s> remove throw new Error(`${context}: Only ambient lights are allowed on a scene`); </s> add throw new Error(`${extensionContext}: Only ambient lights are allowed on a scene`); </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_lights.ts
throw new Error(`${extensionContext}: Ambient lights are not allowed on a node`);
<mask> const light = GLTFLoader._GetProperty(context, this._lights, extension.light); <mask> const name = node._babylonMesh!.name; <mask> switch (light.type) { <mask> case LightType.AMBIENT: { <mask> throw new Error(`${context}: Ambient lights are not allowed on a node`); <mask> } <mask> case LightType.DIRECTIONAL: { <mask> babylonLight = new DirectionalLight(name, Vector3.Forward(), this._loader._babylonScene); <mask> break; <mask> } </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove throw new Error(`${context}: Invalid light type (${light.type})`); </s> add throw new Error(`${extensionContext}: Invalid light type (${light.type})`); </s> remove throw new Error(`${context}: Only ambient lights are allowed on a scene`); </s> add throw new Error(`${extensionContext}: Only ambient lights are allowed on a scene`); </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_lights.ts
throw new Error(`${extensionContext}: Invalid light type (${light.type})`);
<mask> babylonLight = new SpotLight(name, Vector3.Zero(), Vector3.Forward(), outerConeAngle, 2, this._loader._babylonScene); <mask> break; <mask> } <mask> default: { <mask> throw new Error(`${context}: Invalid light type (${light.type})`); <mask> } <mask> } <mask> <mask> babylonLight.diffuse = light.color ? Color3.FromArray(light.color) : Color3.White(); <mask> babylonLight.intensity = light.intensity == undefined ? 1 : light.intensity; </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove throw new Error(`${context}: Only ambient lights are allowed on a scene`); </s> add throw new Error(`${extensionContext}: Only ambient lights are allowed on a scene`); </s> remove throw new Error(`${context}: Ambient lights are not allowed on a node`); </s> add throw new Error(`${extensionContext}: Ambient lights are not allowed on a node`); </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_lights.ts
return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (extensionContext, extension) => {
<mask> export class KHR_materials_pbrSpecularGlossiness extends GLTFLoaderExtension { <mask> public readonly name = NAME; <mask> <mask> protected _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<void>> { <mask> return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (context, extension) => { <mask> material._babylonData = material._babylonData || {}; <mask> let babylonData = material._babylonData[babylonDrawMode]; <mask> if (!babylonData) { <mask> const promises = new Array<Promise<void>>(); <mask> </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene); </s> remove promises.push(this._loadSpecularGlossinessPropertiesAsync(context, material, extension, babylonMaterial)); </s> add promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, material, extension, babylonMaterial)); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => { </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => { </s> remove return this._loadExtensionAsync<ILightReference>(context, node, (context, extension) => { const promise = this._loader._loadNodeAsync(context, node); </s> add return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => { const promise = this._loader._loadNodeAsync(extensionContext, node);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, material, extension, babylonMaterial));
<mask> const name = material.name || `materialSG_${material._index}`; <mask> const babylonMaterial = this._loader._createMaterial(PBRMaterial, name, babylonDrawMode); <mask> <mask> promises.push(this._loader._loadMaterialBasePropertiesAsync(context, material, babylonMaterial)); <mask> promises.push(this._loadSpecularGlossinessPropertiesAsync(context, material, extension, babylonMaterial)); <mask> <mask> this._loader.onMaterialLoadedObservable.notifyObservers(babylonMaterial); <mask> <mask> babylonData = { <mask> material: babylonMaterial, </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (extensionContext, extension) => { </s> remove const materialLODs = this._getLODs(context, material, this._loader._gltf.materials, extension.ids); </s> add const materialLODs = this._getLODs(extensionContext, material, this._loader._gltf.materials, extension.ids); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => { </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light); </s> remove return this._loadExtensionAsync<ILightReference>(context, node, (context, extension) => { const promise = this._loader._loadNodeAsync(context, node); </s> add return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => { const promise = this._loader._loadNodeAsync(extensionContext, node);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => {
<mask> private _loadingMaterialLOD: Nullable<ILoaderMaterial> = null; <mask> private _loadMaterialSignals: { [materialIndex: number]: Deferred<void> } = {}; <mask> <mask> protected _loadNodeAsync(context: string, node: ILoaderNode): Nullable<Promise<void>> { <mask> return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { <mask> let firstPromise: Promise<void>; <mask> <mask> const nodeLODs = this._getLODs(context, node, this._loader._gltf.nodes, extension.ids); <mask> for (let indexLOD = 0; indexLOD < nodeLODs.length; indexLOD++) { <mask> const nodeLOD = nodeLODs[indexLOD]; </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove const nodeLODs = this._getLODs(context, node, this._loader._gltf.nodes, extension.ids); </s> add const nodeLODs = this._getLODs(extensionContext, node, this._loader._gltf.nodes, extension.ids); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => { </s> remove const materialLODs = this._getLODs(context, material, this._loader._gltf.materials, extension.ids); </s> add const materialLODs = this._getLODs(extensionContext, material, this._loader._gltf.materials, extension.ids); </s> remove return this._loadExtensionAsync<ILightReference>(context, node, (context, extension) => { const promise = this._loader._loadNodeAsync(context, node); </s> add return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => { const promise = this._loader._loadNodeAsync(extensionContext, node); </s> remove return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (extensionContext, extension) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
const nodeLODs = this._getLODs(extensionContext, node, this._loader._gltf.nodes, extension.ids);
<mask> protected _loadNodeAsync(context: string, node: ILoaderNode): Nullable<Promise<void>> { <mask> return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { <mask> let firstPromise: Promise<void>; <mask> <mask> const nodeLODs = this._getLODs(context, node, this._loader._gltf.nodes, extension.ids); <mask> for (let indexLOD = 0; indexLOD < nodeLODs.length; indexLOD++) { <mask> const nodeLOD = nodeLODs[indexLOD]; <mask> <mask> if (indexLOD !== 0) { <mask> this._loadingNodeLOD = nodeLOD; </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => { </s> remove const materialLODs = this._getLODs(context, material, this._loader._gltf.materials, extension.ids); </s> add const materialLODs = this._getLODs(extensionContext, material, this._loader._gltf.materials, extension.ids); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => { </s> remove return this._loadExtensionAsync<ILightReference>(context, node, (context, extension) => { const promise = this._loader._loadNodeAsync(context, node); </s> add return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => { const promise = this._loader._loadNodeAsync(extensionContext, node); </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => {
<mask> if (this._loadingNodeLOD) { <mask> return null; <mask> } <mask> <mask> return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { <mask> let firstPromise: Promise<void>; <mask> <mask> const materialLODs = this._getLODs(context, material, this._loader._gltf.materials, extension.ids); <mask> for (let indexLOD = 0; indexLOD < materialLODs.length; indexLOD++) { <mask> const materialLOD = materialLODs[indexLOD]; </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove const materialLODs = this._getLODs(context, material, this._loader._gltf.materials, extension.ids); </s> add const materialLODs = this._getLODs(extensionContext, material, this._loader._gltf.materials, extension.ids); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => { </s> remove const nodeLODs = this._getLODs(context, node, this._loader._gltf.nodes, extension.ids); </s> add const nodeLODs = this._getLODs(extensionContext, node, this._loader._gltf.nodes, extension.ids); </s> remove return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (extensionContext, extension) => { </s> remove promises.push(this._loadSpecularGlossinessPropertiesAsync(context, material, extension, babylonMaterial)); </s> add promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, material, extension, babylonMaterial));
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
const materialLODs = this._getLODs(extensionContext, material, this._loader._gltf.materials, extension.ids);
<mask> <mask> return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { <mask> let firstPromise: Promise<void>; <mask> <mask> const materialLODs = this._getLODs(context, material, this._loader._gltf.materials, extension.ids); <mask> for (let indexLOD = 0; indexLOD < materialLODs.length; indexLOD++) { <mask> const materialLOD = materialLODs[indexLOD]; <mask> <mask> if (indexLOD !== 0) { <mask> this._loadingMaterialLOD = materialLOD; </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => { </s> remove const nodeLODs = this._getLODs(context, node, this._loader._gltf.nodes, extension.ids); </s> add const nodeLODs = this._getLODs(extensionContext, node, this._loader._gltf.nodes, extension.ids); </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => { </s> remove return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, (extensionContext, extension) => { </s> remove promises.push(this._loadSpecularGlossinessPropertiesAsync(context, material, extension, babylonMaterial)); </s> add promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, material, extension, babylonMaterial));
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (extensionContext: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>> {
<mask> <mask> // #endregion <mask> <mask> /** Helper method called by a loader extension to load an glTF extension. */ <mask> protected _loadExtensionAsync<TProperty, TResult = void>(context: string, property: IProperty, actionAsync: (context: string, extension: TProperty) => Promise<TResult>): Nullable<Promise<TResult>> { <mask> if (!property.extensions) { <mask> return null; <mask> } <mask> <mask> const extensions = property.extensions; </s> Add support for KHR_materials_unlit to glTF loader Former-commit-id: 88bbb9ab044418f272a5c6afce7d7d5bf1ea5381 </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, node, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, node, (extensionContext, extension) => { </s> remove return this._loadExtensionAsync<IMSFTLOD>(context, material, (context, extension) => { </s> add return this._loadExtensionAsync<IMSFTLOD>(context, material, (extensionContext, extension) => { </s> remove return this._loadExtensionAsync<ILightReference>(context, node, (context, extension) => { const promise = this._loader._loadNodeAsync(context, node); </s> add return this._loadExtensionAsync<ILightReference>(context, node, (extensionContext, extension) => { const promise = this._loader._loadNodeAsync(extensionContext, node); </s> remove return this._loadExtensionAsync<ILightReference>(context, scene, (context, extension) => { const promise = this._loader._loadSceneAsync(context, scene); </s> add return this._loadExtensionAsync<ILightReference>(context, scene, (extensionContext, extension) => { const promise = this._loader._loadSceneAsync(extensionContext, scene); </s> remove const light = GLTFLoader._GetProperty(context, this._lights, extension.light); </s> add const light = GLTFLoader._GetProperty(extensionContext, this._lights, extension.light);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0548174e29e6fca3275f76b89efe8efc19a2c7d
loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts
onSuccess(newTexture);
<mask> newTexture.name = id; <mask> texture.babylonTexture = newTexture; <mask> }; <mask> GLTFFileLoaderBase.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> var shader = gltfRuntime.shaders[id]; <mask> if (BABYLON.GLTFUtils.IsBase64(shader.uri)) { </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove GLTFFileLoaderBase.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderBase.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove var shaderData = atob(shader.uri.split(",")[1]); onSuccess(shaderData); </s> add var shaderString = atob(shader.uri.split(",")[1]); onSuccess(shaderString); </s> remove GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError); </s> remove * Defines an override for loading textures </s> add * Defines an override for loading texture buffers * Return true to stop further extensions from loading this texture data */ GLTFFileLoaderExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) { return false; }; /** * Defines an override for creating textures
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
GLTFFileLoaderBase.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
<mask> newTexture.wrapV = BABYLON.GLTFUtils.GetWrapMode(sampler.wrapT); <mask> newTexture.name = id; <mask> texture.babylonTexture = newTexture; <mask> }; <mask> GLTFFileLoaderBase.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> var shader = gltfRuntime.shaders[id]; <mask> if (BABYLON.GLTFUtils.IsBase64(shader.uri)) { <mask> var shaderData = atob(shader.uri.split(",")[1]); <mask> onSuccess(shaderData); <mask> } </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove var shaderData = atob(shader.uri.split(",")[1]); onSuccess(shaderData); </s> add var shaderString = atob(shader.uri.split(",")[1]); onSuccess(shaderString); </s> remove GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError); </s> remove BABYLON.GLTFFileLoaderExtension.LoadShaderDataAsync(gltfRuntime, sha, function (shaderData) { </s> add BABYLON.GLTFFileLoaderExtension.LoadShaderStringAsync(gltfRuntime, sha, function (shaderString) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
var shaderString = atob(shader.uri.split(",")[1]); onSuccess(shaderString);
<mask> }; <mask> GLTFFileLoaderBase.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> var shader = gltfRuntime.shaders[id]; <mask> if (BABYLON.GLTFUtils.IsBase64(shader.uri)) { <mask> var shaderData = atob(shader.uri.split(",")[1]); <mask> onSuccess(shaderData); <mask> } <mask> else { <mask> BABYLON.Tools.LoadFile(gltfRuntime.rootUrl + shader.uri, onSuccess, null, null, false, onError); <mask> } <mask> }; </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove GLTFFileLoaderBase.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderBase.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError); </s> remove GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove BABYLON.GLTFFileLoaderExtension.LoadShaderDataAsync(gltfRuntime, sha, function (shaderData) { </s> add BABYLON.GLTFFileLoaderExtension.LoadShaderStringAsync(gltfRuntime, sha, function (shaderString) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
BABYLON.GLTFFileLoaderExtension.LoadShaderStringAsync(gltfRuntime, sha, function (shaderString) {
<mask> }; <mask> GLTFFileLoader.prototype._loadShadersAsync = function (gltfRuntime, onload) { <mask> var hasShaders = false; <mask> var processShader = function (sha, shader) { <mask> BABYLON.GLTFFileLoaderExtension.LoadShaderDataAsync(gltfRuntime, sha, function (shaderData) { <mask> gltfRuntime.loadedShaderCount++; <mask> if (shaderData) { <mask> BABYLON.Effect.ShadersStore[sha + (shader.type === BABYLON.EShaderType.VERTEX ? "VertexShader" : "PixelShader")] = shaderData; <mask> } <mask> if (gltfRuntime.loadedShaderCount === gltfRuntime.shaderscount) { </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove if (shaderData) { BABYLON.Effect.ShadersStore[sha + (shader.type === BABYLON.EShaderType.VERTEX ? "VertexShader" : "PixelShader")] = shaderData; </s> add if (shaderString) { BABYLON.Effect.ShadersStore[sha + (shader.type === BABYLON.EShaderType.VERTEX ? "VertexShader" : "PixelShader")] = shaderString; </s> remove var shaderData = atob(shader.uri.split(",")[1]); onSuccess(shaderData); </s> add var shaderString = atob(shader.uri.split(",")[1]); onSuccess(shaderString); </s> remove GLTFFileLoaderBase.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderBase.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
if (shaderString) { BABYLON.Effect.ShadersStore[sha + (shader.type === BABYLON.EShaderType.VERTEX ? "VertexShader" : "PixelShader")] = shaderString;
<mask> var hasShaders = false; <mask> var processShader = function (sha, shader) { <mask> BABYLON.GLTFFileLoaderExtension.LoadShaderDataAsync(gltfRuntime, sha, function (shaderData) { <mask> gltfRuntime.loadedShaderCount++; <mask> if (shaderData) { <mask> BABYLON.Effect.ShadersStore[sha + (shader.type === BABYLON.EShaderType.VERTEX ? "VertexShader" : "PixelShader")] = shaderData; <mask> } <mask> if (gltfRuntime.loadedShaderCount === gltfRuntime.shaderscount) { <mask> onload(); <mask> } <mask> }, function () { </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove BABYLON.GLTFFileLoaderExtension.LoadShaderDataAsync(gltfRuntime, sha, function (shaderData) { </s> add BABYLON.GLTFFileLoaderExtension.LoadShaderStringAsync(gltfRuntime, sha, function (shaderString) { </s> remove GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError); </s> remove var shaderData = atob(shader.uri.split(",")[1]); onSuccess(shaderData); </s> add var shaderString = atob(shader.uri.split(",")[1]); onSuccess(shaderString); </s> remove GLTFFileLoaderBase.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderBase.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
* Decode the base64 uri * @param uri: the uri to decode */ GLTFUtils.DecodeBase64 = function (uri) { var decodedString = atob(uri.split(",")[1]); var bufferLength = decodedString.length; var bufferView = new Uint8Array(new ArrayBuffer(bufferLength)); for (var i = 0; i < bufferLength; i++) { bufferView[i] = decodedString.charCodeAt(i); } return bufferView.buffer; }; /**
<mask> }; <mask> /** <mask> * Returns the wrap mode of the texture <mask> * @param mode: the mode value <mask> */ <mask> GLTFUtils.GetWrapMode = function (mode) { <mask> switch (mode) { <mask> case BABYLON.ETextureWrapMode.CLAMP_TO_EDGE: return BABYLON.Texture.CLAMP_ADDRESSMODE; </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove * Defines an override for loading textures </s> add * Defines an override for loading texture buffers * Return true to stop further extensions from loading this texture data */ GLTFFileLoaderExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) { return false; }; /** * Defines an override for creating textures </s> remove GLTFFileLoaderExtension.prototype.loadTextureAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.prototype.createTextureAsync = function (gltfRuntime, id, buffer, onSuccess, onError) { </s> remove * Defines an override for loading shader data </s> add * Defines an override for loading shader strings </s> remove GLTFFileLoaderExtension.prototype.loadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError);
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
* Defines an override for loading texture buffers * Return true to stop further extensions from loading this texture data */ GLTFFileLoaderExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) { return false; }; /** * Defines an override for creating textures
<mask> GLTFFileLoaderExtension.prototype.loadBufferAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> return false; <mask> }; <mask> /** <mask> * Defines an override for loading textures <mask> * Return true to stop further extensions from loading this texture <mask> */ <mask> GLTFFileLoaderExtension.prototype.loadTextureAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> return false; <mask> }; </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove GLTFFileLoaderExtension.prototype.loadTextureAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.prototype.createTextureAsync = function (gltfRuntime, id, buffer, onSuccess, onError) { </s> remove * Defines an override for loading shader data </s> add * Defines an override for loading shader strings </s> remove GLTFFileLoaderExtension.prototype.loadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError); </s> remove GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
GLTFFileLoaderExtension.prototype.createTextureAsync = function (gltfRuntime, id, buffer, onSuccess, onError) {
<mask> /** <mask> * Defines an override for loading textures <mask> * Return true to stop further extensions from loading this texture <mask> */ <mask> GLTFFileLoaderExtension.prototype.loadTextureAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> return false; <mask> }; <mask> /** <mask> * Defines an override for loading shader data <mask> * Return true to stop further extensions from loading this shader data </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove * Defines an override for loading textures </s> add * Defines an override for loading texture buffers * Return true to stop further extensions from loading this texture data */ GLTFFileLoaderExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) { return false; }; /** * Defines an override for creating textures </s> remove GLTFFileLoaderExtension.prototype.loadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove * Defines an override for loading shader data </s> add * Defines an override for loading shader strings </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
* Defines an override for loading shader strings
<mask> GLTFFileLoaderExtension.prototype.loadTextureAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> return false; <mask> }; <mask> /** <mask> * Defines an override for loading shader data <mask> * Return true to stop further extensions from loading this shader data <mask> */ <mask> GLTFFileLoaderExtension.prototype.loadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> return false; <mask> }; </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove GLTFFileLoaderExtension.prototype.loadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove GLTFFileLoaderExtension.prototype.loadTextureAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.prototype.createTextureAsync = function (gltfRuntime, id, buffer, onSuccess, onError) { </s> remove * Defines an override for loading textures </s> add * Defines an override for loading texture buffers * Return true to stop further extensions from loading this texture data */ GLTFFileLoaderExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) { return false; }; /** * Defines an override for creating textures </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError); </s> remove GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
GLTFFileLoaderExtension.prototype.loadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
<mask> /** <mask> * Defines an override for loading shader data <mask> * Return true to stop further extensions from loading this shader data <mask> */ <mask> GLTFFileLoaderExtension.prototype.loadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> return false; <mask> }; <mask> /** <mask> * Defines an override for loading materials <mask> * Return true to stop further extensions from loading this material </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove GLTFFileLoaderExtension.prototype.loadTextureAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.prototype.createTextureAsync = function (gltfRuntime, id, buffer, onSuccess, onError) { </s> remove * Defines an override for loading textures </s> add * Defines an override for loading texture buffers * Return true to stop further extensions from loading this texture data */ GLTFFileLoaderExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) { return false; }; /** * Defines an override for creating textures </s> remove * Defines an override for loading shader data </s> add * Defines an override for loading shader strings </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError);
<mask> BABYLON.GLTFFileLoaderBase.LoadBufferAsync(gltfRuntime, id, onSuccess, onError); <mask> }); <mask> }; <mask> GLTFFileLoaderExtension.LoadTextureAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { <mask> return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); <mask> }, function () { <mask> BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); <mask> }); <mask> }; <mask> GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { <mask> return loaderExtension.loadShaderDataAsync(gltfRuntime, id, onSuccess, onError); <mask> }, function () { </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove var shaderData = atob(shader.uri.split(",")[1]); onSuccess(shaderData); </s> add var shaderString = atob(shader.uri.split(",")[1]); onSuccess(shaderString); </s> remove GLTFFileLoaderBase.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderBase.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove * Defines an override for loading textures </s> add * Defines an override for loading texture buffers * Return true to stop further extensions from loading this texture data */ GLTFFileLoaderExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) { return false; }; /** * Defines an override for creating textures </s> remove * Defines an override for loading shader data </s> add * Defines an override for loading shader strings
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
GLTFFileLoaderExtension.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) {
<mask> }, function () { <mask> BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); <mask> }); <mask> }; <mask> GLTFFileLoaderExtension.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { <mask> GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { <mask> return loaderExtension.loadShaderDataAsync(gltfRuntime, id, onSuccess, onError); <mask> }, function () { <mask> BABYLON.GLTFFileLoaderBase.LoadShaderDataAsync(gltfRuntime, id, onSuccess, onError); <mask> }); </s> Split LoadTextureAsync into LoadTextureBufferAsync and CreateTextureAsync Former-commit-id: bdf5e34d181ae291d58bdc026143da8485a4dbd9 </s> remove GLTFFileLoaderExtension.ApplyExtensions(function (loaderExtension) { return loaderExtension.loadTextureAsync(gltfRuntime, id, onSuccess, onError); }, function () { BABYLON.GLTFFileLoaderBase.LoadTextureAsync(gltfRuntime, id, onSuccess, onError); }); </s> add GLTFFileLoaderExtension.LoadTextureBufferAsync(gltfRuntime, id, function (buffer) { return GLTFFileLoaderExtension.CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError); }, onError); </s> remove var shaderData = atob(shader.uri.split(",")[1]); onSuccess(shaderData); </s> add var shaderString = atob(shader.uri.split(",")[1]); onSuccess(shaderString); </s> remove GLTFFileLoaderBase.LoadShaderDataAsync = function (gltfRuntime, id, onSuccess, onError) { </s> add GLTFFileLoaderBase.LoadShaderStringAsync = function (gltfRuntime, id, onSuccess, onError) { </s> remove * Defines an override for loading textures </s> add * Defines an override for loading texture buffers * Return true to stop further extensions from loading this texture data */ GLTFFileLoaderExtension.prototype.loadTextureBufferAsync = function (gltfRuntime, id, onSuccess, onError) { return false; }; /** * Defines an override for creating textures </s> remove * Defines an override for loading shader data </s> add * Defines an override for loading shader strings
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f09a7bf97ad8f3806b31c1ecb85f3b0ef321ac50
loaders/glTF/babylon.glTFFileLoader.js
this.name = "oimo";
<mask> function OimoJSPlugin() { <mask> this._registeredMeshes = []; <mask> /** <mask> * Update the body position according to the mesh position <mask> * @param mesh <mask> */ <mask> this.updateBodyPosition = function (mesh) { </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity; }; OimoJSPlugin.prototype.getGravity = function () { return this._gravity; </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity(); </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity();
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/Plugins/babylon.oimoJSPlugin.js
this._gravity = this._world.gravity = gravity; }; OimoJSPlugin.prototype.getGravity = function () { return this._gravity;
<mask> this._world = new OIMO.World(null, null, iterations); <mask> this._world.clear(); <mask> }; <mask> OimoJSPlugin.prototype.setGravity = function (gravity) { <mask> this._world.gravity = gravity; <mask> }; <mask> OimoJSPlugin.prototype.registerMesh = function (mesh, impostor, options) { <mask> this.unregisterMesh(mesh); <mask> if (!mesh.rotationQuaternion) { <mask> mesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(mesh.rotation.y, mesh.rotation.x, mesh.rotation.z); </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/Plugins/babylon.oimoJSPlugin.js
private _gravity: Vector3;
<mask> private _registeredMeshes = []; <mask> <mask> public name = "oimo"; <mask> <mask> private _checkWithEpsilon(value: number): number { <mask> return value < PhysicsEngine.Epsilon ? PhysicsEngine.Epsilon : value; <mask> } <mask> <mask> public initialize(iterations?: number): void { </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity;
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/Plugins/babylon.oimoJSPlugin.ts
this._gravity = this._world.gravity = gravity;
<mask> this._world.clear(); <mask> } <mask> <mask> public setGravity(gravity: Vector3): void { <mask> this._world.gravity = gravity; <mask> } <mask> <mask> public registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any { <mask> this.unregisterMesh(mesh); <mask> </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity; }; OimoJSPlugin.prototype.getGravity = function () { return this._gravity;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/Plugins/babylon.oimoJSPlugin.ts
public getGravity() : Vector3 { return this._gravity; }
<mask> this._gravity = this._world.gravity = gravity; <mask> } <mask> <mask> public registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any { <mask> this.unregisterMesh(mesh); <mask> <mask> if (!mesh.rotationQuaternion) { <mask> mesh.rotationQuaternion = Quaternion.RotationYawPitchRoll(mesh.rotation.y, mesh.rotation.x, mesh.rotation.z); </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity; </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity; }; OimoJSPlugin.prototype.getGravity = function () { return this._gravity; </s> remove if(scene.isPhysicsEnabled()) { </s> add if (scene.isPhysicsEnabled()) {
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/Plugins/babylon.oimoJSPlugin.ts
PhysicsEngine.prototype._getGravity = function () { return this._currentPlugin.getGravity(); };
<mask> this._currentPlugin.setGravity(this.gravity); <mask> }; <mask> PhysicsEngine.prototype._registerMesh = function (mesh, impostor, options) { <mask> return this._currentPlugin.registerMesh(mesh, impostor, options); <mask> }; <mask> PhysicsEngine.prototype._registerMeshesAsCompound = function (parts, options) { </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity; }; OimoJSPlugin.prototype.getGravity = function () { return this._gravity; </s> remove if(scene.isPhysicsEnabled()) { </s> add if (scene.isPhysicsEnabled()) {
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/babylon.physicsEngine.js
PhysicsEngine.prototype.getPhysicsPluginName = function () { return this._currentPlugin.name; };
<mask> }; <mask> PhysicsEngine.prototype.getPhysicsBodyOfMesh = function (mesh) { <mask> return this._currentPlugin.getPhysicsBodyOfMesh(mesh); <mask> }; <mask> // Statics <mask> PhysicsEngine.NoImpostor = 0; <mask> PhysicsEngine.SphereImpostor = 1; <mask> PhysicsEngine.BoxImpostor = 2; </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity; }; OimoJSPlugin.prototype.getGravity = function () { return this._gravity; </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity(); </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity();
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/babylon.physicsEngine.js
getGravity() : Vector3;
<mask> initialize(iterations?: number); <mask> setGravity(gravity: Vector3): void; <mask> runOneStep(delta: number): void; <mask> registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any; <mask> registerMeshesAsCompound(parts: PhysicsCompoundBodyPart[], options: PhysicsBodyCreationOptions): any; <mask> unregisterMesh(mesh: AbstractMesh); </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity; </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity();
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/babylon.physicsEngine.ts
public _getGravity() : Vector3 { return this._currentPlugin.getGravity(); }
<mask> public _setGravity(gravity: Vector3): void { <mask> this.gravity = gravity || new Vector3(0, -9.807, 0); <mask> this._currentPlugin.setGravity(this.gravity); <mask> } <mask> <mask> public _registerMesh(mesh: AbstractMesh, impostor: number, options: PhysicsBodyCreationOptions): any { <mask> return this._currentPlugin.registerMesh(mesh, impostor, options); <mask> } <mask> </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity;
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Physics/babylon.physicsEngine.ts
serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity();
<mask> } <mask> //Physics <mask> if (scene.isPhysicsEnabled()) { <mask> serializationObject.physicsEnabled = true; <mask> serializationObject.physicsGravity = 0; <mask> serializationObject.physicsEngine = scene.getPhysicsEngine().getPhysicsPluginName(); <mask> } <mask> // Lights <mask> serializationObject.lights = []; <mask> var index; </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity(); </s> remove if(scene.isPhysicsEnabled()) { </s> add if (scene.isPhysicsEnabled()) { </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Tools/babylon.sceneSerializer.js
if (scene.isPhysicsEnabled()) {
<mask> serializationObject.fogDensity = scene.fogDensity; <mask> } <mask> <mask> //Physics <mask> if(scene.isPhysicsEnabled()) { <mask> serializationObject.physicsEnabled = true; <mask> serializationObject.physicsGravity = 0; <mask> serializationObject.physicsEngine = scene.getPhysicsEngine().getPhysicsPluginName(); <mask> } <mask> </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity(); </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity(); </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Tools/babylon.sceneSerializer.ts
serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity();
<mask> <mask> //Physics <mask> if(scene.isPhysicsEnabled()) { <mask> serializationObject.physicsEnabled = true; <mask> serializationObject.physicsGravity = 0; <mask> serializationObject.physicsEngine = scene.getPhysicsEngine().getPhysicsPluginName(); <mask> } <mask> <mask> // Lights <mask> serializationObject.lights = []; </s> getGravity method physics engine will now return the gravity currently used. Scene serializer will serialize it correctly. Former-commit-id: 1ea097fc5170f3882d988d9791817f3a431afc68 </s> remove serializationObject.physicsGravity = 0; </s> add serializationObject.physicsGravity = scene.getPhysicsEngine()._getGravity(); </s> remove if(scene.isPhysicsEnabled()) { </s> add if (scene.isPhysicsEnabled()) { </s> remove this._world.gravity = gravity; </s> add this._gravity = this._world.gravity = gravity;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0a40994918ff9a899c60162e9d6fdc0af90c816
src/Tools/babylon.sceneSerializer.ts
<mask> "webpack": "~4.21.0", <mask> "webpack-cli": "~3.1.2", <mask> "webpack-stream": "5.0.0" <mask> } <mask> } </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove import { BooleanLineComponent } from "../../lines/booleanLineComponent"; </s> add import { faCheck, faTimesCircle } from "@fortawesome/free-solid-svg-icons"; </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons'; </s> remove .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; </s> add .expandableHeader { display: grid; grid-template-columns: 1fr 20px; .text { grid-column: 1; display: flex; align-items: center; .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; } } .expandAll { grid-column: 2; } </s> remove return `No ${singularForm}`; </s> add return `${singularForm}`;
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/package.json
}
<mask> "webpack-cli": "~3.1.2", <mask> "webpack-stream": "5.0.0" <mask> } <mask> } </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove } </s> add </s> remove import { BooleanLineComponent } from "../../lines/booleanLineComponent"; </s> add import { faCheck, faTimesCircle } from "@fortawesome/free-solid-svg-icons"; </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons'; </s> remove .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; </s> add .expandableHeader { display: grid; grid-template-columns: 1fr 20px; .text { grid-column: 1; display: flex; align-items: center; .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; } } .expandAll { grid-column: 2; } </s> remove return `No ${singularForm}`; </s> add return `${singularForm}`;
[ "keep", "keep", "keep", "add" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/package.json
import { IconProp } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
<mask> import * as React from "react"; <mask> <mask> interface IMessageLineComponentProps { <mask> text: string, <mask> color?: string, <mask> icon?: IconProp </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons'; </s> remove import { BooleanLineComponent } from "../../lines/booleanLineComponent"; </s> add import { faCheck, faTimesCircle } from "@fortawesome/free-solid-svg-icons"; </s> remove onClick: () => void </s> add onClick: () => void, onExpandAll: (expand: boolean) => void
[ "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/actionTabs/lines/messageLineComponent.tsx
icon?: IconProp
<mask> text: string, <mask> color?: string, <mask> } <mask> <mask> export class MessageLineComponent extends React.Component<IMessageLineComponentProps> { <mask> constructor(props: IMessageLineComponentProps) { <mask> super(props); </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove onClick: () => void </s> add onClick: () => void, onExpandAll: (expand: boolean) => void </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> { </s> remove this.state = { isExpanded: false }; </s> add this.state = { isExpanded: false, mustExpand: false }; </s> remove import { BooleanLineComponent } from "../../lines/booleanLineComponent"; </s> add import { faCheck, faTimesCircle } from "@fortawesome/free-solid-svg-icons";
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/actionTabs/lines/messageLineComponent.tsx
if (this.props.icon) { return ( <div className="iconMessageLine"> <div className="icon" style={{ color: this.props.color ? this.props.color : "" }}> <FontAwesomeIcon icon={this.props.icon}/> </div> <div className="value" title={this.props.text}> {this.props.text} </div> </div> ); }
<mask> } <mask> <mask> render() { <mask> return ( <mask> <div className="messageLine"> <mask> <div className="value" title={this.props.text} style={{ color: this.props.color ? this.props.color : "" }}> <mask> {this.props.text} <mask> </div> <mask> </div> </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <div> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </s> add <div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div> </s> remove <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.state.mustExpand} extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} />
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/actionTabs/lines/messageLineComponent.tsx
viewer.xAxisMesh!.metadata = { hidden: true }; viewer.yAxisMesh!.metadata = { hidden: true }; viewer.zAxisMesh!.metadata = { hidden: true };
<mask> const x = new BABYLON.Vector3(1, 0, 0); <mask> const y = new BABYLON.Vector3(0, 1, 0); <mask> const z = new BABYLON.Vector3(0, 0, 1); <mask> <mask> viewer.xAxisMesh.metadata = { hidden: true }; <mask> viewer.yAxisMesh.metadata = { hidden: true }; <mask> viewer.zAxisMesh.metadata = { hidden: true }; <mask> <mask> node.metadata.onBeforeRenderObserver = scene.onBeforeRenderObservable.add(() => { <mask> let matrix = node.getWorldMatrix(); <mask> let extend = BABYLON.Tmp.Vector3[0]; <mask> const worldExtend = scene.getWorldExtends(); </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove this.state = { isExpanded: false }; </s> add this.state = { isExpanded: false, mustExpand: false }; </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> { </s> remove this.setState({ isExpanded: !this.state.isExpanded }); </s> add this.setState({ isExpanded: !this.state.isExpanded, mustExpand: false }); </s> remove return `No ${singularForm}`; </s> add return `${singularForm}`;
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/actionTabs/tabs/propertyGrids/meshes/axesViewerComponent.tsx
import { faCheck, faTimesCircle } from "@fortawesome/free-solid-svg-icons";
<mask> import { GlobalState } from "../../../globalState"; <mask> import { FloatLineComponent } from "../../lines/floatLineComponent"; <mask> import { OptionsLineComponent } from "../../lines/optionsLineComponent"; <mask> import { MessageLineComponent } from "../../lines/messageLineComponent"; <mask> import { BooleanLineComponent } from "../../lines/booleanLineComponent"; <mask> import { TextLineComponent } from "../../lines/textLineComponent"; <mask> <mask> interface IGLTFComponentProps { <mask> scene: Scene, <mask> globalState: GlobalState </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons'; </s> remove .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; </s> add .expandableHeader { display: grid; grid-template-columns: 1fr 20px; .text { grid-column: 1; display: flex; align-items: center; .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; } } .expandAll { grid-column: 2; } </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/actionTabs/tabs/tools/gltfComponent.tsx
return `${singularForm}`;
<mask> if (count) { <mask> return `${count} ${singularForm}s`; <mask> } <mask> <mask> return `No ${singularForm}`; <mask> } <mask> <mask> renderValidation() { <mask> const validationResults = this.props.globalState.validationResults; <mask> const issues = validationResults.issues; </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove this.setState({ isExpanded: !this.state.isExpanded }); </s> add this.setState({ isExpanded: !this.state.isExpanded, mustExpand: false }); </s> remove <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <BooleanLineComponent label={this.prepareText("error", issues.numErrors)} value={issues.numErrors === 0} /> <BooleanLineComponent label={this.prepareText("warning", issues.numWarnings)} value={issues.numWarnings === 0} /> <BooleanLineComponent label={this.prepareText("info", issues.numInfos)} value={issues.numInfos === 0} /> <BooleanLineComponent label={this.prepareText("hint", issues.numHints)} value={issues.numHints === 0} /> </s> add { issues.numErrors !== 0 && <MessageLineComponent text="Your file has some validation issues" icon={faTimesCircle} color="Red"/> } { issues.numErrors === 0 && <MessageLineComponent text="Your file is a valid glTF file" icon={faCheck} color="Green"/> } <TextLineComponent label="Errors" value={issues.numErrors.toString()} /> <TextLineComponent label="Warnings" value={issues.numWarnings.toString()} /> <TextLineComponent label="Infos" value={issues.numInfos.toString()} /> <TextLineComponent label="Hints" value={issues.numHints.toString()} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/actionTabs/tabs/tools/gltfComponent.tsx
{ issues.numErrors !== 0 && <MessageLineComponent text="Your file has some validation issues" icon={faTimesCircle} color="Red"/> } { issues.numErrors === 0 && <MessageLineComponent text="Your file is a valid glTF file" icon={faCheck} color="Green"/> } <TextLineComponent label="Errors" value={issues.numErrors.toString()} /> <TextLineComponent label="Warnings" value={issues.numWarnings.toString()} /> <TextLineComponent label="Infos" value={issues.numInfos.toString()} /> <TextLineComponent label="Hints" value={issues.numHints.toString()} />
<mask> const issues = validationResults.issues; <mask> <mask> return ( <mask> <LineContainerComponent title="GLTF VALIDATION" closed={!issues.numErrors && !issues.numWarnings}> <mask> <BooleanLineComponent label={this.prepareText("error", issues.numErrors)} value={issues.numErrors === 0} /> <mask> <BooleanLineComponent label={this.prepareText("warning", issues.numWarnings)} value={issues.numWarnings === 0} /> <mask> <BooleanLineComponent label={this.prepareText("info", issues.numInfos)} value={issues.numInfos === 0} /> <mask> <BooleanLineComponent label={this.prepareText("hint", issues.numHints)} value={issues.numHints === 0} /> <mask> <TextLineComponent label="More details" value="Click here" onLink={() => this.openValidationDetails()} /> <mask> </LineContainerComponent> <mask> ) <mask> } <mask> </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.props.mustExpand} extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> remove <div> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </s> add <div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div>
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/actionTabs/tabs/tools/gltfComponent.tsx
align-self: center; display: grid; align-items: center;
<mask> -moz-user-select: none; <mask> -ms-user-select: none; <mask> user-select: none; <mask> <mask> align-self: center; <mask> display: flex; <mask> align-items: center; <mask> <mask> &:hover { <mask> background: #444444; <mask> } <mask> </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; </s> add .expandableHeader { display: grid; grid-template-columns: 1fr 20px; .text { grid-column: 1; display: flex; align-items: center; .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; } } .expandAll { grid-column: 2; } </s> remove import { BooleanLineComponent } from "../../lines/booleanLineComponent"; </s> add import { faCheck, faTimesCircle } from "@fortawesome/free-solid-svg-icons"; </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons'; </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> { </s> remove this.state = { isExpanded: false }; </s> add this.state = { isExpanded: false, mustExpand: false };
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/sceneExplorer.scss
.expandableHeader { display: grid; grid-template-columns: 1fr 20px; .text { grid-column: 1; display: flex; align-items: center; .arrow { margin-left: 0px; color: white; cursor: pointer; display: inline-block; margin-right: 6px; opacity: 0.5; } } .expandAll { grid-column: 2; }
<mask> <mask> &:hover { <mask> background: #444444; <mask> } <mask> <mask> .arrow { <mask> margin-left: 0px; <mask> color: white; <mask> cursor: pointer; <mask> display: inline-block; <mask> margin-right: 6px; <mask> opacity: 0.5; <mask> } <mask> } <mask> <mask> .icon { <mask> display: grid; </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove align-self: center; display: flex; align-items: center; </s> add align-self: center; display: grid; align-items: center; </s> remove import { BooleanLineComponent } from "../../lines/booleanLineComponent"; </s> add import { faCheck, faTimesCircle } from "@fortawesome/free-solid-svg-icons"; </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons'; </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/sceneExplorer.scss
import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons';
<mask> import * as React from "react"; <mask> import { Nullable, Observable, IExplorerExtensibilityGroup } from "babylonjs"; <mask> import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; <mask> import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; <mask> import { TreeItemSelectableComponent } from "./treeItemSelectableComponent"; <mask> import { Tools } from "../../tools"; <mask> <mask> interface ITreeItemExpandableHeaderComponentProps { <mask> isExpanded: boolean, </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove import { BooleanLineComponent } from "../../lines/booleanLineComponent"; </s> add import { faCheck, faTimesCircle } from "@fortawesome/free-solid-svg-icons"; </s> remove onClick: () => void </s> add onClick: () => void, onExpandAll: (expand: boolean) => void </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> { </s> remove this.state = { isExpanded: false }; </s> add this.state = { isExpanded: false, mustExpand: false };
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
onClick: () => void, onExpandAll: (expand: boolean) => void
<mask> <mask> interface ITreeItemExpandableHeaderComponentProps { <mask> isExpanded: boolean, <mask> label: string, <mask> onClick: () => void <mask> } <mask> <mask> class TreeItemExpandableHeaderComponent extends React.Component<ITreeItemExpandableHeaderComponentProps> { <mask> constructor(props: ITreeItemExpandableHeaderComponentProps) { <mask> super(props); </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> { </s> remove this.state = { isExpanded: false }; </s> add this.state = { isExpanded: false, mustExpand: false }; </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
expandAll() { this.props.onExpandAll(!this.props.isExpanded); }
<mask> } <mask> <mask> render() { <mask> const chevron = this.props.isExpanded ? <FontAwesomeIcon icon={faMinus} /> : <FontAwesomeIcon icon={faPlus} /> <mask> const expandAll = this.props.isExpanded ? <FontAwesomeIcon icon={faCompress} /> : <FontAwesomeIcon icon={faExpandArrowsAlt} /> <mask> </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <div> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </s> add <div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div> </s> remove <BooleanLineComponent label={this.prepareText("error", issues.numErrors)} value={issues.numErrors === 0} /> <BooleanLineComponent label={this.prepareText("warning", issues.numWarnings)} value={issues.numWarnings === 0} /> <BooleanLineComponent label={this.prepareText("info", issues.numInfos)} value={issues.numInfos === 0} /> <BooleanLineComponent label={this.prepareText("hint", issues.numHints)} value={issues.numHints === 0} /> </s> add { issues.numErrors !== 0 && <MessageLineComponent text="Your file has some validation issues" icon={faTimesCircle} color="Red"/> } { issues.numErrors === 0 && <MessageLineComponent text="Your file is a valid glTF file" icon={faCheck} color="Green"/> } <TextLineComponent label="Errors" value={issues.numErrors.toString()} /> <TextLineComponent label="Warnings" value={issues.numWarnings.toString()} /> <TextLineComponent label="Infos" value={issues.numInfos.toString()} /> <TextLineComponent label="Hints" value={issues.numHints.toString()} /> </s> remove <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} />
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
const expandAll = this.props.isExpanded ? <FontAwesomeIcon icon={faCompress} /> : <FontAwesomeIcon icon={faExpandArrowsAlt} />
<mask> <mask> render() { <mask> const chevron = this.props.isExpanded ? <FontAwesomeIcon icon={faMinus} /> : <FontAwesomeIcon icon={faPlus} /> <mask> <mask> return ( <mask> <div className="expandableHeader"> <mask> <div className="text"> </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <div> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </s> add <div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div> </s> remove <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} />
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
<div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div>
<mask> render() { <mask> const chevron = this.props.isExpanded ? <FontAwesomeIcon icon={faMinus} /> : <FontAwesomeIcon icon={faPlus} /> <mask> <mask> return ( <mask> <div> <mask> <span className="arrow icon" onClick={() => this.props.onClick()}> <mask> {chevron} <mask> </span> {this.props.label} <mask> </div> <mask> ) <mask> } <mask> } <mask> </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} />
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> {
<mask> extensibilityGroups?: IExplorerExtensibilityGroup[] <mask> } <mask> <mask> <mask> export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { <mask> constructor(props: ITreeItemComponentProps) { <mask> super(props); <mask> <mask> this.state = { isExpanded: false }; <mask> } </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove this.state = { isExpanded: false }; </s> add this.state = { isExpanded: false, mustExpand: false }; </s> remove this.setState({ isExpanded: !this.state.isExpanded }); </s> add this.setState({ isExpanded: !this.state.isExpanded, mustExpand: false }); </s> remove onClick: () => void </s> add onClick: () => void, onExpandAll: (expand: boolean) => void </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
this.state = { isExpanded: false, mustExpand: false };
<mask> export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { <mask> constructor(props: ITreeItemComponentProps) { <mask> super(props); <mask> <mask> this.state = { isExpanded: false }; <mask> } <mask> <mask> switchExpandedState(): void { <mask> this.setState({ isExpanded: !this.state.isExpanded }); <mask> } </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> { </s> remove this.setState({ isExpanded: !this.state.isExpanded }); </s> add this.setState({ isExpanded: !this.state.isExpanded, mustExpand: false }); </s> remove onClick: () => void </s> add onClick: () => void, onExpandAll: (expand: boolean) => void </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
this.setState({ isExpanded: !this.state.isExpanded, mustExpand: false });
<mask> this.state = { isExpanded: false }; <mask> } <mask> <mask> switchExpandedState(): void { <mask> this.setState({ isExpanded: !this.state.isExpanded }); <mask> } <mask> <mask> shouldComponentUpdate(nextProps: ITreeItemComponentProps, nextState: { isExpanded: boolean }) { <mask> if (!nextState.isExpanded && this.state.isExpanded) { <mask> return true; </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove this.state = { isExpanded: false }; </s> add this.state = { isExpanded: false, mustExpand: false }; </s> remove export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean }> { </s> add export class TreeItemComponent extends React.Component<ITreeItemComponentProps, { isExpanded: boolean, mustExpand: boolean }> { </s> remove onClick: () => void </s> add onClick: () => void, onExpandAll: (expand: boolean) => void </s> remove import { faPlus, faMinus, faBan } from '@fortawesome/free-solid-svg-icons'; </s> add import { faPlus, faMinus, faBan, faExpandArrowsAlt, faCompress } from '@fortawesome/free-solid-svg-icons'; </s> remove return `No ${singularForm}`; </s> add return `${singularForm}`;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
expandAll(expand: boolean) { this.setState({isExpanded: expand, mustExpand: expand}); }
<mask> } <mask> <mask> render() { <mask> const items = this.props.items; <mask> <mask> const marginStyle = { <mask> paddingLeft: (10 * (this.props.offset + 0.5)) + "px" </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.state.mustExpand} extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.props.mustExpand} extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> remove return `No ${singularForm}`; </s> add return `${singularForm}`;
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
<TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} />
<mask> <mask> if (!this.state.isExpanded) { <mask> return ( <mask> <div className="groupContainer" style={marginStyle}> <mask> <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} /> <mask> </div > <mask> ) <mask> } <mask> <mask> const sortedItems = Tools.SortAndFilter(null, items); </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <div> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </s> add <div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div> </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.props.mustExpand} extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
<TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} />
<mask> <mask> return ( <mask> <div> <mask> <div className="groupContainer" style={marginStyle}> <mask> <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} /> <mask> </div> <mask> { <mask> sortedItems.map(item => { <mask> return ( <mask> <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.state.mustExpand} extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.props.mustExpand} extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> remove <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <div> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </s> add <div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
<TreeItemSelectableComponent mustExpand={this.state.mustExpand} extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} />
<mask> </div> <mask> { <mask> sortedItems.map(item => { <mask> return ( <mask> <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> <mask> ); <mask> }) <mask> } <mask> </div> <mask> ); </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.props.mustExpand} extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> remove <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <div> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </s> add <div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemComponent.tsx
<TreeItemSelectableComponent mustExpand={this.props.mustExpand} extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} />
<mask> return ( <mask> children.map(item => { <mask> <mask> return ( <mask> <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} selectedEntity={this.props.selectedEntity} key={item.uniqueId} offset={this.props.offset + 2} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> <mask> ); <mask> }) <mask> ) <mask> } <mask> </s> Fixed gltf display and added expandAll to inspector Former-commit-id: 1bbee8e9c19f3a54433232565dc400fc7511c772 </s> remove <TreeItemSelectableComponent extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> add <TreeItemSelectableComponent mustExpand={this.state.mustExpand} extensibilityGroups={this.props.extensibilityGroups} key={item.uniqueId} offset={this.props.offset + 2} selectedEntity={this.props.selectedEntity} entity={item} onSelectionChangedObservable={this.props.onSelectionChangedObservable} filter={this.props.filter} /> </s> remove <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={this.state.isExpanded} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} /> </s> add <TreeItemExpandableHeaderComponent isExpanded={false} label={this.props.label} onClick={() => this.switchExpandedState()} onExpandAll={expand => this.expandAll(expand)} /> </s> remove <div> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </s> add <div className="expandableHeader"> <div className="text"> <span className="arrow icon" onClick={() => this.props.onClick()}> {chevron} </span> {this.props.label} </div> <div className="expandAll icon" onClick={() => this.expandAll()} title={this.props.isExpanded ? "Collapse all" : "Expand all"}> {expandAll} </div>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f0d3407e1fbf0b2a1bd506748b633be045dad4ab
inspector/src/components/sceneExplorer/treeItemSelectableComponent.tsx
protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean {
<mask> public get name(): string { <mask> return "KHR_materials_pbrSpecularGlossiness"; <mask> } <mask> <mask> protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { <mask> return this._loadExtension<IKHRMaterialsPbrSpecularGlossiness>(material, (extension, onComplete) => { <mask> loader._createPbrMaterial(material); <mask> loader._loadMaterialBaseProperties(material); <mask> this._loadSpecularGlossinessProperties(loader, material, extension); <mask> assign(material.babylonMaterial, true); </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove loader._loadMaterialBaseProperties(material); this._loadSpecularGlossinessProperties(loader, material, extension); </s> add loader._loadMaterialBaseProperties(context, material); this._loadSpecularGlossinessProperties(loader, context, material, extension); </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { return false; } </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { return false; } </s> remove protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { return false; } </s> add protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { return false; }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
loader._loadMaterialBaseProperties(context, material); this._loadSpecularGlossinessProperties(loader, context, material, extension);
<mask> <mask> protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { <mask> return this._loadExtension<IKHRMaterialsPbrSpecularGlossiness>(material, (extension, onComplete) => { <mask> loader._createPbrMaterial(material); <mask> loader._loadMaterialBaseProperties(material); <mask> this._loadSpecularGlossinessProperties(loader, material, extension); <mask> assign(material.babylonMaterial, true); <mask> }); <mask> } <mask> <mask> private _loadSpecularGlossinessProperties(loader: GLTFLoader, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void { </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> remove public static LoadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return this._ApplyExtensions(extension => extension._loadMaterial(loader, material, assign)); </s> add public static LoadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return this._ApplyExtensions(extension => extension._loadMaterial(loader, context, material, assign)); </s> remove private _loadSpecularGlossinessProperties(loader: GLTFLoader, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void { </s> add private _loadSpecularGlossinessProperties(loader: GLTFLoader, context: string, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
private _loadSpecularGlossinessProperties(loader: GLTFLoader, context: string, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void {
<mask> assign(material.babylonMaterial, true); <mask> }); <mask> } <mask> <mask> private _loadSpecularGlossinessProperties(loader: GLTFLoader, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void { <mask> var babylonMaterial = material.babylonMaterial as PBRMaterial; <mask> <mask> babylonMaterial.albedoColor = properties.diffuseFactor ? Color3.FromArray(properties.diffuseFactor) : new Color3(1, 1, 1); <mask> babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : new Color3(1, 1, 1); <mask> babylonMaterial.microSurface = properties.glossinessFactor === undefined ? 1 : properties.glossinessFactor; </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove babylonMaterial.microSurface = properties.glossinessFactor === undefined ? 1 : properties.glossinessFactor; </s> add babylonMaterial.microSurface = properties.glossinessFactor == null ? 1 : properties.glossinessFactor; </s> remove babylonMaterial.albedoTexture = loader._loadTexture(properties.diffuseTexture); </s> add var texture = GLTFUtils.GetArrayItem(loader._gltf.textures, properties.diffuseTexture.index); if (!texture) { throw new Error(context + ": Failed to find diffuse texture " + properties.diffuseTexture.index); } babylonMaterial.albedoTexture = loader._loadTexture("textures[" + texture.index + "]", texture, properties.diffuseTexture.texCoord); </s> remove public _loadMaterialBaseProperties(material: IGLTFMaterial): void { </s> add public _loadMaterialBaseProperties(context: string, material: IGLTFMaterial): void { </s> remove loader._loadMaterialBaseProperties(material); this._loadSpecularGlossinessProperties(loader, material, extension); </s> add loader._loadMaterialBaseProperties(context, material); this._loadSpecularGlossinessProperties(loader, context, material, extension); </s> remove babylonMaterial.albedoTexture = this._loadTexture(properties.baseColorTexture); </s> add var texture = GLTFUtils.GetArrayItem(this._gltf.textures, properties.baseColorTexture.index); if (!texture) { throw new Error(context + ": Failed to find base color texture " + properties.baseColorTexture.index); } babylonMaterial.albedoTexture = this._loadTexture("textures[" + texture.index + "]", texture, properties.baseColorTexture.texCoord);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
babylonMaterial.microSurface = properties.glossinessFactor == null ? 1 : properties.glossinessFactor;
<mask> var babylonMaterial = material.babylonMaterial as PBRMaterial; <mask> <mask> babylonMaterial.albedoColor = properties.diffuseFactor ? Color3.FromArray(properties.diffuseFactor) : new Color3(1, 1, 1); <mask> babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : new Color3(1, 1, 1); <mask> babylonMaterial.microSurface = properties.glossinessFactor === undefined ? 1 : properties.glossinessFactor; <mask> <mask> if (properties.diffuseTexture) { <mask> babylonMaterial.albedoTexture = loader._loadTexture(properties.diffuseTexture); <mask> } <mask> </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove private _loadSpecularGlossinessProperties(loader: GLTFLoader, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void { </s> add private _loadSpecularGlossinessProperties(loader: GLTFLoader, context: string, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void { </s> remove babylonMaterial.albedoTexture = loader._loadTexture(properties.diffuseTexture); </s> add var texture = GLTFUtils.GetArrayItem(loader._gltf.textures, properties.diffuseTexture.index); if (!texture) { throw new Error(context + ": Failed to find diffuse texture " + properties.diffuseTexture.index); } babylonMaterial.albedoTexture = loader._loadTexture("textures[" + texture.index + "]", texture, properties.diffuseTexture.texCoord); </s> remove public _loadMaterialBaseProperties(material: IGLTFMaterial): void { </s> add public _loadMaterialBaseProperties(context: string, material: IGLTFMaterial): void { </s> remove babylonMaterial.albedoTexture = this._loadTexture(properties.baseColorTexture); </s> add var texture = GLTFUtils.GetArrayItem(this._gltf.textures, properties.baseColorTexture.index); if (!texture) { throw new Error(context + ": Failed to find base color texture " + properties.baseColorTexture.index); } babylonMaterial.albedoTexture = this._loadTexture("textures[" + texture.index + "]", texture, properties.baseColorTexture.texCoord); </s> remove public _loadTexture(textureInfo: IGLTFTextureInfo): Texture { var texture = this._getArrayItem(this._gltf.textures, textureInfo.index, "Texture"); if (!texture) { return null; } var texCoord = textureInfo.texCoord || 0; var source = this._getArrayItem(this._gltf.images, texture.source, "Texture (" + textureInfo.index + ") source"); if (!source) { return null; } var sampler = (texture.sampler == null ? <IGLTFSampler>{} : this._getArrayItem(this._gltf.samplers, texture.sampler, "Texture (" + textureInfo.index + ") sampler")); </s> add public _loadTexture(context: string, texture: IGLTFTexture, coordinatesIndex: number): Texture { var sampler = (texture.sampler == null ? <IGLTFSampler>{} : GLTFUtils.GetArrayItem(this._gltf.samplers, texture.sampler));
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
var texture = GLTFUtils.GetArrayItem(loader._gltf.textures, properties.diffuseTexture.index); if (!texture) { throw new Error(context + ": Failed to find diffuse texture " + properties.diffuseTexture.index); } babylonMaterial.albedoTexture = loader._loadTexture("textures[" + texture.index + "]", texture, properties.diffuseTexture.texCoord);
<mask> babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : new Color3(1, 1, 1); <mask> babylonMaterial.microSurface = properties.glossinessFactor === undefined ? 1 : properties.glossinessFactor; <mask> <mask> if (properties.diffuseTexture) { <mask> babylonMaterial.albedoTexture = loader._loadTexture(properties.diffuseTexture); <mask> } <mask> <mask> if (properties.specularGlossinessTexture) { <mask> babylonMaterial.reflectivityTexture = loader._loadTexture(properties.specularGlossinessTexture); <mask> babylonMaterial.reflectivityTexture.hasAlpha = true; </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove babylonMaterial.microSurface = properties.glossinessFactor === undefined ? 1 : properties.glossinessFactor; </s> add babylonMaterial.microSurface = properties.glossinessFactor == null ? 1 : properties.glossinessFactor; </s> remove private _loadSpecularGlossinessProperties(loader: GLTFLoader, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void { </s> add private _loadSpecularGlossinessProperties(loader: GLTFLoader, context: string, material: IGLTFMaterial, properties: IKHRMaterialsPbrSpecularGlossiness): void { </s> remove babylonMaterial.reflectivityTexture = loader._loadTexture(properties.specularGlossinessTexture); </s> add var texture = GLTFUtils.GetArrayItem(loader._gltf.textures, properties.specularGlossinessTexture.index); if (!texture) { throw new Error(context + ": Failed to find diffuse texture " + properties.specularGlossinessTexture.index); } babylonMaterial.reflectivityTexture = loader._loadTexture("textures[" + texture.index + "]", texture, properties.specularGlossinessTexture.texCoord); </s> remove babylonMaterial.albedoTexture = this._loadTexture(properties.baseColorTexture); </s> add var texture = GLTFUtils.GetArrayItem(this._gltf.textures, properties.baseColorTexture.index); if (!texture) { throw new Error(context + ": Failed to find base color texture " + properties.baseColorTexture.index); } babylonMaterial.albedoTexture = this._loadTexture("textures[" + texture.index + "]", texture, properties.baseColorTexture.texCoord); </s> remove public _loadTexture(textureInfo: IGLTFTextureInfo): Texture { var texture = this._getArrayItem(this._gltf.textures, textureInfo.index, "Texture"); if (!texture) { return null; } var texCoord = textureInfo.texCoord || 0; var source = this._getArrayItem(this._gltf.images, texture.source, "Texture (" + textureInfo.index + ") source"); if (!source) { return null; } var sampler = (texture.sampler == null ? <IGLTFSampler>{} : this._getArrayItem(this._gltf.samplers, texture.sampler, "Texture (" + textureInfo.index + ") sampler")); </s> add public _loadTexture(context: string, texture: IGLTFTexture, coordinatesIndex: number): Texture { var sampler = (texture.sampler == null ? <IGLTFSampler>{} : GLTFUtils.GetArrayItem(this._gltf.samplers, texture.sampler));
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
var texture = GLTFUtils.GetArrayItem(loader._gltf.textures, properties.specularGlossinessTexture.index); if (!texture) { throw new Error(context + ": Failed to find diffuse texture " + properties.specularGlossinessTexture.index); } babylonMaterial.reflectivityTexture = loader._loadTexture("textures[" + texture.index + "]", texture, properties.specularGlossinessTexture.texCoord);
<mask> babylonMaterial.albedoTexture = loader._loadTexture(properties.diffuseTexture); <mask> } <mask> <mask> if (properties.specularGlossinessTexture) { <mask> babylonMaterial.reflectivityTexture = loader._loadTexture(properties.specularGlossinessTexture); <mask> babylonMaterial.reflectivityTexture.hasAlpha = true; <mask> babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true; <mask> } <mask> <mask> loader._loadMaterialAlphaProperties(material, properties.diffuseFactor); </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove loader._loadMaterialAlphaProperties(material, properties.diffuseFactor); </s> add loader._loadMaterialAlphaProperties(context, material, properties.diffuseFactor); </s> remove babylonMaterial.albedoTexture = loader._loadTexture(properties.diffuseTexture); </s> add var texture = GLTFUtils.GetArrayItem(loader._gltf.textures, properties.diffuseTexture.index); if (!texture) { throw new Error(context + ": Failed to find diffuse texture " + properties.diffuseTexture.index); } babylonMaterial.albedoTexture = loader._loadTexture("textures[" + texture.index + "]", texture, properties.diffuseTexture.texCoord); </s> remove babylonMaterial.metallicTexture = this._loadTexture(properties.metallicRoughnessTexture); </s> add var texture = GLTFUtils.GetArrayItem(this._gltf.textures, properties.metallicRoughnessTexture.index); if (!texture) { throw new Error(context + ": Failed to find metallic roughness texture " + properties.metallicRoughnessTexture.index); } babylonMaterial.metallicTexture = this._loadTexture("textures[" + texture.index + "]", texture, properties.metallicRoughnessTexture.texCoord); </s> remove babylonMaterial.albedoTexture = this._loadTexture(properties.baseColorTexture); </s> add var texture = GLTFUtils.GetArrayItem(this._gltf.textures, properties.baseColorTexture.index); if (!texture) { throw new Error(context + ": Failed to find base color texture " + properties.baseColorTexture.index); } babylonMaterial.albedoTexture = this._loadTexture("textures[" + texture.index + "]", texture, properties.baseColorTexture.texCoord); </s> remove if (material.occlusionTexture.strength !== undefined) { </s> add if (material.occlusionTexture.strength != null) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
loader._loadMaterialAlphaProperties(context, material, properties.diffuseFactor);
<mask> babylonMaterial.reflectivityTexture.hasAlpha = true; <mask> babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true; <mask> } <mask> <mask> loader._loadMaterialAlphaProperties(material, properties.diffuseFactor); <mask> } <mask> } <mask> <mask> GLTFLoader.RegisterExtension(new KHRMaterialsPbrSpecularGlossiness()); <mask> } </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove babylonMaterial.reflectivityTexture = loader._loadTexture(properties.specularGlossinessTexture); </s> add var texture = GLTFUtils.GetArrayItem(loader._gltf.textures, properties.specularGlossinessTexture.index); if (!texture) { throw new Error(context + ": Failed to find diffuse texture " + properties.specularGlossinessTexture.index); } babylonMaterial.reflectivityTexture = loader._loadTexture("textures[" + texture.index + "]", texture, properties.specularGlossinessTexture.texCoord); </s> remove babylonMaterial.metallicTexture = this._loadTexture(properties.metallicRoughnessTexture); </s> add var texture = GLTFUtils.GetArrayItem(this._gltf.textures, properties.metallicRoughnessTexture.index); if (!texture) { throw new Error(context + ": Failed to find metallic roughness texture " + properties.metallicRoughnessTexture.index); } babylonMaterial.metallicTexture = this._loadTexture("textures[" + texture.index + "]", texture, properties.metallicRoughnessTexture.texCoord); </s> remove babylonMaterial.albedoTexture = loader._loadTexture(properties.diffuseTexture); </s> add var texture = GLTFUtils.GetArrayItem(loader._gltf.textures, properties.diffuseTexture.index); if (!texture) { throw new Error(context + ": Failed to find diffuse texture " + properties.diffuseTexture.index); } babylonMaterial.albedoTexture = loader._loadTexture("textures[" + texture.index + "]", texture, properties.diffuseTexture.texCoord); </s> remove if (material.occlusionTexture.strength !== undefined) { </s> add if (material.occlusionTexture.strength != null) { </s> remove babylonMaterial.ambientTexture = this._loadTexture(material.occlusionTexture); </s> add var texture = GLTFUtils.GetArrayItem(this._gltf.textures, material.occlusionTexture.index); if (!texture) { throw new Error(context + ": Failed to find occlusion texture " + material.occlusionTexture.index); } babylonMaterial.ambientTexture = this._loadTexture("textures[" + texture.index + "]", texture, material.occlusionTexture.texCoord);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean {
<mask> public get name() { <mask> return "MSFT_lod"; <mask> } <mask> <mask> protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { <mask> var node = loader._getArrayItem(loader._gltf.nodes, index, "Node"); <mask> if (!node) { <mask> return true; <mask> } <mask> <mask> return this._loadExtension<IMSFTLOD>(node, (extension, onComplete) => { <mask> for (var i = extension.ids.length - 1; i >= 0; i--) { <mask> loader._traverseNode(extension.ids[i], action, parentNode); <mask> } <mask> </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { return false; } </s> add protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { return false; } </s> remove loader._traverseNode(index, action, parentNode); </s> add loader._traverseNode(context, node, action, parentNode); </s> remove loader._traverseNode(extension.ids[i], action, parentNode); </s> add var lodNode = GLTFUtils.GetArrayItem(loader._gltf.nodes, extension.ids[i]); if (!lodNode) { throw new Error(context + ": Failed to find node " + extension.ids[i]); } loader._traverseNode(context, lodNode, action, parentNode); </s> remove public static TraverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { return this._ApplyExtensions(extension => extension._traverseNode(loader, index, action, parentNode)); </s> add public static TraverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { return this._ApplyExtensions(extension => extension._traverseNode(loader, context, node, action, parentNode)); </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { return false; } </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { return false; }
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
var lodNode = GLTFUtils.GetArrayItem(loader._gltf.nodes, extension.ids[i]); if (!lodNode) { throw new Error(context + ": Failed to find node " + extension.ids[i]); } loader._traverseNode(context, lodNode, action, parentNode);
<mask> } <mask> <mask> return this._loadExtension<IMSFTLOD>(node, (extension, onComplete) => { <mask> for (var i = extension.ids.length - 1; i >= 0; i--) { <mask> loader._traverseNode(extension.ids[i], action, parentNode); <mask> } <mask> <mask> loader._traverseNode(index, action, parentNode); <mask> onComplete(); <mask> }); </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove loader._traverseNode(index, action, parentNode); </s> add loader._traverseNode(context, node, action, parentNode); </s> remove protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { var node = loader._getArrayItem(loader._gltf.nodes, index, "Node"); if (!node) { return true; } </s> add protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { </s> remove var node = this._getArrayItem(this._gltf.nodes, nodeIndices[i], "Node"); </s> add var node = GLTFUtils.GetArrayItem(this._gltf.nodes, nodeIndices[i]); </s> remove this._loadNodeLOD(loader, nodes, nodes.length - 1, () => { </s> add this._loadNodeLOD(loader, context, nodes, nodes.length - 1, () => { </s> remove return; </s> add throw new Error(context + ": Failed to find node " + nodeIndices[i]);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
loader._traverseNode(context, node, action, parentNode);
<mask> for (var i = extension.ids.length - 1; i >= 0; i--) { <mask> loader._traverseNode(extension.ids[i], action, parentNode); <mask> } <mask> <mask> loader._traverseNode(index, action, parentNode); <mask> onComplete(); <mask> }); <mask> } <mask> <mask> protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove loader._traverseNode(extension.ids[i], action, parentNode); </s> add var lodNode = GLTFUtils.GetArrayItem(loader._gltf.nodes, extension.ids[i]); if (!lodNode) { throw new Error(context + ": Failed to find node " + extension.ids[i]); } loader._traverseNode(context, lodNode, action, parentNode); </s> remove protected _traverseNode(loader: GLTFLoader, index: number, action: (node: IGLTFNode, index: number, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { var node = loader._getArrayItem(loader._gltf.nodes, index, "Node"); if (!node) { return true; } </s> add protected _traverseNode(loader: GLTFLoader, context: string, node: IGLTFNode, action: (node: IGLTFNode, parentNode: IGLTFNode) => boolean, parentNode: IGLTFNode): boolean { </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { return false; } </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { return false; } </s> remove var node = this._getArrayItem(this._gltf.nodes, nodeIndices[i], "Node"); </s> add var node = GLTFUtils.GetArrayItem(this._gltf.nodes, nodeIndices[i]);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean {
<mask> onComplete(); <mask> }); <mask> } <mask> <mask> protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { <mask> return this._loadExtension<IMSFTLOD>(node, (extension, onComplete) => { <mask> var nodes = [node.index, ...extension.ids].map(index => loader._gltf.nodes[index]); <mask> <mask> loader._addLoaderPendingData(node); <mask> this._loadNodeLOD(loader, nodes, nodes.length - 1, () => { </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove this._loadNodeLOD(loader, nodes, nodes.length - 1, () => { </s> add this._loadNodeLOD(loader, context, nodes, nodes.length - 1, () => { </s> remove this._loadNodeLOD(loader, nodes, index - 1, onComplete); </s> add this._loadNodeLOD(loader, context, nodes, index - 1, onComplete); </s> remove this._loadMaterialLOD(loader, materials, materials.length - 1, assign, () => { </s> add this._loadMaterialLOD(loader, context, materials, materials.length - 1, assign, () => { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove loader._traverseNode(index, action, parentNode); </s> add loader._traverseNode(context, node, action, parentNode);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
this._loadNodeLOD(loader, context, nodes, nodes.length - 1, () => {
<mask> return this._loadExtension<IMSFTLOD>(node, (extension, onComplete) => { <mask> var nodes = [node.index, ...extension.ids].map(index => loader._gltf.nodes[index]); <mask> <mask> loader._addLoaderPendingData(node); <mask> this._loadNodeLOD(loader, nodes, nodes.length - 1, () => { <mask> loader._removeLoaderPendingData(node); <mask> onComplete(); <mask> }); <mask> }); <mask> } </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { </s> remove this._loadMaterialLOD(loader, materials, materials.length - 1, assign, () => { </s> add this._loadMaterialLOD(loader, context, materials, materials.length - 1, assign, () => { </s> remove this._loadNodeLOD(loader, nodes, index - 1, onComplete); </s> add this._loadNodeLOD(loader, context, nodes, index - 1, onComplete); </s> remove loader._traverseNode(extension.ids[i], action, parentNode); </s> add var lodNode = GLTFUtils.GetArrayItem(loader._gltf.nodes, extension.ids[i]); if (!lodNode) { throw new Error(context + ": Failed to find node " + extension.ids[i]); } loader._traverseNode(context, lodNode, action, parentNode); </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
private _loadNodeLOD(loader: GLTFLoader, context: string, nodes: IGLTFNode[], index: number, onComplete: () => void): void {
<mask> }); <mask> }); <mask> } <mask> <mask> private _loadNodeLOD(loader: GLTFLoader, nodes: IGLTFNode[], index: number, onComplete: () => void): void { <mask> loader._whenAction(() => { <mask> loader._loadNode(nodes[index]); <mask> }, () => { <mask> if (index !== nodes.length - 1) { <mask> var previousNode = nodes[index + 1]; </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove loader._loadNode(nodes[index]); </s> add loader._loadNode(context, nodes[index]); </s> remove private _loadMaterialLOD(loader: GLTFLoader, materials: IGLTFMaterial[], index: number, assign: (babylonMaterial: Material, isNew: boolean) => void, onComplete: () => void): void { loader._loadMaterial(materials[index], (babylonMaterial, isNew) => { </s> add private _loadMaterialLOD(loader: GLTFLoader, context: string, materials: IGLTFMaterial[], index: number, assign: (babylonMaterial: Material, isNew: boolean) => void, onComplete: () => void): void { loader._loadMaterial(context, materials[index], (babylonMaterial, isNew) => { </s> remove this._loadNodeLOD(loader, nodes, nodes.length - 1, () => { </s> add this._loadNodeLOD(loader, context, nodes, nodes.length - 1, () => { </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { return false; } </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { return false; }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
loader._loadNode(context, nodes[index]);
<mask> } <mask> <mask> private _loadNodeLOD(loader: GLTFLoader, nodes: IGLTFNode[], index: number, onComplete: () => void): void { <mask> loader._whenAction(() => { <mask> loader._loadNode(nodes[index]); <mask> }, () => { <mask> if (index !== nodes.length - 1) { <mask> var previousNode = nodes[index + 1]; <mask> previousNode.babylonMesh.setEnabled(false); <mask> } </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove private _loadNodeLOD(loader: GLTFLoader, nodes: IGLTFNode[], index: number, onComplete: () => void): void { </s> add private _loadNodeLOD(loader: GLTFLoader, context: string, nodes: IGLTFNode[], index: number, onComplete: () => void): void { </s> remove private _loadMaterialLOD(loader: GLTFLoader, materials: IGLTFMaterial[], index: number, assign: (babylonMaterial: Material, isNew: boolean) => void, onComplete: () => void): void { loader._loadMaterial(materials[index], (babylonMaterial, isNew) => { </s> add private _loadMaterialLOD(loader: GLTFLoader, context: string, materials: IGLTFMaterial[], index: number, assign: (babylonMaterial: Material, isNew: boolean) => void, onComplete: () => void): void { loader._loadMaterial(context, materials[index], (babylonMaterial, isNew) => { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { return false; } </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { return false; } </s> remove this._loadNodeLOD(loader, nodes, nodes.length - 1, () => { </s> add this._loadNodeLOD(loader, context, nodes, nodes.length - 1, () => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
this._loadNodeLOD(loader, context, nodes, index - 1, onComplete);
<mask> return; <mask> } <mask> <mask> setTimeout(() => { <mask> this._loadNodeLOD(loader, nodes, index - 1, onComplete); <mask> }, MSFTLOD.MinimalLODDelay); <mask> }); <mask> } <mask> <mask> protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> remove loader._loadMaterialBaseProperties(material); this._loadSpecularGlossinessProperties(loader, material, extension); </s> add loader._loadMaterialBaseProperties(context, material); this._loadSpecularGlossinessProperties(loader, context, material, extension); </s> remove this._loadMaterialLOD(loader, materials, index - 1, assign, onComplete); </s> add this._loadMaterialLOD(loader, context, materials, index - 1, assign, onComplete);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean {
<mask> }, MSFTLOD.MinimalLODDelay); <mask> }); <mask> } <mask> <mask> protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { <mask> return this._loadExtension<IMSFTLOD>(material, (extension, onComplete) => { <mask> var materials = [material.index, ...extension.ids].map(index => loader._gltf.materials[index]); <mask> <mask> loader._addLoaderPendingData(material); <mask> this._loadMaterialLOD(loader, materials, materials.length - 1, assign, () => { </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove this._loadMaterialLOD(loader, materials, materials.length - 1, assign, () => { </s> add this._loadMaterialLOD(loader, context, materials, materials.length - 1, assign, () => { </s> remove this._loadNodeLOD(loader, nodes, index - 1, onComplete); </s> add this._loadNodeLOD(loader, context, nodes, index - 1, onComplete); </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> remove loader._loadMaterialBaseProperties(material); this._loadSpecularGlossinessProperties(loader, material, extension); </s> add loader._loadMaterialBaseProperties(context, material); this._loadSpecularGlossinessProperties(loader, context, material, extension);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
this._loadMaterialLOD(loader, context, materials, materials.length - 1, assign, () => {
<mask> return this._loadExtension<IMSFTLOD>(material, (extension, onComplete) => { <mask> var materials = [material.index, ...extension.ids].map(index => loader._gltf.materials[index]); <mask> <mask> loader._addLoaderPendingData(material); <mask> this._loadMaterialLOD(loader, materials, materials.length - 1, assign, () => { <mask> material.extensions[this.name] = extension; <mask> loader._removeLoaderPendingData(material); <mask> onComplete(); <mask> }); <mask> }); </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove this._loadNodeLOD(loader, nodes, nodes.length - 1, () => { </s> add this._loadNodeLOD(loader, context, nodes, nodes.length - 1, () => { </s> remove this._loadMaterialLOD(loader, materials, index - 1, assign, onComplete); </s> add this._loadMaterialLOD(loader, context, materials, index - 1, assign, onComplete); </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { </s> remove loader._traverseNode(extension.ids[i], action, parentNode); </s> add var lodNode = GLTFUtils.GetArrayItem(loader._gltf.nodes, extension.ids[i]); if (!lodNode) { throw new Error(context + ": Failed to find node " + extension.ids[i]); } loader._traverseNode(context, lodNode, action, parentNode);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
private _loadMaterialLOD(loader: GLTFLoader, context: string, materials: IGLTFMaterial[], index: number, assign: (babylonMaterial: Material, isNew: boolean) => void, onComplete: () => void): void { loader._loadMaterial(context, materials[index], (babylonMaterial, isNew) => {
<mask> }); <mask> }); <mask> } <mask> <mask> private _loadMaterialLOD(loader: GLTFLoader, materials: IGLTFMaterial[], index: number, assign: (babylonMaterial: Material, isNew: boolean) => void, onComplete: () => void): void { <mask> loader._loadMaterial(materials[index], (babylonMaterial, isNew) => { <mask> assign(babylonMaterial, isNew); <mask> <mask> if (index === 0) { <mask> onComplete(); <mask> return; </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove private _loadNodeLOD(loader: GLTFLoader, nodes: IGLTFNode[], index: number, onComplete: () => void): void { </s> add private _loadNodeLOD(loader: GLTFLoader, context: string, nodes: IGLTFNode[], index: number, onComplete: () => void): void { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { return false; } </s> remove public _loadMaterial(material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void { </s> add public _loadMaterial(context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void { </s> remove loader._loadNode(nodes[index]); </s> add loader._loadNode(context, nodes[index]); </s> remove protected _loadNode(loader: GLTFLoader, node: IGLTFNode): boolean { return false; } </s> add protected _loadNode(loader: GLTFLoader, context: string, node: IGLTFNode): boolean { return false; }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
this._loadMaterialLOD(loader, context, materials, index - 1, assign, onComplete);
<mask> // all active material textures of the current LOD are loaded. <mask> loader._executeWhenRenderReady(() => { <mask> BaseTexture.WhenAllReady(babylonMaterial.getActiveTextures(), () => { <mask> setTimeout(() => { <mask> this._loadMaterialLOD(loader, materials, index - 1, assign, onComplete); <mask> }, MSFTLOD.MinimalLODDelay); <mask> }); <mask> }); <mask> }); <mask> } </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove this._loadNodeLOD(loader, nodes, index - 1, onComplete); </s> add this._loadNodeLOD(loader, context, nodes, index - 1, onComplete); </s> remove this._loadMaterialLOD(loader, materials, materials.length - 1, assign, () => { </s> add this._loadMaterialLOD(loader, context, materials, materials.length - 1, assign, () => { </s> remove protected _loadMaterial(loader: GLTFLoader, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> add protected _loadMaterial(loader: GLTFLoader, context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): boolean { </s> remove this._loadNodeLOD(loader, nodes, nodes.length - 1, () => { </s> add this._loadNodeLOD(loader, context, nodes, nodes.length - 1, () => { </s> remove private _loadNodeLOD(loader: GLTFLoader, nodes: IGLTFNode[], index: number, onComplete: () => void): void { </s> add private _loadNodeLOD(loader: GLTFLoader, context: string, nodes: IGLTFNode[], index: number, onComplete: () => void): void {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
} interface TypedArrayConstructor<T extends ArrayBufferView> { readonly prototype: T; new(length: number): T; new(array: ArrayLike<number>): T; new(buffer: ArrayBuffer, byteOffset?: number, length?: number): T; readonly BYTES_PER_ELEMENT: number; }
<mask> if (--this._pendingCount === 0) { <mask> this._callback(); <mask> } <mask> } <mask> } <mask> <mask> export class GLTFLoader implements IGLTFLoader, IDisposable { <mask> public _gltf: IGLTF; <mask> public _babylonScene: Scene; <mask> </s> More glTF loader error handling Former-commit-id: c89907a7e7bc41621a54cc66c25e45060661cd2c </s> remove public _loadTexture(textureInfo: IGLTFTextureInfo): Texture { var texture = this._getArrayItem(this._gltf.textures, textureInfo.index, "Texture"); if (!texture) { return null; } var texCoord = textureInfo.texCoord || 0; var source = this._getArrayItem(this._gltf.images, texture.source, "Texture (" + textureInfo.index + ") source"); if (!source) { return null; } var sampler = (texture.sampler == null ? <IGLTFSampler>{} : this._getArrayItem(this._gltf.samplers, texture.sampler, "Texture (" + textureInfo.index + ") sampler")); </s> add public _loadTexture(context: string, texture: IGLTFTexture, coordinatesIndex: number): Texture { var sampler = (texture.sampler == null ? <IGLTFSampler>{} : GLTFUtils.GetArrayItem(this._gltf.samplers, texture.sampler)); </s> remove } catch (e) { this._onError(e.message); } </s> add }); </s> remove this._loadBufferAsync(buffer, bufferData => { if (byteOffset + byteLength > bufferData.byteLength) { this._onError("Buffer access is out of range"); return; </s> add this._loadBufferViewAsync("bufferViews[" + bufferView.index + "]", bufferView, bufferViewData => { var numComponents = this._getNumComponentsOfType(accessor.type); if (numComponents === 0) { throw new Error(context + ": Invalid type (" + accessor.type + ")"); </s> remove public _onError(message: string): void { </s> add private _onError(message: string): void { </s> remove public _loadMaterial(material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void { </s> add public _loadMaterial(context: string, material: IGLTFMaterial, assign: (babylonMaterial: Material, isNew: boolean) => void): void {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f12fd170c590220f40d077bc7b48be242371065c
loaders/src/glTF/2.0/babylon.glTFLoader.ts