Skip to content

Commit

Permalink
Game - Removes boilerplate Sutra setup that is now handled upstream
Browse files Browse the repository at this point in the history
Rebuilds dist
Updates examples
Code clean-up
  • Loading branch information
Marak committed Mar 5, 2024
1 parent 0c3511a commit f2de321
Show file tree
Hide file tree
Showing 68 changed files with 2,221 additions and 1,377 deletions.
16 changes: 16 additions & 0 deletions mantra-client/public/categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,14 @@ let entity_examples = [
image: 'placeholder-image.jpg',
url: 'entity/entity-lifetime.html',
tags: ['entity', 'lifetime', 'duration', 'time', 'exist', 'live', 'survive', 'persist', 'endure', 'continue', 'remain']
},
{
title: 'Absolute Position',
category: 'entity',
description: 'Set an absolute screen position for an entity.',
image: 'placeholder-image.jpg',
url: 'entity/absolute-position.html',
tags: ['absolute', 'fixed', 'position', 'entity', 'screen', 'location', 'place', 'spot', 'site', 'area', 'region', 'zone']
}

];
Expand Down Expand Up @@ -1024,6 +1032,14 @@ let container_examples = [
url: 'containers/group-entities.html',
tags: ['group', 'entities', 'group', 'layout', 'arrangement', 'composition', 'assembly', 'collection', 'assemblage', 'aggregation']
},
{
title: 'Scene Layout',
category: ['containers', 'scenes', 'entity'],
description: 'Arrange entities by origin in a Scene.',
image: 'placeholder-image.jpg',
url: 'containers/scene-layout.html',
tags: ['grid', 'layout', 'arrange', 'entities', 'group', 'layout', 'arrangement', 'composition', 'assembly', 'collection', 'scene']
},
{
title: 'Grid Layout',
category: 'containers',
Expand Down
16 changes: 16 additions & 0 deletions mantra-client/public/examples/categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,14 @@ let entity_examples = [
image: 'placeholder-image.jpg',
url: 'entity/entity-lifetime.html',
tags: ['entity', 'lifetime', 'duration', 'time', 'exist', 'live', 'survive', 'persist', 'endure', 'continue', 'remain']
},
{
title: 'Absolute Position',
category: 'entity',
description: 'Set an absolute screen position for an entity.',
image: 'placeholder-image.jpg',
url: 'entity/absolute-position.html',
tags: ['absolute', 'fixed', 'position', 'entity', 'screen', 'location', 'place', 'spot', 'site', 'area', 'region', 'zone']
}

];
Expand Down Expand Up @@ -1024,6 +1032,14 @@ let container_examples = [
url: 'containers/group-entities.html',
tags: ['group', 'entities', 'group', 'layout', 'arrangement', 'composition', 'assembly', 'collection', 'assemblage', 'aggregation']
},
{
title: 'Scene Layout',
category: ['containers', 'scenes', 'entity'],
description: 'Arrange entities by origin in a Scene.',
image: 'placeholder-image.jpg',
url: 'containers/scene-layout.html',
tags: ['grid', 'layout', 'arrange', 'entities', 'group', 'layout', 'arrangement', 'composition', 'assembly', 'collection', 'scene']
},
{
title: 'Grid Layout',
category: 'containers',
Expand Down
14 changes: 14 additions & 0 deletions mantra-client/public/examples/entity.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@
</div>
<!-- <div class="resize-handle"></div> Resize handle -->
<div class="categories">
<a class="staticExampleLink" href="entity/absolute-position.html">
<div class="category" style="background-color: #e91e63;">
<span class="categoryExample">Entity</span>
<p>Set an absolute screen position for an entity.</p>
<h3>Absolute Position</h3>
</div>
</a>
<a class="staticExampleLink" href="entity/clone-entity.html">
<div class="category" style="background-color: #e91e63;">
<span class="categoryExample">Entity</span>
Expand Down Expand Up @@ -452,6 +459,13 @@ <h3>Field of View</h3>
<h3>Group Entities</h3>
</div>
</a>
<a class="staticExampleLink" href="containers/scene-layout.html">
<div class="category" style="background-color: #e91e63;">
<span class="categoryExample">Entity</span>
<p>Arrange entities by origin in a Scene.</p>
<h3>Scene Layout</h3>
</div>
</a>
<a class="staticExampleLink" href="lifecycle/after-collision-active.html">
<div class="category" style="background-color: #ff4081;">
<span class="categoryExample">Entity</span>
Expand Down
2 changes: 1 addition & 1 deletion mantra-client/public/examples/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h2 id="exampleTitle"></h2>
<script>
//
//
const exampleURLs = ["npc/hexapod.html","physics/set-position.html","physics/rotate.html","collisions/collision-start.html","collisions/collision-active.html","markup/html-preview.html","markup/html-entity-metadata.html","markup/html-entity.html","markup/html-entity-containers.html","markup/html-entity-attributes.html","markup/html-collision-events.html","games/home.html","games/platformer.html","games/music-world.html","games/maze-world.html","games/gravity-gardens.html","lifecycle/before-update-entity.html","lifecycle/before-update.html","lifecycle/before-remove-entity.html","lifecycle/before-create-entity.html","lifecycle/before-collision-start.html","lifecycle/before-collision-end.html","lifecycle/before-collision-active.html","lifecycle/after-update-entity.html","lifecycle/after-update.html","lifecycle/after-remove-entity.html","lifecycle/after-create-entity.html","lifecycle/after-collision-start.html","lifecycle/after-collision-end.html","lifecycle/after-collision-active.html","ui/ui-textarea.html","ui/ui-text.html","ui/ui-select.html","ui/ui-range.html","ui/ui-link.html","ui/ui-image.html","ui/ui-iframe.html","ui/flash-message.html","ui/ui-code.html","ui/ui-canvas.html","ui/ui-button.html","scenes/scene-unloading.html","scenes/scene-loading.html","containers/stack-layout.html","containers/group-entities.html","containers/grid-layout.html","game-config/game-size.html","game-config/game-root.html","game-config/game-graphics.html","game-config/field-of-view.html","game-config/frames-per-second.html","terrain/procedural-maze.html","terrain/procedural-biome.html","terrain/infinite-maze.html","tilemaps/tilemap-data.html","tilemaps/tile-collisions.html","tilemaps/tilemap-from-labyrinthos.html","behaviors/keyboard-input.html","behaviors/gamepad-input.html","behaviors/game-tick.html","behaviors/entity-state.html","camera/follow-player.html","camera/camera-shake.html","camera/camera-set-position.html","camera/camera-move.html","collisions/collision-start.html","collisions/collision-end.html","collisions/collision-active.html","audio/virtual-piano.html","audio/play-tone.html","inputs/mouse.html","inputs/mouse.html","inputs/keyboard.html","inputs/gamepad.html","assets/load-sprite-sheet.html","assets/load-image.html","render/three.html","render/css3.html","render/babylon.html","textures/update-texture.html","textures/sprite-sheets.html","textures/set-texture.html","physics/set-position.html","physics/rotate.html","physics/apply-force.html","entity/update-entity.html","entity/repeat-entity.html","entity/remove-entity.html","entity/get-entity.html","entity/entity-origin.html","entity/entity-lifetime.html","entity/entity-builder.html","entity/create-entity.html","entity/entity-composition.html","entity/clone-entity.html","npc/hexapod.html","items/unit-spawner.html","items/teleporter.html","items/flame.html","items/bullet.html","items/boomerang.html","items/block.html"]; // Assuming exampleURLsJSON is defined elsewhere
const exampleURLs = ["npc/hexapod.html","physics/set-position.html","physics/rotate.html","collisions/collision-start.html","collisions/collision-active.html","markup/html-preview.html","markup/html-entity-metadata.html","markup/html-entity.html","markup/html-entity-containers.html","markup/html-entity-attributes.html","markup/html-collision-events.html","games/home.html","games/platformer.html","games/music-world.html","games/maze-world.html","games/gravity-gardens.html","lifecycle/before-update-entity.html","lifecycle/before-update.html","lifecycle/before-remove-entity.html","lifecycle/before-create-entity.html","lifecycle/before-collision-start.html","lifecycle/before-collision-end.html","lifecycle/before-collision-active.html","lifecycle/after-update-entity.html","lifecycle/after-update.html","lifecycle/after-remove-entity.html","lifecycle/after-create-entity.html","lifecycle/after-collision-start.html","lifecycle/after-collision-end.html","lifecycle/after-collision-active.html","ui/ui-textarea.html","ui/ui-text.html","ui/ui-select.html","ui/ui-range.html","ui/ui-link.html","ui/ui-image.html","ui/ui-iframe.html","ui/flash-message.html","ui/ui-code.html","ui/ui-canvas.html","ui/ui-button.html","scenes/scene-unloading.html","scenes/scene-loading.html","containers/stack-layout.html","containers/scene-layout.html","containers/group-entities.html","containers/grid-layout.html","game-config/game-size.html","game-config/game-root.html","game-config/game-graphics.html","game-config/field-of-view.html","game-config/frames-per-second.html","terrain/procedural-maze.html","terrain/procedural-biome.html","terrain/infinite-maze.html","tilemaps/tilemap-data.html","tilemaps/tile-collisions.html","tilemaps/tilemap-from-labyrinthos.html","behaviors/keyboard-input.html","behaviors/gamepad-input.html","behaviors/game-tick.html","behaviors/entity-state.html","camera/follow-player.html","camera/camera-shake.html","camera/camera-set-position.html","camera/camera-move.html","collisions/collision-start.html","collisions/collision-end.html","collisions/collision-active.html","audio/virtual-piano.html","audio/play-tone.html","inputs/mouse.html","inputs/mouse.html","inputs/keyboard.html","inputs/gamepad.html","assets/load-sprite-sheet.html","assets/load-image.html","render/three.html","render/css3.html","render/babylon.html","textures/update-texture.html","textures/sprite-sheets.html","textures/set-texture.html","physics/set-position.html","physics/rotate.html","physics/apply-force.html","entity/update-entity.html","entity/repeat-entity.html","entity/remove-entity.html","entity/get-entity.html","entity/entity-origin.html","entity/entity-lifetime.html","entity/entity-builder.html","entity/create-entity.html","entity/entity-composition.html","entity/clone-entity.html","entity/absolute-position.html","npc/hexapod.html","items/unit-spawner.html","items/teleporter.html","items/flame.html","items/bullet.html","items/boomerang.html","items/block.html"]; // Assuming exampleURLsJSON is defined elsewhere



Expand Down
Loading

0 comments on commit f2de321

Please sign in to comment.