2018-01-30 15:02:47 +01:00
|
|
|
/**
|
|
|
|
* GameLib.D3.API.Mesh.Line
|
|
|
|
* @constructor
|
|
|
|
* @param apiMesh
|
|
|
|
* @param lineWidth
|
|
|
|
*/
|
|
|
|
GameLib.D3.API.Mesh.Line = function(
|
|
|
|
apiMesh,
|
|
|
|
lineWidth
|
|
|
|
) {
|
|
|
|
|
|
|
|
if (GameLib.Utils.UndefinedOrNull(apiMesh)) {
|
|
|
|
apiMesh = {
|
|
|
|
meshType : GameLib.D3.API.Mesh.MESH_TYPE_LINE
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
if (GameLib.Utils.UndefinedOrNull(apiMesh.meshType)) {
|
|
|
|
apiMesh.meshType = GameLib.D3.API.Mesh.MESH_TYPE_LINE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (GameLib.Utils.UndefinedOrNull(lineWidth)) {
|
|
|
|
lineWidth = 1;
|
|
|
|
}
|
|
|
|
this.lineWidth = lineWidth;
|
|
|
|
|
|
|
|
GameLib.D3.API.Mesh.call(
|
|
|
|
this,
|
|
|
|
apiMesh.id,
|
|
|
|
apiMesh.name,
|
|
|
|
apiMesh.meshType,
|
2018-02-08 14:21:31 +01:00
|
|
|
apiMesh.excludeFromEnvironment,
|
2018-01-30 15:02:47 +01:00
|
|
|
apiMesh.vertices,
|
|
|
|
apiMesh.faces,
|
|
|
|
apiMesh.materials,
|
|
|
|
apiMesh.parentMesh,
|
|
|
|
apiMesh.parentScene,
|
|
|
|
apiMesh.skeleton,
|
|
|
|
apiMesh.skinIndices,
|
|
|
|
apiMesh.skinWeights,
|
|
|
|
apiMesh.position,
|
|
|
|
apiMesh.quaternion,
|
|
|
|
apiMesh.rotation,
|
|
|
|
apiMesh.scale,
|
|
|
|
apiMesh.up,
|
|
|
|
apiMesh.modelMatrix,
|
|
|
|
apiMesh.renderOrder,
|
|
|
|
apiMesh.isBufferMesh,
|
|
|
|
apiMesh.useQuaternion,
|
|
|
|
apiMesh.visible,
|
|
|
|
apiMesh.castShadow,
|
|
|
|
apiMesh.receiveShadow,
|
|
|
|
apiMesh.parentEntity
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
GameLib.D3.API.Mesh.Line.prototype = Object.create(GameLib.D3.API.Mesh.prototype);
|
|
|
|
GameLib.D3.API.Mesh.Line.prototype.constructor = GameLib.D3.API.Mesh.Line;
|