forked from mml-io/mml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mml.xsd
1091 lines (1054 loc) · 41.4 KB
/
mml.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version='1.0'?>
<?xml-stylesheet href="xsd.xsl" type="text/xsl"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation>
Intro
This is a work-in-progress schema definition for MML v0.1.
Its primary purpose is to define the valid tags and attributes for reference.
Its secondary purpose is to serve as documentation for those creating content using the MML format.
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
Value Types
</xs:documentation>
</xs:annotation>
<xs:simpleType name="ContentType">
<xs:annotation>
<xs:documentation>
media type, as per [RFC2045]
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="URI">
<xs:annotation>
<xs:documentation>
a Uniform Resource Identifier, see [RFC2396]
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:anyURI"/>
</xs:simpleType>
<xs:simpleType name="Script">
<xs:annotation>
<xs:documentation>
This is a string that is evaluated as a script expression.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:annotation>
<xs:documentation>
Attribute Sets
</xs:documentation>
</xs:annotation>
<xs:attributeGroup name="coreattrs">
<xs:annotation>
<xs:documentation>
Attributes common to all elements.
</xs:documentation>
</xs:annotation>
<xs:attribute name="id" type="xs:ID">
<xs:annotation>
<xs:documentation>
A unique identifier for the element, used for selection and manipulation through scripting. It must be unique within the document.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="class" type="xs:NMTOKENS">
<xs:annotation>
<xs:documentation>
A space-separated list of class names that can be used for scripting purposes.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="clickable">
<xs:annotation>
<xs:documentation>
This attribute group indicates that this element is clickable. The onclick attribute is a script expression that is executed when the element is clicked. Events are also dispatched to "click" listeners.
</xs:documentation>
</xs:annotation>
<xs:attribute name="onclick" type="Script">
<xs:annotation>
<xs:documentation>
A script expression that is executed when the element is clicked. Events are also dispatched to "click" event listeners.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="transformable">
<xs:annotation>
<xs:documentation>
Attributes for positioning, rotating and scaling in 3D.
</xs:documentation>
</xs:annotation>
<xs:attribute name="x" type="xs:float">
<xs:annotation>
<xs:documentation>
The position of the element along the X-axis in meters. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="y" type="xs:float">
<xs:annotation>
<xs:documentation>
The position of the element along the Y-axis in meters. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="z" type="xs:float">
<xs:annotation>
<xs:documentation>
The position of the element along the Z-axis in meters. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="rx" type="xs:float">
<xs:annotation>
<xs:documentation>
The rotation of the element around the X-axis in degrees. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ry" type="xs:float">
<xs:annotation>
<xs:documentation>
The rotation of the element around the Y-axis in degrees. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="rz" type="xs:float">
<xs:annotation>
<xs:documentation>
The rotation of the element around the Z-axis in degrees. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="sx" type="xs:float">
<xs:annotation>
<xs:documentation>
The scale of the element along the X-axis. Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="sy" type="xs:float">
<xs:annotation>
<xs:documentation>
The scale of the element along the Y-axis. Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="sz" type="xs:float">
<xs:annotation>
<xs:documentation>
The scale of the element along the Z-axis. Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="visible" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the element is visible (true) or hidden (false) in the scene. Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="shadows">
<xs:annotation>
<xs:documentation>
Attributes for cast and receiving shadows
</xs:documentation>
</xs:annotation>
<xs:attribute name="cast-shadows" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the element casts shadows onto other elements (true) or not (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="debuggable">
<xs:annotation>
<xs:documentation>
The debug attribute is a boolean that indicates whether the element should be drawn with debug information.
</xs:documentation>
</xs:annotation>
<xs:attribute name="debug" type="xs:boolean">
<xs:annotation>
<xs:documentation>
A boolean that indicates whether the element should be drawn with debug information (e.g. axes helper). Default value is false.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="collideable">
<xs:annotation>
<xs:documentation>
The collide attribute is a boolean that indicates whether a collision test should be performed on this element.
</xs:documentation>
</xs:annotation>
<xs:attribute name="collide" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether or not this object should participate in collision detection by other systems. Default value is false. If set to true, the object will be considered for collision tests.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="colorable">
<xs:annotation>
<xs:documentation>
The color attribute is a string that indicates the color of the element.
</xs:documentation>
</xs:annotation>
<xs:attribute name="color" type="xs:string">
<xs:annotation>
<xs:documentation>
The color of the element. Accepts color values in formats such as "#FF0000", "red", or "rgb(255,0,0)". If not specified, the default color is "white".
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:annotation>
<xs:documentation>
Document Structure
</xs:documentation>
</xs:annotation>
<xs:element name="html">
<xs:complexType>
<xs:sequence>
<xs:element ref="head"/>
<xs:element ref="body"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"/>
</xs:complexType>
</xs:element>
<xs:element name="head">
<xs:annotation>
<xs:documentation>
The `head` element is used to define the document's metadata and can contain `script` elements.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="script"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute name="profile" type="URI"/>
</xs:complexType>
</xs:element>
<xs:element name="script">
<xs:annotation>
<xs:documentation>
The `script` element is used to define script expressions that are executed when the document is loaded.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute name="type" type="ContentType"/>
<xs:attribute name="src" type="URI"/>
<xs:attribute name="defer">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="defer"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="body">
<xs:annotation>
<xs:documentation>
The `body` element is used to define the document's content.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attribute name="onload" type="Script"/>
<xs:attribute name="onunload" type="Script"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="MMLContent" mixed="true">
<xs:annotation>
<xs:documentation>
`MMLContent` defines the set of MML tags.
</xs:documentation>
</xs:annotation>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="m-cube"/>
<xs:element ref="m-sphere"/>
<xs:element ref="m-label"/>
<xs:element ref="m-light"/>
<xs:element ref="m-plane"/>
<xs:element ref="m-model"/>
<xs:element ref="m-character"/>
<xs:element ref="m-audio"/>
<xs:element ref="m-image"/>
<xs:element ref="m-video"/>
<xs:element ref="m-prompt"/>
<xs:element ref="m-interaction"/>
<xs:element ref="m-frame"/>
<xs:element ref="m-cylinder"/>
<xs:element ref="m-group"/>
<xs:element ref="script"/>
</xs:choice>
</xs:complexType>
<xs:annotation >
<xs:documentation>
MML Elements
</xs:documentation>
</xs:annotation>
<xs:element name="m-group">
<xs:annotation>
<xs:documentation>
The `m-group` element can contain other MML tags, allowing all of them to be transformed as single item.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-cube">
<xs:annotation>
<xs:documentation>
The `m-cube` element is a primitive 3D cube that can be coloured. It is often used for debugging or initial development purposes.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="collideable"/>
<xs:attributeGroup ref="colorable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attributeGroup ref="shadows"/>
<xs:attribute name="width" type="xs:float">
<xs:annotation>
<xs:documentation>
The width of the cube in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="height" type="xs:float">
<xs:annotation>
<xs:documentation>
The height of the cube in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="depth" type="xs:float">
<xs:annotation>
<xs:documentation>
The depth of the cube in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="opacity" type="xs:float">
<xs:annotation>
<xs:documentation>
The opacity of the cube, ranging from 0 (completely transparent) to 1 (completely opaque). Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-sphere">
<xs:annotation>
<xs:documentation>
The `m-sphere` element is a primitive 3D sphere that can be coloured. It is often used for debugging or initial development purposes.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="collideable"/>
<xs:attributeGroup ref="colorable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attributeGroup ref="shadows"/>
<xs:attribute name="radius" type="xs:float">
<xs:annotation>
<xs:documentation>
The radius of the sphere in meters. Default value is 0.5 meters.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="opacity" type="xs:float">
<xs:annotation>
<xs:documentation>
The opacity of the sphere, ranging from 0 (completely transparent) to 1 (completely opaque). Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-cylinder">
<xs:annotation>
<xs:documentation>
The `m-cylinder` element is a primitive 3D cylinder that can be coloured. It is often used for debugging or initial development purposes.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="collideable"/>
<xs:attributeGroup ref="colorable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attribute name="radius" type="xs:float">
<xs:annotation>
<xs:documentation>
The radius of the cylinder in meters. Default value is 0.5 meters.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="height" type="xs:float">
<xs:annotation>
<xs:documentation>
The height of the cylinder in meters.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-light">
<xs:annotation>
<xs:documentation>
The `m-light` element is a light that supports various types (e.g. `point`, `directional`) and can be coloured.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="colorable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attribute name="intensity" type="xs:float">
<xs:annotation>
<xs:documentation>
The intensity of the light, ranging from 0 (no light) to 1 (full intensity). Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="distance" type="xs:float">
<xs:annotation>
<xs:documentation>
The maximum distance in meters that the light will affect objects. Objects beyond this distance will not be illuminated. Default value is 0, which means the light has no maximum distance.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="angle" type="xs:float">
<xs:annotation>
<xs:documentation>
The angle of the light in degrees (only applicable to spotlight type). Default value is 45.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="enabled" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the light is enabled (true) or disabled (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="ambient"/>
<xs:enumeration value="point"/>
<xs:enumeration value="directional"/>
<xs:enumeration value="spotlight"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-plane">
<xs:annotation>
<xs:documentation>
The `m-plane` element is a primitive 3D plane that can be coloured.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="collideable"/>
<xs:attributeGroup ref="colorable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attributeGroup ref="shadows"/>
<xs:attribute name="width" type="xs:float">
<xs:annotation>
<xs:documentation>
The width of the plane in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="height" type="xs:float">
<xs:annotation>
<xs:documentation>
The height of the plane in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-model">
<xs:annotation>
<xs:documentation>
The `m-model` element is a 3D model. It can be used to load and display various 3D model file formats, such as OBJ, FBX, or GLTF, depending on the rendering engine being used. The model can be positioned, rotated, and scaled within the 3D scene. It also supports animations.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="collideable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attributeGroup ref="shadows"/>
<xs:attribute name="src" type="URI">
<xs:annotation>
<xs:documentation>
The source URI of the 3D model file. Supported formats may vary depending on the rendering engine used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim" type="URI">
<xs:annotation>
<xs:documentation>
The source URI of the animation file, if applicable. Supported formats may vary depending on the rendering engine used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim-loop" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the animation should loop (true) or play once (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim-enabled" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the animation is enabled (true) or disabled (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim-start-time" type="xs:int">
<xs:annotation>
<xs:documentation>
The time in milliseconds since the start of the document lifecycle when the animation should begin. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim-pause-time" type="xs:int">
<xs:annotation>
<xs:documentation>
The time in milliseconds since the start of the document lifecycle when the animation should pause. If there is no value the animation will not be paused.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-character">
<xs:annotation>
<xs:documentation>
The `m-character` element is a 3D character. It supports containing other `m-model` elements, allowing for composing a character from multiple models.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="collideable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attributeGroup ref="shadows"/>
<xs:attribute name="src" type="URI">
<xs:annotation>
<xs:documentation>
The source URI of the 3D character model file. Supported formats may vary depending on the rendering engine used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim" type="URI">
<xs:annotation>
<xs:documentation>
The source URI of the character animation file, if applicable. Supported formats may vary depending on the rendering engine used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim-loop" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the character animation should loop (true) or play once (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim-enabled" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the character animation is enabled (true) or disabled (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim-start-time" type="xs:int">
<xs:annotation>
<xs:documentation>
The time in milliseconds since the start of the document lifecycle when the character animation should begin. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="anim-pause-time" type="xs:int">
<xs:annotation>
<xs:documentation>
The time in milliseconds since the start of the document lifecycle when the character animation should pause. If there is no value the animation will not be paused.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-frame">
<xs:annotation>
<xs:documentation>
The `m-frame` element is a 3D frame. It enables composing other MML documents into the document and transforming them as a unit.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attribute name="src" type="URI">
<xs:annotation>
<xs:documentation>
The source URI of the MML document to be embedded within the current document.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-audio">
<xs:annotation>
<xs:documentation>
The `m-audio` element is used to play audio in a 3D scene.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attribute name="src" type="URI">
<xs:annotation>
<xs:documentation>
The source URI of the audio file. Supported formats may vary depending on the rendering engine used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="loop" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the audio should loop (true) or play once (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="enabled" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the audio is enabled (true) or disabled (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="volume" type="xs:float">
<xs:annotation>
<xs:documentation>
The volume of the audio, ranging from 0 (silent) to 1 (maximum volume). Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="roll-off" type="xs:float">
<xs:annotation>
<xs:documentation>
The rate at which the audio volume decreases as the listener moves away from the source. Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ref-distance" type="xs:float">
<xs:annotation>
<xs:documentation>
The reference distance in meters at which the audio volume is unaffected by the listener's distance from the source. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="start-time" type="xs:int">
<xs:annotation>
<xs:documentation>
The time in milliseconds since the start of the document lifecycle when the audio should start playing. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="pause-time" type="xs:int">
<xs:annotation>
<xs:documentation>
The time in milliseconds since the start of the document lifecycle when the audio should pause. If there is no value the audio will not be paused.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-image">
<xs:annotation>
<xs:documentation>
The `m-image` element is used to display an image in a 3D scene.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="collideable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="shadows"/>
<xs:attribute name="src" type="URI">
<xs:annotation>
<xs:documentation>
The source URI of the image file. Supported formats may vary depending on the rendering engine used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="width" type="xs:float">
<xs:annotation>
<xs:documentation>
The width of the image in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="height" type="xs:float">
<xs:annotation>
<xs:documentation>
The height of the image in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-video">
<xs:annotation>
<xs:documentation>
The `m-video` element is used to display a video in a 3D scene.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="collideable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="shadows"/>
<xs:attribute name="src" type="URI">
<xs:annotation>
<xs:documentation>
The source URI of the video file. Supported formats may vary depending on the rendering engine used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="width" type="xs:float">
<xs:annotation>
<xs:documentation>
The width of the video in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="height" type="xs:float">
<xs:annotation>
<xs:documentation>
The height of the video in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="loop" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the video should loop (true) or play once (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="enabled" type="xs:boolean">
<xs:annotation>
<xs:documentation>
Whether the video is enabled (true) or disabled (false). Default value is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="volume" type="xs:float">
<xs:annotation>
<xs:documentation>
The volume of the video's audio, ranging from 0 (silent) to 1 (maximum volume). Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="roll-off" type="xs:float">
<xs:annotation>
<xs:documentation>
The rate at which the video's audio volume decreases as the listener moves away from the source. Default value is 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ref-distance" type="xs:float">
<xs:annotation>
<xs:documentation>
The reference distance in meters at which the video's audio volume is unaffected by the listener's distance from the source. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="start-time" type="xs:int">
<xs:annotation>
<xs:documentation>
The time in milliseconds since the start of the document lifecycle when the video should start playing. Default value is 0.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="pause-time" type="xs:int">
<xs:annotation>
<xs:documentation>
The time in milliseconds since the start of the document lifecycle when the video should pause. If there is no value the video will not be paused.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-label">
<xs:annotation>
<xs:documentation>
The `m-label` element is used to display text on a plane in a 3D scene.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="colorable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attributeGroup ref="clickable"/>
<xs:attributeGroup ref="shadows"/>
<xs:attribute name="content" type="xs:string">
<xs:annotation>
<xs:documentation>
The text content to be displayed on the label.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="width" type="xs:float">
<xs:annotation>
<xs:documentation>
The width of the label in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="height" type="xs:float">
<xs:annotation>
<xs:documentation>
The height of the label in meters. Default value is 1 meter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="font-size" type="xs:float">
<xs:annotation>
<xs:documentation>
The font size of the text in centimeters. Default value is 24 centimeters.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="font-color" type="xs:string">
<xs:annotation>
<xs:documentation>
The color of the text on the label. Accepts color values in formats such as "#FF0000", "red", or "rgb(255,0,0)". If not specified, the default color is "black".
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="padding" type="xs:float">
<xs:annotation>
<xs:documentation>
The padding around the text in centimeters. Default value is 8 centimeters.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="alignment">
<xs:annotation>
<xs:documentation>
The horizontal alignment of the text. Default value is left.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="left"/>
<xs:enumeration value="center"/>
<xs:enumeration value="right"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="m-prompt">
<xs:annotation>
<xs:documentation>
The `m-prompt` element is used to request a string from the user when the element is clicked in a 3D scene.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:complexContent>
<xs:extension base="MMLContent">
<xs:attributeGroup ref="debuggable"/>
<xs:attributeGroup ref="transformable"/>
<xs:attributeGroup ref="coreattrs"/>
<xs:attribute name="message" type="xs:string">