Skip to content

Commit c1e76af

Browse files
committed
API Docs rework and Sprite + Input guides
1 parent 17709ce commit c1e76af

7,058 files changed

Lines changed: 1037263 additions & 7 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/_layouts/page.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
image = null; imageRealPath = null;
5050
%>
5151
</head>
52-
<body id="page-<%= category %>" class="page<%- category != 'home' ? ' page-standard' : '' %>">
52+
<body id="page-<%= category %>" class="page<%- category != 'home' ? ' page-standard' : '' %><%- typeof(subCategory) != 'undefined' ? ' page-' + category + '-' + subCategory : '' %>">
5353
<aside id="site-navigation">
5454
<ul>
5555
<li<%- category == 'home' ? ' class="selected"' : '' %>><a href="/"><img src="/static/ceramic-small.png" class="ceramic-icon" />Ceramic</a></li>
5656
<li<%- category == 'guides' ? ' class="selected"' : '' %>><a href="/guides">Guides</a></li>
5757
<li<%- category == 'examples' ? ' class="selected"' : '' %>><a href="/examples">Examples</a></li>
5858
<li<%- category == 'blog' ? ' class="selected"' : '' %>><a href="/blog">Blog</a></li>
59-
<li><a href="/api-docs">API Docs</a></li>
59+
<li<%- category == 'api-docs' ? ' class="selected"' : '' %>><a href="/api-docs/clay-native">API Docs</a></li>
6060
<li><a href="https://github.com/ceramic-engine/ceramic">GitHub</a></li>
6161
<li<%- category == 'discord' ? ' class="selected"' : '' %>><a href="/discord">Discord</a></li>
6262
</ul>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: api-docs
3+
category: api-docs
4+
subCategory: doc
5+
menu: Haxe
6+
title: Any
7+
target: Clay (Native)
8+
permalink: api-docs/clay-native/Any/
9+
---
10+
11+
# Any
12+
13+
<div class="type-hierarchy"><strong>Any</strong> (Abstract)</div>
14+
15+
`Any` is a type that is compatible with any other in both ways.
16+
17+
This means that a value of any type can be assigned to `Any`, and
18+
vice-versa, a value of `Any` type can be assigned to any other type.
19+
20+
It's a more type-safe alternative to `Dynamic`, because it doesn't
21+
support field access or operators and it's bound to monomorphs. So,
22+
to work with the actual value, it needs to be explicitly promoted
23+
to another type.
24+
25+
## Type Conversions
26+
27+
**From:**
28+
- `[Dynamic](/api-docs/clay-native/Dynamic/)`
29+
30+
**To:**
31+
- `__promote.T`
32+
33+
## Metadata
34+
35+
| Name | Parameters |
36+
|------|------------|
37+
| `:forward.variance` | - |
38+

content/api-docs/clay-native/Array.md

Lines changed: 456 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: api-docs
3+
category: api-docs
4+
subCategory: doc
5+
menu: Haxe
6+
title: ArrayAccess
7+
target: Clay (Native)
8+
permalink: api-docs/clay-native/ArrayAccess/
9+
---
10+
11+
# ArrayAccess
12+
13+
<div class="type-hierarchy"><strong>ArrayAccess</strong> (extern interface)</div>
14+
15+
`ArrayAccess` is used to indicate a class that can be accessed using brackets.
16+
The type parameter represents the type of the elements stored.
17+
18+
This interface should be used for externs only. Haxe does not support custom
19+
array access on classes. However, array access can be implemented for
20+
abstract types.
21+
22+
<div class="see"><strong>See:</strong> https://haxe.org/manual/types-abstract-array-access.html</div>
23+
24+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: api-docs
3+
category: api-docs
4+
subCategory: doc
5+
menu: Haxe
6+
title: Bool
7+
target: Clay (Native)
8+
permalink: api-docs/clay-native/Bool/
9+
---
10+
11+
# Bool
12+
13+
<div class="type-hierarchy"><strong>Bool</strong> (Abstract)</div>
14+
15+
The standard Boolean type, which can either be `true` or `false`.
16+
17+
On static targets, `null` cannot be assigned to `Bool`. If this is necessary,
18+
`Null<Bool>` can be used instead.
19+
20+
<div class="see"><strong>See:</strong> https://haxe.org/manual/types-bool.html, https://haxe.org/manual/types-nullability.html</div>
21+
22+
23+
## Metadata
24+
25+
| Name | Parameters |
26+
|------|------------|
27+
| `:notNull` | - |
28+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
layout: api-docs
3+
category: api-docs
4+
subCategory: doc
5+
menu: Haxe
6+
title: Class
7+
target: Clay (Native)
8+
permalink: api-docs/clay-native/Class/
9+
---
10+
11+
# Class
12+
13+
<div class="type-hierarchy"><strong>Class</strong> (Abstract)</div>
14+
15+
An abstract type that represents a Class.
16+
17+
See `Type` for the Haxe Reflection API.
18+
19+
<div class="see"><strong>See:</strong> https://haxe.org/manual/types-class-instance.html</div>
20+
21+
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
layout: api-docs
3+
category: api-docs
4+
subCategory: doc
5+
menu: Haxe
6+
title: Date
7+
target: Clay (Native)
8+
permalink: api-docs/clay-native/Date/
9+
---
10+
11+
# Date
12+
13+
<div class="type-hierarchy"><strong>Date</strong> (Class)</div>
14+
15+
The Date class provides a basic structure for date and time related
16+
information. Date instances can be created by
17+
18+
- `new Date()` for a specific date,
19+
- `Date.now()` to obtain information about the current time,
20+
- `Date.fromTime()` with a given timestamp or
21+
- `Date.fromString()` by parsing from a String.
22+
23+
There are some extra functions available in the `DateTools` class.
24+
25+
In the context of Haxe dates, a timestamp is defined as the number of
26+
milliseconds elapsed since 1st January 1970 UTC.
27+
28+
## Supported range
29+
30+
Due to platform limitations, only dates in the range 1970 through 2038 are
31+
supported consistently. Some targets may support dates outside this range,
32+
depending on the OS at runtime. The `Date.fromTime` method will not work with
33+
timestamps outside the range on any target.
34+
35+
## Static Members
36+
37+
<div class="signature field-method has-description" id="now"><code><span class="field-name">now</span><span class="parenthesis">(</span><span class="parenthesis">)</span><span class="operator">:</span> <a href="#" class="type-link">Date</a></code><a class="header-anchor" href="#now"><span aria-hidden="true" class="header-anchor__symbol">#</span></a></div>
38+
39+
Returns a Date representing the current local time.
40+
| Returns |
41+
|---------|
42+
| [Date](/api-docs/clay-native/Date/) |
43+
44+
<hr class="field-separator" />
45+
46+
<div class="signature field-method has-description" id="fromTime"><code><span class="field-name">fromTime</span><span class="parenthesis">(</span><span class="arg-name">t</span><span class="operator">:</span> <a href="/api-docs/clay-native/Float/" class="type-link">Float</a><span class="parenthesis">)</span><span class="operator">:</span> <a href="#" class="type-link">Date</a></code><a class="header-anchor" href="#fromTime"><span aria-hidden="true" class="header-anchor__symbol">#</span></a></div>
47+
48+
Creates a Date from the timestamp (in milliseconds) `t`.
49+
50+
| Name | Type |
51+
|------|------|
52+
| `t` | [Float](/api-docs/clay-native/Float/) |
53+
54+
| Returns |
55+
|---------|
56+
| [Date](/api-docs/clay-native/Date/) |
57+
58+
<hr class="field-separator" />
59+
60+
<div class="signature field-method has-description" id="fromString"><code><span class="field-name">fromString</span><span class="parenthesis">(</span><span class="arg-name">s</span><span class="operator">:</span> <a href="/api-docs/clay-native/String/" class="type-link">String</a><span class="parenthesis">)</span><span class="operator">:</span> <a href="#" class="type-link">Date</a></code><a class="header-anchor" href="#fromString"><span aria-hidden="true" class="header-anchor__symbol">#</span></a></div>
61+
62+
Creates a Date from the formatted string `s`. The following formats are
63+
accepted by the function:
64+
65+
- `"YYYY-MM-DD hh:mm:ss"`
66+
- `"YYYY-MM-DD"`
67+
- `"hh:mm:ss"`
68+
69+
The first two formats expressed a date in local time. The third is a time
70+
relative to the UTC epoch.
71+
72+
| Name | Type |
73+
|------|------|
74+
| `s` | [String](/api-docs/clay-native/String/) |
75+
76+
| Returns |
77+
|---------|
78+
| [Date](/api-docs/clay-native/Date/) |
79+
80+
## Instance Members
81+
82+
<div class="signature field-method has-description" id="getTime"><code><span class="field-name">getTime</span><span class="parenthesis">(</span><span class="parenthesis">)</span><span class="operator">:</span> <a href="/api-docs/clay-native/Float/" class="type-link">Float</a></code><a class="header-anchor" href="#getTime"><span aria-hidden="true" class="header-anchor__symbol">#</span></a></div>
83+
84+
Returns the timestamp (in milliseconds) of `this` date.
85+
On cpp and neko, this function only has a second resolution, so the
86+
result will always be a multiple of `1000.0`, e.g. `1454698271000.0`.
87+
To obtain the current timestamp with better precision on cpp and neko,
88+
see the `Sys.time` API.
89+
90+
For measuring time differences with millisecond accuracy on
91+
all platforms, see `haxe.Timer.stamp`.
92+
| Returns |
93+
|---------|
94+
| [Float](/api-docs/clay-native/Float/) |
95+
96+
<hr class="field-separator" />
97+
98+
<div class="signature field-method has-description" id="toString"><code><span class="field-name">toString</span><span class="parenthesis">(</span><span class="parenthesis">)</span><span class="operator">:</span> <a href="/api-docs/clay-native/String/" class="type-link">String</a></code><a class="header-anchor" href="#toString"><span aria-hidden="true" class="header-anchor__symbol">#</span></a></div>
99+
100+
Returns a string representation of `this` Date in the local timezone
101+
using the standard format `YYYY-MM-DD HH:MM:SS`. See `DateTools.format` for
102+
other formatting rules.
103+
| Returns |
104+
|---------|
105+
| [String](/api-docs/clay-native/String/) |
106+
107+
<hr class="field-separator" />
108+
109+
<div class="signature field-method has-description" id="new"><code><span class="field-name">new</span><span class="parenthesis">(</span><span class="arg-name">year</span><span class="operator">:</span> <a href="/api-docs/clay-native/Int/" class="type-link">Int</a><span class="operator">,</span> <span class="arg-name">month</span><span class="operator">:</span> <a href="/api-docs/clay-native/Int/" class="type-link">Int</a><span class="operator">,</span> <span class="arg-name">day</span><span class="operator">:</span> <a href="/api-docs/clay-native/Int/" class="type-link">Int</a><span class="operator">,</span> <span class="arg-name">hour</span><span class="operator">:</span> <a href="/api-docs/clay-native/Int/" class="type-link">Int</a><span class="operator">,</span> <span class="arg-name">min</span><span class="operator">:</span> <a href="/api-docs/clay-native/Int/" class="type-link">Int</a><span class="operator">,</span> <span class="arg-name">sec</span><span class="operator">:</span> <a href="/api-docs/clay-native/Int/" class="type-link">Int</a><span class="parenthesis">)</span><span class="operator">:</span> <a href="/api-docs/clay-native/Void/" class="type-link">Void</a></code><a class="header-anchor" href="#new"><span aria-hidden="true" class="header-anchor__symbol">#</span></a></div>
110+
111+
Creates a new date object from the given arguments.
112+
113+
The behaviour of a Date instance is only consistent across platforms if
114+
the the arguments describe a valid date.
115+
116+
- month: 0 to 11 (note that this is zero-based)
117+
- day: 1 to 31
118+
- hour: 0 to 23
119+
- min: 0 to 59
120+
- sec: 0 to 59
121+
122+
| Name | Type |
123+
|------|------|
124+
| `year` | [Int](/api-docs/clay-native/Int/) |
125+
| `month` | [Int](/api-docs/clay-native/Int/) |
126+
| `day` | [Int](/api-docs/clay-native/Int/) |
127+
| `hour` | [Int](/api-docs/clay-native/Int/) |
128+
| `min` | [Int](/api-docs/clay-native/Int/) |
129+
| `sec` | [Int](/api-docs/clay-native/Int/) |
130+
131+
## Private Members
132+
133+
<div class="signature field-var no-description" id="mSeconds"><code><span class="field-name">mSeconds</span><span class="operator">:</span> <a href="/api-docs/clay-native/Float/" class="type-link">Float</a></code><a class="header-anchor" href="#mSeconds"><span aria-hidden="true" class="header-anchor__symbol">#</span></a></div>
134+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
layout: api-docs
3+
category: api-docs
4+
subCategory: doc
5+
menu: Haxe
6+
title: Dynamic
7+
target: Clay (Native)
8+
permalink: api-docs/clay-native/Dynamic/
9+
---
10+
11+
# Dynamic
12+
13+
<div class="type-hierarchy"><strong>Dynamic</strong> (Abstract)</div>
14+
15+
`Dynamic` is a special type which is compatible with all other types.
16+
17+
Use of `Dynamic` should be minimized as it prevents several compiler
18+
checks and optimizations. See `Any` type for a safer alternative for
19+
representing values of any type.
20+
21+
<div class="see"><strong>See:</strong> https://haxe.org/manual/types-dynamic.html</div>
22+
23+

0 commit comments

Comments
 (0)