Explorar o código

create SceneAssetContainer class

Trevor Baron %!s(int64=7) %!d(string=hai) anos
pai
achega
ac8164c975
Modificáronse 1 ficheiros con 66 adicións e 0 borrados
  1. 66 0
      src/babylon.scene.ts

+ 66 - 0
src/babylon.scene.ts

@@ -3,6 +3,72 @@
         dispose(): void;
     }
 
+    export class SceneAssetContainer {
+            public scene: Scene;
+
+            // Config
+            public useDelayedTextureLoading:boolean;
+            public autoClear:boolean;
+            public clearColor:Color4;
+            public ambientColor:Color3;
+            public metadata:any;
+            public activeCameraID:string;
+
+            // Physics
+            public gravity:Vector3;
+            public physicsGravity:Nullable<Vector3>;
+            public physicsPluginName:string;
+            public enablePhysics: boolean;
+            public collisionsEnabled:boolean;
+            public workerCollisions:boolean;
+
+            // Fog
+            public fogMode:number;
+            public fogColor:Color3;
+            public fogStart:number;
+            public fogEnd:number;
+            public fogDensity:number;
+
+            // Animation
+            public autoAnimate:boolean;
+            public autoAnimateFrom:number;
+            public autoAnimateTo:number;
+            public autoAnimateLoop:number;
+            public autoAnimateSpeed:number;
+
+            // Skybox
+            public createDefaultSkybox:boolean;
+            public environmentTexture:BaseTexture;
+            public skyboxBlurLevel:number;
+
+            // Objects
+            public cameras = new Array<Camera>();
+            public lights = new Array<Light>();
+            public meshes = new Array<AbstractMesh>();
+            public skeletons = new Array<Skeleton>();
+            public particleSystems = new Array<ParticleSystem>();
+            public animations = new Array<Animation>();
+            public multiMaterials = new Array<MultiMaterial>();
+            public materials = new Array<Material>();
+            public morphTargetManagers = new Array<MorphTargetManager>();
+            public geometries = new Array<Geometry>();
+            public transformNodes = new Array<TransformNode>();
+            public lensFlareSystems = new Array<LensFlareSystem>();
+            public shadowGenerators = new Array<ShadowGenerator>();
+            public actionManagers = new Array<ActionManager>();
+            
+            constructor(scene:Scene){
+                this.scene = scene;
+            }
+            
+            addAllToScene(){
+                // TODO
+            }
+            removeAllFromScene(){
+                // TODO
+            }
+        }
+
     export interface IActiveMeshCandidateProvider {
         getMeshes(scene: Scene): AbstractMesh[];
         readonly checksIsEnabled: boolean; // Indicates if the meshes have been checked to make sure they are isEnabled().