{"size": 1417, "ext": "js", "max_stars_repo_path": "App/demo/MeshVisualizer/index.js", "max_stars_repo_name": "wq8806/CesiumMeshVisualizer", "max_stars_repo_stars_event_min_datetime": "2022-01-04T03:00:43.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-04T03:00:43.000Z", "max_issues_repo_path": "App/demo/MeshVisualizer/index.js", "max_issues_repo_name": "wq8806/CesiumMeshVisualizer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "App/demo/MeshVisualizer/index.js", "max_forks_repo_name": "wq8806/CesiumMeshVisualizer", "max_forks_repo_forks_event_min_datetime": "2020-06-27T06:34:44.000Z", "max_forks_repo_forks_event_max_datetime": "2020-06-27T06:34:44.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 27.25, "max_line_length": 87, "alphanum_fraction": 0.6019760056}
/// <reference path="../common.js" />
  
//requirejs([
//       "../../../requirejs.config.js",
//       "../../../appconfig.js",
//       '../../../Source/Main',
//       '../common.js'
//], function (
//       config,
//       appconfig,
//       Cesium,
//       common
//       ) {
    MeshVisualizer = Cesium.MeshVisualizer;
    Mesh = Cesium.Mesh;
    MeshMaterial = Cesium.MeshMaterial;
    FramebufferTexture = Cesium.FramebufferTexture;
    GeometryUtils = Cesium.GeometryUtils;
    LOD = Cesium.LOD;

    init();

    var center = Cesium.Cartesian3.fromDegrees(homePosition[0], homePosition[1], 5000);
    var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);

    var meshVisualizer = new MeshVisualizer({
        modelMatrix: modelMatrix,
        up: { z: 1 }
    });
    viewer.scene.primitives.add(meshVisualizer);
    meshVisualizer.showReference = true;//显示坐标轴

    var material = new MeshMaterial({
        defaultColor: "rgba(200,0,0,1.0)",
        wireframe: true,
        side: MeshMaterial.Sides.FRONT
    });
    var geometry = new Cesium.SphereGeometry({
        radius: 50000.0,
        vertexFormat: Cesium.VertexFormat.POSITION_ONLY
    });
    var mesh = new Mesh(geometry, material);
    mesh.position.z += 50000  ;
    meshVisualizer.add(mesh);

    setInterval(function () {
        mesh.rotation.angle += 1;
        mesh.modelMatrixNeedsUpdate = true;
    }, 20);

//});
