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

<pc-entity>

The <pc-entity> tag is used to define an entity.

注記
  • It must be a direct child of <pc-scene> or another <pc-entity>.

Attributes

属性 (Attribute)説明
enabledEnabled state of the entity. If not specified, true is used.
nameThe name of the entity.
positionThe position of the entity. Specified as a space-separated list of X, Y, and Z values. If not specified, 0 0 0 is used.
rotationThe rotation of the entity. Specified as a space-separated list of X, Y, and Z Euler angles in degrees. If not specified, 0 0 0 is used.
scaleThe scale of the entity. Specified as a space-separated list of X, Y, and Z values. If not specified, 1 1 1 is used.
tagsA space-separated list of tags for the entity.

<pc-entity name="MyEntity" position="1 2 3" rotation="45 0 0" scale="2 2 2" tags="tag1 tag2">
<!-- Child entities and components go here -->
</pc-entity>

JavaScript Interface

You can programmatically create and manipulate <pc-entity> elements using the EntityElement API.