Constructor
new CoordinateMapper(params)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
- Source:
Methods
convertLocalAngleToSurface(a) → {Number}
Converts a local angle to output surface angle
Parameters:
Name | Type | Description |
---|---|---|
a |
Number | The local angle |
- Source:
Returns:
The transformed angle
- Type
- Number
convertLocalToSurface(x, y) → {Object}
Converts a local coordinate to the output surface space
Parameters:
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number |
- Source:
Returns:
The transformed coordinate
- Type
- Object
convertSurfaceToLocal(x, y) → {Object}
Converts a output surface coordinate to the local space
Parameters:
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number |
- Source:
Returns:
The transformed coordinate
- Type
- Object
isCounterClockwise()
- Source:
Returns:
True, if angles are measured counter-clockwise on the output surface, false otherwise
scalingLocalToSurface() → {Number}
The scaling factor that scales local lengths to the output surface space.
The viewport is uniformly scaled, so it is just a single value
- Source:
Returns:
The scaling factor
- Type
- Number
scalingSurfaceToLocal() → {Number}
The scaling factor that scales local lengths to the output surface space.
The viewport is uniformly scaled, so it is just a single value
- Source:
Returns:
The scaling factor
- Type
- Number
updateViewport(params)
Update the visible viewport
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
- Source: