Skip to content

Commit 6fdb8c8

Browse files
authored
Nightly (#8738)
* Add option in default pipeline property grid to convert cc to gamma or linear * Nightly * Nightly
1 parent 6c797d4 commit 6fdb8c8

File tree

57 files changed

+464
-184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+464
-184
lines changed

Playground/src/components/examplesComponent.tsx

+10-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface IExamplesComponentProps {
88
}
99

1010
export class ExamplesComponent extends React.Component<IExamplesComponentProps, {filter: string}> {
11-
private _state = "";
11+
private _state = "removed";
1212
private _rootRef: React.RefObject<HTMLDivElement>;
1313
private _scripts: {
1414
title: string;
@@ -29,12 +29,18 @@ export class ExamplesComponent extends React.Component<IExamplesComponentProps,
2929
this._rootRef = React.createRef();
3030

3131
this.props.globalState.onExamplesDisplayChangedObservable.add(() => {
32-
if (this._state === "") {
33-
this._rootRef.current!.classList.add("visible");
34-
this._state = "visible";
32+
if (this._state !== "visible") {
33+
this._rootRef.current!.classList.remove("removed");
34+
setTimeout(() => {
35+
this._rootRef.current!.classList.add("visible");
36+
this._state = "visible";
37+
}, 16);
3538
} else {
3639
this._rootRef.current!.classList.remove("visible");
3740
this._state = "";
41+
setTimeout(() => {
42+
this._rootRef.current!.classList.add("removed");
43+
}, 200)
3844
}
3945
});
4046
}

Playground/src/scss/examples.scss

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
opacity: 1;
1717
}
1818

19+
&.removed {
20+
display: none;
21+
}
22+
1923
width: 380px;
2024
display: grid;
2125
grid-template-columns: 100%;

dist/preview release/babylon.d.ts

+13
Original file line numberDiff line numberDiff line change
@@ -35168,6 +35168,15 @@ declare module BABYLON {
3516835168
_removePendingData(data: any): void;
3516935169
offlineProvider: IOfflineProvider;
3517035170
}
35171+
/**
35172+
* Information about the current host
35173+
*/
35174+
export interface HostInformation {
35175+
/**
35176+
* Defines if the current host is a mobile
35177+
*/
35178+
isMobile: boolean;
35179+
}
3517135180
/** Interface defining initialization parameters for Engine class */
3517235181
export interface EngineOptions extends WebGLContextAttributes {
3517335182
/**
@@ -35423,6 +35432,10 @@ declare module BABYLON {
3542335432
private _activeRequests;
3542435433
/** @hidden */
3542535434
_transformTextureUrl: Nullable<(url: string) => string>;
35435+
/**
35436+
* Gets information about the current host
35437+
*/
35438+
hostInformation: HostInformation;
3542635439
protected get _supportsHardwareTextureRescaling(): boolean;
3542735440
private _framebufferDimensionsObject;
3542835441
/**

dist/preview release/babylon.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/preview release/babylon.max.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -16483,8 +16483,7 @@ var FreeCameraMouseInput = /** @class */ (function () {
1648316483
if (engine.isInVRExclusivePointerMode) {
1648416484
return;
1648516485
}
16486-
var isMouseEvent = evt instanceof MouseEvent;
16487-
if (!_this.touchEnabled && evt.pointerType === "touch" && !isMouseEvent) {
16486+
if (!_this.touchEnabled && evt.pointerType === "touch") {
1648816487
return;
1648916488
}
1649016489
if (p.type !== _Events_pointerEvents__WEBPACK_IMPORTED_MODULE_4__["PointerEventTypes"].POINTERMOVE && _this.buttons.indexOf(evt.button) === -1) {
@@ -16694,7 +16693,7 @@ var FreeCameraTouchInput = /** @class */ (function () {
1669416693
};
1669516694
this._pointerInput = function (p) {
1669616695
var evt = p.event;
16697-
var isMouseEvent = evt instanceof MouseEvent;
16696+
var isMouseEvent = !_this.camera.getEngine().hostInformation.isMobile && evt instanceof MouseEvent;
1669816697
if (!_this.allowMouse && (evt.pointerType === "mouse" || isMouseEvent)) {
1669916698
return;
1670016699
}
@@ -25313,6 +25312,7 @@ var TargetCamera = /** @class */ (function (_super) {
2531325312
if (this.position.z === target.z) {
2531425313
this.position.z += _Maths_math_constants__WEBPACK_IMPORTED_MODULE_4__["Epsilon"];
2531525314
}
25315+
this._referencePoint.normalize().scaleInPlace(this._initialFocalDistance);
2531625316
_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__["Matrix"].LookAtLHToRef(this.position, target, this._defaultUp, this._camMatrix);
2531725317
this._camMatrix.invert();
2531825318
this.rotation.x = Math.atan(this._camMatrix.m[6] / this._camMatrix.m[10]);
@@ -39147,6 +39147,12 @@ var ThinEngine = /** @class */ (function () {
3914739147
this._activeRequests = new Array();
3914839148
/** @hidden */
3914939149
this._transformTextureUrl = null;
39150+
/**
39151+
* Gets information about the current host
39152+
*/
39153+
this.hostInformation = {
39154+
isMobile: false
39155+
};
3915039156
/**
3915139157
* Defines whether the engine has been created with the premultipliedAlpha option on or not.
3915239158
*/
@@ -39218,6 +39224,7 @@ var ThinEngine = /** @class */ (function () {
3921839224
// Exceptions
3921939225
if (navigator && navigator.userAgent) {
3922039226
var ua = navigator.userAgent;
39227+
this.hostInformation.isMobile = ua.indexOf("Mobile") !== -1;
3922139228
for (var _i = 0, _a = ThinEngine.ExceptionList; _i < _a.length; _i++) {
3922239229
var exception = _a[_i];
3922339230
var key = exception.key;

dist/preview release/babylon.max.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/preview release/babylon.module.d.ts

+26
Original file line numberDiff line numberDiff line change
@@ -36428,6 +36428,15 @@ declare module "babylonjs/Engines/thinEngine" {
3642836428
_removePendingData(data: any): void;
3642936429
offlineProvider: IOfflineProvider;
3643036430
}
36431+
/**
36432+
* Information about the current host
36433+
*/
36434+
export interface HostInformation {
36435+
/**
36436+
* Defines if the current host is a mobile
36437+
*/
36438+
isMobile: boolean;
36439+
}
3643136440
/** Interface defining initialization parameters for Engine class */
3643236441
export interface EngineOptions extends WebGLContextAttributes {
3643336442
/**
@@ -36683,6 +36692,10 @@ declare module "babylonjs/Engines/thinEngine" {
3668336692
private _activeRequests;
3668436693
/** @hidden */
3668536694
_transformTextureUrl: Nullable<(url: string) => string>;
36695+
/**
36696+
* Gets information about the current host
36697+
*/
36698+
hostInformation: HostInformation;
3668636699
protected get _supportsHardwareTextureRescaling(): boolean;
3668736700
private _framebufferDimensionsObject;
3668836701
/**
@@ -114455,6 +114468,15 @@ declare module BABYLON {
114455114468
_removePendingData(data: any): void;
114456114469
offlineProvider: IOfflineProvider;
114457114470
}
114471+
/**
114472+
* Information about the current host
114473+
*/
114474+
export interface HostInformation {
114475+
/**
114476+
* Defines if the current host is a mobile
114477+
*/
114478+
isMobile: boolean;
114479+
}
114458114480
/** Interface defining initialization parameters for Engine class */
114459114481
export interface EngineOptions extends WebGLContextAttributes {
114460114482
/**
@@ -114710,6 +114732,10 @@ declare module BABYLON {
114710114732
private _activeRequests;
114711114733
/** @hidden */
114712114734
_transformTextureUrl: Nullable<(url: string) => string>;
114735+
/**
114736+
* Gets information about the current host
114737+
*/
114738+
hostInformation: HostInformation;
114713114739
protected get _supportsHardwareTextureRescaling(): boolean;
114714114740
private _framebufferDimensionsObject;
114715114741
/**

dist/preview release/documentation.d.ts

+13
Original file line numberDiff line numberDiff line change
@@ -35168,6 +35168,15 @@ declare module BABYLON {
3516835168
_removePendingData(data: any): void;
3516935169
offlineProvider: IOfflineProvider;
3517035170
}
35171+
/**
35172+
* Information about the current host
35173+
*/
35174+
export interface HostInformation {
35175+
/**
35176+
* Defines if the current host is a mobile
35177+
*/
35178+
isMobile: boolean;
35179+
}
3517135180
/** Interface defining initialization parameters for Engine class */
3517235181
export interface EngineOptions extends WebGLContextAttributes {
3517335182
/**
@@ -35423,6 +35432,10 @@ declare module BABYLON {
3542335432
private _activeRequests;
3542435433
/** @hidden */
3542535434
_transformTextureUrl: Nullable<(url: string) => string>;
35435+
/**
35436+
* Gets information about the current host
35437+
*/
35438+
hostInformation: HostInformation;
3542635439
protected get _supportsHardwareTextureRescaling(): boolean;
3542735440
private _framebufferDimensionsObject;
3542835441
/**

dist/preview release/inspector/babylon.inspector.bundle.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)