/** * R3.D3.Mesh.Curve * @param graphics R3.GraphicsRuntime * @param apiMeshCurve * @constructor */ R3.D3.Mesh.Curve = function ( graphics, apiMeshCurve ) { this.graphics = graphics; this.graphics.isNotThreeThrow(); if (R3.Utils.UndefinedOrNull(apiMeshCurve)) { apiMeshCurve = { meshType: R3.D3.API.Mesh.MESH_TYPE_CURVE }; } R3.D3.API.Mesh.Curve.call( this, apiMeshCurve, apiMeshCurve.pointSize ); R3.D3.Mesh.call( this, this.graphics, this ); }; R3.D3.Mesh.Curve.prototype = Object.create(R3.D3.Mesh.prototype); R3.D3.Mesh.Curve.prototype.constructor = R3.D3.Mesh.Curve; R3.D3.Mesh.Curve.prototype.createInstance = function() { console.warn('todo: not fully implemented'); this.instance = true; return; // var geometry = new THREE.Geometry(); // // /** // * Setup vertices // */ // this.applyVertexDataToInstance(geometry); // // var instance = new THREE.Points(geometry); // // this.createInstanceDefaults(instance); // // return instance; }; /** * Converts a R3.D3.Mesh.Curve to a R3.D3.API.Mesh.Curve * @returns {R3.D3.API.Mesh.Curve} */ R3.D3.Mesh.Curve.prototype.toApiObject = function() { var apiMesh = R3.D3.Mesh.prototype.toApiObject.call(this); var apiMeshCurve = new R3.D3.API.Mesh.Curve( apiMesh, this.pointSize ); return apiMeshCurve; };