Skip to content

Commit

Permalink
fixed documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
IanLilleyT committed Jan 7, 2020
1 parent d1bd5ba commit 5600a18
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions Source/Scene/Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ import when from '../ThirdParty/when.js';
* @param {Boolean} [options.strict=false] Throws errors for issues that would normally be ignored, including unused uniforms or materials.
* @param {Boolean|Function} [options.translucent=true] When <code>true</code> or a function that returns <code>true</code>, the geometry
* with this material is expected to appear translucent.
* @param {TextureMinificationFilter} [options.minificationFilter=TextureMinificationFilter.LINEAR] The {@link TextureMinificationFilter} to apply to this material's textures.
* @param {TextureMagnificationFilter} [options.magnificationFilter=TextureMagnificationFilter.LINEAR] The {@link TextureMagnificationFilter} to apply to this material's textures.
* @param {Object} options.fabric The fabric JSON used to generate the material.
*
* @constructor
Expand Down Expand Up @@ -301,27 +303,8 @@ import when from '../ThirdParty/when.js';
*/
this.translucent = undefined;

/**
* The {@link TextureMinificationFilter} to apply to this material.
* The default value is {@link TextureMinificationFilter.LINEAR}.
*
* To take effect, this property must be set before the texture is created.
*
* @type {TextureMinificationFilter}
* @default {@link TextureMinificationFilter.LINEAR}
*/
this.minificationFilter = defaultValue(options.minificationFilter, TextureMinificationFilter.LINEAR);

/**
* The {@link TextureMagnificationFilter} to apply to this material.
* The default value is {@link TextureMagnificationFilter.LINEAR}.
*
* To take effect, this property must be set before the texture is created.
*
* @type {TextureMagnificationFilter}
* @default {@link TextureMagnificationFilter.LINEAR}
*/
this.magnificationFilter = defaultValue(options.magnificationFilter, TextureMagnificationFilter.LINEAR);
this._minificationFilter = defaultValue(options.minificationFilter, TextureMinificationFilter.LINEAR);
this._magnificationFilter = defaultValue(options.magnificationFilter, TextureMagnificationFilter.LINEAR);

this._strict = undefined;
this._template = undefined;
Expand Down Expand Up @@ -441,8 +424,8 @@ import when from '../ThirdParty/when.js';
var image = loadedImage.image;

var sampler = new Sampler({
minificationFilter : this.minificationFilter,
magnificationFilter : this.magnificationFilter
minificationFilter : this._minificationFilter,
magnificationFilter : this._magnificationFilter
});

var texture;
Expand Down Expand Up @@ -496,8 +479,8 @@ import when from '../ThirdParty/when.js';
negativeZ : images[5]
},
sampler : new Sampler({
minificationFilter : this.minificationFilter,
magnificationFilter : this.magnificationFilter
minificationFilter : this._minificationFilter,
magnificationFilter : this._magnificationFilter
})
});

Expand Down Expand Up @@ -762,8 +745,8 @@ import when from '../ThirdParty/when.js';

if (!defined(texture) || texture === context.defaultTexture) {
var sampler = new Sampler({
minificationFilter : material.minificationFilter,
magnificationFilter : material.magnificationFilter
minificationFilter : material._minificationFilter,
magnificationFilter : material._magnificationFilter
});
texture = new Texture({
context : context,
Expand Down

0 comments on commit 5600a18

Please sign in to comment.