Skip to content

Commit

Permalink
Improve FPS Controller example visuals
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Jan 17, 2025
1 parent 9b6671e commit 5cdf599
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Binary file modified examples/assets/models/fps-map.glb
Binary file not shown.
Binary file added examples/assets/skies/autumn-field-puresky.webp
Binary file not shown.
11 changes: 4 additions & 7 deletions examples/fps-controller.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,27 @@
<pc-app>
<!-- Modules -->
<pc-module name="Ammo" glue="modules/ammo/ammo.wasm.js" wasm="modules/ammo/ammo.wasm.wasm" fallback="modules/ammo/ammo.js"></pc-module>
<pc-module name="Basis" glue="modules/basis/basis.wasm.js" wasm="modules/basis/basis.wasm.wasm" fallback="modules/basis/basis.js"></pc-module>
<!-- Assets -->
<pc-asset id="first-person-camera" src="../node_modules/playcanvas/scripts/esm/first-person-controller.mjs" preload></pc-asset>
<pc-asset id="static-body" src="scripts/static-body.mjs" preload></pc-asset>
<pc-asset id="lake-bed" src="assets/skies/dry-lake-bed-2k.hdr" preload></pc-asset>
<pc-asset id="lake-bed" src="assets/skies/autumn-field-puresky.webp" preload></pc-asset>
<pc-asset id="map" src="assets/models/fps-map.glb" preload></pc-asset>
<!-- Scene -->
<pc-scene>
<!-- Sky -->
<pc-sky asset="lake-bed" lighting></pc-sky>
<!-- Camera (with XR support) -->
<pc-entity name="camera controller" position="5 2 10">
<pc-entity id="camera" position="0 0.9 0">
<pc-entity id="camera" position="0 0.8 0">
<pc-camera></pc-camera>
</pc-entity>
<pc-collision type="capsule" radius="0.5" height="2"></pc-collision>
<pc-collision type="capsule" radius="0.5" height="1.8"></pc-collision>
<pc-rigidbody type="dynamic" angular-factor="0 0 0" mass="100" friction="0.5" restitution="0"></pc-rigidbody>
<pc-scripts>
<pc-script name="firstPersonController"></pc-script>
</pc-scripts>
</pc-entity>
<!-- Light -->
<pc-entity name="light" rotation="45 0 0">
<pc-light></pc-light>
</pc-entity>
<!-- Map -->
<pc-entity name="map">
<pc-model asset="map"></pc-model>
Expand Down

0 comments on commit 5cdf599

Please sign in to comment.