创建新仓库
This commit is contained in:
		
							
								
								
									
										58
									
								
								dist/electron/static/example/加载tileset.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								dist/electron/static/example/加载tileset.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,58 @@ | ||||
| <!-- | ||||
|  * @name:  | ||||
|  * @author: zh | ||||
|  * @date: Do not edit | ||||
|  * @update: Do not edit | ||||
|  * @description:  | ||||
| --> | ||||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|     <meta charset="UTF-8"> | ||||
|     <title>加载tileset</title> | ||||
|     <script src="../sdk/YJEarth.min.js"></script> | ||||
|     <script src="vue.js"></script> | ||||
|     <style> | ||||
|         body { | ||||
|             width: 100%; | ||||
|             height: 100%; | ||||
|         } | ||||
|     </style> | ||||
| </head> | ||||
| <body> | ||||
| <div id="app" class="fullSize"> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
|  | ||||
| <script> | ||||
|     new Vue({ | ||||
|         el: "#app", | ||||
|         data: { | ||||
|             sdk: null, | ||||
|         }, | ||||
|         async mounted() { | ||||
|             await YJ.on({host: "http://localhost:8894"}) | ||||
|             this.createEarth() | ||||
|             await this.addTileset() | ||||
|         }, | ||||
|         methods: { | ||||
|             createEarth() { | ||||
|                 window.sdk = new YJ.YJEarth("app") | ||||
|             }, | ||||
|             async addTileset() { | ||||
|                 let tileset = new YJ.Obj.Tileset(window.sdk, { | ||||
|                     show: true, | ||||
|                     url: "https://lab.earthsdk.com/model/8c5299e0ce5f11eab7a4adf1d6568ff7/tileset.json" | ||||
|                 }) | ||||
|                 await tileset.on() | ||||
|                 tileset.flyTo() | ||||
|                 tileset.edit(true) | ||||
|                 // tileset.rotationEditingCallBack = (params)=>{ | ||||
|                 //    console.log(params) | ||||
|                 // } | ||||
|             } | ||||
|         } | ||||
|     }) | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user