Skip to content

Instantly share code, notes, and snippets.

@todashuta
Created November 25, 2022 15:13
Show Gist options
  • Select an option

  • Save todashuta/c95de300dbf030f5ecd7cae6c2c789a3 to your computer and use it in GitHub Desktop.

Select an option

Save todashuta/c95de300dbf030f5ecd7cae6c2c789a3 to your computer and use it in GitHub Desktop.
3D Tiles の tileset.json の transform に書く内容を出力してみる
// 3D Tiles の tileset.json の transform に書く内容を出力してみる
//
// deno で npm が使えるようになったのでお手軽になった
// Vim で :QuickRun typescript/deno とかする
//
// See: https://groups.google.com/g/cesium-dev/c/0K_RXY0gIM4
import * as Cesium from "npm:cesium";
const lon = 175.3050519951; // 経度
const lat = -41.1948830262; // 緯度
const height = 0;
const loc = Cesium.Cartesian3.fromDegrees(lon, lat, height);
const tf = Cesium.Transforms.eastNorthUpToFixedFrame(loc);
console.log(JSON.stringify(Array.from(tf), null, 4));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment