Named exports from ol/vec/Mat4
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
/**
|
||||
* @module ol/vec/Mat4
|
||||
*/
|
||||
var _ol_vec_Mat4_ = {};
|
||||
|
||||
|
||||
/**
|
||||
* @return {Array.<number>} 4x4 matrix representing a 3D identity transform.
|
||||
*/
|
||||
_ol_vec_Mat4_.create = function() {
|
||||
export function create() {
|
||||
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,7 +16,7 @@ _ol_vec_Mat4_.create = function() {
|
||||
* @param {ol.Transform} transform Transformation matrix.
|
||||
* @return {Array.<number>} 2D transformation matrix as flattened 4x4 matrix.
|
||||
*/
|
||||
_ol_vec_Mat4_.fromTransform = function(mat4, transform) {
|
||||
export function fromTransform(mat4, transform) {
|
||||
mat4[0] = transform[0];
|
||||
mat4[1] = transform[1];
|
||||
mat4[4] = transform[2];
|
||||
@@ -25,5 +24,4 @@ _ol_vec_Mat4_.fromTransform = function(mat4, transform) {
|
||||
mat4[12] = transform[4];
|
||||
mat4[13] = transform[5];
|
||||
return mat4;
|
||||
};
|
||||
export default _ol_vec_Mat4_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user