履歴: プログラミング/JavaScript/three.js/再入門
各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 9 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます
| 日時 | タイトル | 文字数 | 追加 | 削除 | 内容 | 差分 | 基準 |
|---|---|---|---|---|---|---|---|
| 2022/3/22 8:56:37 | プログラミング/JavaScript/three.js/再入門 最新版 | 11,685 | +4 | -2 | 表示 | 差分 | — |
| 2022/3/21 23:56:37 | プログラミング/JavaScript/three.js/再入門 | 11,473 | +26 | -38 | 表示 | 差分 | 選択 |
| 2022/3/20 11:15:11 | プログラミング/JavaScript/three.js/再入門 | 11,870 | +4 | -0 | 表示 | 差分 | 選択 |
| 2022/3/20 5:06:13 | プログラミング/JavaScript/three.js/再入門 | 11,721 | +52 | -3 | 表示 | 差分 | 選択 |
| 2022/3/18 5:21:43 | プログラミング/JavaScript/three.js/再入門 | 10,232 | +3 | -0 | 表示 | 表示中 | 選択 |
| 2022/3/18 5:21:43 | プログラミング/JavaScript/three.js/再入門 | 10,152 | +21 | -10 | 表示 | 差分 | 選択 |
| 2022/3/16 13:47:19 | プログラミング/JavaScript/three.js/再入門 | 10,154 | +78 | -11 | 表示 | 差分 | 基準 |
| 2022/3/16 5:22:28 | プログラミング/JavaScript/three.js/再入門 | 8,227 | +310 | -8 | 表示 | 差分 | 選択 |
| 2022/3/16 3:23:04 | プログラミング/JavaScript/three.js/再入門 | 1,009 | — | — | 表示 | — | 選択 |
基準: プログラミング/JavaScript/three.js/再入門 (2022/3/16 13:47:19) → 比較: プログラミング/JavaScript/three.js/再入門 (2022/3/18 5:21:43)
@@ -372,7 +372,7 @@
curveSegments のデフォルトは 12 なので、これを大きくしないとガタガタになる(右図)。
-* スムースシェーディング [#jbc741e4]
+* スムーズシェーディング [#jbc741e4]
https://discourse.threejs.org/t/smooth-shading-for-extruded-circle/25782
@@ -393,7 +393,7 @@
bevelSize: 20, // 面内方向
bevelOffset: 0, // 外形からの距離(って何だ?)
bevelSegments: 5, // 大きくすると丸くなる
- curveSegments: 60, // 大きくすると丸くなる
+ curveSegments: 20, // 大きくすると丸くなる
};
const geometry1 = new THREE.ExtrudeGeometry( shape, extrudeSettings );
geometry1.deleteAttribute( 'normal' );
@@ -401,16 +401,30 @@
const geometry = THREE.BufferGeometryUtils.mergeVertices( geometry1 );
geometry.computeVertexNormals();
-本来なら curveSegments = 30 くらいでも良さそうなのだけれど、
-なぜだかはじめと終わりの継ぎ目と思われる部分にちょっとだけガタが残る。
+なぜだかはじめと終わりの継ぎ目と思われる部分にちょっとだけガタが残る(左)。
+&ref(disk4.gif);
&ref(disk3.gif);
-&attachref(disk4.gif);
-上のリンク先でも、
+ LANG:js
+ const geometry = THREE.BufferGeometryUtils.mergeVertices( geometry1, 1 );
-> You could try to use BufferGeometryUtils.mergeVertices() 12 to create an indexed geometry. However this function can only merge vertices if all existing vertex data match (vertices, normals, uvs, colors etc.). This makes it problematic to use it with ExtrudeGeometry see https://jsfiddle.net/r6zguh09/1/ 39.
->
->It’s probably best if you create a custom cylinder mesh in Blender and import it as a glTF asset.
+のようにトレランスを大きくしたら良くなったかも(右)。
-と言われていて・・・これではうまく行かないのかもしれない?
+
+* 参考 [#secc2ddd]
+
+メッシュの表示:~
+http://www.mwsoft.jp/programming/webgl/geometry.html
+
+ガラス:~
+https://tympanus.net/codrops/2021/10/27/creating-the-effect-of-transparent-glass-and-plastic-in-three-js/
+
+キャラクター~
+https://tympanus.net/codrops/2021/10/04/creating-3d-characters-in-three-js/
+
+雲~
+https://tympanus.net/codrops/2020/01/28/how-to-create-procedural-clouds-using-three-js-sprites/
+
+BufferGeometry~
+https://threejs.org/docs/index.html#api/en/core/BufferGeometry