Browse Source

删除unityApp组件

develop
徐振升 5 years ago
parent
commit
3efd76b56d
  1. 3
      angular.json
  2. 2
      src/app/ui/plan/plan.component.html
  3. 3
      src/app/ui/ui.module.ts
  4. 3
      src/app/ui/unity/unity.component.html
  5. 4
      src/app/ui/unity/unity.component.scss
  6. 25
      src/app/ui/unity/unity.component.spec.ts
  7. 59
      src/app/ui/unity/unity.component.ts
  8. BIN
      src/assets/images/progressEmpty.Dark.png
  9. BIN
      src/assets/images/progressFull.Dark.png
  10. 4
      src/assets/unityApp/Build/UnityLoader.js
  11. BIN
      src/assets/unityApp/Build/unityApp.data.unityweb
  12. 16
      src/assets/unityApp/Build/unityApp.json
  13. BIN
      src/assets/unityApp/Build/unityApp.wasm.code.unityweb
  14. BIN
      src/assets/unityApp/Build/unityApp.wasm.framework.unityweb
  15. 4767
      src/assets/unityApp/StreamingAssets/222.json
  16. BIN
      src/assets/unityApp/StreamingAssets/222.png
  17. BIN
      src/assets/unityApp/StreamingAssets/aa/WebGL/WebGL/defaultlocalgroup_assets_all_a7fc1d4da475174ae32d3537fc5f8424.bundle
  18. 1
      src/assets/unityApp/StreamingAssets/aa/WebGL/catalog.json
  19. 114
      src/assets/unityApp/StreamingAssets/aa/WebGL/link.xml
  20. 1
      src/assets/unityApp/StreamingAssets/aa/WebGL/settings.json
  21. 24
      src/assets/unityApp/TemplateData/UnityProgress.js
  22. BIN
      src/assets/unityApp/TemplateData/favicon.ico
  23. BIN
      src/assets/unityApp/TemplateData/fullscreen.png
  24. BIN
      src/assets/unityApp/TemplateData/progressEmpty.Dark.png
  25. BIN
      src/assets/unityApp/TemplateData/progressEmpty.Light.png
  26. BIN
      src/assets/unityApp/TemplateData/progressFull.Dark.png
  27. BIN
      src/assets/unityApp/TemplateData/progressFull.Light.png
  28. BIN
      src/assets/unityApp/TemplateData/progressLogo.Dark.png
  29. BIN
      src/assets/unityApp/TemplateData/progressLogo.Light.png
  30. 18
      src/assets/unityApp/TemplateData/style.css
  31. BIN
      src/assets/unityApp/TemplateData/webgl-logo.png
  32. 25
      src/assets/unityApp/index.html

3
angular.json

@ -34,8 +34,7 @@
],
"scripts": [
"node_modules/echarts/dist/echarts.js",
"./node_modules/swiper/js/swiper.min.js",
"src/assets/unityApp/Build/UnityLoader.js"
"./node_modules/swiper/js/swiper.min.js"
]
},
"configurations": {

2
src/app/ui/plan/plan.component.html

@ -1 +1 @@
<app-unity></app-unity>
<!-- <app-unity></app-unity> -->

3
src/app/ui/ui.module.ts

@ -94,10 +94,9 @@ import { ImagesData } from './fire-fighting-device/imagesdata.component';
import { ImgsDataDetail } from './fire-fighting-device/imgsdatadetail.component';
import { KeySiteImgs } from './key-site/keysiteimgs.component';
import { KeyImgDetail } from './key-site/keyimgdetail.component';
import { UnityComponent} from './unity/unity.component';
@NgModule({
declarations: [UiComponent, CardComponent, StepperComponent, TabgroupComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,EditRole,TimePipe,CreateNewUser,EditNewUser,allRoles,SharePower,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, BasicinfoComponent, PlanComponent, AllaroundComponent, FireFightingDeviceComponent, KeySiteComponent, FunctionDivisionComponent, RealisticPictureComponent, UploadingCADComponent,AddHouseInfo,ImgDetails,ImagesData,ImgsDataDetail,KeySiteImgs,KeyImgDetail,addPartition,addPartitionAttribute,previewImg,addRealPicture,editRealPicture,UnityComponent,readFile,editFile
declarations: [UiComponent, CardComponent, StepperComponent, TabgroupComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,EditRole,TimePipe,CreateNewUser,EditNewUser,allRoles,SharePower,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, BasicinfoComponent, PlanComponent, AllaroundComponent, FireFightingDeviceComponent, KeySiteComponent, FunctionDivisionComponent, RealisticPictureComponent, UploadingCADComponent,AddHouseInfo,ImgDetails,ImagesData,ImgsDataDetail,KeySiteImgs,KeyImgDetail,addPartition,addPartitionAttribute,previewImg,addRealPicture,editRealPicture,readFile,editFile
],
imports: [

3
src/app/ui/unity/unity.component.html

@ -1,3 +0,0 @@
<div class="webgl-content">
<div id="unityContainer"></div>
</div>

4
src/app/ui/unity/unity.component.scss

@ -1,4 +0,0 @@
#unityContainer{
width: 100%;
height: 100%;
}

25
src/app/ui/unity/unity.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { UnityComponent } from './unity.component';
describe('UnityComponent', () => {
let component: UnityComponent;
let fixture: ComponentFixture<UnityComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ UnityComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(UnityComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

59
src/app/ui/unity/unity.component.ts

@ -1,59 +0,0 @@
import { Component, OnInit } from '@angular/core';
declare var UnityLoader: any;
declare var window: Window & { getCookie: any };
@Component({
selector: 'app-unity',
templateUrl: './unity.component.html',
styleUrls: ['./unity.component.scss']
})
export class UnityComponent implements OnInit {
public unityInstance: any = {};
constructor() {
//window.getCookie = this.getCookie.bind(this);
}
// progressValue = 0;
ngOnInit(): void {
this.unityInstance = UnityLoader.instantiate('unityContainer', 'assets/unityApp/Build/unityApp.json');
//this.progressValue = 50;
}
// ngAfterViewInit ( ): void {
// }
// ///
// UnityProgress(unityInstance, progress) {
// if (!unityInstance.Module)
// return;
// this.progressValue = 100;
// console.log(this.progressValue);
// if (progress == 1)
// unityInstance.SendMessage("GameManager", "ShowMainView");
// }
// //发送单位id
// sendCompanyId(){
// var companyId = sessionStorage.getItem('companyId');
// this.unityInstance.SendMessage("GameManager","SetCompanyId",)
// }
// CallUnity(): void {
// console.log('修改progressValue的值为'+this.progressValue);
// }
// public SendMessage(objectName: string, methodName: string): void {
// this.unityInstance.SendMessage(objectName, methodName);
// }
}

BIN
src/assets/images/progressEmpty.Dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

BIN
src/assets/images/progressFull.Dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

4
src/assets/unityApp/Build/UnityLoader.js

File diff suppressed because one or more lines are too long

BIN
src/assets/unityApp/Build/unityApp.data.unityweb

Binary file not shown.

16
src/assets/unityApp/Build/unityApp.json

@ -1,16 +0,0 @@
{
"companyName": "DefaultCompany",
"productName": "2DPlanMakingTool",
"productVersion": "0.1",
"dataUrl": "unityApp.data.unityweb",
"wasmCodeUrl": "unityApp.wasm.code.unityweb",
"wasmFrameworkUrl": "unityApp.wasm.framework.unityweb",
"graphicsAPI": ["WebGL 2.0","WebGL 1.0"],
"webglContextAttributes": {"preserveDrawingBuffer": false},
"splashScreenStyle": "Dark",
"backgroundColor": "#231F20",
"cacheControl": {"default": "must-revalidate"},
"developmentBuild": false,
"multithreading": false,
"unityVersion": "2019.3.2f1"
}

BIN
src/assets/unityApp/Build/unityApp.wasm.code.unityweb

Binary file not shown.

BIN
src/assets/unityApp/Build/unityApp.wasm.framework.unityweb

Binary file not shown.

4767
src/assets/unityApp/StreamingAssets/222.json

File diff suppressed because it is too large Load Diff

BIN
src/assets/unityApp/StreamingAssets/222.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

BIN
src/assets/unityApp/StreamingAssets/aa/WebGL/WebGL/defaultlocalgroup_assets_all_a7fc1d4da475174ae32d3537fc5f8424.bundle

Binary file not shown.

1
src/assets/unityApp/StreamingAssets/aa/WebGL/catalog.json

File diff suppressed because one or more lines are too long

114
src/assets/unityApp/StreamingAssets/aa/WebGL/link.xml

@ -1,114 +0,0 @@
<linker>
<assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.GameObject" preserve="all" />
<type fullname="UnityEngine.Material" preserve="all" />
<type fullname="UnityEngine.Texture2D" preserve="all" />
<type fullname="UnityEngine.Sprite" preserve="all" />
<type fullname="UnityEngine.RectTransform" preserve="all" />
<type fullname="UnityEngine.U2D.SpriteAtlas" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Rigidbody2D" preserve="all" />
<type fullname="UnityEngine.PolygonCollider2D" preserve="all" />
<type fullname="UnityEngine.BoxCollider2D" preserve="all" />
<type fullname="UnityEngine.CompositeCollider2D" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.AnimationClip" preserve="all" />
<type fullname="UnityEngine.RuntimeAnimatorController" preserve="all" />
<type fullname="UnityEngine.Animator" preserve="all" />
</assembly>
<assembly fullname="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="MultipleAssetIcon" preserve="all" />
<type fullname="Config" preserve="all" />
<type fullname="MessageInput" preserve="all" />
<type fullname="MultipleClosedAssetIcon" preserve="all" />
<type fullname="DisastersViewItemItem" preserve="all" />
<type fullname="ColorBoard" preserve="all" />
<type fullname="UIViewAddBuilding" preserve="all" />
<type fullname="UIViewMain" preserve="all" />
<type fullname="Point" preserve="all" />
<type fullname="AssetInfoItem" preserve="all" />
<type fullname="DropdownControl" preserve="all" />
<type fullname="DragUGUI2" preserve="all" />
<type fullname="TextBoxAsset" preserve="all" />
<type fullname="ExpandViewItem" preserve="all" />
<type fullname="ExpandViewOneOrTwoItem" preserve="all" />
<type fullname="UIFloorControl" preserve="all" />
<type fullname="AssetLibItem" preserve="all" />
<type fullname="BooleanControl" preserve="all" />
<type fullname="ExpandView" preserve="all" />
<type fullname="FillingArea" preserve="all" />
<type fullname="WorkingArea" preserve="all" />
<type fullname="CanvasSampleOpenFileImage" preserve="all" />
<type fullname="Arrows" preserve="all" />
<type fullname="DisastersViewItem" preserve="all" />
<type fullname="BuildingFloor" preserve="all" />
<type fullname="SinglepointIcon" preserve="all" />
<type fullname="ImageBrowser" preserve="all" />
<type fullname="UIViewLoading" preserve="all" />
<type fullname="BuildingTab" preserve="all" />
<type fullname="UIViewMessageYesNo" preserve="all" />
<type fullname="UIViewAddBuildingFloor" preserve="all" />
<type fullname="XTreeView.TreeViewControl" preserve="all" />
<type fullname="SelfAdaptionInputField" preserve="all" />
<type fullname="Floor" preserve="all" />
<type fullname="NewBehaviourScript" preserve="all" />
<type fullname="AngleInputField" preserve="all" />
<type fullname="AssetPropertiesView" preserve="all" />
<type fullname="XTreeView.TreeViewItem" preserve="all" />
<type fullname="SitePlanTab" preserve="all" />
<type fullname="CustomButton" preserve="all" />
<type fullname="SitePlanFloor" preserve="all" />
<type fullname="InputField_WebGL" preserve="all" />
<type fullname="MessageBox" preserve="all" />
<type fullname="UIViewCreateBackground" preserve="all" />
<type fullname="Line" preserve="all" />
<type fullname="Tips" preserve="all" />
<type fullname="SetOutline" preserve="all" />
<type fullname="WebGLOpenFileButton" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.UI.Text" preserve="all" />
<type fullname="UnityEngine.UI.Scrollbar" preserve="all" />
<type fullname="UnityEngine.UI.Image" preserve="all" />
<type fullname="UnityEngine.UI.GridLayoutGroup" preserve="all" />
<type fullname="UnityEngine.UI.ContentSizeFitter" preserve="all" />
<type fullname="UnityEngine.UI.LayoutElement" preserve="all" />
<type fullname="UnityEngine.UI.Mask" preserve="all" />
<type fullname="UnityEngine.UI.ScrollRect" preserve="all" />
<type fullname="UnityEngine.UI.Button" preserve="all" />
<type fullname="UnityEngine.UI.RawImage" preserve="all" />
<type fullname="UnityEngine.UI.VerticalLayoutGroup" preserve="all" />
<type fullname="UnityEngine.UI.InputField" preserve="all" />
<type fullname="UnityEngine.UI.HorizontalLayoutGroup" preserve="all" />
<type fullname="UnityEngine.UI.Outline" preserve="all" />
<type fullname="UnityEngine.UI.Dropdown" preserve="all" />
<type fullname="UnityEngine.UI.Toggle" preserve="all" />
<type fullname="UnityEngine.UI.Slider" preserve="all" />
<type fullname="UnityEngine.UI.ToggleGroup" preserve="all" />
</assembly>
<assembly fullname="UniRx, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UniRx.Triggers.ObservableDestroyTrigger" preserve="all" />
</assembly>
<assembly fullname="UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEditor.MonoScript" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Font" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.UIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.CanvasRenderer" preserve="all" />
<type fullname="UnityEngine.CanvasGroup" preserve="all" />
</assembly>
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
</assembly>
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
</assembly>
</linker>

1
src/assets/unityApp/StreamingAssets/aa/WebGL/settings.json

@ -1 +0,0 @@
{"m_buildTarget":"WebGL","m_SettingsHash":"","m_CatalogLocations":[{"m_Keys":["AddressablesMainContentCatalog"],"m_InternalId":"{UnityEngine.AddressableAssets.Addressables.RuntimePath}/catalog.json","m_Provider":"UnityEngine.AddressableAssets.ResourceProviders.ContentCatalogProvider","m_Dependencies":[],"m_ResourceType":{"m_AssemblyName":"Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData"}}],"m_ProfileEvents":false,"m_LogResourceManagerExceptions":true,"m_ExtraInitializationData":[],"m_DisableCatalogUpdateOnStart":false,"m_CertificateHandlerType":{"m_AssemblyName":"","m_ClassName":""}}

24
src/assets/unityApp/TemplateData/UnityProgress.js

@ -1,24 +0,0 @@
function UnityProgress(unityInstance, progress) {
if (!unityInstance.Module)
return;
if (!unityInstance.logo) {
unityInstance.logo = document.createElement("div");
unityInstance.logo.className = "logo " + unityInstance.Module.splashScreenStyle;
unityInstance.container.appendChild(unityInstance.logo);
}
if (!unityInstance.progress) {
unityInstance.progress = document.createElement("div");
unityInstance.progress.className = "progress " + unityInstance.Module.splashScreenStyle;
unityInstance.progress.empty = document.createElement("div");
unityInstance.progress.empty.className = "empty";
unityInstance.progress.appendChild(unityInstance.progress.empty);
unityInstance.progress.full = document.createElement("div");
unityInstance.progress.full.className = "full";
unityInstance.progress.appendChild(unityInstance.progress.full);
unityInstance.container.appendChild(unityInstance.progress);
}
unityInstance.progress.full.style.width = (100 * progress) + "%";
unityInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
if (progress == 1)
unityInstance.logo.style.display = unityInstance.progress.style.display = "none";
}

BIN
src/assets/unityApp/TemplateData/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

BIN
src/assets/unityApp/TemplateData/fullscreen.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

BIN
src/assets/unityApp/TemplateData/progressEmpty.Dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

BIN
src/assets/unityApp/TemplateData/progressEmpty.Light.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

BIN
src/assets/unityApp/TemplateData/progressFull.Dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

BIN
src/assets/unityApp/TemplateData/progressFull.Light.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

BIN
src/assets/unityApp/TemplateData/progressLogo.Dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/unityApp/TemplateData/progressLogo.Light.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

18
src/assets/unityApp/TemplateData/style.css

@ -1,18 +0,0 @@
.webgl-content * {border: 0; margin: 0; padding: 0}
.webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;}
.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;}
.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;}
.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;}
.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');}
.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');}
.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');}
.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;}
.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;}
.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;}
.webgl-content .footer .title {margin-right: 10px; float: right;}
.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;}

BIN
src/assets/unityApp/TemplateData/webgl-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

25
src/assets/unityApp/index.html

@ -1,25 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | 2DPlanMakingTool</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script>
<script src="Build/UnityLoader.js"></script>
<script>
var unityInstance = UnityLoader.instantiate("unityContainer", "Build/unityApp.json", {onProgress: UnityProgress});
</script>
</head>
<body>
<div class="webgl-content">
<div id="unityContainer" style="width: 1024px; height: 768px"></div>
<div class="footer">
<div class="webgl-logo"></div>
<div class="fullscreen" onclick="unityInstance.SetFullscreen(1)"></div>
<div class="title">2DPlanMakingTool</div>
</div>
</div>
</body>
</html>
Loading…
Cancel
Save