12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- function Layer3D(layer)
- {
- this.layer = layer;
-
- this.paint = {
- value:null,
- beginPaint:false,
- currentId:null
- };
-
- //模型集合
- this.collectMeshes = {
- //能够引起碰撞的mesh
- collidableMeshes:[],
- //软饰
- softDecorationMeshes:[],
- //门、窗、墙、地板等等
- roomWallMeshes:[],
- glassBoxMeshes:[],
- //编辑模型的时候,出现的箭头
- arrowMeshes:[]
- };
-
- this.scene3D = new Scene3D();
- this.materials;
- this.decorate3D;
- this.modelLoader;
- this.action3D;
-
- };
- Layer3D.prototype.clearSymbol=function()
- {
-
- for(var i=0;i<this.collectMeshes.collidableMeshes.length;++i)
- {
- if(this.collectMeshes.collidableMeshes[i].name=="plane")
- {
- this.collectMeshes.collidableMeshes[i].dispose();
- this.collectMeshes.collidableMeshes.splice(i, 1);
- --i;
- }
-
- }
-
- for(var i=0;i<this.collectMeshes.roomWallMeshes.length;++i)
- {
- this.collectMeshes.roomWallMeshes[i].dispose();
- }
- };
- Layer3D.prototype.initialize = function ()
- {
- this.scene3D.createScene();
-
- this.materials = new Material(this);
- this.materials.initialize();
-
- this.decorate3D = new decorate3D(this);
- this.decorate3D.addSkybox();
- this.decorate3D.addGround();
-
- this.modelLoader = new ModelLoader(this);
-
- this.action3D = new Action3D(this);
- this.action3D.active();
- };
|