izurvive sdk
1.0.0
iZurvive は、DayZ のゲーム内座標系とは異なる地理座標系 (緯度、経度) を使用します。
さらに、変換は DayZ マップに依存します。
IzurviveTransformation
を使用して、次の座標系間で変換します。
const { IzurviveTransformation } = require ( './lib/izurvive' )
const { Point , Coordinate } = require ( './lib/model' )
// Transform the DayZ Coordinate 1500 2500 on Chernarus Plus to iZurvive Coordinates
const dayzPoint = new Point ( 1500 , 2500 )
const transformation = IzurviveTransformation . chernarusPlus ( )
const izurviveCoordinate = transformation . dayzPointToIzurviveCoordinate ( dayzPoint )
const { IzurviveTransformation } = require ( './lib/izurvive' )
const { Point , Coordinate } = require ( './lib/model' )
// Transform the iZurvive Coordinate (-50, 30) to DayZ Coordinates on Livonia
const izurviveCoordinate = new Coordinate ( - 50 , 30 )
const transformation = IzurviveTransformation . livonia ( )
const dayzPoint = transformation . izurviveCoordinateToDayzPoint ( izurviveCoordinate )