@babylonjs/core 7.26.3 → 7.26.5
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/Animations/animationGroup.d.ts +1 -0
- package/Animations/animationGroup.js +1 -0
- package/Animations/animationGroup.js.map +1 -1
- package/Audio/audioSceneComponent.d.ts +1 -1
- package/Audio/audioSceneComponent.js +2 -2
- package/Audio/audioSceneComponent.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/engine.d.ts +2 -67
- package/Layers/effectLayerSceneComponent.js +2 -1
- package/Layers/effectLayerSceneComponent.js.map +1 -1
- package/LensFlares/lensFlareSystemSceneComponent.js +2 -1
- package/LensFlares/lensFlareSystemSceneComponent.js.map +1 -1
- package/Lights/Shadows/shadowGeneratorSceneComponent.d.ts +1 -1
- package/Lights/Shadows/shadowGeneratorSceneComponent.js +2 -2
- package/Lights/Shadows/shadowGeneratorSceneComponent.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js +3 -3
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Loading/Plugins/babylonFileParser.function.d.ts +45 -0
- package/Loading/Plugins/babylonFileParser.function.js +61 -0
- package/Loading/Plugins/babylonFileParser.function.js.map +1 -0
- package/Loading/Plugins/index.d.ts +1 -0
- package/Loading/Plugins/index.js +1 -0
- package/Loading/Plugins/index.js.map +1 -1
- package/Loading/loadingScreen.js +0 -2
- package/Loading/loadingScreen.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
- package/Materials/Textures/videoTexture.js +0 -4
- package/Materials/Textures/videoTexture.js.map +1 -1
- package/Maths/math.scalar.d.ts +1 -4
- package/Meshes/mesh.js +9 -2
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/meshUtils.js +4 -0
- package/Meshes/meshUtils.js.map +1 -1
- package/Misc/timingTools.js +1 -0
- package/Misc/timingTools.js.map +1 -1
- package/Misc/videoRecorder.d.ts +1 -0
- package/Misc/videoRecorder.js +4 -4
- package/Misc/videoRecorder.js.map +1 -1
- package/Particles/particleSystemComponent.js +4 -4
- package/Particles/particleSystemComponent.js.map +1 -1
- package/Rendering/subSurfaceSceneComponent.js +2 -2
- package/Rendering/subSurfaceSceneComponent.js.map +1 -1
- package/Sprites/spriteRenderer.js +10 -1
- package/Sprites/spriteRenderer.js.map +1 -1
- package/abstractScene.d.ts +0 -52
- package/abstractScene.js +0 -60
- package/abstractScene.js.map +1 -1
- package/package.json +1 -1
- package/Shaders/blur.fragment.d.ts +0 -5
- package/Shaders/blur.fragment.js +0 -14
- package/Shaders/blur.fragment.js.map +0 -1
package/abstractScene.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { Scene } from "./scene";
|
|
2
1
|
import type { Nullable } from "./types";
|
|
3
2
|
import type { AbstractMesh } from "./Meshes/abstractMesh";
|
|
4
3
|
import type { TransformNode } from "./Meshes/transformNode";
|
|
5
4
|
import type { Geometry } from "./Meshes/geometry";
|
|
6
5
|
import type { Skeleton } from "./Bones/skeleton";
|
|
7
6
|
import type { MorphTargetManager } from "./Morph/morphTargetManager";
|
|
8
|
-
import type { AssetContainer } from "./assetContainer";
|
|
9
7
|
import type { IParticleSystem } from "./Particles/IParticleSystem";
|
|
10
8
|
import type { AnimationGroup } from "./Animations/animationGroup";
|
|
11
9
|
import type { BaseTexture } from "./Materials/Textures/baseTexture";
|
|
@@ -17,62 +15,12 @@ import type { Light } from "./Lights/light";
|
|
|
17
15
|
import type { Node } from "./node";
|
|
18
16
|
import type { PostProcess } from "./PostProcesses/postProcess";
|
|
19
17
|
import type { Animation } from "./Animations/animation";
|
|
20
|
-
/**
|
|
21
|
-
* Defines how the parser contract is defined.
|
|
22
|
-
* These parsers are used to parse a list of specific assets (like particle systems, etc..)
|
|
23
|
-
*/
|
|
24
|
-
export type BabylonFileParser = (parsedData: any, scene: Scene, container: AssetContainer, rootUrl: string) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Defines how the individual parser contract is defined.
|
|
27
|
-
* These parser can parse an individual asset
|
|
28
|
-
*/
|
|
29
|
-
export type IndividualBabylonFileParser = (parsedData: any, scene: Scene, rootUrl: string) => any;
|
|
30
18
|
/**
|
|
31
19
|
* Base class of the scene acting as a container for the different elements composing a scene.
|
|
32
20
|
* This class is dynamically extended by the different components of the scene increasing
|
|
33
21
|
* flexibility and reducing coupling
|
|
34
22
|
*/
|
|
35
23
|
export declare abstract class AbstractScene {
|
|
36
|
-
/**
|
|
37
|
-
* Stores the list of available parsers in the application.
|
|
38
|
-
*/
|
|
39
|
-
private static _BabylonFileParsers;
|
|
40
|
-
/**
|
|
41
|
-
* Stores the list of available individual parsers in the application.
|
|
42
|
-
*/
|
|
43
|
-
private static _IndividualBabylonFileParsers;
|
|
44
|
-
/**
|
|
45
|
-
* Adds a parser in the list of available ones
|
|
46
|
-
* @param name Defines the name of the parser
|
|
47
|
-
* @param parser Defines the parser to add
|
|
48
|
-
*/
|
|
49
|
-
static AddParser(name: string, parser: BabylonFileParser): void;
|
|
50
|
-
/**
|
|
51
|
-
* Gets a general parser from the list of available ones
|
|
52
|
-
* @param name Defines the name of the parser
|
|
53
|
-
* @returns the requested parser or null
|
|
54
|
-
*/
|
|
55
|
-
static GetParser(name: string): Nullable<BabylonFileParser>;
|
|
56
|
-
/**
|
|
57
|
-
* Adds n individual parser in the list of available ones
|
|
58
|
-
* @param name Defines the name of the parser
|
|
59
|
-
* @param parser Defines the parser to add
|
|
60
|
-
*/
|
|
61
|
-
static AddIndividualParser(name: string, parser: IndividualBabylonFileParser): void;
|
|
62
|
-
/**
|
|
63
|
-
* Gets an individual parser from the list of available ones
|
|
64
|
-
* @param name Defines the name of the parser
|
|
65
|
-
* @returns the requested parser or null
|
|
66
|
-
*/
|
|
67
|
-
static GetIndividualParser(name: string): Nullable<IndividualBabylonFileParser>;
|
|
68
|
-
/**
|
|
69
|
-
* Parser json data and populate both a scene and its associated container object
|
|
70
|
-
* @param jsonData Defines the data to parse
|
|
71
|
-
* @param scene Defines the scene to parse the data for
|
|
72
|
-
* @param container Defines the container attached to the parsing sequence
|
|
73
|
-
* @param rootUrl Defines the root url of the data
|
|
74
|
-
*/
|
|
75
|
-
static Parse(jsonData: any, scene: Scene, container: AssetContainer, rootUrl: string): void;
|
|
76
24
|
/**
|
|
77
25
|
* Gets the list of root nodes (ie. nodes with no parent)
|
|
78
26
|
*/
|
package/abstractScene.js
CHANGED
|
@@ -88,58 +88,6 @@ export class AbstractScene {
|
|
|
88
88
|
*/
|
|
89
89
|
this.postProcesses = [];
|
|
90
90
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Adds a parser in the list of available ones
|
|
93
|
-
* @param name Defines the name of the parser
|
|
94
|
-
* @param parser Defines the parser to add
|
|
95
|
-
*/
|
|
96
|
-
static AddParser(name, parser) {
|
|
97
|
-
this._BabylonFileParsers[name] = parser;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Gets a general parser from the list of available ones
|
|
101
|
-
* @param name Defines the name of the parser
|
|
102
|
-
* @returns the requested parser or null
|
|
103
|
-
*/
|
|
104
|
-
static GetParser(name) {
|
|
105
|
-
if (this._BabylonFileParsers[name]) {
|
|
106
|
-
return this._BabylonFileParsers[name];
|
|
107
|
-
}
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Adds n individual parser in the list of available ones
|
|
112
|
-
* @param name Defines the name of the parser
|
|
113
|
-
* @param parser Defines the parser to add
|
|
114
|
-
*/
|
|
115
|
-
static AddIndividualParser(name, parser) {
|
|
116
|
-
this._IndividualBabylonFileParsers[name] = parser;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Gets an individual parser from the list of available ones
|
|
120
|
-
* @param name Defines the name of the parser
|
|
121
|
-
* @returns the requested parser or null
|
|
122
|
-
*/
|
|
123
|
-
static GetIndividualParser(name) {
|
|
124
|
-
if (this._IndividualBabylonFileParsers[name]) {
|
|
125
|
-
return this._IndividualBabylonFileParsers[name];
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Parser json data and populate both a scene and its associated container object
|
|
131
|
-
* @param jsonData Defines the data to parse
|
|
132
|
-
* @param scene Defines the scene to parse the data for
|
|
133
|
-
* @param container Defines the container attached to the parsing sequence
|
|
134
|
-
* @param rootUrl Defines the root url of the data
|
|
135
|
-
*/
|
|
136
|
-
static Parse(jsonData, scene, container, rootUrl) {
|
|
137
|
-
for (const parserName in this._BabylonFileParsers) {
|
|
138
|
-
if (Object.prototype.hasOwnProperty.call(this._BabylonFileParsers, parserName)) {
|
|
139
|
-
this._BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
91
|
/**
|
|
144
92
|
* Texture used in all pbr material as the reflection texture.
|
|
145
93
|
* As in the majority of the scene they are the same (exception for multi room and so on),
|
|
@@ -164,14 +112,6 @@ export class AbstractScene {
|
|
|
164
112
|
return nodes;
|
|
165
113
|
}
|
|
166
114
|
}
|
|
167
|
-
/**
|
|
168
|
-
* Stores the list of available parsers in the application.
|
|
169
|
-
*/
|
|
170
|
-
AbstractScene._BabylonFileParsers = {};
|
|
171
|
-
/**
|
|
172
|
-
* Stores the list of available individual parsers in the application.
|
|
173
|
-
*/
|
|
174
|
-
AbstractScene._IndividualBabylonFileParsers = {};
|
|
175
115
|
// Register Class Name
|
|
176
116
|
RegisterClass("BABYLON.AbstractScene", AbstractScene);
|
|
177
117
|
//# sourceMappingURL=abstractScene.js.map
|
package/abstractScene.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractScene.js","sourceRoot":"","sources":["../../../dev/core/src/abstractScene.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAcjD;;;;GAIG;AACH,MAAM,OAAgB,aAAa;IAAnC;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AE,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7E,OAAO,KAAK,CAAC;IACjB,CAAC;;AA9LD;;GAEG;AACY,iCAAmB,GAAyC,EAAE,AAA3C,CAA4C;AAE9E;;GAEG;AACY,2CAA6B,GAAmD,EAAE,AAArD,CAAsD;AAyLtG,sBAAsB;AACtB,aAAa,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport type { AbstractMesh } from \"./Meshes/abstractMesh\";\r\nimport type { TransformNode } from \"./Meshes/transformNode\";\r\nimport type { Geometry } from \"./Meshes/geometry\";\r\nimport type { Skeleton } from \"./Bones/skeleton\";\r\nimport type { MorphTargetManager } from \"./Morph/morphTargetManager\";\r\nimport type { AssetContainer } from \"./assetContainer\";\r\nimport type { IParticleSystem } from \"./Particles/IParticleSystem\";\r\nimport type { AnimationGroup } from \"./Animations/animationGroup\";\r\nimport type { BaseTexture } from \"./Materials/Textures/baseTexture\";\r\nimport type { Material } from \"./Materials/material\";\r\nimport type { MultiMaterial } from \"./Materials/multiMaterial\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { Camera } from \"./Cameras/camera\";\r\nimport type { Light } from \"./Lights/light\";\r\nimport type { Node } from \"./node\";\r\nimport type { PostProcess } from \"./PostProcesses/postProcess\";\r\nimport type { Animation } from \"./Animations/animation\";\r\nimport { RegisterClass } from \"./Misc/typeStore\";\r\n\r\n/**\r\n * Defines how the parser contract is defined.\r\n * These parsers are used to parse a list of specific assets (like particle systems, etc..)\r\n */\r\nexport type BabylonFileParser = (parsedData: any, scene: Scene, container: AssetContainer, rootUrl: string) => void;\r\n\r\n/**\r\n * Defines how the individual parser contract is defined.\r\n * These parser can parse an individual asset\r\n */\r\nexport type IndividualBabylonFileParser = (parsedData: any, scene: Scene, rootUrl: string) => any;\r\n\r\n/**\r\n * Base class of the scene acting as a container for the different elements composing a scene.\r\n * This class is dynamically extended by the different components of the scene increasing\r\n * flexibility and reducing coupling\r\n */\r\nexport abstract class AbstractScene {\r\n /**\r\n * Stores the list of available parsers in the application.\r\n */\r\n private static _BabylonFileParsers: { [key: string]: BabylonFileParser } = {};\r\n\r\n /**\r\n * Stores the list of available individual parsers in the application.\r\n */\r\n private static _IndividualBabylonFileParsers: { [key: string]: IndividualBabylonFileParser } = {};\r\n\r\n /**\r\n * Adds a parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddParser(name: string, parser: BabylonFileParser): void {\r\n this._BabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets a general parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetParser(name: string): Nullable<BabylonFileParser> {\r\n if (this._BabylonFileParsers[name]) {\r\n return this._BabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Adds n individual parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddIndividualParser(name: string, parser: IndividualBabylonFileParser): void {\r\n this._IndividualBabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets an individual parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetIndividualParser(name: string): Nullable<IndividualBabylonFileParser> {\r\n if (this._IndividualBabylonFileParsers[name]) {\r\n return this._IndividualBabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Parser json data and populate both a scene and its associated container object\r\n * @param jsonData Defines the data to parse\r\n * @param scene Defines the scene to parse the data for\r\n * @param container Defines the container attached to the parsing sequence\r\n * @param rootUrl Defines the root url of the data\r\n */\r\n public static Parse(jsonData: any, scene: Scene, container: AssetContainer, rootUrl: string): void {\r\n for (const parserName in this._BabylonFileParsers) {\r\n if (Object.prototype.hasOwnProperty.call(this._BabylonFileParsers, parserName)) {\r\n this._BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the list of root nodes (ie. nodes with no parent)\r\n */\r\n public rootNodes: Node[] = [];\r\n\r\n /** All of the cameras added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras\r\n */\r\n public cameras: Camera[] = [];\r\n\r\n /**\r\n * All of the lights added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\r\n */\r\n public lights: Light[] = [];\r\n\r\n /**\r\n * All of the (abstract) meshes added to this scene\r\n */\r\n public meshes: AbstractMesh[] = [];\r\n\r\n /**\r\n * The list of skeletons added to the scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\r\n */\r\n public skeletons: Skeleton[] = [];\r\n\r\n /**\r\n * All of the particle systems added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro\r\n */\r\n public particleSystems: IParticleSystem[] = [];\r\n\r\n /**\r\n * Gets a list of Animations associated with the scene\r\n */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * All of the animation groups added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations\r\n */\r\n public animationGroups: AnimationGroup[] = [];\r\n\r\n /**\r\n * All of the multi-materials added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials\r\n */\r\n public multiMaterials: MultiMaterial[] = [];\r\n\r\n /**\r\n * All of the materials added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addMaterial and removeMaterial Scene methods.\r\n * Note also that the order of the Material within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\r\n */\r\n public materials: Material[] = [];\r\n\r\n /**\r\n * The list of morph target managers added to the scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph\r\n */\r\n public morphTargetManagers: MorphTargetManager[] = [];\r\n\r\n /**\r\n * The list of geometries used in the scene.\r\n */\r\n public geometries: Geometry[] = [];\r\n\r\n /**\r\n * All of the transform nodes added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods.\r\n * Note also that the order of the TransformNode within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/transform_node\r\n */\r\n public transformNodes: TransformNode[] = [];\r\n\r\n /**\r\n * ActionManagers available on the scene.\r\n * @deprecated\r\n */\r\n public actionManagers: AbstractActionManager[] = [];\r\n\r\n /**\r\n * Textures to keep.\r\n */\r\n public textures: BaseTexture[] = [];\r\n\r\n /** @internal */\r\n protected _environmentTexture: Nullable<BaseTexture> = null;\r\n /**\r\n * Texture used in all pbr material as the reflection texture.\r\n * As in the majority of the scene they are the same (exception for multi room and so on),\r\n * this is easier to reference from here than from all the materials.\r\n */\r\n public get environmentTexture(): Nullable<BaseTexture> {\r\n return this._environmentTexture;\r\n }\r\n\r\n public set environmentTexture(value: Nullable<BaseTexture>) {\r\n this._environmentTexture = value;\r\n }\r\n\r\n /**\r\n * The list of postprocesses added to the scene\r\n */\r\n public postProcesses: PostProcess[] = [];\r\n\r\n /**\r\n * @returns all meshes, lights, cameras, transformNodes and bones\r\n */\r\n public getNodes(): Array<Node> {\r\n let nodes: Node[] = [];\r\n nodes = nodes.concat(this.meshes);\r\n nodes = nodes.concat(this.lights);\r\n nodes = nodes.concat(this.cameras);\r\n nodes = nodes.concat(this.transformNodes); // dummies\r\n this.skeletons.forEach((skeleton) => (nodes = nodes.concat(skeleton.bones)));\r\n return nodes;\r\n }\r\n}\r\n\r\n// Register Class Name\r\nRegisterClass(\"BABYLON.AbstractScene\", AbstractScene);\r\n"]}
|
|
1
|
+
{"version":3,"file":"ab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AI,CAAC,MAAM,CAAC,CAAC;QAClC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU;QACrD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7E,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAED,sBAAsB;AACtB,aAAa,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"./types\";\r\nimport type { AbstractMesh } from \"./Meshes/abstractMesh\";\r\nimport type { TransformNode } from \"./Meshes/transformNode\";\r\nimport type { Geometry } from \"./Meshes/geometry\";\r\nimport type { Skeleton } from \"./Bones/skeleton\";\r\nimport type { MorphTargetManager } from \"./Morph/morphTargetManager\";\r\nimport type { IParticleSystem } from \"./Particles/IParticleSystem\";\r\nimport type { AnimationGroup } from \"./Animations/animationGroup\";\r\nimport type { BaseTexture } from \"./Materials/Textures/baseTexture\";\r\nimport type { Material } from \"./Materials/material\";\r\nimport type { MultiMaterial } from \"./Materials/multiMaterial\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { Camera } from \"./Cameras/camera\";\r\nimport type { Light } from \"./Lights/light\";\r\nimport type { Node } from \"./node\";\r\nimport type { PostProcess } from \"./PostProcesses/postProcess\";\r\nimport type { Animation } from \"./Animations/animation\";\r\nimport { RegisterClass } from \"./Misc/typeStore\";\r\n\r\n/**\r\n * Base class of the scene acting as a container for the different elements composing a scene.\r\n * This class is dynamically extended by the different components of the scene increasing\r\n * flexibility and reducing coupling\r\n */\r\nexport abstract class AbstractScene {\r\n /**\r\n * Gets the list of root nodes (ie. nodes with no parent)\r\n */\r\n public rootNodes: Node[] = [];\r\n\r\n /** All of the cameras added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras\r\n */\r\n public cameras: Camera[] = [];\r\n\r\n /**\r\n * All of the lights added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\r\n */\r\n public lights: Light[] = [];\r\n\r\n /**\r\n * All of the (abstract) meshes added to this scene\r\n */\r\n public meshes: AbstractMesh[] = [];\r\n\r\n /**\r\n * The list of skeletons added to the scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\r\n */\r\n public skeletons: Skeleton[] = [];\r\n\r\n /**\r\n * All of the particle systems added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro\r\n */\r\n public particleSystems: IParticleSystem[] = [];\r\n\r\n /**\r\n * Gets a list of Animations associated with the scene\r\n */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * All of the animation groups added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations\r\n */\r\n public animationGroups: AnimationGroup[] = [];\r\n\r\n /**\r\n * All of the multi-materials added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials\r\n */\r\n public multiMaterials: MultiMaterial[] = [];\r\n\r\n /**\r\n * All of the materials added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addMaterial and removeMaterial Scene methods.\r\n * Note also that the order of the Material within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\r\n */\r\n public materials: Material[] = [];\r\n\r\n /**\r\n * The list of morph target managers added to the scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph\r\n */\r\n public morphTargetManagers: MorphTargetManager[] = [];\r\n\r\n /**\r\n * The list of geometries used in the scene.\r\n */\r\n public geometries: Geometry[] = [];\r\n\r\n /**\r\n * All of the transform nodes added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods.\r\n * Note also that the order of the TransformNode within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/transform_node\r\n */\r\n public transformNodes: TransformNode[] = [];\r\n\r\n /**\r\n * ActionManagers available on the scene.\r\n * @deprecated\r\n */\r\n public actionManagers: AbstractActionManager[] = [];\r\n\r\n /**\r\n * Textures to keep.\r\n */\r\n public textures: BaseTexture[] = [];\r\n\r\n /** @internal */\r\n protected _environmentTexture: Nullable<BaseTexture> = null;\r\n /**\r\n * Texture used in all pbr material as the reflection texture.\r\n * As in the majority of the scene they are the same (exception for multi room and so on),\r\n * this is easier to reference from here than from all the materials.\r\n */\r\n public get environmentTexture(): Nullable<BaseTexture> {\r\n return this._environmentTexture;\r\n }\r\n\r\n public set environmentTexture(value: Nullable<BaseTexture>) {\r\n this._environmentTexture = value;\r\n }\r\n\r\n /**\r\n * The list of postprocesses added to the scene\r\n */\r\n public postProcesses: PostProcess[] = [];\r\n\r\n /**\r\n * @returns all meshes, lights, cameras, transformNodes and bones\r\n */\r\n public getNodes(): Array<Node> {\r\n let nodes: Node[] = [];\r\n nodes = nodes.concat(this.meshes);\r\n nodes = nodes.concat(this.lights);\r\n nodes = nodes.concat(this.cameras);\r\n nodes = nodes.concat(this.transformNodes); // dummies\r\n this.skeletons.forEach((skeleton) => (nodes = nodes.concat(skeleton.bones)));\r\n return nodes;\r\n }\r\n}\r\n\r\n// Register Class Name\r\nRegisterClass(\"BABYLON.AbstractScene\", AbstractScene);\r\n"]}
|
package/package.json
CHANGED
package/Shaders/blur.fragment.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Do not edit.
|
|
2
|
-
import { ShaderStore } from "../Engines/shaderStore.js";
|
|
3
|
-
const name = "blurPixelShader";
|
|
4
|
-
const shader = `varying vec2 vUV;uniform sampler2D textureSampler;uniform vec2 screenSize;uniform vec2 direction;uniform float blurWidth;
|
|
5
|
-
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
6
|
-
void main(void)
|
|
7
|
-
{float weights[7];weights[0]=0.05;weights[1]=0.1;weights[2]=0.2;weights[3]=0.3;weights[4]=0.2;weights[5]=0.1;weights[6]=0.05;vec2 texelSize=vec2(1.0/screenSize.x,1.0/screenSize.y);vec2 texelStep=texelSize*direction*blurWidth;vec2 start=vUV-3.0*texelStep;vec4 baseColor=vec4(0.,0.,0.,0.);vec2 texelOffset=vec2(0.,0.);for (int i=0; i<7; i++)
|
|
8
|
-
{baseColor+=texture2D(textureSampler,start+texelOffset)*weights[i];texelOffset+=texelStep;}
|
|
9
|
-
gl_FragColor=baseColor;}`;
|
|
10
|
-
// Sideeffect
|
|
11
|
-
ShaderStore.ShadersStore[name] = shader;
|
|
12
|
-
/** @internal */
|
|
13
|
-
export const blurPixelShader = { name, shader };
|
|
14
|
-
//# sourceMappingURL=blur.fragment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blur.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/blur.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAC/B,MAAM,MAAM,GAAG;;;;;yBAKU,CAAC;AAC1B,aAAa;AACb,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC,gBAAgB;AAChB,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"blurPixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;uniform vec2 screenSize;uniform vec2 direction;uniform float blurWidth;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{float weights[7];weights[0]=0.05;weights[1]=0.1;weights[2]=0.2;weights[3]=0.3;weights[4]=0.2;weights[5]=0.1;weights[6]=0.05;vec2 texelSize=vec2(1.0/screenSize.x,1.0/screenSize.y);vec2 texelStep=texelSize*direction*blurWidth;vec2 start=vUV-3.0*texelStep;vec4 baseColor=vec4(0.,0.,0.,0.);vec2 texelOffset=vec2(0.,0.);for (int i=0; i<7; i++)\n{baseColor+=texture2D(textureSampler,start+texelOffset)*weights[i];texelOffset+=texelStep;}\ngl_FragColor=baseColor;}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const blurPixelShader = { name, shader };\n"]}
|