-
Notifications
You must be signed in to change notification settings - Fork 193
/
Copy pathapi.js
256 lines (256 loc) · 13 KB
/
api.js
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
YUI.add("yuidoc-meta", function(Y) {
Y.YUIDoc = { meta: {
"classes": [
"Kiwi.Animations.Animation",
"Kiwi.Animations.Sequence",
"Kiwi.Animations.Tween",
"Kiwi.Animations.Tweens.Easing.Back",
"Kiwi.Animations.Tweens.Easing.Bounce",
"Kiwi.Animations.Tweens.Easing.Circular",
"Kiwi.Animations.Tweens.Easing.Cubic",
"Kiwi.Animations.Tweens.Easing.Elastic",
"Kiwi.Animations.Tweens.Easing.Exponential",
"Kiwi.Animations.Tweens.Easing.Linear",
"Kiwi.Animations.Tweens.Easing.Quadratic",
"Kiwi.Animations.Tweens.Easing.Quartic",
"Kiwi.Animations.Tweens.Easing.Quintic",
"Kiwi.Animations.Tweens.Easing.Sinusoidal",
"Kiwi.Animations.Tweens.TweenManager",
"Kiwi.Camera",
"Kiwi.CameraManager",
"Kiwi.Component",
"Kiwi.ComponentManager",
"Kiwi.Components.AnimationManager",
"Kiwi.Components.ArcadePhysics",
"Kiwi.Components.Box",
"Kiwi.Components.Input",
"Kiwi.Components.Sound",
"Kiwi.Entity",
"Kiwi.Files.AudioFile",
"Kiwi.Files.DataFile",
"Kiwi.Files.DataLibrary",
"Kiwi.Files.File",
"Kiwi.Files.FileStore",
"Kiwi.Files.Loader",
"Kiwi.Files.TextureFile",
"Kiwi.Game",
"Kiwi.GameManager",
"Kiwi.GameObjects.Sprite",
"Kiwi.GameObjects.StaticImage",
"Kiwi.GameObjects.TextField",
"Kiwi.GameObjects.Tilemap.TileMap",
"Kiwi.GameObjects.Tilemap.TileMapLayer",
"Kiwi.GameObjects.Tilemap.TileMapLayerIsometric",
"Kiwi.GameObjects.Tilemap.TileMapLayerOrthogonal",
"Kiwi.GameObjects.Tilemap.TileType",
"Kiwi.Geom.AABB",
"Kiwi.Geom.Circle",
"Kiwi.Geom.Intersect",
"Kiwi.Geom.IntersectResult",
"Kiwi.Geom.Line",
"Kiwi.Geom.Matrix",
"Kiwi.Geom.Point",
"Kiwi.Geom.Ray",
"Kiwi.Geom.Rectangle",
"Kiwi.Geom.Transform",
"Kiwi.Geom.Vector2",
"Kiwi.Group",
"Kiwi.HUD.HUDComponents.Counter",
"Kiwi.HUD.HUDComponents.Time",
"Kiwi.HUD.HUDComponents.WidgetInput",
"Kiwi.HUD.HUDDisplay",
"Kiwi.HUD.HUDManager",
"Kiwi.HUD.HUDWidget",
"Kiwi.HUD.Widget.Bar",
"Kiwi.HUD.Widget.BasicScore",
"Kiwi.HUD.Widget.Button",
"Kiwi.HUD.Widget.Icon",
"Kiwi.HUD.Widget.IconBar",
"Kiwi.HUD.Widget.Menu",
"Kiwi.HUD.Widget.MenuItem",
"Kiwi.HUD.Widget.TextField",
"Kiwi.HUD.Widget.Time",
"Kiwi.IChild",
"Kiwi.Input.Finger",
"Kiwi.Input.InputManager",
"Kiwi.Input.Key",
"Kiwi.Input.Keyboard",
"Kiwi.Input.Keycodes",
"Kiwi.Input.Mouse",
"Kiwi.Input.MouseCursor",
"Kiwi.Input.Pointer",
"Kiwi.Input.Touch",
"Kiwi.PluginManager",
"Kiwi.Renderers.CanvasRenderer",
"Kiwi.Renderers.GLArrayBuffer",
"Kiwi.Renderers.GLBlendMode",
"Kiwi.Renderers.GLElementArrayBuffer",
"Kiwi.Renderers.GLRenderManager",
"Kiwi.Renderers.GLTextureManager",
"Kiwi.Renderers.GLTextureWrapper",
"Kiwi.Renderers.Renderer",
"Kiwi.Renderers.TextureAtlasRenderer",
"Kiwi.Shaders.ShaderManager",
"Kiwi.Shaders.ShaderPair",
"Kiwi.Shaders.TextureAtlasShader",
"Kiwi.Signal",
"Kiwi.SignalBinding",
"Kiwi.Sound.Audio",
"Kiwi.Sound.AudioLibrary",
"Kiwi.Sound.AudioManager",
"Kiwi.Stage",
"Kiwi.State",
"Kiwi.StateConfig",
"Kiwi.StateManager",
"Kiwi.System.Bootstrap",
"Kiwi.System.Device",
"Kiwi.Textures.SingleImage",
"Kiwi.Textures.SpriteSheet",
"Kiwi.Textures.TextureAtlas",
"Kiwi.Textures.TextureLibrary",
"Kiwi.Time.Clock",
"Kiwi.Time.ClockManager",
"Kiwi.Time.MasterClock",
"Kiwi.Time.Timer",
"Kiwi.Time.TimerEvent",
"Kiwi.Utils.Canvas",
"Kiwi.Utils.Color",
"Kiwi.Utils.Common",
"Kiwi.Utils.GameMath",
"Kiwi.Utils.Log",
"Kiwi.Utils.RandomDataGenerator",
"Kiwi.Utils.RequestAnimationFrame",
"Kiwi.Utils.Version"
],
"modules": [
"Animations",
"Components",
"Easing",
"Files",
"GameObjects",
"Geom",
"HUD",
"HUDComponents",
"Input",
"Kiwi",
"Renderers",
"Shaders",
"Sound",
"System",
"Textures",
"Tilemap",
"Time",
"Tweens",
"Utils",
"Utils.",
"Widget"
],
"allModules": [
{
"displayName": "Animations",
"name": "Animations",
"description": "Is the namespace in which all code that is used to create/provide an animation of various sorts are stored. These could range from animations that change the cell of a SpriteSheet that is displayed every few seconds (Animation/Sequence), to animations that change a numeric value on a object over a period time (Tweens)."
},
{
"displayName": "Components",
"name": "Components",
"description": "Component's are a snipnets of code which are designed to provide extra functionality to various objects that contain a ComponentManager. Objects do not have to have Components in order to preform their main function, but are instead provided to make common task's that you may want to do with those Objects a bit easier. For example: Some times you would like to easily listen for when a GameObject has been 'clicked'. So you can attach a 'InputComponent' to a GameObject (Sprites have them by default) which will then do hit-detector code for you. All you have to do is Subscribe to the events on the InputComponent."
},
{
"displayName": "Easing",
"name": "Easing",
"description": "Contains various methods that can be used when you are wanting to ease a Tween."
},
{
"displayName": "Files",
"name": "Files",
"description": "AudioFile which contains settings, loading, and processing details for Audio files to be used. \n\nUses tag loading for devices not supporting the WebAudioAPI. Otherwise XHR + arraybuffer loading methods are used."
},
{
"displayName": "GameObjects",
"name": "GameObjects",
"description": "The GameObject namespace holds classes which are designed to be added to a State (either directly, or as an ancestor of a Group) and are the Objects that are used when wanting to render anything visual onto the current State. Each GameObject is a representation of a particular item in a game and as such has information that corresponds to that item (like where they are in the 'GameWorld', the scale of the GameObject, who their parent is, e.t.c). For Example: If you wanted to have a massive background image then you can use the StaticImage GameObject, as that is a relatively light-weight object). Or if you had Player with an Animation, which user's could interactive with, then you would use a Sprite, which is more robust."
},
{
"displayName": "Geom",
"name": "Geom",
"description": "Contains common classes whose applications deal with geometry or the collision of geometric shapes."
},
{
"displayName": "HUD",
"name": "HUD",
"description": "The HUD (Heads Up Display) is a section that handles the displayment of information that you always want visible to user. \nThis section is managed differently to normal GameObjects, where the difference being that HUD items aren't added to a Canvas but are DOM elements instead. Since they DOM elements you can style these elements using a CSS sheet if you wish."
},
{
"displayName": "HUDComponents",
"name": "HUDComponents",
"description": "HUDComponents are a space where components that are specific to HUDWidgets are kept. This are seperated from the normal Components section as the implementation of these are unique and only make sense when implemented on HUDWidgets, otherwise the concepts behind these are the same as normal Components."
},
{
"displayName": "Input",
"name": "Input",
"description": "Section that contains the code related to handling user interaction with a game."
},
{
"displayName": "Kiwi",
"name": "Kiwi",
"description": "Module - Kiwi (Core)\nThe top level namespace in which all core classes and modules are defined."
},
{
"displayName": "Renderers",
"name": "Renderers",
"description": "Contains the classes which are related to the rendering of GameObjects."
},
{
"displayName": "Shaders",
"name": "Shaders",
"description": "GLSL ES Shaders are used for WebGL rendering.\nShaderPair objects encapsulate GLSL ES vertex and fragment shader programs. \n ShaderPairs contain the GLSL code, provide an interface to uniforms and attributes, and have the ability to link and compile the shaders.\nThe ShaderManager keeps track of each ShaderPair, and controls which one is bound for use at any particular time.\n Only the ShaderManager can create ShaderPairs. When a renderer (see note on renderes below) requests a ShaderPair the ShaderManager will either\n 1) Return a reference to an already instantiated ShaderPair, and set the GL state to use the shader program or\n 2) Return a reference to a new ShaderPair, which will be linked and compiled and bound for use.\n All ShaderPairs must be housed as properties of the Kiwi.Shaders object. \n\nKiwi.Renderer objects use a ShaderPair to draw.\n They must request a ShaderPair from the ShaderManager.\n Many renderers may use the same ShaderPair.\n Some renderers may at different times use multiple ShaderPairs (only one is possible at any given time)"
},
{
"displayName": "Sound",
"name": "Sound",
"description": "The namespace that holds all of the assets and functionality when dealing with Audio."
},
{
"displayName": "System",
"name": "System",
"description": "Kiwi - System"
},
{
"displayName": "Textures",
"name": "Textures",
"description": "Contains Objects that are used when dealing specifically with Textures/Images. Majority of these classes are for Internal Kiwi use."
},
{
"displayName": "Tilemap",
"name": "Tilemap",
"description": "A TileMap handles the creation of TileMapLayers and the TileTypes that they use.\nSince a TileMap isn't a Entity itself you cannot add it to the Stage inorder to render that it manages, \nInstead you have to add each layer lies within it. This way you can have other GameObjects behind/in-front of layers."
},
{
"displayName": "Time",
"name": "Time",
"description": "Contains ways of tracking time within a game or application. Each game will have a ClockManager, MasterClock and a single Clock automatically generated for them upon game creation."
},
{
"displayName": "Tweens",
"name": "Tweens",
"description": "The section of Kiwi which holds the scripts that manage Tween's in Kiwi. The scripts in this section are based on Tween.js by sole and have been converted to TypeScript and integrated into Kiwi. https://github.com/sole/tween.js"
},
{
"displayName": "Utils",
"name": "Utils",
"description": "Utils is a space that holds a wide varity of useful methods."
},
{
"displayName": "Utils.",
"name": "Utils.",
"description": "A utilty class used to add management functionality to common console methods. \nYou can use this class by either creating a new instance, or using the instance at the namespace 'Kiwi.Log'.\n\nlog/error/warn methods contained on this class function just like their 'console' equivalents except that:\n- You can assign a tag to message by adding a '#' symbol to the front of a parameter. Example: this.log('Hi', '#welcome'); \n- Messages can have multiple tags. Example: this.log('Hi', '#welcome', '#greeting');\n- Messages are recorded (by default) and you can then search through any messages saved.\n\nYou can use the 'show' commands to search through recordings and find specific messages."
},
{
"displayName": "Widget",
"name": "Widget",
"description": "HUD Widgets are objects that are generally placed on to a HUD Display for displaying and managing information that the user would always need to see.\nAn example of such information would be: the Health remaining, amount of ammo left, time they have left, e.t.c.\nAnd each one of those examples would have its own widget."
}
]
} };
});