docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
listlengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
export class SkyMaterial extends PushMaterial {
<mask> this.rebuild(); <mask> } <mask> } <mask> <mask> export class SkyMaterial extends Material { <mask> // Public members <mask> @serialize() <mask> public luminance: number = 1.0; <mask> <mask> @serialize() </s> Moved SkyMaterial to...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
private _renderId: number;
<mask> <mask> // Private members <mask> private _cameraPosition: Vector3 = Vector3.Zero(); <mask> <mask> private _renderId: number; <mask> <mask> private _defines = new SkyMaterialDefines(); <mask> private _cachedDefines = new SkyMaterialDefines...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
public isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean { if (this.isFrozen) { if (this._wasPreviouslyReady && subMesh.effect) {
<mask> return null; <mask> } <mask> <mask> // Methods <mask> private _checkCache(scene: Scene, mesh?: AbstractMesh, useInstances?: boolean): boolean { <mask> if (!mesh) { <mask> return true; <mask> } <mask> <mask> ret...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
if (!subMesh._materialDefines) { subMesh._materialDefines = new SkyMaterialDefines(); } var defines = <SkyMaterialDefines>subMesh._materialDefines;
<mask> return true; <mask> } <mask> } <mask> <mask> var scene = this.getScene(); <mask> <mask> if (!this.checkReadyOnEveryCall) { <mask> if (this._renderId === scene.getRenderId()) { <mask> return true...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
return true;
<mask> var scene = this.getScene(); <mask> <mask> if (!this.checkReadyOnEveryCall) { <mask> if (this._renderId === scene.getRenderId()) { <mask> if (this._checkCache(scene, mesh, useInstances)) { <mask> return true; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
<mask> } <mask> } <mask> <mask> var engine = scene.getEngine(); <mask> this._defines.reset(); <mask> <mask> // Effect <mask> if (scene.clipPlane) { <mask> this._defines.CLIPPLANE = true; <mask> } </s> Mo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
MaterialHelper.PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, defines);
<mask> <mask> var engine = scene.getEngine(); <mask> this._defines.reset(); <mask> <mask> // Effect <mask> if (scene.clipPlane) { <mask> this._defines.CLIPPLANE = true; <mask> } <mask> <mask> // Point size <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, false);
<mask> this._defines.FOG = true; <mask> } <mask> <mask> // Attribs <mask> if (mesh) { <mask> if (mesh.useVertexColors && mesh.isVerticesDataPresent(VertexBuffer.ColorKind)) { <mask> this._defines.VERTEXCOLOR = tr...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
if (defines.isDirty) { defines.markAsProcessed();
<mask> } <mask> } <mask> <mask> // Get correct effect <mask> if (!this._defines.isEqual(this._cachedDefines) || !this._effect) { <mask> this._defines.cloneTo(this._cachedDefines); <mask> <mask> scene.rese...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
if (defines.FOG) {
<mask> scene.resetCachedMaterial(); <mask> <mask> // Fallbacks <mask> var fallbacks = new EffectFallbacks(); <mask> if (this._defines.FOG) { <mask> fallbacks.addFallback(1, "FOG"); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
if (defines.VERTEXCOLOR) {
<mask> <mask> //Attributes <mask> var attribs = [VertexBuffer.PositionKind]; <mask> <mask> if (this._defines.VERTEXCOLOR) { <mask> attribs.push(VertexBuffer.ColorKind); <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
<mask> if (this._defines.VERTEXCOLOR) { <mask> attribs.push(VertexBuffer.ColorKind); <mask> } <mask> <mask> // Legacy browser patch <mask> var shaderName = "sky"; <mask> <mask> var join = this._...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
var join = defines.toString(); subMesh.setEffect(scene.getEngine().createEffect(shaderName,
<mask> <mask> // Legacy browser patch <mask> var shaderName = "sky"; <mask> <mask> var join = this._defines.toString(); <mask> this._effect = scene.getEngine().createEffect(shaderName, <mask> attribs, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
join, fallbacks, this.onCompiled, this.onError), defines);
<mask> "luminance", "turbidity", "rayleigh", "mieCoefficient", "mieDirectionalG", "sunPosition", <mask> "cameraPosition" <mask> ], <mask> [], <mask> join, fallbacks, this.onCompiled, this.onError); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
if (!subMesh.effect.isReady()) {
<mask> [], <mask> join, fallbacks, this.onCompiled, this.onError); <mask> } <mask> <mask> if (!this._effect.isReady()) { <mask> return false; <mask> } <mask> <mask> this._renderId = scene.getRe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
public bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void {
<mask> <mask> return true; <mask> } <mask> <mask> public bindOnlyWorldMatrix(world: Matrix): void { <mask> this._effect.setMatrix("world", world); <mask> } <mask> <mask> public bind(world: Matrix, mesh?: Mesh): void { <mask> var scene = th...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
var defines = <SkyMaterialDefines>subMesh._materialDefines; if (!defines) { return; } var effect = subMesh.effect; this._activeEffect = effect;
<mask> public bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void { <mask> var scene = this.getScene(); <mask> <mask> // Matrices <mask> this.bindOnlyWorldMatrix(world); <mask> this._activeEffect.setMatrix("viewProjection", scene.getTr...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
<mask> var scene = this.getScene(); <mask> <mask> // Matrices <mask> this.bindOnlyWorldMatrix(world); <mask> this._effect.setMatrix("viewProjection", scene.getTransformMatrix()); <mask> <mask> if (scene.getCachedMaterial() !== this) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
if (this._mustRebind(scene, effect)) {
<mask> // Matrices <mask> this.bindOnlyWorldMatrix(world); <mask> this._effect.setMatrix("viewProjection", scene.getTransformMatrix()); <mask> <mask> if (scene.getCachedMaterial() !== this) { <mask> // Clip plane <mask> if (...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._activeEffect.setFloat4("vClipPlane", clipPlane.normal.x, clipPlane.normal.y, clipPlane.normal.z, clipPlane.d);
<mask> if (scene.getCachedMaterial() !== this) { <mask> // Clip plane <mask> if (scene.clipPlane) { <mask> var clipPlane = scene.clipPlane; <mask> this._effect.setFloat4("vClipPlane", clipPlane.normal.x, clipPlane.normal.y, clipPla...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._activeEffect.setFloat("pointSize", this.pointSize);
<mask> } <mask> <mask> // Point size <mask> if (this.pointsCloud) { <mask> this._effect.setFloat("pointSize", this.pointSize); <mask> } <mask> } <mask> <mask> // View <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._activeEffect.setMatrix("view", scene.getViewMatrix());
<mask> } <mask> <mask> // View <mask> if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) { <mask> this._effect.setMatrix("view", scene.getViewMatrix()); <mask> } <mask> <mask> // Fog <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
MaterialHelper.BindFogParameters(scene, mesh, this._activeEffect);
<mask> this._effect.setMatrix("view", scene.getViewMatrix()); <mask> } <mask> <mask> // Fog <mask> MaterialHelper.BindFogParameters(scene, mesh, this._effect); <mask> <mask> // Sky <mask> var camera = scene.act...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._activeEffect.setVector3("cameraPosition", this._cameraPosition);
<mask> var cameraWorldMatrix = camera.getWorldMatrix(); <mask> this._cameraPosition.x = cameraWorldMatrix.m[12]; <mask> this._cameraPosition.y = cameraWorldMatrix.m[13]; <mask> this._cameraPosition.z = cameraWorldMatrix.m[14]; <mask> t...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._activeEffect.setFloat("luminance", this.luminance);
<mask> this._effect.setVector3("cameraPosition", this._cameraPosition); <mask> } <mask> <mask> if (this.luminance > 0) { <mask> this._effect.setFloat("luminance", this.luminance); <mask> } <mask> <mask> this._effect...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._activeEffect.setFloat("turbidity", this.turbidity); this._activeEffect.setFloat("rayleigh", this.rayleigh); this._activeEffect.setFloat("mieCoefficient", this.mieCoefficient); this._activeEffect.setFloat("mieDirectionalG", this.mieDirectionalG);
<mask> if (this.luminance > 0) { <mask> this._effect.setFloat("luminance", this.luminance); <mask> } <mask> <mask> this._effect.setFloat("turbidity", this.turbidity); <mask> this._effect.setFloat("rayleigh", this.rayleigh); <mask> this._effect.setFloa...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._activeEffect.setVector3("sunPosition", this.sunPosition);
<mask> this.sunPosition.y = this.distance * Math.sin(phi) * Math.sin(theta); <mask> this.sunPosition.z = this.distance * Math.sin(phi) * Math.cos(theta); <mask> } <mask> <mask> this._effect.setVector3("sunPosition", this.sunPosition); <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._afterBind(mesh, this._activeEffect);
<mask> } <mask> <mask> this._effect.setVector3("sunPosition", this.sunPosition); <mask> <mask> this._afterBind(mesh); <mask> } <mask> <mask> public getAnimatables(): IAnimatable[] { <mask> return []; <mask> } </s> Moved SkyMaterial...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/471edf5289205e089876966f483bbab55e443ad6
materialsLibrary/src/sky/babylon.skyMaterial.ts
this._vitality *= (0.92 - 100 * Math.max(projDistSquared - 0.0016, 0) + Math.max(this._t - priorT, 0));
<mask> this._t = dot / (this._axisLength * this._axisLength); <mask> const projDistSquared = this._currentPosition.lengthSquared() - (dot / this._axisLength) * (dot / this._axisLength); <mask> <mask> // TODO: Extricate the magic. <mask> this._vitality *= (0.95 - 100 * Math.max(proj...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4750f5ec15c665a67d28e30f55d66e863b5b607a
src/XR/features/WebXRWalkingLocomotion.ts
private static get _MillisecondsPerUpdate(): number { // 15 FPS return 1000 / 15; }
<mask> return 1; <mask> } <mask> <mask> private _sessionManager: WebXRSessionManager; <mask> private _up: Vector3 = new Vector3(); <mask> private _forward: Vector3 = new Vector3(); <mask> private _position: Vector3 = new Vector3(); <mask> private _movement: Vector3 = new Vector3...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4750f5ec15c665a67d28e30f55d66e863b5b607a
src/XR/features/WebXRWalkingLocomotion.ts
private _millisecondsSinceLastUpdate: number = WebXRWalkingLocomotion._MillisecondsPerUpdate;
<mask> private _movement: Vector3 = new Vector3(); <mask> private _walker: Nullable<Walker>; <mask> <mask> private _locomotionTarget: WebXRCamera | TransformNode; <mask> private _isLocomotionTargetWebXRCamera: boolean; <mask> <mask> /** </s> Attempting to fix walking framerate to 15 FPS. ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4750f5ec15c665a67d28e30f55d66e863b5b607a
src/XR/features/WebXRWalkingLocomotion.ts
// Enforce reduced framerate this._millisecondsSinceLastUpdate += this._sessionManager.scene.getEngine().getDeltaTime(); if (this._millisecondsSinceLastUpdate < WebXRWalkingLocomotion._MillisecondsPerUpdate) { return; } this._millisecondsSinceLastUpdate -= WebXRW...
<mask> return true; <mask> } <mask> <mask> protected _onXRFrame(frame: XRFrame): void { <mask> const pose = frame.getViewerPose(this._sessionManager.baseReferenceSpace); <mask> if (!pose) { <mask> return; <mask> } <mask> <mask> const handednessScal...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4750f5ec15c665a67d28e30f55d66e863b5b607a
src/XR/features/WebXRWalkingLocomotion.ts
precision?: number;
<mask> label: string; <mask> value: number; <mask> step?: number; <mask> onChange: (value: number) => void; <mask> } <mask> <mask> export class NumericInputComponent extends React.Component<INumericInputComponentProps, { value: string }> { <mask> <mask> static defaultProps = { </s> Bette...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4812f905571d953ca69b70c2dee54e3ccfca3213
inspector/src/components/actionTabs/lines/numericInputComponent.tsx
this.state = { value: this.props.value.toFixed(this.props.precision !== undefined ? this.props.precision : 3) }
<mask> private _localChange = false; <mask> constructor(props: INumericInputComponentProps) { <mask> super(props); <mask> <mask> this.state = { value: this.props.value.toFixed(3) } <mask> } <mask> <mask> shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4812f905571d953ca69b70c2dee54e3ccfca3213
inspector/src/components/actionTabs/lines/numericInputComponent.tsx
nextState.value = nextProps.value.toFixed(this.props.precision !== undefined ? this.props.precision : 3);
<mask> return true; <mask> } <mask> <mask> if (nextProps.value.toString() !== nextState.value) { <mask> nextState.value = nextProps.value.toFixed(3); <mask> return true; <mask> } <mask> return false; <mask> } <mask> </s> Better UI for ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4812f905571d953ca69b70c2dee54e3ccfca3213
inspector/src/components/actionTabs/lines/numericInputComponent.tsx
</LineContainerComponent> <LineContainerComponent globalState={this.props.globalState} title="CAPTURE WITH RTT"> <ButtonLineComponent label="Capture" onClick={() => this.captureRender()} /> <div className="vector3Line"> ...
<mask> <div className="pane"> <mask> <LineContainerComponent globalState={this.props.globalState} title="CAPTURE"> <mask> <ButtonLineComponent label="Screenshot" onClick={() => this.captureScreenshot()} /> <mask> <ButtonLineComponent label={this.st...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4812f905571d953ca69b70c2dee54e3ccfca3213
inspector/src/components/actionTabs/tabs/toolsTabComponent.tsx
} </div>
<mask> </div> <mask> } <mask> <mask> </div> <mask> </LineContainerComponent> <mask> <mask> </LineContainerComponent> <mask> <LineContainerComponent gl...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4812f905571d953ca69b70c2dee54e3ccfca3213
inspector/src/components/actionTabs/tabs/toolsTabComponent.tsx
import { Logger } from './logger';
<mask> import { ThinEngine } from '../Engines/thinEngine'; <mask> import { EngineStore } from '../Engines/engineStore'; <mask> <mask> /** @ignore */ <mask> export class LoadFileError extends BaseError { <mask> public request?: WebRequest; </s> onOpened error handling Former-commit-id: 741a1ea43d8b624c6c72...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/487db5373d218c0623aaa0857bd1f0af7dedafa9
src/Misc/fileTools.ts
const handleError = (error: unknown) => { const message = error instanceof Error ? error.message : 'Unknown error'; if (onError) { onError(new RequestFileError(message, request)); } else { Logger.Error(message); ...
<mask> retryHandle = null; <mask> } <mask> }; <mask> <mask> const retryLoop = (retryIndex: number) => { <mask> request.open('GET', loadUrl); <mask> <mask> if (onOpened) { </s> onOpened error handling Former-commit-i...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/487db5373d218c0623aaa0857bd1f0af7dedafa9
src/Misc/fileTools.ts
try { onOpened(request); } catch (e: unknown) { handleError(e); return; }
<mask> const retryLoop = (retryIndex: number) => { <mask> request.open('GET', loadUrl); <mask> <mask> if (onOpened) { <mask> onOpened(request); <mask> } <mask> <mask> if (useArrayBuffer) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/487db5373d218c0623aaa0857bd1f0af7dedafa9
src/Misc/fileTools.ts
} catch (e: unknown) { handleError(e);
<mask> <mask> if ((request.status >= 200 && request.status < 300) || (request.status === 0 && (!DomManagement.IsWindowObjectExist() || FileTools.IsFileURL()))) { <mask> try { <mask> onSuccess(useArrayBuffer ? request.response : req...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/487db5373d218c0623aaa0857bd1f0af7dedafa9
src/Misc/fileTools.ts
"referenceImage": "gltfAnimationSkin0.png", "excludedEngines": ["webgpu"]
<mask> "title": "GLTF Animation Skin (0)", <mask> "renderCount": 2, <mask> "playgroundId": "#DS8AA7#18", <mask> "replace": "__folder__, Animation_Skin, __page__, 0", <mask> "referenceImage": "gltfAnimationSkin0.png" <mask> }, <mask> { <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/492f9829ca0066aad2557b4457c60fe4559496e8
tests/validation/config.json
engine = new BABYLON.Engine(canvas, false, { useHighPrecisionFloats: true, disableWebGL2Support: engineName === "webgl1" ? true : false });
<mask> return new Promise((resolve) => { <mask> engine.initAsync(glslangOptions).then(() => resolve()); <mask> }); <mask> } else { <mask> engine = new BABYLON.Engine(canvas, false, { useHighPrecisionFloats: true, disableWebGL2Support: window.disableWebGL2Support || engineNam...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/492f9829ca0066aad2557b4457c60fe4559496e8
tests/validation/validation.js
"playgroundId": "#EUH2VL#1"
<mask> "playgroundId": "#CW5PRI#0" <mask> }, <mask> { <mask> "title": "water material", <mask> "playgroundId": "#EUH2VL#0" <mask> }, <mask> { <mask> "title": "show bounding box", <mask> "renderCount": 5, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/492f9829ca0066aad2557b4457c60fe4559496e8
tests/validation/webgpu.json
"playgroundId": "#WL4Q8J#0", "excludedEngines": ["webgl1"]
<mask> "playgroundId": "#X229PI#0" <mask> }, <mask> { <mask> "title": "pillars sphere and torus with PCSS shadows", <mask> "playgroundId": "#WL4Q8J#0" <mask> }, <mask> { <mask> "title": "soft transparent shadows", <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/492f9829ca0066aad2557b4457c60fe4559496e8
tests/validation/webgpu.json
"playgroundId": "#G3DJGA#0", "excludedEngines": ["webgl1"]
<mask> "playgroundId": "#WL4Q8J#0" <mask> }, <mask> { <mask> "title": "soft transparent shadows", <mask> "playgroundId": "#G3DJGA#0" <mask> }, <mask> { <mask> "title": "default render pipeline", <mask> "playgroundId": "...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/492f9829ca0066aad2557b4457c60fe4559496e8
tests/validation/webgpu.json
"playgroundId": "#4N0QRP#1"
<mask> }, <mask> { <mask> "title": "show all procedural textures", <mask> "renderCount": 5, <mask> "playgroundId": "#4N0QRP#0" <mask> }, <mask> { <mask> "title": "custom handling of materials for render target pass", <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/492f9829ca0066aad2557b4457c60fe4559496e8
tests/validation/webgpu.json
"playgroundId": "#IIZ9UU#63", "excludedEngines": ["webgl1"]
<mask> }, <mask> { <mask> "title": "cascaded shadow maps and flying saucers", <mask> "renderCount": 10, <mask> "playgroundId": "#IIZ9UU#63" <mask> }, <mask> { <mask> "title": "sprite maps", <mask> "playgroundId": "#PIVJ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/492f9829ca0066aad2557b4457c60fe4559496e8
tests/validation/webgpu.json
error: 0 /* SUCCESS */, taskType: 0 /* INIT */
<mask> } <mask> CollisionDetectorTransferable.prototype.onInit = function (payload) { <mask> this._collisionCache = new CollisionCache(); <mask> var reply = { <mask> error: BABYLON.WorkerReplyType.SUCCESS, <mask> taskType: BABYLON.WorkerTaskT...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Collisions/babylon.collisionWorker.js
error: 0 /* SUCCESS */, taskType: 1 /* UPDATE */
<mask> this._collisionCache.addMesh(payload.updatedMeshes[uniqueId]); <mask> } <mask> } <mask> var replay = { <mask> error: BABYLON.WorkerReplyType.SUCCESS, <mask> taskType: BABYLON.WorkerTaskType.UPDATE <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Collisions/babylon.collisionWorker.js
error: 0 /* SUCCESS */, taskType: 2 /* COLLIDE */,
<mask> collisionId: payload.collisionId, <mask> newPosition: finalPosition.asArray() <mask> }; <mask> var reply = { <mask> error: BABYLON.WorkerReplyType.SUCCESS, <mask> taskType: BABYLON.WorkerTaskType.COLLIDE, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Collisions/babylon.collisionWorker.js
case 0 /* INIT */:
<mask> var collisionDetector = new CollisionDetectorTransferable(); <mask> var onNewMessage = function (event) { <mask> var message = event.data; <mask> switch (message.taskType) { <mask> case BABYLON.WorkerTaskType.INIT: <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Collisions/babylon.collisionWorker.js
case 2 /* COLLIDE */:
<mask> switch (message.taskType) { <mask> case BABYLON.WorkerTaskType.INIT: <mask> collisionDetector.onInit(message.payload); <mask> break; <mask> case BABYLON.WorkerTaskType.COLLIDE: <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Collisions/babylon.collisionWorker.js
case 1 /* UPDATE */:
<mask> break; <mask> case BABYLON.WorkerTaskType.COLLIDE: <mask> collisionDetector.onCollision(message.payload); <mask> break; <mask> case BABYLON.WorkerTaskType.UPDATE: <mask> c...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Collisions/babylon.collisionWorker.js
return true;
<mask> StandardMaterial.prototype.isReady = function (mesh, useInstances) { <mask> if (this.checkReadyOnlyOnce) { <mask> if (this._wasPreviouslyReady) { <mask> } <mask> } <mask> var scene = this.getScene(); <mask> if (!this.c...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Materials/babylon.standardMaterial.js
return true;
<mask> if (!this.checkReadyOnEveryCall) { <mask> if (this._renderId === scene.getRenderId()) { <mask> } <mask> } <mask> var engine = scene.getEngine(); <mask> var defines = []; </s> Removing unwanted comments Former-commit-id: d999...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Materials/babylon.standardMaterial.js
return true;
<mask> // Methods <mask> public isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean { <mask> if (this.checkReadyOnlyOnce) { <mask> if (this._wasPreviouslyReady) { <mask> // return true; <mask> } <mask> } <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Materials/babylon.standardMaterial.ts
return true;
<mask> var scene = this.getScene(); <mask> <mask> if (!this.checkReadyOnEveryCall) { <mask> if (this._renderId === scene.getRenderId()) { <mask> // return true; <mask> } <mask> } <mask> <mask> var engine = scen...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Materials/babylon.standardMaterial.ts
/** This function affects parametric shapes on update only : ribbons, tubes, etc. It has no effect at all on other shapes */
<mask> enumerable: true, <mask> configurable: true <mask> }); <mask> Mesh.prototype.freezeNormals = function () { <mask> this._areNormalsFrozen = true; <mask> }; <mask> /** This function affects parametric shapes on update only : ribbons, tubes...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Mesh/babylon.mesh.js
/** This function affects parametric shapes on update only : ribbons, tubes, etc. It has no effect at all on other shapes */
<mask> Mesh.prototype.freezeNormals = function () { <mask> this._areNormalsFrozen = true; <mask> }; <mask> Mesh.prototype.unfreezeNormals = function () { <mask> this._areNormalsFrozen = false; <mask> }; <mask> // Methods <mask> Mesh.proto...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4a02e1068ef03161785045ab8d71cab36292b7a7
Babylon/Mesh/babylon.mesh.js
public METALLICWORKFLOW = false; public METALLICROUGHNESSGSTOREINALPHA = false; public METALLICROUGHNESSGSTOREINGREEN = false;
<mask> public INVERTNORMALMAPX = false; <mask> public INVERTNORMALMAPY = false; <mask> public SHADOWFULLFLOAT = false; <mask> <mask> constructor() { <mask> super(); <mask> this.rebuild(); <mask> } <mask> } </s> Add Metallic Workflow Former...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Materials/babylon.pbrMaterial.ts
/** * Used to switch from specular/glossiness to metallic/roughness workflow. */ @serializeAsTexture() public metallicTexture: BaseTexture;
<mask> public reflectivityTexture: BaseTexture; <mask> <mask> @serializeAsTexture() <mask> public bumpTexture: BaseTexture; <mask> <mask> @serializeAsTexture() <mask> public lightmapTexture: BaseTexture; </s> Add Metallic Workflow Former-commit-id: e0527bc9f59fd55c46b...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Materials/babylon.pbrMaterial.ts
/** * Specifies if the metallic texture contains the roughness information in its alpha channel. */ @serialize() public useRoughnessFromMetallicTextureAlpha = true; /** * Specifies if the metallic texture contains the roughness information in its gree...
<mask> */ <mask> @serialize() <mask> public useMicroSurfaceFromReflectivityMapAlpha = false; <mask> <mask> /** <mask> * In case the reflectivity map does not contain the microsurface information in its alpha channel, <mask> * The material will try to in...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Materials/babylon.pbrMaterial.ts
if (StandardMaterial.SpecularTextureEnabled) { if (this.metallicTexture) { if (!this.metallicTexture.isReady()) { return false; } else { needUVs = true...
<mask> this._defines.EMISSIVE = true; <mask> } <mask> } <mask> <mask> if (this.reflectivityTexture && StandardMaterial.SpecularTextureEnabled) { <mask> if (!this.reflectivityTexture.isReady()) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Materials/babylon.pbrMaterial.ts
if (StandardMaterial.SpecularTextureEnabled) { if (this.metallicTexture) { this._effect.setTexture("reflectivitySampler", this.metallicTexture); this._effect.setFloat2("vReflectivityInfos", this.metallicTexture.coor...
<mask> this._effect.setFloat2("vLightmapInfos", this.lightmapTexture.coordinatesIndex, this.lightmapTexture.level); <mask> this._effect.setMatrix("lightmapMatrix", this.lightmapTexture.getTextureMatrix()); <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Materials/babylon.pbrMaterial.ts
this._effect.setFloat2("vReflectivityInfos", this.reflectivityTexture.coordinatesIndex, this.reflectivityTexture.level); this._effect.setMatrix("reflectivityMatrix", this.reflectivityTexture.getTextureMatrix()); }
<mask> <mask> if (this.reflectivityTexture && StandardMaterial.SpecularTextureEnabled) { <mask> this._effect.setTexture("reflectivitySampler", this.reflectivityTexture); <mask> <mask> this._effect.setFloat2("vReflectivityInfos", this.reflectivit...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Materials/babylon.pbrMaterial.ts
if (this.metallicTexture && this.metallicTexture.animations && this.metallicTexture.animations.length > 0) { results.push(this.metallicTexture); } else if (this.reflectivityTexture && this.reflectivityTexture.animations && this.reflectivityTexture.animations.length...
<mask> if (this.emissiveTexture && this.emissiveTexture.animations && this.emissiveTexture.animations.length > 0) { <mask> results.push(this.emissiveTexture); <mask> } <mask> <mask> if (this.reflectivityTexture && this.reflectivityTexture.animations && this.refl...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Materials/babylon.pbrMaterial.ts
if (this.metallicTexture) { this.metallicTexture.dispose(); }
<mask> this.emissiveTexture.dispose(); <mask> } <mask> <mask> if (this.reflectivityTexture) { <mask> this.reflectivityTexture.dispose(); <mask> } <mask> <mask> if (this.bumpTexture) { <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Materials/babylon.pbrMaterial.ts
#if defined(REFLECTIVITY) || defined(METALLICWORKFLOW)
<mask> uniform vec2 vLightmapInfos; <mask> uniform sampler2D lightmapSampler; <mask> #endif <mask> <mask> #if defined(REFLECTIVITY) <mask> varying vec2 vReflectivityUV; <mask> uniform vec2 vReflectivityInfos; <mask> uniform sampler2D reflectivitySampler; <mask> #endif <mask> </s> Add Metallic Workflow Fo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
#ifdef OVERLOADEDVALUES surfaceReflectivityColor = mix(surfaceReflectivityColor, vOverloadedReflectivity, vOverloadedIntensity.z); #endif
<mask> vec4 surfaceReflectivityColorMap = texture2D(reflectivitySampler, vReflectivityUV + uvOffset); <mask> surfaceReflectivityColor = surfaceReflectivityColorMap.rgb; <mask> surfaceReflectivityColor = toLinearSpace(surfaceReflectivityColor); <mask> <mask> #ifdef OVERLOADEDVALUES <mask> surfaceReflectivityC...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
#ifdef MICROSURFACEFROMREFLECTIVITYMAP microSurface = surfaceReflectivityColorMap.a; #else #ifdef MICROSURFACEAUTOMATIC microSurface = computeDefaultMicroSurface(microSurface, surfaceReflectivityColor); #endif #endif
<mask> #ifdef OVERLOADEDVALUES <mask> surfaceReflectivityColor = mix(surfaceReflectivityColor, vOverloadedReflectivity, vOverloadedIntensity.z); <mask> #endif <mask> <mask> #ifdef MICROSURFACEFROMREFLECTIVITYMAP <mask> microSurface = surfaceReflectivityColorMap.a; <mask> #else <mask> #ifdef MICROSURFACEAUTOM...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
#ifdef LINKREFRACTIONTOTRANSPARENCY // Transmission based on alpha. transmission *= (1.0 - alpha);
<mask> // Compute refractance <mask> vec3 refractance = vec3(0.0, 0.0, 0.0); <mask> #ifdef REFRACTION <mask> vec3 transmission = vec3(1.0, 1.0, 1.0); <mask> #ifdef LINKREFRACTIONTOTRANSPARENCY <mask> // Transmission based on alpha. <mask> transmission *= (1.0 - alpha); <mask> <mask> // Tint the material...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
// Tint the material with albedo. // TODO. PBR Tinting. vec3 mixedAlbedo = surfaceAlbedoContribution.rgb * surfaceAlbedo.rgb; float maxChannel = max(max(mixedAlbedo.r, mixedAlbedo.g), mixedAlbedo.b); vec3 tint = clamp(maxChannel * mixedAlbedo, 0.0, 1.0);
<mask> #ifdef LINKREFRACTIONTOTRANSPARENCY <mask> // Transmission based on alpha. <mask> transmission *= (1.0 - alpha); <mask> <mask> // Tint the material with albedo. <mask> // TODO. PBR Tinting. <mask> vec3 mixedAlbedo = surfaceAlbedoContribution.rgb * surfaceAlbedo.rgb; <mask> float maxChannel = max(m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
// Decrease Albedo Contribution surfaceAlbedoContribution *= alpha;
<mask> vec3 mixedAlbedo = surfaceAlbedoContribution.rgb * surfaceAlbedo.rgb; <mask> float maxChannel = max(max(mixedAlbedo.r, mixedAlbedo.g), mixedAlbedo.b); <mask> vec3 tint = clamp(maxChannel * mixedAlbedo, 0.0, 1.0); <mask> <mask> // Decrease Albedo Contribution <mask> surfaceAlbedoContribution *= alpha;...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
// Decrease irradiance Contribution environmentIrradiance *= alpha;
<mask> <mask> // Decrease Albedo Contribution <mask> surfaceAlbedoContribution *= alpha; <mask> <mask> // Decrease irradiance Contribution <mask> environmentIrradiance *= alpha; <mask> <mask> // Tint reflectance <mask> surfaceRefractionColor *= tint; <mask> <mask> // Put alpha back to 1; </s> Add...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
// Tint reflectance surfaceRefractionColor *= tint;
<mask> <mask> // Decrease irradiance Contribution <mask> environmentIrradiance *= alpha; <mask> <mask> // Tint reflectance <mask> surfaceRefractionColor *= tint; <mask> <mask> // Put alpha back to 1; <mask> alpha = 1.0; <mask> #endif <mask> </s> Add Metallic Workflow Former-commit-id: e0527bc9f5...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
// Put alpha back to 1; alpha = 1.0; #endif
<mask> <mask> // Tint reflectance <mask> surfaceRefractionColor *= tint; <mask> <mask> // Put alpha back to 1; <mask> alpha = 1.0; <mask> #endif <mask> <mask> // Add Multiple internal bounces. <mask> vec3 bounceSpecularEnvironmentReflectance = (2.0 * specularEnvironmentReflectance) / (1.0 + specularE...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.fragment.fx
#if defined(REFLECTIVITY) || defined(METALLICWORKFLOW)
<mask> uniform vec2 vLightmapInfos; <mask> uniform mat4 lightmapMatrix; <mask> #endif <mask> <mask> #if defined(REFLECTIVITY) <mask> varying vec2 vReflectivityUV; <mask> uniform vec2 vReflectivityInfos; <mask> uniform mat4 reflectivityMatrix; <mask> #endif <mask> </s> Add Metallic Workflow Former-commit-...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.vertex.fx
#if defined(REFLECTIVITY) || defined(METALLICWORKFLOW)
<mask> vLightmapUV = vec2(lightmapMatrix * vec4(uv2, 1.0, 0.0)); <mask> } <mask> #endif <mask> <mask> #if defined(REFLECTIVITY) <mask> if (vReflectivityInfos.x == 0.) <mask> { <mask> vReflectivityUV = vec2(reflectivityMatrix * vec4(uv, 1.0, 0.0)); <mask> } <mask> else </s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4c483db2906263ed0b07c8f633de68c9bec41243
src/Shaders/pbr.vertex.fx
/** * Functions added to this observable will be executed on each frame rendered. */ public onFrameRenderedObservable: Observable<AbstractViewer>;
<mask> */ <mask> public onInitDoneObservable: Observable<AbstractViewer>; <mask> <mask> /** <mask> * The canvas associated with this viewer <mask> */ <mask> protected _canvas: HTMLCanvasElement; <mask> </s> changes to viewer loading and a new observable onFrameRenderedObservable wa...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
this.onFrameRenderedObservable = new Observable();
<mask> this.onInitDoneObservable = new Observable(); <mask> this.onLoaderInitObservable = new Observable(); <mask> <mask> this._registeredOnBeforeRenderFunctions = []; <mask> this.models = []; <mask> this.modelLoader = new ModelLoader(this); <mask> </s> changes to viewe...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
this.onFrameRenderedObservable.notifyObservers(this);
<mask> protected _render = (force: boolean = false): void => { <mask> if (force || (this.runRenderLoop && this.scene && this.scene.activeCamera)) { <mask> this.scene.render(); <mask> } <mask> } <mask> <mask> /** <mask> * Update the current viewer configuration with ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
this.onFrameRenderedObservable.clear(); delete this.onFrameRenderedObservable;
<mask> delete this.onModelLoadProgressObservable; <mask> this.onSceneInitObservable.clear(); <mask> delete this.onSceneInitObservable; <mask> <mask> if (this.scene.activeCamera) { <mask> this.scene.activeCamera.detachControl(this.canvas); <mask> } <mask> <m...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
let modelConfiguration = this._configuration.model;
<mask> * But first - it will load the extendible onTemplateLoaded()! <mask> */ <mask> private _onTemplateLoaded(): Promise<AbstractViewer> { <mask> return this._onTemplatesLoaded().then(() => { <mask> let autoLoadModel = this._configuration.model; <mask> return this._...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
if (modelConfiguration) { return this.loadModel(modelConfiguration).catch(e => { }).then(() => { return this.scene });
<mask> let autoLoadModel = this._configuration.model; <mask> return this._initEngine().then((engine) => { <mask> return this.onEngineInitObservable.notifyObserversWithPromise(engine); <mask> }).then(() => { <mask> if (autoLoadModel) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
public initModel(modelConfig: string | IModelConfiguration, clearScene: boolean = true): ViewerModel { let modelUrl = (typeof modelConfig === 'string') ? modelConfig : modelConfig.url; if (!modelUrl) { throw new Error("no model configuration provided"); }
<mask> * @param modelConfig model configuration to use when loading the model. <mask> * @param clearScene should the scene be cleared before loading this model <mask> * @returns a ViewerModel object that is not yet fully loaded. <mask> */ <mask> public initModel(modelConfig: IModelConfigura...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
let configuration: IModelConfiguration; if (typeof modelConfig === 'string') { configuration = { url: modelConfig } } else { configuration = modelConfig } //merge the configuration for future models: if (this....
<mask> if (clearScene) { <mask> this.models.forEach(m => m.dispose()); <mask> this.models.length = 0; <mask> } <mask> let model = this.modelLoader.load(modelConfig); <mask> <mask> this.lastUsedLoader = model.loader; <mask> model.onLoadErrorObserva...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
Promise.resolve().then(() => { this._configureLights(this._configuration.lights, model);
<mask> }); <mask> this.onLoaderInitObservable.notifyObserversWithPromise(this.lastUsedLoader); <mask> <mask> model.onLoadedObservable.add(() => { <mask> this.onModelLoadedObservable.notifyObserversWithPromise(model) <mask> .then(() => { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
if (this._configuration.camera || !this.scene.activeCamera) { this._configureCamera(this._configuration.camera || {}, model); } return this._initEnvironment(model); }).then(() => { this._isLoading = false; ...
<mask> this.onModelLoadedObservable.notifyObserversWithPromise(model) <mask> .then(() => { <mask> this._configureLights(this._configuration.lights); <mask> <mask> if (this._configuration.camera || !this.scene.activeCamera) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
public loadModel(modelConfig: string | IModelConfiguration, clearScene: boolean = true): Promise<ViewerModel> {
<mask> * @param modelConfig the model configuration or URL to load. <mask> * @param clearScene Should the scene be cleared before loading the model <mask> * @returns a Promise the fulfills when the model finished loading successfully. <mask> */ <mask> public loadModel(modelConfig: any = th...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
<mask> if (this._isLoading) { <mask> // We can decide here whether or not to cancel the lst load, but the developer can do that. <mask> return Promise.reject("another model is curently being loaded."); <mask> } <mask> this._isLoading = true; <mask> if ((type...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
let model = this.initModel(modelConfig, clearScene);
<mask> return scene; <mask> }).then(() => { <mask> return new Promise<ViewerModel>((resolve, reject) => { <mask> // at this point, configuration.model is an object, not a string <mask> model.onLoadedObservable.add(() => { <mask> r...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
model.onLoadedObservable.add(() => { resolve(model); }); model.onLoadErrorObservable.add((error) => { reject(error); });
<mask> return scene; <mask> }).then(() => { <mask> return new Promise<ViewerModel>((resolve, reject) => { <mask> // at this point, configuration.model is an object, not a string <mask> try { <mask> resolve(this.initModel(modelConf...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d1f725266cb1aee467016af1a390f668a3bd39b
Viewer/src/viewer/viewer.ts
// wait for object to load svgExist.addEventListener("load", () => {
<mask> var elemid = value.split('#')[1]; <mask> // check if object alr exist in document <mask> var svgExist = <HTMLObjectElement> document.body.querySelector('object[data="' + svgsrc + '"]'); <mask> if (svgExist) { <mask> if (svgExist.contentDocument...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d66f809657d599f024139be417796e6f4b5a0b0
gui/src/2D/controls/image.ts
});
<mask> if (svgExist) { <mask> if (svgExist.contentDocument) { <mask> // svg object alr exists <mask> this._getSVGAttribs(svgExist, elemid); <mask> } else { <mask> // wait for object to load <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d66f809657d599f024139be417796e6f4b5a0b0
gui/src/2D/controls/image.ts
if (vb && docwidth && docheight) {
<mask> var docwidth = Number(svgDoc.documentElement.getAttribute("width")); <mask> var docheight = Number(svgDoc.documentElement.getAttribute("height")); <mask> // get element bbox and matrix transform <mask> var elem = <SVGGraphicsElement> <unknown> svgDoc.getElement...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4d66f809657d599f024139be417796e6f4b5a0b0
gui/src/2D/controls/image.ts
const { hoverIndexMeshTip, pickIndexMeshTip} = this._generateNewHandTipMeshes();
<mask> return; <mask> } <mask> <mask> const { laserPointer, selectionMesh } = this._generateNewMeshPair(xrController.pointer); <mask> const { hoverIndexMesh, pickIndexMesh} = this._generateNewHandTipMeshes(); <mask> <mask> // get two new meshes <mask> this._...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4e876e7ffb2459bf08125f5157c803e4b592970e
src/XR/features/WebXRControllerPointerSelection.ts
pickIndexMeshTip, hoverIndexMeshTip, grabRay: new Ray(new Vector3(), new Vector3()),
<mask> selectionMesh, <mask> meshUnderPointer: null, <mask> pick: null, <mask> tmpRay: new Ray(new Vector3(), new Vector3()), <mask> pickIndexMesh, <mask> hoverIndexMesh, <mask> nearPick: false, <mask> nearHover: fal...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4e876e7ffb2459bf08125f5157c803e4b592970e
src/XR/features/WebXRControllerPointerSelection.ts
pickIndexMeshTip: Nullable<AbstractMesh>; hoverIndexMeshTip: Nullable<AbstractMesh>; grabRay: Ray;
<mask> meshUnderPointer: Nullable<AbstractMesh>; <mask> pick: Nullable<PickingInfo>; <mask> id: number; <mask> tmpRay: Ray; <mask> pickIndexMesh: Nullable<AbstractMesh>; <mask> hoverIndexMesh: Nullable<AbstractMesh>; <mask> nearP...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4e876e7ffb2459bf08125f5157c803e4b592970e
src/XR/features/WebXRControllerPointerSelection.ts
const { hoverIndexMeshTip, pickIndexMeshTip} = this._generateNewHandTipMeshes();
<mask> if (this._options.gazeCamera) { <mask> const webXRCamera = this._options.gazeCamera; <mask> <mask> const { laserPointer, selectionMesh } = this._generateNewMeshPair(webXRCamera); <mask> const { hoverIndexMesh, pickIndexMesh} = this._generateNewHandTipMeshes(); <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/4e876e7ffb2459bf08125f5157c803e4b592970e
src/XR/features/WebXRControllerPointerSelection.ts