未验证 提交 d9450c90 编写于 作者: M Michael Herzog 提交者: GitHub

ShapeGeometry: Make all parameters optional. (#22513)

上级 a403fda2
......@@ -59,7 +59,7 @@
<h3>[name]([param:Array shapes], [param:Integer curveSegments])</h3>
<p>
shapes — [page:Array] of shapes or a single [page:Shape shape].<br />
shapes — [page:Array] of shapes or a single [page:Shape shape]. Default is a single triangle shape.<br />
curveSegments - [page:Integer] - Number of segments per shape. Default is 12.
</p>
......
......@@ -59,7 +59,7 @@
<h3>[name]([param:Array shapes], [param:Integer curveSegments])</h3>
<p>
shapes — 一个单独的[page:Shape shape],或者一个包含形状的[page:Array]。<br />
shapes — 一个单独的[page:Shape shape],或者一个包含形状的[page:Array]。Default is a single triangle shape.<br />
curveSegments - [page:Integer] - 每一个形状的分段数,默认值为12。
</p>
......
import { BufferGeometry } from '../core/BufferGeometry.js';
import { Float32BufferAttribute } from '../core/BufferAttribute.js';
import { Shape } from '../extras/core/Shape.js';
import { ShapeUtils } from '../extras/ShapeUtils.js';
import { Vector2 } from '../math/Vector2.js';
class ShapeGeometry extends BufferGeometry {
constructor( shapes, curveSegments = 12 ) {
constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), curveSegments = 12 ) {
super();
this.type = 'ShapeGeometry';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册