/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import"../../../../core/has.js";import{estimateNestedObjectMemory as e}from"../../../../core/memoryEstimations.js";import{Seconds as t}from"../../../../core/time.js";import{fadeOutTime as s}from"./constants.js";import{FlowQuery3D as r}from"./FlowQuery3D.js";class i{constructor(e,s,r,i,m){this._query=e,this.streamlines=s,this._material=r,this.geometries=i,this._bytesPerFeature=m,this._endTime=t(1/0),this.usedMemory=null,this.computeMemory()}computeMemory(){const t=e(this.streamlines),s=e(this.geometries.map(e=>e.attributes)),r=this.streamlines.length*this._bytesPerFeature;this.usedMemory=t+s+r}get startTime(){return this._query.time}set startTime(e){this._query.time!==e&&(this._query=new r(this._query.extent,this._query.timeExtent,this._query.size,this._query.pixelRatio,t(e))),this.setMaterialParameters({startTime:e})}get endTime(){return this._endTime}set endTime(e){this._endTime!==e&&(this._endTime=e,this.setMaterialParameters({endTime:e}))}get query(){return this._query}hasFadedOut(e){return this.endTime+s<e}setMaterialParameters(e){this._material.setParameters(e)}get test(){return null}}export{i as StreamlineResources3D};
