@babylonjs/core 6.5.1 → 6.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Behaviors/behavior.d.ts +1 -1
- package/Behaviors/behavior.js.map +1 -1
- package/Engines/thinEngine.js +10 -5
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -0
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Gizmos/gizmo.d.ts +21 -0
- package/Gizmos/gizmo.js +30 -3
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/positionGizmo.d.ts +3 -1
- package/Gizmos/positionGizmo.js +9 -0
- package/Gizmos/positionGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.d.ts +3 -1
- package/Gizmos/rotationGizmo.js +9 -0
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Gizmos/scaleGizmo.d.ts +3 -1
- package/Gizmos/scaleGizmo.js +11 -0
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.js +25 -24
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/physicsBody.d.ts +1 -1
- package/Physics/v2/physicsBody.js +5 -1
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockAnisotropic.js +3 -3
- package/Shaders/ShadersInclude/pbrBlockAnisotropic.js.map +1 -1
- package/ShadersWGSL/postprocess.vertex.d.ts +5 -0
- package/ShadersWGSL/postprocess.vertex.js +12 -0
- package/ShadersWGSL/postprocess.vertex.js.map +1 -0
- package/assetContainer.js +5 -1
- package/assetContainer.js.map +1 -1
- package/package.json +1 -1
package/Behaviors/behavior.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface Behavior<T> {
|
|
|
6
6
|
/** gets or sets behavior's name */
|
|
7
7
|
name: string;
|
|
8
8
|
/**
|
|
9
|
-
* Function called when the behavior needs to be initialized (
|
|
9
|
+
* Function called when the behavior needs to be initialized (before attaching it to a target)
|
|
10
10
|
*/
|
|
11
11
|
init(): void;
|
|
12
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior.js","sourceRoot":"","sources":["../../../../lts/core/generated/Behaviors/behavior.ts"],"names":[],"mappings":"","sourcesContent":["import type { Nullable } from \"../types\";\r\n\r\n/**\r\n * Interface used to define a behavior\r\n */\r\nexport interface Behavior<T> {\r\n /** gets or sets behavior's name */\r\n name: string;\r\n\r\n /**\r\n * Function called when the behavior needs to be initialized (
|
|
1
|
+
{"version":3,"file":"behavior.js","sourceRoot":"","sources":["../../../../lts/core/generated/Behaviors/behavior.ts"],"names":[],"mappings":"","sourcesContent":["import type { Nullable } from \"../types\";\r\n\r\n/**\r\n * Interface used to define a behavior\r\n */\r\nexport interface Behavior<T> {\r\n /** gets or sets behavior's name */\r\n name: string;\r\n\r\n /**\r\n * Function called when the behavior needs to be initialized (before attaching it to a target)\r\n */\r\n init(): void;\r\n /**\r\n * Called when the behavior is attached to a target\r\n * @param target defines the target where the behavior is attached to\r\n */\r\n attach(target: T): void;\r\n /**\r\n * Called when the behavior is detached from its target\r\n */\r\n detach(): void;\r\n}\r\n\r\n/**\r\n * Interface implemented by classes supporting behaviors\r\n */\r\nexport interface IBehaviorAware<T> {\r\n /**\r\n * Attach a behavior\r\n * @param behavior defines the behavior to attach\r\n * @returns the current host\r\n */\r\n addBehavior(behavior: Behavior<T>): T;\r\n /**\r\n * Remove a behavior from the current object\r\n * @param behavior defines the behavior to detach\r\n * @returns the current host\r\n */\r\n removeBehavior(behavior: Behavior<T>): T;\r\n /**\r\n * Gets a behavior using its name to search\r\n * @param name defines the name to search\r\n * @returns the behavior or null if not found\r\n */\r\n getBehaviorByName(name: string): Nullable<Behavior<T>>;\r\n}\r\n"]}
|
package/Engines/thinEngine.js
CHANGED
|
@@ -34,13 +34,13 @@ export class ThinEngine {
|
|
|
34
34
|
*/
|
|
35
35
|
// Not mixed with Version for tooling purpose.
|
|
36
36
|
static get NpmPackage() {
|
|
37
|
-
return "babylonjs@6.
|
|
37
|
+
return "babylonjs@6.6.1";
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Returns the current version of the framework
|
|
41
41
|
*/
|
|
42
42
|
static get Version() {
|
|
43
|
-
return "6.
|
|
43
|
+
return "6.6.1";
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Returns a string describing the current engine
|
|
@@ -1280,15 +1280,16 @@ export class ThinEngine {
|
|
|
1280
1280
|
resize(forceSetSize = false) {
|
|
1281
1281
|
let width;
|
|
1282
1282
|
let height;
|
|
1283
|
-
//
|
|
1283
|
+
// Re-query hardware scaling level to handle zoomed-in resizing.
|
|
1284
1284
|
if (this.adaptToDeviceRatio) {
|
|
1285
1285
|
const devicePixelRatio = IsWindowObjectExist() ? window.devicePixelRatio || 1.0 : 1.0;
|
|
1286
1286
|
const changeRatio = this._lastDevicePixelRatio / devicePixelRatio;
|
|
1287
1287
|
this._lastDevicePixelRatio = devicePixelRatio;
|
|
1288
1288
|
this._hardwareScalingLevel *= changeRatio;
|
|
1289
1289
|
}
|
|
1290
|
-
if (IsWindowObjectExist()) {
|
|
1291
|
-
|
|
1290
|
+
if (IsWindowObjectExist() && IsDocumentAvailable()) {
|
|
1291
|
+
// make sure it is a Node object, and is a part of the document.
|
|
1292
|
+
if (this._renderingCanvas && this._renderingCanvas.nodeType && document.body.contains(this._renderingCanvas)) {
|
|
1292
1293
|
const boundingRect = this._renderingCanvas.getBoundingClientRect
|
|
1293
1294
|
? this._renderingCanvas.getBoundingClientRect()
|
|
1294
1295
|
: {
|
|
@@ -1299,6 +1300,10 @@ export class ThinEngine {
|
|
|
1299
1300
|
width = this._renderingCanvas.clientWidth || boundingRect.width;
|
|
1300
1301
|
height = this._renderingCanvas.clientHeight || boundingRect.height;
|
|
1301
1302
|
}
|
|
1303
|
+
else if (this._renderingCanvas) {
|
|
1304
|
+
width = this._renderingCanvas.width;
|
|
1305
|
+
height = this._renderingCanvas.height;
|
|
1306
|
+
}
|
|
1302
1307
|
else {
|
|
1303
1308
|
width = window.innerWidth;
|
|
1304
1309
|
height = window.innerHeight;
|