在// Parse message body
env, _ := enmime.ReadEnvelope(r)
// Headers can be retrieved via Envelope.GetHeader(name).
fmt.Printf("From: %v\n", env.GetHeader("From"))
// Address-type headers can be parsed into a list of decoded mail.Address structs.
alist, _ := env.AddressList("To")
for _, addr := range alist {
fmt.Printf("To: %s <%s>\n", addr.Name, addr.Address)
}
fmt.Printf("Subject: %v\n", env.GetHeader("Subject"))
// The plain text body is available as mime.Text.
fmt.Printf("Text Body: %v chars\n", len(env.Text))
// The HTML body is stored in mime.HTML.
fmt.Printf("HTML Body: %v chars\n", len(env.HTML))
// mime.Inlines is a slice of inlined attacments.
fmt.Printf("Inlines: %v\n", len(env.Inlines))
// mime.Attachments contains the non-inline attachments.
fmt.Printf("Attachments: %v\n", len(env.Attachments))
中,我希望产生aframe
100次,每次都是随机sphere
首先,position
中的每个值都应该是-100到100之间的数字
position= "x y z"
其次,上面的代码应重复100次,使之前的<a-sphere
position="x y z"
radius="0.5">
</a-sphere>
不受影响。
这是所需的end result,忽略了动作。
如何实现这一目标?
答案 0 :(得分:0)
请参阅:
使用entity-generator + randomizer组件。
<a-mixin id="sphere" geometry="primitive: sphere" material random-position="min: -100 -100 -100; max: 100 100 100"></a-mixin>
<a-entity entity-generator="mixin: sphere; num: 100"></a-entity>