Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory cleanup, use pooling and data structs #178

Merged
merged 1 commit into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
299 changes: 152 additions & 147 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/documentation/custom-shaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ShaderGame extends Game {
}
`
);
this.messageBus.Publish(new Message<ShaderAsset>(ShaderAsset.MESSAGE_REQUEST_LOAD, new ShaderAsset(
this.messageBus.Publish(Message.New<ShaderAsset>(ShaderAsset.MESSAGE_REQUEST_LOAD, new ShaderAsset(
"example-shader",
shader
)));
Expand Down Expand Up @@ -121,13 +121,13 @@ class ShaderGame extends Game {
}
`
);
this.messageBus.Publish(new Message<ShaderAsset>(ShaderAsset.MESSAGE_REQUEST_LOAD, new ShaderAsset(
this.messageBus.Publish(Message.New<ShaderAsset>(ShaderAsset.MESSAGE_REQUEST_LOAD, new ShaderAsset(
"example-shader",
shader
)));

// Load texture, will be overridden by custom shader
this.messageBus.Publish(new Message<ImageRequest>(ImageRequest.MESSAGE_REQUEST_LOAD, new ImageRequest(
this.messageBus.Publish(Message.New<ImageRequest>(ImageRequest.MESSAGE_REQUEST_LOAD, new ImageRequest(
"example",
"assets/example.png"
)));
Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/http-audio-loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ new HTTPAudioSystem(messageBus);
## Loading an Audio Asset

```typescript
this.messageBus.Publish(new Message<AudioRequest>(AudioRequest.MESSAGE_REQUEST_LOAD, new AudioRequest(
this.messageBus.Publish(Message.New<AudioRequest>(AudioRequest.MESSAGE_REQUEST_LOAD, new AudioRequest(
"example",
"assets/example.mp3"
)));
Expand All @@ -26,4 +26,4 @@ This loads the audio file `assets/example.mp3` and saves it as asset name
to as `example`.

[AudioSource]: ../../reference/classes/audiosource
[HTTPAudioSystem]: ../../references/classes/httpaudiosystem
[HTTPAudioSystem]: ../../references/classes/httpaudiosystem
4 changes: 2 additions & 2 deletions docs/documentation/image-loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Images are loaded by sending a message to an image loading system with an
attached [ImageRequest] to specify the image.

```typescript
this.messageBus.Publish(new Message<ImageRequest>(
this.messageBus.Publish(Message.New<ImageRequest>(
ImageRequest.MESSAGE_REQUEST_LOAD,
new ImageRequest("bullet", "assets/bullet.png")
));
Expand Down Expand Up @@ -48,7 +48,7 @@ Textures generated from a loaded image can be customised further with additional
options provided to the [ImageRequest] in the form of [ITextureOptions].

```typescript
this.messageBus.Publish(new Message<ImageRequest>(
this.messageBus.Publish(Message.New<ImageRequest>(
ImageRequest.MESSAGE_REQUEST_LOAD,
new ImageRequest(
"bullet",
Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Once this system has been set up, scripts can be loaded in by sending a message
with a [ScriptRequest] as the payload.

```typescript
this.messageBus.Publish(new Message<ScriptRequest>(ScriptRequest.MESSAGE_REQUEST_LOAD,
this.messageBus.Publish(Message.New<ScriptRequest>(ScriptRequest.MESSAGE_REQUEST_LOAD,
new ScriptRequest(
"test-script",
"assets/script.js"
Expand Down Expand Up @@ -108,7 +108,7 @@ Scripts can be manually executed by sending a message with a
[ScriptTriggerRequest].

```typescript
this.messageBus.Publish(new Message<ScriptTriggerRequest<string>>(ScriptRequest.MESSAGE_REQUEST_LOAD,
this.messageBus.Publish(Message.New<ScriptTriggerRequest<string>>(ScriptRequest.MESSAGE_REQUEST_LOAD,
new ScriptTriggerRequest(
"test-script",
"custom-execution",
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ HTML, for example:
This loads the `VT323` font into the browser using HTML.

```typescript
messageBus.Publish(new Message<FontAsset>(FontAsset.MESSAGE_REQUEST_LOAD, new FontAsset(
messageBus.Publish(Message.New<FontAsset>(FontAsset.MESSAGE_REQUEST_LOAD, new FontAsset(
"example_font",
"VT323",
"normal",
Expand Down
3 changes: 3 additions & 0 deletions docs/reference/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

246 changes: 246 additions & 0 deletions docs/reference/classes/arraysystem.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading