メインコンテンツまでスキップ

<pc-camera>

The <pc-camera> tag is used to define a camera component.

注記

Attributes

属性 (Attribute)説明
clear-colorThe background color of the camera. Can be a space-separated list of R, G, B, and A values, a hex color code, or a named color. If unspecified, 0.75,0.75,0.75,1 is used.
clear-color-bufferBoolean attribute. Controls whether the camera clears the color buffer. If unspecified, the color buffer is cleared.
clear-depth-bufferBoolean attribute. Controls whether the camera clears the depth buffer. If unspecified, the depth buffer is cleared.
clear-stencil-bufferBoolean attribute. Controls whether the camera clears the stencil buffer. If unspecified, the stencil buffer is cleared.
cull-facesBoolean attribute. Controls whether the camera culls faces. If unspecified, faces are culled.
far-clipThe far clipping plane of the camera. If unspecified, 1000 is used.
flip-facesBoolean attribute. Controls whether the camera flips faces. If unspecified, faces are not flipped.
fovThe field of view of the camera. If unspecified, 45 is used.
frustum-cullingBoolean attribute. Controls whether the camera uses frustum culling. If unspecified, frustum culling is used.
gammaThe gamma of the camera. Can be none or srgb. If unspecified, none is used.
horizontal-fovValueless attribute. If present, the camera uses a horizontal field of view. If unspecified, the camera uses a vertical field of view.
near-clipThe near clipping plane of the camera. If unspecified, 0.1 is used.
orthographicValueless attribute. If present, the camera uses an orthographic projection. If unspecified, the camera uses a perspective projection.
ortho-heightThe height of the orthographic projection. If unspecified, 10 is used.
priorityThe priority of the camera. If unspecified, 0 is used.
rectThe viewport rectangle of the camera. Specified as a space-separated list of X, Y, Width, and Height values. If unspecified, 0 0 1 1 is used.
scissor-rectThe scissor rectangle of the camera. Specified as a space-separated list of X, Y, Width, and Height values. If not specified, 0 0 1 1 is used.
tonemapThe tonemap of the camera. Can be none, aces, aces2, filmic, hejl, linear, or neutral. If unspecified, none is used.

<pc-entity>
<pc-camera clear-color="yellow"></pc-camera>
</pc-entity>

JavaScript Interface

You can programmatically create and manipulate <pc-camera> elements using the CameraComponentElement API.