Skip to content

Commit e9b7559

Browse files
authored
Add minFilter and magFilter to material component replacing npot (#5717)
1 parent f47d94d commit e9b7559

File tree

20 files changed

+771
-775
lines changed

20 files changed

+771
-775
lines changed

‎docs/components/material.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ depending on the material type applied.
6464
| alphaTest | Alpha test threshold for transparency. | 0 |
6565
| depthTest | Whether depth testing is enabled when rendering the material. | true |
6666
| flatShading | Use `THREE.FlatShading` rather than `THREE.StandardShading`. | false |
67-
| npot | Use settings for non-power-of-two (NPOT) texture. | false |
6867
| offset | Texture offset to be used. | {x: 0, y: 0} |
6968
| opacity | Extent of transparency. If the `transparent` property is not `true`, then the material will remain opaque and `opacity` will only affect color. | 1.0 |
7069
| repeat | Texture repeat to be used. | {x: 1, y: 1} |
70+
| magFilter | Which magnifying filter to use when sampling textures. Can be one of `linear` or `nearest`. | `linear` |
71+
| minFilter | Which minifying filter to use when sampling textures. Can be one of `linear`, `linear-mipmap-nearest`, `linear-mipmap-linear`, `nearest`, `nearest-mipmap-nearest` or `nearest-mipmap-linear`. | `linear-mipmap-linear` |
7172
| shader | Which material to use. Defaults to the [standard material][standard]. Can be set to the [flat material][flat] or to a registered custom shader material. | standard |
7273
| side | Which sides of the mesh to render. Can be one of `front`, `back`, or `double`. | front |
7374
| transparent | Whether material is transparent. Transparent entities are rendered after non-transparent entities. | false |

‎docs/primitives/a-box.md‎

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -27,57 +27,58 @@ The box primitive creates shapes such as boxes, cubes, or walls.
2727

2828
## Attributes
2929

30-
| Attribute | Component Mapping | Default Value |
31-
| -------- | ----------------- | ------------- |
32-
| alpha-test | material.alphaTest | 0 |
33-
| ambient-occlusion-map | material.ambientOcclusionMap | None |
34-
| ambient-occlusion-map-intensity | material.ambientOcclusionMapIntensity | 1 |
35-
| ambient-occlusion-texture-offset | material.ambientOcclusionTextureOffset | 0 0 |
36-
| ambient-occlusion-texture-repeat | material.ambientOcclusionTextureRepeat | 1 1 |
37-
| anisotropy | material.anisotropy | 0 |
38-
| blending | material.blending | normal |
39-
| color | material.color | #FFF |
40-
| depth | geometry.depth | 1 |
41-
| depth-test | material.depthTest | true |
42-
| depth-write | material.depthWrite | true |
43-
| displacement-bias | material.displacementBias | 0.5 |
44-
| displacement-map | material.displacementMap | None |
45-
| displacement-scale | material.displacementScale | 1 |
46-
| displacement-texture-offset | material.displacementTextureOffset | 0 0 |
47-
| displacement-texture-repeat | material.displacementTextureRepeat | 1 1 |
48-
| dithering | material.dithering | true |
49-
| emissive | material.emissive | #000 |
50-
| emissive-intensity | material.emissiveIntensity | 1 |
51-
| env-map | material.envMap | None |
52-
| flat-shading | material.flatShading | false |
53-
| height | geometry.height | 1 |
54-
| material-fog | material.fog | true |
55-
| material-visible | material.visible | true |
56-
| metalness | material.metalness | 0 |
57-
| metalness-map | material.metalnessMap | None |
58-
| metalness-texture-offset | material.metalnessTextureOffset | 0 0 |
59-
| metalness-texture-repeat | material.metalnessTextureRepeat | 1 1 |
60-
| normal-map | material.normalMap | None |
61-
| normal-scale | material.normalScale | 1 1 |
62-
| normal-texture-offset | material.normalTextureOffset | 0 0 |
63-
| normal-texture-repeat | material.normalTextureRepeat | 1 1 |
64-
| npot | material.npot | false |
65-
| offset | material.offset | 0 0 |
66-
| opacity | material.opacity | 1 |
67-
| repeat | material.repeat | 1 1 |
68-
| roughness | material.roughness | 0.5 |
69-
| roughness-map | material.roughnessMap | None |
70-
| roughness-texture-offset | material.roughnessTextureOffset | 0 0 |
71-
| roughness-texture-repeat | material.roughnessTextureRepeat | 1 1 |
72-
| segments-depth | geometry.segmentsDepth | 1 |
73-
| segments-height | geometry.segmentsHeight | 1 |
74-
| segments-width | geometry.segmentsWidth | 1 |
75-
| shader | material.shader | standard |
76-
| side | material.side | front |
77-
| spherical-env-map | material.sphericalEnvMap | None |
78-
| src | material.src | None |
79-
| transparent | material.transparent | false |
80-
| vertex-colors-enabled | material.vertexColorsEnabled | false |
81-
| width | geometry.width | 1 |
82-
| wireframe | material.wireframe | false |
83-
| wireframe-linewidth | material.wireframeLinewidth | 2 |
30+
| Attribute | Component Mapping | Default Value |
31+
| -------- | ----------------- | ------------- |
32+
| alpha-test | material.alphaTest | 0 |
33+
| ambient-occlusion-map | material.ambientOcclusionMap | None |
34+
| ambient-occlusion-map-intensity | material.ambientOcclusionMapIntensity | 1 |
35+
| ambient-occlusion-texture-offset | material.ambientOcclusionTextureOffset | 0 0 |
36+
| ambient-occlusion-texture-repeat | material.ambientOcclusionTextureRepeat | 1 1 |
37+
| anisotropy | material.anisotropy | 0 |
38+
| blending | material.blending | normal |
39+
| color | material.color | #FFF |
40+
| depth | geometry.depth | 1 |
41+
| depth-test | material.depthTest | true |
42+
| depth-write | material.depthWrite | true |
43+
| displacement-bias | material.displacementBias | 0.5 |
44+
| displacement-map | material.displacementMap | None |
45+
| displacement-scale | material.displacementScale | 1 |
46+
| displacement-texture-offset | material.displacementTextureOffset | 0 0 |
47+
| displacement-texture-repeat | material.displacementTextureRepeat | 1 1 |
48+
| dithering | material.dithering | true |
49+
| emissive | material.emissive | #000 |
50+
| emissive-intensity | material.emissiveIntensity | 1 |
51+
| env-map | material.envMap | None |
52+
| flat-shading | material.flatShading | false |
53+
| height | geometry.height | 1 |
54+
| mag-filter | material.magFilter | linear |
55+
| material-fog | material.fog | true |
56+
| material-visible | material.visible | true |
57+
| metalness | material.metalness | 0 |
58+
| metalness-map | material.metalnessMap | None |
59+
| metalness-texture-offset | material.metalnessTextureOffset | 0 0 |
60+
| metalness-texture-repeat | material.metalnessTextureRepeat | 1 1 |
61+
| min-filter | material.minFilter | linear-mipmap-linear |
62+
| normal-map | material.normalMap | None |
63+
| normal-scale | material.normalScale | 1 1 |
64+
| normal-texture-offset | material.normalTextureOffset | 0 0 |
65+
| normal-texture-repeat | material.normalTextureRepeat | 1 1 |
66+
| offset | material.offset | 0 0 |
67+
| opacity | material.opacity | 1 |
68+
| repeat | material.repeat | 1 1 |
69+
| roughness | material.roughness | 0.5 |
70+
| roughness-map | material.roughnessMap | None |
71+
| roughness-texture-offset | material.roughnessTextureOffset | 0 0 |
72+
| roughness-texture-repeat | material.roughnessTextureRepeat | 1 1 |
73+
| segments-depth | geometry.segmentsDepth | 1 |
74+
| segments-height | geometry.segmentsHeight | 1 |
75+
| segments-width | geometry.segmentsWidth | 1 |
76+
| shader | material.shader | standard |
77+
| side | material.side | front |
78+
| spherical-env-map | material.sphericalEnvMap | None |
79+
| src | material.src | None |
80+
| transparent | material.transparent | false |
81+
| vertex-colors-enabled | material.vertexColorsEnabled | false |
82+
| width | geometry.width | 1 |
83+
| wireframe | material.wireframe | false |
84+
| wireframe-linewidth | material.wireframeLinewidth | 2 |

0 commit comments

Comments
 (0)