Browse Source

Initial commit.

master
revolverpunk 4 years ago
commit
986c652744
12 changed files with 165056 additions and 0 deletions
  1. +3
    -0
      README.md
  2. +50
    -0
      index.html
  3. +7
    -0
      libs/aframe-extras.min.js
  4. +294
    -0
      libs/aframe.min.js
  5. +1364
    -0
      mesh/Cat.ply
  6. BIN
      mesh/Cat.vox
  7. +1364
    -0
      mesh/Cat_Walk0.ply
  8. BIN
      mesh/Cat_Walk0.vox
  9. +1364
    -0
      mesh/Cat_Walk1.ply
  10. BIN
      mesh/Cat_Walk1.vox
  11. +160610
    -0
      mesh/FlatFloor.ply
  12. BIN
      mesh/FlatFloor.vox

+ 3
- 0
README.md View File

@@ -0,0 +1,3 @@
Cat Flat
========
Cat Flat is like Dwarf Fortress but with cats instead of dwarves and a lot less simulation, in VR.

+ 50
- 0
index.html View File

@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tweaky technical stuff -->
<meta charset="utf-8" />
<link rel="shortcut icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Tweaky technical stuff -->

<!-- Descriptiony stuff -->
<title>Cat Flat</title>
<!-- Descriptiony stuff -->
</head>
<body>
<!-- Enter the matri- VR -->
<script src="libs/aframe.min.js"></script>
<script src="libs/aframe-extras.min.js"></script>
<a-scene vr-mode-ui="enabled: true">
<a-assets>
<a-asset-item id="FlatFloor" src="mesh/FlatFloor.ply"></a-asset-item>
<a-asset-item id="Cat" src="mesh/Cat.ply"></a-asset-item>
<a-asset-item id="CatW0" src="mesh/Cat_Walk0.ply"></a-asset-item>
<a-asset-item id="CatW1" src="mesh/Cat_Walk1.ply"></a-asset-item>
</a-assets>
<a-entity camera="userHeight: 1" look-controls position="-0.91 0 -0.91" rotation="0 225 0"></a-entity>
<a-sky color="#111"></a-sky>
<a-entity light="type: directional" position="-1 1 -0.5"></a-entity>
<a-entity ply-model="src: #FlatFloor" rotation="-90 0 0" position="0 0 0" scale="0.03 0.03 0.03"></a-entity>
<a-entity id="Cat" ply-model="src: #Cat" rotation="-90 -110 0" position="0 0.105 0" scale="0.03 0.03 0.03" cat="walking:true"></a-entity>
</a-scene>
<script>
AFRAME.registerComponent("cat", {
dependencies: ["ply-model"],
schema: {
walking: {
default: true
}
},
tick: function(time, delta) {
var scaledTime = time / 300.0;
var height = Math.sin(scaledTime * 2 * Math.PI) * 0.005 + 0.005;
var frame = Math.floor(scaledTime) % 2;
var position = this.el.getAttribute("position");
this.el.setAttribute("ply-model", "src: #CatW" + frame);
this.el.setAttribute("position", {x : position.x, y: 0.105 + height, z: position.z});
}
})
</script>
</body>
<html>

+ 7
- 0
libs/aframe-extras.min.js
File diff suppressed because it is too large
View File


+ 294
- 0
libs/aframe.min.js
File diff suppressed because it is too large
View File


+ 1364
- 0
mesh/Cat.ply
File diff suppressed because it is too large
View File


BIN
mesh/Cat.vox View File


+ 1364
- 0
mesh/Cat_Walk0.ply
File diff suppressed because it is too large
View File


BIN
mesh/Cat_Walk0.vox View File


+ 1364
- 0
mesh/Cat_Walk1.ply
File diff suppressed because it is too large
View File


BIN
mesh/Cat_Walk1.vox View File


+ 160610
- 0
mesh/FlatFloor.ply
File diff suppressed because it is too large
View File


BIN
mesh/FlatFloor.vox View File


Loading…
Cancel
Save