function WMTS_Provider(options) { //Constructor Provider.call(this, new IoDriver_XBIL()); this.cache = CacheRessource(); this.ioDriverImage = new IoDriver_Image(); this.ioDriverXML = new IoDriverXML(); this.projection = new Projection(); this.support = options.support || false; this.getTextureFloat; if (this.support) this.getTextureFloat = function() { return new THREE.Texture(); }; else this.getTextureFloat = function(buffer) { // Start float to RGBA uint8 //var bufferUint = new Uint8Array(buffer.buffer); // var texture = new THREE.DataTexture(bufferUint, 256, 256); var texture = new THREE.DataTexture(buffer, 256, 256, THREE.AlphaFormat, THREE.FloatType); texture.needsUpdate = true; return texture; }; }
function TileProvider(ellipsoid) { //Constructor Provider.call(this, null); this.projection = new Projection(); this.ellipsoid = ellipsoid; this.builder = new BuilderEllipsoidTile(this.ellipsoid, this.projection); this.cacheGeometry = []; this.tree = null; this.nNode = 0; }
/** * Return url wmts MNT * @param {String} options.url: service base url * @param {String} options.layer: requested data layer * @param {String} options.format: image format (default: format/jpeg) * @returns {Object@call;create.url.url|String} */ function WMS_Provider(options) { //Constructor Provider.call(this, new IoDriver_XBIL()); this.cache = CacheRessource(); this.ioDriverImage = new IoDriver_Image(); this.ioDriverXML = new IoDriverXML(); this.baseUrl = options.url || ""; this.layer = options.layer || ""; this.format = defaultValue(options.format, "image/jpeg"); this.srs = options.srs || ""; this.width = defaultValue(options.width, 256); this.height = defaultValue(options.height, 256); }
/** * Return url wmts MNT * @param {String} options.url: service base url * @param {String} options.layer: requested data layer * @param {String} options.format: image format (default: format/jpeg) * @returns {Object@call;create.url.url|String} */ function WMS_Provider(/*options*/) { //Constructor Provider.call(this, new IoDriver_XBIL()); this.cache = CacheRessource(); this.ioDriverImage = new IoDriver_Image(); this.ioDriverXML = new IoDriverXML(); this.projection = new Projection(); this.getTextureFloat = function(buffer){ // Start float to RGBA uint8 var texture = new THREE.DataTexture(buffer, 256, 256, THREE.AlphaFormat, THREE.FloatType); texture.needsUpdate = true; return texture; }; }