r3-legacy/bak/r3-d3-api-mesh-curve.js

59 lines
1.4 KiB
JavaScript

/**
* R3.D3.API.Mesh.Curve
* @constructor
* @param apiMesh
* @param pointSize
*/
R3.D3.API.Mesh.Curve = function(
apiMesh,
pointSize
) {
if (R3.Utils.UndefinedOrNull(apiMesh)) {
apiMesh = {
meshType : R3.D3.API.Mesh.MESH_TYPE_CURVE
};
}
if (R3.Utils.UndefinedOrNull(apiMesh.meshType)) {
apiMesh.meshType = R3.D3.API.Mesh.MESH_TYPE_CURVE;
}
if (R3.Utils.UndefinedOrNull(pointSize)) {
pointSize = 1;
}
this.pointSize = pointSize;
R3.D3.API.Mesh.call(
this,
apiMesh.id,
apiMesh.name,
apiMesh.meshType,
apiMesh.excludeFromEnvironment,
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
);
};
R3.D3.API.Mesh.Curve.prototype = Object.create(R3.D3.API.Mesh.prototype);
R3.D3.API.Mesh.Curve.prototype.constructor = R3.D3.API.Mesh.Curve;