@babylonjs/core 5.53.1 → 5.55.0

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.
Files changed (37) hide show
  1. package/Debug/debugLayer.d.ts +27 -0
  2. package/Debug/debugLayer.js.map +1 -1
  3. package/Engines/engine.d.ts +1 -1
  4. package/Engines/engineCapabilities.d.ts +2 -0
  5. package/Engines/engineCapabilities.js.map +1 -1
  6. package/Engines/nativeEngine.js +1 -0
  7. package/Engines/nativeEngine.js.map +1 -1
  8. package/Engines/nullEngine.js +1 -0
  9. package/Engines/nullEngine.js.map +1 -1
  10. package/Engines/thinEngine.js +7 -2
  11. package/Engines/thinEngine.js.map +1 -1
  12. package/Engines/webgpuEngine.js +1 -0
  13. package/Engines/webgpuEngine.js.map +1 -1
  14. package/Layers/effectLayer.js +1 -2
  15. package/Layers/effectLayer.js.map +1 -1
  16. package/Meshes/mesh.d.ts +7 -0
  17. package/Meshes/mesh.js +24 -7
  18. package/Meshes/mesh.js.map +1 -1
  19. package/Meshes/meshUVSpaceRenderer.d.ts +8 -5
  20. package/Meshes/meshUVSpaceRenderer.js +8 -13
  21. package/Meshes/meshUVSpaceRenderer.js.map +1 -1
  22. package/Meshes/trailMesh.d.ts +5 -2
  23. package/Meshes/trailMesh.js +9 -8
  24. package/Meshes/trailMesh.js.map +1 -1
  25. package/Misc/sceneRecorder.js +3 -0
  26. package/Misc/sceneRecorder.js.map +1 -1
  27. package/Morph/morphTargetManager.js +5 -1
  28. package/Morph/morphTargetManager.js.map +1 -1
  29. package/Particles/gpuParticleSystem.js +2 -2
  30. package/Particles/gpuParticleSystem.js.map +1 -1
  31. package/Rendering/depthPeelingRenderer.js +2 -1
  32. package/Rendering/depthPeelingRenderer.js.map +1 -1
  33. package/Shaders/fluidRenderingRender.fragment.js +4 -4
  34. package/Shaders/fluidRenderingRender.fragment.js.map +1 -1
  35. package/assetContainer.js +1 -1
  36. package/assetContainer.js.map +1 -1
  37. package/package.json +1 -1
@@ -13,6 +13,10 @@ export interface IExplorerExtensibilityOption {
13
13
  * Defines the action to execute on click
14
14
  */
15
15
  action: (entity: any) => void;
16
+ /**
17
+ * Keep popup open after click
18
+ */
19
+ keepOpenAfterClick?: boolean;
16
20
  }
17
21
  /**
18
22
  * Defines a group of actions associated with a predicate to use when extending the Inspector scene explorer
@@ -58,6 +62,21 @@ export interface IExplorerAdditionalNode {
58
62
  */
59
63
  getContent(): IExplorerAdditionalChild[];
60
64
  }
65
+ export type IInspectorContextMenuType = "pipeline" | "node" | "materials" | "spriteManagers" | "particleSystems";
66
+ /**
67
+ * Context menu item
68
+ */
69
+ export interface IInspectorContextMenuItem {
70
+ /**
71
+ * Display label - menu item
72
+ */
73
+ label: string;
74
+ /**
75
+ * Callback function that will be called when the menu item is selected
76
+ * @param entity the entity that is currently selected in the scene explorer
77
+ */
78
+ action: (entity?: unknown) => void;
79
+ }
61
80
  /**
62
81
  * Interface used to define the options to use to create the Inspector
63
82
  */
@@ -114,6 +133,14 @@ export interface IInspectorOptions {
114
133
  * Optional camera to use to render the gizmos from the inspector (default to the scene.activeCamera or the latest from scene.activeCameras)
115
134
  */
116
135
  gizmoCamera?: Camera;
136
+ /**
137
+ * Context menu for inspector tools such as "Post Process", "Nodes", "Materials", etc.
138
+ */
139
+ contextMenu?: Partial<Record<IInspectorContextMenuType, IInspectorContextMenuItem[]>>;
140
+ /**
141
+ * List of context menu items that should be completely overridden by custom items from the contextMenu property.
142
+ */
143
+ contextMenuOverride?: IInspectorContextMenuType[];
117
144
  }
118
145
  declare module "../scene" {
119
146
  interface Scene {
@@ -1 +1 @@
1
- {"version":3,"file":"debugLayer.js","sourceRoot":"","sources":["../../../../lts/core/generated/Debug/debugLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAA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AS,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,SAAS;QACZ,OAAO,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC;IACtE,CAAC;IAED;;OAEG;IACI,IAAI;QACP,IAAI,IAAI,CAAC,YAAY,EAAE;YACnB,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;SACtC;IACL,CAAC;IAED;;OAEG;IACI,gBAAgB;QACnB,IAAI,IAAI,CAAC,YAAY,EAAE;YACnB,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACzD;IACL,CAAC;IAED;;;;OAIG;IACI,IAAI,CAAC,MAA0B;QAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC3B,IAAI,OAAO,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE;gBACzC,MAAM,YAAY,GAAG,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC;gBAEnG,uCAAuC;gBACvC,KAAK,CAAC,UAAU,CAAC,YAAY,EAAE,GAAG,EAAE;oBAChC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;oBAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;gBAClB,CAAC,CAAC,CAAC;aACN;iBAAM;gBACH,kCAAkC;gBAClC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;gBAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;aACjB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;;AAxLD;;;;GAIG;AACW,uBAAY,GAAG,yCAAyC,MAAM,CAAC,OAAO,8BAA8B,CAAC","sourcesContent":["import { Tools } from \"../Misc/tools\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport { Scene } from \"../scene\";\r\nimport { Engine } from \"../Engines/engine\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\nimport type { IInspectable } from \"../Misc/iInspectable\";\r\nimport type { Camera } from \"../Cameras/camera\";\r\n\r\n// declare INSPECTOR namespace for compilation issue\r\ndeclare let INSPECTOR: any;\r\ndeclare let BABYLON: any;\r\n// load the inspector using require, if not present in the global namespace.\r\n\r\n/**\r\n * Interface used to define scene explorer extensibility option\r\n */\r\nexport interface IExplorerExtensibilityOption {\r\n /**\r\n * Define the option label\r\n */\r\n label: string;\r\n /**\r\n * Defines the action to execute on click\r\n */\r\n action: (entity: any) => void;\r\n}\r\n\r\n/**\r\n * Defines a group of actions associated with a predicate to use when extending the Inspector scene explorer\r\n */\r\nexport interface IExplorerExtensibilityGroup {\r\n /**\r\n * Defines a predicate to test if a given type mut be extended\r\n */\r\n predicate: (entity: any) => boolean;\r\n /**\r\n * Gets the list of options added to a type\r\n */\r\n entries: IExplorerExtensibilityOption[];\r\n}\r\n\r\n/**\r\n * Defines a new node that will be displayed as top level node in the explorer\r\n */\r\nexport interface IExplorerAdditionalChild {\r\n /**\r\n * Gets the name of the additional node\r\n */\r\n name: string;\r\n /**\r\n * Function used to return the class name of the child node\r\n */\r\n getClassName(): string;\r\n /**\r\n * List of inspectable custom properties (used by the Inspector)\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility\r\n */\r\n inspectableCustomProperties: IInspectable[];\r\n}\r\n\r\n/**\r\n * Defines a new node that will be displayed as top level node in the explorer\r\n */\r\nexport interface IExplorerAdditionalNode {\r\n /**\r\n * Gets the name of the additional node\r\n */\r\n name: string;\r\n /**\r\n * Function used to return the list of child entries\r\n */\r\n getContent(): IExplorerAdditionalChild[];\r\n}\r\n\r\n/**\r\n * Interface used to define the options to use to create the Inspector\r\n */\r\nexport interface IInspectorOptions {\r\n /**\r\n * Display in overlay mode (default: false)\r\n */\r\n overlay?: boolean;\r\n /**\r\n * HTML element to use as root (the parent of the rendering canvas will be used as default value)\r\n */\r\n globalRoot?: HTMLElement;\r\n /**\r\n * Display the Scene explorer\r\n */\r\n showExplorer?: boolean;\r\n /**\r\n * Display the property inspector\r\n */\r\n showInspector?: boolean;\r\n /**\r\n * Display in embed mode (both panes on the right)\r\n */\r\n embedMode?: boolean;\r\n /**\r\n * let the Inspector handles resize of the canvas when panes are resized (default to true)\r\n */\r\n handleResize?: boolean;\r\n /**\r\n * Allow the panes to popup (default: true)\r\n */\r\n enablePopup?: boolean;\r\n /**\r\n * Allow the panes to be closed by users (default: true)\r\n */\r\n enableClose?: boolean;\r\n /**\r\n * Optional list of extensibility entries\r\n */\r\n explorerExtensibility?: IExplorerExtensibilityGroup[];\r\n /**\r\n * Optional list of additional top level nodes\r\n */\r\n additionalNodes?: IExplorerAdditionalNode[];\r\n /**\r\n * Optional URL to get the inspector script from (by default it uses the babylonjs CDN).\r\n */\r\n inspectorURL?: string;\r\n /**\r\n * Optional initial tab (default to DebugLayerTab.Properties)\r\n */\r\n initialTab?: DebugLayerTab;\r\n /**\r\n * Optional camera to use to render the gizmos from the inspector (default to the scene.activeCamera or the latest from scene.activeCameras)\r\n */\r\n gizmoCamera?: Camera;\r\n}\r\n\r\ndeclare module \"../scene\" {\r\n export interface Scene {\r\n /**\r\n * @internal\r\n * Backing field\r\n */\r\n _debugLayer: DebugLayer;\r\n\r\n /**\r\n * Gets the debug layer (aka Inspector) associated with the scene\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector\r\n */\r\n debugLayer: DebugLayer;\r\n }\r\n}\r\nObject.defineProperty(Scene.prototype, \"debugLayer\", {\r\n get: function (this: Scene) {\r\n if (!this._debugLayer) {\r\n this._debugLayer = new DebugLayer(this);\r\n }\r\n return this._debugLayer;\r\n },\r\n enumerable: true,\r\n configurable: true,\r\n});\r\n\r\n/**\r\n * Enum of inspector action tab\r\n */\r\nexport enum DebugLayerTab {\r\n /**\r\n * Properties tag (default)\r\n */\r\n Properties = 0,\r\n /**\r\n * Debug tab\r\n */\r\n Debug = 1,\r\n /**\r\n * Statistics tab\r\n */\r\n Statistics = 2,\r\n /**\r\n * Tools tab\r\n */\r\n Tools = 3,\r\n /**\r\n * Settings tab\r\n */\r\n Settings = 4,\r\n}\r\n\r\n/**\r\n * The debug layer (aka Inspector) is the go to tool in order to better understand\r\n * what is happening in your scene\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector\r\n */\r\nexport class DebugLayer {\r\n /**\r\n * Define the url to get the inspector script from.\r\n * By default it uses the babylonjs CDN.\r\n * @ignoreNaming\r\n */\r\n public static InspectorURL = `https://unpkg.com/babylonjs-inspector@${Engine.Version}/babylon.inspector.bundle.js`;\r\n\r\n private _scene: Scene;\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private BJSINSPECTOR = this._getGlobalInspector();\r\n\r\n private _onPropertyChangedObservable?: Observable<{ object: any; property: string; value: any; initialValue: any }>;\r\n /**\r\n * Observable triggered when a property is changed through the inspector.\r\n */\r\n public get onPropertyChangedObservable() {\r\n if (this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector) {\r\n return this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable;\r\n }\r\n\r\n if (!this._onPropertyChangedObservable) {\r\n this._onPropertyChangedObservable = new Observable<{ object: any; property: string; value: any; initialValue: any }>();\r\n }\r\n\r\n return this._onPropertyChangedObservable;\r\n }\r\n\r\n private _onSelectionChangedObservable?: Observable<any>;\r\n /**\r\n * Observable triggered when the selection is changed through the inspector.\r\n */\r\n public get onSelectionChangedObservable() {\r\n if (this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector) {\r\n return this.BJSINSPECTOR.Inspector.OnSelectionChangeObservable;\r\n }\r\n\r\n if (!this._onSelectionChangedObservable) {\r\n this._onSelectionChangedObservable = new Observable<any>();\r\n }\r\n\r\n return this._onSelectionChangedObservable;\r\n }\r\n\r\n /**\r\n * Instantiates a new debug layer.\r\n * The debug layer (aka Inspector) is the go to tool in order to better understand\r\n * what is happening in your scene\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector\r\n * @param scene Defines the scene to inspect\r\n */\r\n constructor(scene?: Scene) {\r\n this._scene = scene || <Scene>EngineStore.LastCreatedScene;\r\n if (!this._scene) {\r\n return;\r\n }\r\n this._scene.onDisposeObservable.add(() => {\r\n // Debug layer\r\n if (this._scene._debugLayer) {\r\n this._scene._debugLayer.hide();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Creates the inspector window.\r\n * @param config\r\n */\r\n private _createInspector(config?: Partial<IInspectorOptions>) {\r\n if (this.isVisible()) {\r\n return;\r\n }\r\n\r\n if (this._onPropertyChangedObservable) {\r\n for (const observer of this._onPropertyChangedObservable!.observers) {\r\n this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable.add(observer);\r\n }\r\n this._onPropertyChangedObservable.clear();\r\n this._onPropertyChangedObservable = undefined;\r\n }\r\n\r\n if (this._onSelectionChangedObservable) {\r\n for (const observer of this._onSelectionChangedObservable!.observers) {\r\n this.BJSINSPECTOR.Inspector.OnSelectionChangedObservable.add(observer);\r\n }\r\n this._onSelectionChangedObservable.clear();\r\n this._onSelectionChangedObservable = undefined;\r\n }\r\n\r\n const userOptions: IInspectorOptions = {\r\n overlay: false,\r\n showExplorer: true,\r\n showInspector: true,\r\n embedMode: false,\r\n handleResize: true,\r\n enablePopup: true,\r\n ...config,\r\n };\r\n\r\n this.BJSINSPECTOR = this.BJSINSPECTOR || this._getGlobalInspector();\r\n\r\n this.BJSINSPECTOR.Inspector.Show(this._scene, userOptions);\r\n }\r\n\r\n /**\r\n * Select a specific entity in the scene explorer and highlight a specific block in that entity property grid\r\n * @param entity defines the entity to select\r\n * @param lineContainerTitles defines the specific blocks to highlight (could be a string or an array of strings)\r\n */\r\n public select(entity: any, lineContainerTitles?: string | string[]) {\r\n if (this.BJSINSPECTOR) {\r\n if (lineContainerTitles) {\r\n if (Object.prototype.toString.call(lineContainerTitles) == \"[object String]\") {\r\n this.BJSINSPECTOR.Inspector.MarkLineContainerTitleForHighlighting(lineContainerTitles);\r\n } else {\r\n this.BJSINSPECTOR.Inspector.MarkMultipleLineContainerTitlesForHighlighting(lineContainerTitles);\r\n }\r\n }\r\n this.BJSINSPECTOR.Inspector.OnSelectionChangeObservable.notifyObservers(entity);\r\n }\r\n }\r\n\r\n /** Get the inspector from bundle or global */\r\n private _getGlobalInspector(): any {\r\n // UMD Global name detection from Webpack Bundle UMD Name.\r\n if (typeof INSPECTOR !== \"undefined\") {\r\n return INSPECTOR;\r\n }\r\n\r\n // In case of module let s check the global emitted from the Inspector entry point.\r\n if (typeof BABYLON !== \"undefined\" && typeof BABYLON.Inspector !== \"undefined\") {\r\n return BABYLON;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Get if the inspector is visible or not.\r\n * @returns true if visible otherwise, false\r\n */\r\n public isVisible(): boolean {\r\n return this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector.IsVisible;\r\n }\r\n\r\n /**\r\n * Hide the inspector and close its window.\r\n */\r\n public hide() {\r\n if (this.BJSINSPECTOR) {\r\n this.BJSINSPECTOR.Inspector.Hide();\r\n }\r\n }\r\n\r\n /**\r\n * Update the scene in the inspector\r\n */\r\n public setAsActiveScene() {\r\n if (this.BJSINSPECTOR) {\r\n this.BJSINSPECTOR.Inspector._SetNewScene(this._scene);\r\n }\r\n }\r\n\r\n /**\r\n * Launch the debugLayer.\r\n * @param config Define the configuration of the inspector\r\n * @returns a promise fulfilled when the debug layer is visible\r\n */\r\n public show(config?: IInspectorOptions): Promise<DebugLayer> {\r\n return new Promise((resolve) => {\r\n if (typeof this.BJSINSPECTOR == \"undefined\") {\r\n const inspectorUrl = config && config.inspectorURL ? config.inspectorURL : DebugLayer.InspectorURL;\r\n\r\n // Load inspector and add it to the DOM\r\n Tools.LoadScript(inspectorUrl, () => {\r\n this._createInspector(config);\r\n resolve(this);\r\n });\r\n } else {\r\n // Otherwise creates the inspector\r\n this._createInspector(config);\r\n resolve(this);\r\n }\r\n });\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"debugLayer.js","sourceRoot":"","sources":["../../../../lts/core/generated/Debug/debugLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA4KrD,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE;IACjD,GAAG,EAAE;QACD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACnB,IAAI,CAAC,WAAW,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;SAC3C;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IACD,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,IAAI;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,aAqBX;AArBD,WAAY,aAAa;IACrB;;OAEG;IACH,6DAAc,CAAA;IACd;;OAEG;IACH,mDAAS,CAAA;IACT;;OAEG;IACH,6DAAc,CAAA;IACd;;OAEG;IACH,mDAAS,CAAA;IACT;;OAEG;IACH,yDAAY,CAAA;AAChB,CAAC,EArBW,aAAa,KAAb,aAAa,QAqBxB;AAED;;;;GAIG;AACH,MAAM,OAAO,UAAU;IAcnB;;OAEG;IACH,IAAW,2BAA2B;QAClC,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE;YAClD,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,2BAA2B,CAAC;SAClE;QAED,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACpC,IAAI,CAAC,4BAA4B,GAAG,IAAI,UAAU,EAAoE,CAAC;SAC1H;QAED,OAAO,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IAAI,CAAC,CAAC;aACjB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;;AAxLD;;;;GAIG;AACW,uBAAY,GAAG,yCAAyC,MAAM,CAAC,OAAO,8BAA8B,CAAC","sourcesContent":["import { Tools } from \"../Misc/tools\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport { Scene } from \"../scene\";\r\nimport { Engine } from \"../Engines/engine\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\nimport type { IInspectable } from \"../Misc/iInspectable\";\r\nimport type { Camera } from \"../Cameras/camera\";\r\n\r\n// declare INSPECTOR namespace for compilation issue\r\ndeclare let INSPECTOR: any;\r\ndeclare let BABYLON: any;\r\n// load the inspector using require, if not present in the global namespace.\r\n\r\n/**\r\n * Interface used to define scene explorer extensibility option\r\n */\r\nexport interface IExplorerExtensibilityOption {\r\n /**\r\n * Define the option label\r\n */\r\n label: string;\r\n /**\r\n * Defines the action to execute on click\r\n */\r\n action: (entity: any) => void;\r\n /**\r\n * Keep popup open after click\r\n */\r\n keepOpenAfterClick?: boolean;\r\n}\r\n\r\n/**\r\n * Defines a group of actions associated with a predicate to use when extending the Inspector scene explorer\r\n */\r\nexport interface IExplorerExtensibilityGroup {\r\n /**\r\n * Defines a predicate to test if a given type mut be extended\r\n */\r\n predicate: (entity: any) => boolean;\r\n /**\r\n * Gets the list of options added to a type\r\n */\r\n entries: IExplorerExtensibilityOption[];\r\n}\r\n\r\n/**\r\n * Defines a new node that will be displayed as top level node in the explorer\r\n */\r\nexport interface IExplorerAdditionalChild {\r\n /**\r\n * Gets the name of the additional node\r\n */\r\n name: string;\r\n /**\r\n * Function used to return the class name of the child node\r\n */\r\n getClassName(): string;\r\n /**\r\n * List of inspectable custom properties (used by the Inspector)\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility\r\n */\r\n inspectableCustomProperties: IInspectable[];\r\n}\r\n\r\n/**\r\n * Defines a new node that will be displayed as top level node in the explorer\r\n */\r\nexport interface IExplorerAdditionalNode {\r\n /**\r\n * Gets the name of the additional node\r\n */\r\n name: string;\r\n /**\r\n * Function used to return the list of child entries\r\n */\r\n getContent(): IExplorerAdditionalChild[];\r\n}\r\n\r\nexport type IInspectorContextMenuType = \"pipeline\" | \"node\" | \"materials\" | \"spriteManagers\" | \"particleSystems\";\r\n\r\n/**\r\n * Context menu item\r\n */\r\nexport interface IInspectorContextMenuItem {\r\n /**\r\n * Display label - menu item\r\n */\r\n label: string;\r\n /**\r\n * Callback function that will be called when the menu item is selected\r\n * @param entity the entity that is currently selected in the scene explorer\r\n */\r\n action: (entity?: unknown) => void;\r\n}\r\n\r\n/**\r\n * Interface used to define the options to use to create the Inspector\r\n */\r\nexport interface IInspectorOptions {\r\n /**\r\n * Display in overlay mode (default: false)\r\n */\r\n overlay?: boolean;\r\n /**\r\n * HTML element to use as root (the parent of the rendering canvas will be used as default value)\r\n */\r\n globalRoot?: HTMLElement;\r\n /**\r\n * Display the Scene explorer\r\n */\r\n showExplorer?: boolean;\r\n /**\r\n * Display the property inspector\r\n */\r\n showInspector?: boolean;\r\n /**\r\n * Display in embed mode (both panes on the right)\r\n */\r\n embedMode?: boolean;\r\n /**\r\n * let the Inspector handles resize of the canvas when panes are resized (default to true)\r\n */\r\n handleResize?: boolean;\r\n /**\r\n * Allow the panes to popup (default: true)\r\n */\r\n enablePopup?: boolean;\r\n /**\r\n * Allow the panes to be closed by users (default: true)\r\n */\r\n enableClose?: boolean;\r\n /**\r\n * Optional list of extensibility entries\r\n */\r\n explorerExtensibility?: IExplorerExtensibilityGroup[];\r\n /**\r\n * Optional list of additional top level nodes\r\n */\r\n additionalNodes?: IExplorerAdditionalNode[];\r\n /**\r\n * Optional URL to get the inspector script from (by default it uses the babylonjs CDN).\r\n */\r\n inspectorURL?: string;\r\n /**\r\n * Optional initial tab (default to DebugLayerTab.Properties)\r\n */\r\n initialTab?: DebugLayerTab;\r\n /**\r\n * Optional camera to use to render the gizmos from the inspector (default to the scene.activeCamera or the latest from scene.activeCameras)\r\n */\r\n gizmoCamera?: Camera;\r\n /**\r\n * Context menu for inspector tools such as \"Post Process\", \"Nodes\", \"Materials\", etc.\r\n */\r\n contextMenu?: Partial<Record<IInspectorContextMenuType, IInspectorContextMenuItem[]>>;\r\n /**\r\n * List of context menu items that should be completely overridden by custom items from the contextMenu property.\r\n */\r\n contextMenuOverride?: IInspectorContextMenuType[];\r\n}\r\n\r\ndeclare module \"../scene\" {\r\n export interface Scene {\r\n /**\r\n * @internal\r\n * Backing field\r\n */\r\n _debugLayer: DebugLayer;\r\n\r\n /**\r\n * Gets the debug layer (aka Inspector) associated with the scene\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector\r\n */\r\n debugLayer: DebugLayer;\r\n }\r\n}\r\nObject.defineProperty(Scene.prototype, \"debugLayer\", {\r\n get: function (this: Scene) {\r\n if (!this._debugLayer) {\r\n this._debugLayer = new DebugLayer(this);\r\n }\r\n return this._debugLayer;\r\n },\r\n enumerable: true,\r\n configurable: true,\r\n});\r\n\r\n/**\r\n * Enum of inspector action tab\r\n */\r\nexport enum DebugLayerTab {\r\n /**\r\n * Properties tag (default)\r\n */\r\n Properties = 0,\r\n /**\r\n * Debug tab\r\n */\r\n Debug = 1,\r\n /**\r\n * Statistics tab\r\n */\r\n Statistics = 2,\r\n /**\r\n * Tools tab\r\n */\r\n Tools = 3,\r\n /**\r\n * Settings tab\r\n */\r\n Settings = 4,\r\n}\r\n\r\n/**\r\n * The debug layer (aka Inspector) is the go to tool in order to better understand\r\n * what is happening in your scene\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector\r\n */\r\nexport class DebugLayer {\r\n /**\r\n * Define the url to get the inspector script from.\r\n * By default it uses the babylonjs CDN.\r\n * @ignoreNaming\r\n */\r\n public static InspectorURL = `https://unpkg.com/babylonjs-inspector@${Engine.Version}/babylon.inspector.bundle.js`;\r\n\r\n private _scene: Scene;\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private BJSINSPECTOR = this._getGlobalInspector();\r\n\r\n private _onPropertyChangedObservable?: Observable<{ object: any; property: string; value: any; initialValue: any }>;\r\n /**\r\n * Observable triggered when a property is changed through the inspector.\r\n */\r\n public get onPropertyChangedObservable() {\r\n if (this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector) {\r\n return this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable;\r\n }\r\n\r\n if (!this._onPropertyChangedObservable) {\r\n this._onPropertyChangedObservable = new Observable<{ object: any; property: string; value: any; initialValue: any }>();\r\n }\r\n\r\n return this._onPropertyChangedObservable;\r\n }\r\n\r\n private _onSelectionChangedObservable?: Observable<any>;\r\n /**\r\n * Observable triggered when the selection is changed through the inspector.\r\n */\r\n public get onSelectionChangedObservable() {\r\n if (this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector) {\r\n return this.BJSINSPECTOR.Inspector.OnSelectionChangeObservable;\r\n }\r\n\r\n if (!this._onSelectionChangedObservable) {\r\n this._onSelectionChangedObservable = new Observable<any>();\r\n }\r\n\r\n return this._onSelectionChangedObservable;\r\n }\r\n\r\n /**\r\n * Instantiates a new debug layer.\r\n * The debug layer (aka Inspector) is the go to tool in order to better understand\r\n * what is happening in your scene\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector\r\n * @param scene Defines the scene to inspect\r\n */\r\n constructor(scene?: Scene) {\r\n this._scene = scene || <Scene>EngineStore.LastCreatedScene;\r\n if (!this._scene) {\r\n return;\r\n }\r\n this._scene.onDisposeObservable.add(() => {\r\n // Debug layer\r\n if (this._scene._debugLayer) {\r\n this._scene._debugLayer.hide();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Creates the inspector window.\r\n * @param config\r\n */\r\n private _createInspector(config?: Partial<IInspectorOptions>) {\r\n if (this.isVisible()) {\r\n return;\r\n }\r\n\r\n if (this._onPropertyChangedObservable) {\r\n for (const observer of this._onPropertyChangedObservable!.observers) {\r\n this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable.add(observer);\r\n }\r\n this._onPropertyChangedObservable.clear();\r\n this._onPropertyChangedObservable = undefined;\r\n }\r\n\r\n if (this._onSelectionChangedObservable) {\r\n for (const observer of this._onSelectionChangedObservable!.observers) {\r\n this.BJSINSPECTOR.Inspector.OnSelectionChangedObservable.add(observer);\r\n }\r\n this._onSelectionChangedObservable.clear();\r\n this._onSelectionChangedObservable = undefined;\r\n }\r\n\r\n const userOptions: IInspectorOptions = {\r\n overlay: false,\r\n showExplorer: true,\r\n showInspector: true,\r\n embedMode: false,\r\n handleResize: true,\r\n enablePopup: true,\r\n ...config,\r\n };\r\n\r\n this.BJSINSPECTOR = this.BJSINSPECTOR || this._getGlobalInspector();\r\n\r\n this.BJSINSPECTOR.Inspector.Show(this._scene, userOptions);\r\n }\r\n\r\n /**\r\n * Select a specific entity in the scene explorer and highlight a specific block in that entity property grid\r\n * @param entity defines the entity to select\r\n * @param lineContainerTitles defines the specific blocks to highlight (could be a string or an array of strings)\r\n */\r\n public select(entity: any, lineContainerTitles?: string | string[]) {\r\n if (this.BJSINSPECTOR) {\r\n if (lineContainerTitles) {\r\n if (Object.prototype.toString.call(lineContainerTitles) == \"[object String]\") {\r\n this.BJSINSPECTOR.Inspector.MarkLineContainerTitleForHighlighting(lineContainerTitles);\r\n } else {\r\n this.BJSINSPECTOR.Inspector.MarkMultipleLineContainerTitlesForHighlighting(lineContainerTitles);\r\n }\r\n }\r\n this.BJSINSPECTOR.Inspector.OnSelectionChangeObservable.notifyObservers(entity);\r\n }\r\n }\r\n\r\n /** Get the inspector from bundle or global */\r\n private _getGlobalInspector(): any {\r\n // UMD Global name detection from Webpack Bundle UMD Name.\r\n if (typeof INSPECTOR !== \"undefined\") {\r\n return INSPECTOR;\r\n }\r\n\r\n // In case of module let s check the global emitted from the Inspector entry point.\r\n if (typeof BABYLON !== \"undefined\" && typeof BABYLON.Inspector !== \"undefined\") {\r\n return BABYLON;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Get if the inspector is visible or not.\r\n * @returns true if visible otherwise, false\r\n */\r\n public isVisible(): boolean {\r\n return this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector.IsVisible;\r\n }\r\n\r\n /**\r\n * Hide the inspector and close its window.\r\n */\r\n public hide() {\r\n if (this.BJSINSPECTOR) {\r\n this.BJSINSPECTOR.Inspector.Hide();\r\n }\r\n }\r\n\r\n /**\r\n * Update the scene in the inspector\r\n */\r\n public setAsActiveScene() {\r\n if (this.BJSINSPECTOR) {\r\n this.BJSINSPECTOR.Inspector._SetNewScene(this._scene);\r\n }\r\n }\r\n\r\n /**\r\n * Launch the debugLayer.\r\n * @param config Define the configuration of the inspector\r\n * @returns a promise fulfilled when the debug layer is visible\r\n */\r\n public show(config?: IInspectorOptions): Promise<DebugLayer> {\r\n return new Promise((resolve) => {\r\n if (typeof this.BJSINSPECTOR == \"undefined\") {\r\n const inspectorUrl = config && config.inspectorURL ? config.inspectorURL : DebugLayer.InspectorURL;\r\n\r\n // Load inspector and add it to the DOM\r\n Tools.LoadScript(inspectorUrl, () => {\r\n this._createInspector(config);\r\n resolve(this);\r\n });\r\n } else {\r\n // Otherwise creates the inspector\r\n this._createInspector(config);\r\n resolve(this);\r\n }\r\n });\r\n }\r\n}\r\n"]}
@@ -1597,7 +1597,7 @@ interface GPUCompilationInfo {
1597
1597
  }
1598
1598
 
1599
1599
  class GPUPipelineError extends DOMException {
1600
- constructor(message: DOMString | undefined, options: GPUPipelineErrorInit);
1600
+ constructor(message: string | undefined, options: GPUPipelineErrorInit);
1601
1601
  readonly reason: GPUPipelineErrorReason;
1602
1602
  }
1603
1603
 
@@ -108,4 +108,6 @@ export interface EngineCapabilities {
108
108
  textureMaxLevel: boolean;
109
109
  /** Defines the maximum layer count for a 2D Texture array. */
110
110
  texture2DArrayMaxLayerCount: number;
111
+ /** Defines if the morph target texture is supported. */
112
+ disableMorphTargetTexture: boolean;
111
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"engineCapabilities.js","sourceRoot":"","sources":["../../../../lts/core/generated/Engines/engineCapabilities.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Interface used to describe the capabilities of the engine relatively to the current browser\r\n */\r\nexport interface EngineCapabilities {\r\n /** Maximum textures units per fragment shader */\r\n maxTexturesImageUnits: number;\r\n /** Maximum texture units per vertex shader */\r\n maxVertexTextureImageUnits: number;\r\n /** Maximum textures units in the entire pipeline */\r\n maxCombinedTexturesImageUnits: number;\r\n /** Maximum texture size */\r\n maxTextureSize: number;\r\n /** Maximum texture samples */\r\n maxSamples?: number;\r\n /** Maximum cube texture size */\r\n maxCubemapTextureSize: number;\r\n /** Maximum render texture size */\r\n maxRenderTextureSize: number;\r\n /** Maximum number of vertex attributes */\r\n maxVertexAttribs: number;\r\n /** Maximum number of varyings */\r\n maxVaryingVectors: number;\r\n /** Maximum number of uniforms per vertex shader */\r\n maxVertexUniformVectors: number;\r\n /** Maximum number of uniforms per fragment shader */\r\n maxFragmentUniformVectors: number;\r\n /** Defines if standard derivatives (dx/dy) are supported */\r\n standardDerivatives: boolean;\r\n /** Defines if s3tc texture compression is supported */\r\n s3tc?: WEBGL_compressed_texture_s3tc;\r\n /** Defines if s3tc sRGB texture compression is supported */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n s3tc_srgb?: WEBGL_compressed_texture_s3tc_srgb;\r\n /** Defines if pvrtc texture compression is supported */\r\n pvrtc: any; //WEBGL_compressed_texture_pvrtc;\r\n /** Defines if etc1 texture compression is supported */\r\n etc1: any; //WEBGL_compressed_texture_etc1;\r\n /** Defines if etc2 texture compression is supported */\r\n etc2: any; //WEBGL_compressed_texture_etc;\r\n /** Defines if astc texture compression is supported */\r\n astc: any; //WEBGL_compressed_texture_astc;\r\n /** Defines if bptc texture compression is supported */\r\n bptc: any; //EXT_texture_compression_bptc;\r\n /** Defines if float textures are supported */\r\n textureFloat: boolean;\r\n /** Defines if vertex array objects are supported */\r\n vertexArrayObject: boolean;\r\n /** Gets the webgl extension for anisotropic filtering (null if not supported) */\r\n textureAnisotropicFilterExtension?: EXT_texture_filter_anisotropic;\r\n /** Gets the maximum level of anisotropy supported */\r\n maxAnisotropy: number;\r\n /** Defines if instancing is supported */\r\n instancedArrays: boolean;\r\n /** Defines if 32 bits indices are supported */\r\n uintIndices: boolean;\r\n /** Defines if high precision shaders are supported */\r\n highPrecisionShaderSupported: boolean;\r\n /** Defines if depth reading in the fragment shader is supported */\r\n fragmentDepthSupported: boolean;\r\n /** Defines if float texture linear filtering is supported*/\r\n textureFloatLinearFiltering: boolean;\r\n /** Defines if rendering to float textures is supported */\r\n textureFloatRender: boolean;\r\n /** Defines if half float textures are supported*/\r\n textureHalfFloat: boolean;\r\n /** Defines if half float texture linear filtering is supported*/\r\n textureHalfFloatLinearFiltering: boolean;\r\n /** Defines if rendering to half float textures is supported */\r\n textureHalfFloatRender: boolean;\r\n /** Defines if textureLOD shader command is supported */\r\n textureLOD: boolean;\r\n /** Defines if texelFetch shader command is supported */\r\n texelFetch: boolean;\r\n /** Defines if draw buffers extension is supported */\r\n drawBuffersExtension: boolean;\r\n /** Defines if depth textures are supported */\r\n depthTextureExtension: boolean;\r\n /** Defines if float color buffer are supported */\r\n colorBufferFloat: boolean;\r\n /** Gets disjoint timer query extension (null if not supported) */\r\n timerQuery?: EXT_disjoint_timer_query;\r\n /** Defines if timestamp can be used with timer query */\r\n canUseTimestampForTimerQuery: boolean;\r\n /** Defines if occlusion queries are supported by the engine */\r\n supportOcclusionQuery: boolean;\r\n /** Defines if multiview is supported (https://www.khronos.org/registry/webgl/extensions/WEBGL_multiview/) */\r\n multiview?: any;\r\n /** Defines if oculus multiview is supported (https://developer.oculus.com/documentation/oculus-browser/latest/concepts/browser-multiview/) */\r\n oculusMultiview?: any;\r\n /** Function used to let the system compiles shaders in background */\r\n parallelShaderCompile?: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n COMPLETION_STATUS_KHR: number;\r\n };\r\n /** Max number of texture samples for MSAA */\r\n maxMSAASamples: number;\r\n /** Defines if the blend min max extension is supported */\r\n blendMinMax: boolean;\r\n /** In some iOS + WebGL1, gl_InstanceID (and gl_InstanceIDEXT) is undefined even if instancedArrays is true. So don't use gl_InstanceID in those cases */\r\n canUseGLInstanceID: boolean;\r\n /** Defines if gl_vertexID is available */\r\n canUseGLVertexID: boolean;\r\n /** Defines if compute shaders are supported by the engine */\r\n supportComputeShaders: boolean;\r\n /** Defines if sRGB texture formats are supported */\r\n supportSRGBBuffers: boolean;\r\n /** Defines if transform feedbacks are supported */\r\n supportTransformFeedbacks: boolean;\r\n /** Defines if texture max level are supported */\r\n textureMaxLevel: boolean;\r\n\r\n /** Defines the maximum layer count for a 2D Texture array. */\r\n texture2DArrayMaxLayerCount: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"engineCapabilities.js","sourceRoot":"","sources":["../../../../lts/core/generated/Engines/engineCapabilities.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Interface used to describe the capabilities of the engine relatively to the current browser\r\n */\r\nexport interface EngineCapabilities {\r\n /** Maximum textures units per fragment shader */\r\n maxTexturesImageUnits: number;\r\n /** Maximum texture units per vertex shader */\r\n maxVertexTextureImageUnits: number;\r\n /** Maximum textures units in the entire pipeline */\r\n maxCombinedTexturesImageUnits: number;\r\n /** Maximum texture size */\r\n maxTextureSize: number;\r\n /** Maximum texture samples */\r\n maxSamples?: number;\r\n /** Maximum cube texture size */\r\n maxCubemapTextureSize: number;\r\n /** Maximum render texture size */\r\n maxRenderTextureSize: number;\r\n /** Maximum number of vertex attributes */\r\n maxVertexAttribs: number;\r\n /** Maximum number of varyings */\r\n maxVaryingVectors: number;\r\n /** Maximum number of uniforms per vertex shader */\r\n maxVertexUniformVectors: number;\r\n /** Maximum number of uniforms per fragment shader */\r\n maxFragmentUniformVectors: number;\r\n /** Defines if standard derivatives (dx/dy) are supported */\r\n standardDerivatives: boolean;\r\n /** Defines if s3tc texture compression is supported */\r\n s3tc?: WEBGL_compressed_texture_s3tc;\r\n /** Defines if s3tc sRGB texture compression is supported */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n s3tc_srgb?: WEBGL_compressed_texture_s3tc_srgb;\r\n /** Defines if pvrtc texture compression is supported */\r\n pvrtc: any; //WEBGL_compressed_texture_pvrtc;\r\n /** Defines if etc1 texture compression is supported */\r\n etc1: any; //WEBGL_compressed_texture_etc1;\r\n /** Defines if etc2 texture compression is supported */\r\n etc2: any; //WEBGL_compressed_texture_etc;\r\n /** Defines if astc texture compression is supported */\r\n astc: any; //WEBGL_compressed_texture_astc;\r\n /** Defines if bptc texture compression is supported */\r\n bptc: any; //EXT_texture_compression_bptc;\r\n /** Defines if float textures are supported */\r\n textureFloat: boolean;\r\n /** Defines if vertex array objects are supported */\r\n vertexArrayObject: boolean;\r\n /** Gets the webgl extension for anisotropic filtering (null if not supported) */\r\n textureAnisotropicFilterExtension?: EXT_texture_filter_anisotropic;\r\n /** Gets the maximum level of anisotropy supported */\r\n maxAnisotropy: number;\r\n /** Defines if instancing is supported */\r\n instancedArrays: boolean;\r\n /** Defines if 32 bits indices are supported */\r\n uintIndices: boolean;\r\n /** Defines if high precision shaders are supported */\r\n highPrecisionShaderSupported: boolean;\r\n /** Defines if depth reading in the fragment shader is supported */\r\n fragmentDepthSupported: boolean;\r\n /** Defines if float texture linear filtering is supported*/\r\n textureFloatLinearFiltering: boolean;\r\n /** Defines if rendering to float textures is supported */\r\n textureFloatRender: boolean;\r\n /** Defines if half float textures are supported*/\r\n textureHalfFloat: boolean;\r\n /** Defines if half float texture linear filtering is supported*/\r\n textureHalfFloatLinearFiltering: boolean;\r\n /** Defines if rendering to half float textures is supported */\r\n textureHalfFloatRender: boolean;\r\n /** Defines if textureLOD shader command is supported */\r\n textureLOD: boolean;\r\n /** Defines if texelFetch shader command is supported */\r\n texelFetch: boolean;\r\n /** Defines if draw buffers extension is supported */\r\n drawBuffersExtension: boolean;\r\n /** Defines if depth textures are supported */\r\n depthTextureExtension: boolean;\r\n /** Defines if float color buffer are supported */\r\n colorBufferFloat: boolean;\r\n /** Gets disjoint timer query extension (null if not supported) */\r\n timerQuery?: EXT_disjoint_timer_query;\r\n /** Defines if timestamp can be used with timer query */\r\n canUseTimestampForTimerQuery: boolean;\r\n /** Defines if occlusion queries are supported by the engine */\r\n supportOcclusionQuery: boolean;\r\n /** Defines if multiview is supported (https://www.khronos.org/registry/webgl/extensions/WEBGL_multiview/) */\r\n multiview?: any;\r\n /** Defines if oculus multiview is supported (https://developer.oculus.com/documentation/oculus-browser/latest/concepts/browser-multiview/) */\r\n oculusMultiview?: any;\r\n /** Function used to let the system compiles shaders in background */\r\n parallelShaderCompile?: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n COMPLETION_STATUS_KHR: number;\r\n };\r\n /** Max number of texture samples for MSAA */\r\n maxMSAASamples: number;\r\n /** Defines if the blend min max extension is supported */\r\n blendMinMax: boolean;\r\n /** In some iOS + WebGL1, gl_InstanceID (and gl_InstanceIDEXT) is undefined even if instancedArrays is true. So don't use gl_InstanceID in those cases */\r\n canUseGLInstanceID: boolean;\r\n /** Defines if gl_vertexID is available */\r\n canUseGLVertexID: boolean;\r\n /** Defines if compute shaders are supported by the engine */\r\n supportComputeShaders: boolean;\r\n /** Defines if sRGB texture formats are supported */\r\n supportSRGBBuffers: boolean;\r\n /** Defines if transform feedbacks are supported */\r\n supportTransformFeedbacks: boolean;\r\n /** Defines if texture max level are supported */\r\n textureMaxLevel: boolean;\r\n\r\n /** Defines the maximum layer count for a 2D Texture array. */\r\n texture2DArrayMaxLayerCount: number;\r\n /** Defines if the morph target texture is supported. */\r\n disableMorphTargetTexture: boolean;\r\n}\r\n"]}
@@ -190,6 +190,7 @@ export class NativeEngine extends Engine {
190
190
  supportTransformFeedbacks: false,
191
191
  textureMaxLevel: false,
192
192
  texture2DArrayMaxLayerCount: _native.Engine.CAPS_LIMITS_MAX_TEXTURE_LAYERS,
193
+ disableMorphTargetTexture: false,
193
194
  };
194
195
  this._features = {
195
196
  forceBitmapOverHTMLImageElement: false,