Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material: Remove morphTargets and morphNormals properties. #22169

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/api/en/materials/LineBasicMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ <h3>[property:String linejoin]</h3>
property and it is ignored by the [page:WebGLRenderer WebGL] renderer.
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h2>Methods</h2>
<p>See the base [page:Material] class for common methods.</p>

Expand Down
4 changes: 0 additions & 4 deletions docs/api/en/materials/MeshBasicMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ <h3>[property:Float lightMapIntensity]</h3>
<h3>[property:Texture map]</h3>
<p>The color map. Default is null.</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>


<h3>[property:Float reflectivity]</h3>
<p>
How much the environment map affects the surface; also see [page:.combine].
Expand Down
3 changes: 0 additions & 3 deletions docs/api/en/materials/MeshDepthMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ <h3>[property:Boolean fog]</h3>
<h3>[property:Texture map]</h3>
<p>The color map. Default is null.</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Boolean wireframe]</h3>
<p>Render geometry as wireframe. Default is false (i.e. render as smooth shaded).</p>

Expand Down
3 changes: 0 additions & 3 deletions docs/api/en/materials/MeshDistanceMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ <h3>[property:Boolean fog]</h3>
<h3>[property:Texture map]</h3>
<p>The color map. Default is null.</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Float nearDistance]</h3>
<p>
The near value of the point light's internal shadow camera.
Expand Down
9 changes: 0 additions & 9 deletions docs/api/en/materials/MeshLambertMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,6 @@ <h3>[property:Float lightMapIntensity]</h3>
<h3>[property:Texture map]</h3>
<p>The color map. Default is null.</p>

<h3>[property:Boolean morphNormals]</h3>
<p>
Defines whether the material uses morphNormals. Set as true to pass morphNormal
attributes from the geometry to the shader. Default is *false*.
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Float reflectivity]</h3>
<p>How much the environment map affects the surface; also see [page:.combine].</p>

Expand Down
9 changes: 0 additions & 9 deletions docs/api/en/materials/MeshMatcapMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,6 @@ <h3>[property:Texture map]</h3>
<h3>[property:Texture matcap]</h3>
<p>The matcap map. Default is null.</p>

<h3>[property:Boolean morphNormals]</h3>
<p>
Defines whether the material uses morphNormals. Set as true to pass morphNormal
attributes from the geometry to the shader. Default is *false*.
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Texture normalMap]</h3>
<p>
The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
Expand Down
9 changes: 0 additions & 9 deletions docs/api/en/materials/MeshNormalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,6 @@ <h3>[property:Boolean flatShading]</h3>
<h3>[property:Boolean fog]</h3>
<p>Whether the material is affected by fog. Default is *false*.</p>

<h3>[property:Boolean morphNormals]</h3>
<p>
Defines whether the material uses morphNormals. Set as true to pass morphNormal
attributes from the geometry to the shader. Default is *false*.
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Texture normalMap]</h3>
<p>
The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
Expand Down
9 changes: 0 additions & 9 deletions docs/api/en/materials/MeshPhongMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,6 @@ <h3>[property:Float lightMapIntensity]</h3>
<h3>[property:Texture map]</h3>
<p>The color map. Default is null. The texture map color is modulated by the diffuse [page:.color].</p>

<h3>[property:Boolean morphNormals]</h3>
<p>
Defines whether the material uses morphNormals. Set as true to pass morphNormal
attributes from the geometry to the shader. Default is *false*.
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Texture normalMap]</h3>
<p>
The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
Expand Down
9 changes: 0 additions & 9 deletions docs/api/en/materials/MeshStandardMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,6 @@ <h3>[property:Float metalness]</h3>
<h3>[property:Texture metalnessMap]</h3>
<p>The blue channel of this texture is used to alter the metalness of the material.</p>

<h3>[property:Boolean morphNormals]</h3>
<p>
Defines whether the material uses morphNormals. Set as true to pass morphNormal
attributes from the geometry to the shader. Default is *false*.
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Texture normalMap]</h3>
<p>
The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
Expand Down
9 changes: 0 additions & 9 deletions docs/api/en/materials/MeshToonMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,6 @@ <h3>[property:Float lightMapIntensity]</h3>
<h3>[property:Texture map]</h3>
<p>The color map. Default is null. The texture map color is modulated by the diffuse [page:.color].</p>

<h3>[property:Boolean morphNormals]</h3>
<p>
Defines whether the material uses morphNormals. Set as true to pass morphNormal
attributes from the geometry to the shader. Default is *false*.
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Texture normalMap]</h3>
<p>
The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
Expand Down
4 changes: 0 additions & 4 deletions docs/api/en/materials/PointsMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,8 @@ <h3>[property:Color color]</h3>
<p>[page:Color] of the material, by default set to white (0xffffff).</p>

<h3>[property:Texture map]</h3>

<p>Sets the color of the points using data from a [page:Texture].</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Number size]</h3>
<p>Sets the size of the points. Default is 1.0.<br/>
Will be capped if it exceeds the hardware dependent parameter [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParameter gl.ALIASED_POINT_SIZE_RANGE].</p>
Expand Down
11 changes: 0 additions & 11 deletions docs/api/en/materials/ShaderMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,17 +367,6 @@ <h3>[property:Float linewidth]</h3>
always be 1 regardless of the set value.
</p>


<h3>[property:Boolean morphTargets]</h3>
<p>
When set to true, morph target attributes are available in the vertex shader. Default is *false*.
</p>

<h3>[property:Boolean morphNormals]</h3>
<p>
When set to true, morph normal attributes are available in the vertex shader. Default is *false*.
</p>

<h3>[property:Boolean flatShading]</h3>
<p>
Define whether the material is rendered with flat shading. Default is false.
Expand Down
3 changes: 0 additions & 3 deletions docs/api/zh/materials/LineBasicMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ <h3>[property:String linejoin]</h3>
并且会被[page:WebGLRenderer WebGL]渲染器忽略。
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h2>方法(Methods)</h2>
<p>共有方法请参见其基类[page:Material]。</p>

Expand Down
4 changes: 0 additions & 4 deletions docs/api/zh/materials/MeshBasicMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ <h3>[property:Float lightMapIntensity]</h3>
<h3>[property:Texture map]</h3>
<p> 颜色贴图。默认为null。</p>

<h3>[property:Boolean morphTargets]</h3>
<p>材质是否使用morphTargets。默认值为false。</p>


<h3>[property:Float reflectivity]</h3>
<p> 环境贴图对表面的影响程度; 见[page:.combine]。默认值为1,有效范围介于0(无反射)和1(完全反射)之间。
</p>
Expand Down
3 changes: 0 additions & 3 deletions docs/api/zh/materials/MeshDepthMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ <h3>[property:Boolean fog]</h3>
<h3>[property:Texture map]</h3>
<p>颜色贴图。默认为null。</p>

<h3>[property:Boolean morphTargets]</h3>
<p>材质是否使用morphTargets。默认值为false。</p>

<h3>[property:Boolean wireframe]</h3>
<p> 将几何体渲染为线框。默认值为*false*(即渲染为平滑着色)。</p>

Expand Down
3 changes: 0 additions & 3 deletions docs/api/zh/materials/MeshDistanceMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ <h3>[property:Boolean fog]</h3>
<h3>[property:Texture map]</h3>
<p>颜色贴图。默认为null。</p>

<h3>[property:Boolean morphTargets]</h3>
<p>材质是否使用morphTargets。默认值为false。</p>

<h3>[property:Float nearDistance]</h3>
<p>
The near value of the point light's internal shadow camera.
Expand Down
7 changes: 0 additions & 7 deletions docs/api/zh/materials/MeshLambertMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ <h3>[property:Float lightMapIntensity]</h3>
<h3>[property:Texture map]</h3>
<p>颜色贴图。默认为null。</p>

<h3>[property:Boolean morphNormals]</h3>
<p> 定义是否使用morphNormals。设置为true可将morphNormal属性从geometry传递到shader。默认值为*false*。
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>定义材质是否使用morphTargets。默认值为false。</p>

<h3>[property:Float reflectivity]</h3>
<p> 环境贴图对表面的影响程度; 见[page:.combine]。默认值为1,有效范围介于0(无反射)和1(完全反射)之间。</p>

Expand Down
7 changes: 0 additions & 7 deletions docs/api/zh/materials/MeshMatcapMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ <h3>[property:Texture map]</h3>
<h3>[property:Texture matcap]</h3>
<p>matcap贴图,默认为null。</p>

<h3>[property:Boolean morphNormals]</h3>
<p> 定义是否使用morphNormals。设置为true可将morphNormal属性从geometry传递到shader。默认值为*false*。
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>定义材质是否使用morphTargets。默认值为false。</p>

<h3>[property:Texture normalMap]</h3>
<p> 用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
In case the material has a normal map authored using the left handed convention, the y component of normalScale
Expand Down
7 changes: 0 additions & 7 deletions docs/api/zh/materials/MeshNormalMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ <h3>[property:Boolean flatShading]</h3>
<h3>[property:Boolean fog]</h3>
<p>材质是否受雾影响。默认值为*false*。</p>

<h3>[property:Boolean morphNormals]</h3>
<p> 定义是否使用morphNormals。设置为true可将morphNormal属性从geometry传递到shader。默认值为*false*。
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>定义材质是否使用morphTargets。默认值为false。</p>

<h3>[property:Texture normalMap]</h3>
<p> 用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
In case the material has a normal map authored using the left handed convention, the y component of normalScale
Expand Down
7 changes: 0 additions & 7 deletions docs/api/zh/materials/MeshPhongMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,6 @@ <h3>[property:Float lightMapIntensity]</h3>
<h3>[property:Texture map]</h3>
<p>颜色贴图。默认为null。纹理贴图颜色由漫反射颜色[page:.color]调节。</p>

<h3>[property:Boolean morphNormals]</h3>
<p> 定义是否使用morphNormals。设置为true可将morphNormal属性从geometry传递到shader。默认值为*false*。
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>定义材质是否使用morphTargets。默认值为false。</p>

<h3>[property:Texture normalMap]</h3>
<p> 用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
In case the material has a normal map authored using the left handed convention, the y component of normalScale
Expand Down
7 changes: 0 additions & 7 deletions docs/api/zh/materials/MeshStandardMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,6 @@ <h3>[property:Float metalness]</h3>
<h3>[property:Texture metalnessMap]</h3>
<p> 该纹理的蓝色通道用于改变材质的金属度。</p>

<h3>[property:Boolean morphNormals]</h3>
<p> 定义是否使用morphNormals。设置为true可将morphNormal属性从geometry传递到shader。默认值为*false*。
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>定义材质是否使用morphTargets。默认值为false。</p>

<h3>[property:Texture normalMap]</h3>
<p>用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
In case the material has a normal map authored using the left handed convention, the y component of normalScale
Expand Down
9 changes: 0 additions & 9 deletions docs/api/zh/materials/MeshToonMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,6 @@ <h3>[property:Float lightMapIntensity]</h3>
<h3>[property:Texture map]</h3>
<p>The color map. Default is null. The texture map color is modulated by the diffuse [page:.color].</p>

<h3>[property:Boolean morphNormals]</h3>
<p>
Defines whether the material uses morphNormals. Set as true to pass morphNormal
attributes from the geometry to the shader. Default is *false*.
</p>

<h3>[property:Boolean morphTargets]</h3>
<p>Define whether the material uses morphTargets. Default is false.</p>

<h3>[property:Texture normalMap]</h3>
<p>
The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
Expand Down
3 changes: 0 additions & 3 deletions docs/api/zh/materials/PointsMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ <h3>[property:Texture map]</h3>

<p>使用[page:Texture]中的数据设置点的颜色。</p>

<h3>[property:Boolean morphTargets]</h3>
<p>材质是否使用morphTargets。默认值为false。</p>

<h3>[property:Number size]</h3>
<p>设置点的大小。默认值为1.0。<br/>
Will be capped if it exceeds the hardware dependent parameter [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParameter gl.ALIASED_POINT_SIZE_RANGE].</p>
Expand Down
8 changes: 0 additions & 8 deletions docs/api/zh/materials/ShaderMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,6 @@ <h3>[property:Float linewidth]</h3>
由于[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]与大多数平台上[page:WebGLRenderer WebGL]渲染器的限制,无论如何设置该值,线宽始终为1。
</p>

<h3>[property:Boolean morphTargets]</h3>
<p> When set to true, morph target attributes are available in the vertex shader. Default is *false*.
</p>

<h3>[property:Boolean morphNormals]</h3>
<p> When set to true, morph normal attributes are available in the vertex shader. Default is *false*.
</p>

<h3>[property:Boolean flatShading]</h3>
<p> 定义材质是否使用平面着色进行渲染。默认值为false。
</p>
Expand Down
27 changes: 0 additions & 27 deletions docs/manual/ja/introduction/How-to-update-things.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,33 +126,6 @@ <h3>Examples</h3>

</div>

<h2>Geometry</h2>
<div>
<p>
下記に示してあるフラグはさまざまなジオメトリの要素の更新をコントロールします。 更新にはコストがかかるので、更新が必要な要素のみを、更新するように設定してください。 バッファが変化すると、自動的にこれらのフラグはflaseにリセットされます。 バッファを更新し続けたいのであれば、このフラグをtrueに設定し続ける必要があります。 これは[page:Geometry]にのみ適用されて、[page:BufferGeometry]には適用されないことに注意してください。
</p>
<code>
const geometry = new THREE.Geometry();
geometry.verticesNeedUpdate = true;
geometry.elementsNeedUpdate = true;
geometry.morphTargetsNeedUpdate = true;
geometry.uvsNeedUpdate = true;
geometry.normalsNeedUpdate = true;
geometry.colorsNeedUpdate = true;
geometry.tangentsNeedUpdate = true;
</code>

<p>
[link:https://github.com/mrdoob/three.js/releases/tag/r66 r66]以前のバージョンでは、メッシュは<em>dynamic</em>フラグを有効にする必要があります。これは内部で型付き配列を保持するために必要になります。
</p>

<code>
// removed after r66
geometry.dynamic = true;
</code>

</div>

<h2>Materials</h2>
<div>
<p>
Expand Down
5 changes: 1 addition & 4 deletions editor/js/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,7 @@ function Loader( editor ) {
var { MD2Loader } = await import( '../../examples/jsm/loaders/MD2Loader.js' );

var geometry = new MD2Loader().parse( contents );
var material = new THREE.MeshStandardMaterial( {
morphTargets: true,
morphNormals: true
} );
var material = new THREE.MeshStandardMaterial();

var mesh = new THREE.Mesh( geometry, material );
mesh.mixer = new THREE.AnimationMixer( mesh );
Expand Down
2 changes: 0 additions & 2 deletions examples/jsm/effects/OutlineEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@ class OutlineEffect {

const outlineParameters = originalMaterial.userData.outlineParameters;

material.morphTargets = originalMaterial.morphTargets;
material.morphNormals = originalMaterial.morphNormals;
material.fog = originalMaterial.fog;
material.toneMapped = originalMaterial.toneMapped;
material.premultipliedAlpha = originalMaterial.premultipliedAlpha;
Expand Down
Loading