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

Optimizations #241

Merged
merged 21 commits into from
Feb 5, 2018
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules
npm-debug.log*
*.wav
*.bat
.vs
305 changes: 305 additions & 0 deletions assets/images/brush_atlas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
{
"meta": {
"image": "brush_atlas.png",
"size": {"w":3584,"h":2944},
"scale": "1"
},
"frames": {
"stamp_grass.png":
{
"frame": {"x":0,"y":128,"w":1536,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1536,"h":512},
"sourceSize": {"w":1536,"h":512}
},
"lines4.png":
{
"frame": {"x":0,"y":0,"w":2048,"h":128},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":2048,"h":128},
"sourceSize": {"w":2048,"h":128}
},
"stamp_fur2.png":
{
"frame": {"x":0,"y":640,"w":1536,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1536,"h":512},
"sourceSize": {"w":1536,"h":512}
},
"stamp_bush.png":
{
"frame": {"x":0,"y":1152,"w":1024,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":512},
"sourceSize": {"w":1024,"h":512}
},
"stamp_gear.png":
{
"frame": {"x":1024,"y":1152,"w":1024,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":512},
"sourceSize": {"w":1024,"h":512}
},
"stamp_fur1.png":
{
"frame": {"x":2048,"y":0,"w":1024,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":512},
"sourceSize": {"w":1024,"h":512}
},
"lines3.png":
{
"frame": {"x":2048,"y":512,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"line_gradient.png":
{
"frame": {"x":2048,"y":768,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"lines5.png":
{
"frame": {"x":2048,"y":1024,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"silky_flat.png":
{
"frame": {"x":2048,"y":1280,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"silky_textured.png":
{
"frame": {"x":0,"y":1664,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"squared_textured.png":
{
"frame": {"x":1024,"y":1664,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"line_grunge2.png":
{
"frame": {"x":2048,"y":1664,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"line_grunge3.png":
{
"frame": {"x":0,"y":1920,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"line_grunge1.png":
{
"frame": {"x":1024,"y":1920,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"lines2.png":
{
"frame": {"x":2048,"y":1920,"w":1024,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":1024,"h":256},
"sourceSize": {"w":1024,"h":256}
},
"stamp_leaf3.png":
{
"frame": {"x":1536,"y":128,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_dots.png":
{
"frame": {"x":1536,"y":640,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"thumb_stamp_star.png":
{
"frame": {"x":2304,"y":1536,"w":128,"h":128},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
"sourceSize": {"w":128,"h":128}
},
"stamp_grunge1.png":
{
"frame": {"x":512,"y":2176,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_grunge2.png":
{
"frame": {"x":1024,"y":2176,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_grunge3.png":
{
"frame": {"x":1536,"y":2176,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_grunge4.png":
{
"frame": {"x":2048,"y":2176,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_grunge5.png":
{
"frame": {"x":2560,"y":2176,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_leaf1.png":
{
"frame": {"x":3072,"y":0,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_leaf2.png":
{
"frame": {"x":3072,"y":512,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_column.png":
{
"frame": {"x":3072,"y":1024,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_snow.png":
{
"frame": {"x":3072,"y":1536,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"stamp_squares.png":
{
"frame": {"x":3072,"y":2048,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
},
"lines1.png":
{
"frame": {"x":0,"y":2688,"w":256,"h":256},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":256,"h":256},
"sourceSize": {"w":256,"h":256}
},
"thumb_rainbow.png":
{
"frame": {"x":3072,"y":2560,"w":128,"h":128},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
"sourceSize": {"w":128,"h":128}
},
"thumb_single_sphere.png":
{
"frame": {"x":3200,"y":2560,"w":128,"h":128},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
"sourceSize": {"w":128,"h":128}
},
"thumb_stamp_fur1.png":
{
"frame": {"x":3328,"y":2560,"w":128,"h":128},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
"sourceSize": {"w":128,"h":128}
},
"thumb_stamp_fur2.png":
{
"frame": {"x":3456,"y":2560,"w":128,"h":128},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
"sourceSize": {"w":128,"h":128}
},
"thumb_stamp_grass.png":
{
"frame": {"x":2048,"y":1536,"w":128,"h":128},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
"sourceSize": {"w":128,"h":128}
},
"thumb_stamp_snow.png":
{
"frame": {"x":2176,"y":1536,"w":128,"h":128},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
"sourceSize": {"w":128,"h":128}
},
"stamp_star.png":
{
"frame": {"x":0,"y":2176,"w":512,"h":512},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":512,"h":512},
"sourceSize": {"w":512,"h":512}
}
}
}
Binary file added assets/images/brush_atlas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 9 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</script>
<script src="https://ucarecdn.com/widget/2.5.5/uploadcare/uploadcare.full.min.js"></script>
<script src="https://cdn.rawgit.com/zenorocha/clipboard.js/v1.5.12/dist/clipboard.min.js"></script>
<script src="vendor/aframe-v0.7.0.min.js"></script>
<script src="vendor/aframe-input-mapping-component.min.js"></script>
<script src="vendor/aframe-master.min.js"></script>
<script src="vendor/aframe-input-mapping-component.js"></script>
<script src="build.js"></script>
<script src="https://unpkg.com/aframe-gltf-exporter-component/dist/aframe-gltf-exporter-component.min.js"></script>
<script src="vendor/aframe-teleport-controls.min.js"></script>
Expand Down Expand Up @@ -43,19 +43,18 @@
<a-light type="point" light="color: #fff; intensity:0.6" position="3 10 1"></a-light>
<a-light type="point" light="color: #fff; intensity:0.2" position="-3 -10 0"></a-light>
<a-light type="hemisphere" groundColor="#888" intensity="0.8"></a-light>
<a-entity id="logo" obj-model="obj: #logoobj; mtl: #logomtl"></a-entity>
<!--geometry="primitive: circle; radius: 12;"
rotation="-90 0 0"-->
<a-entity id="hitEntityLeft" material="shader:flat; color: #ff3468" obj-model="obj: #hitEntityObj"></a-entity>
<a-entity id="hitEntityRight" material="shader:flat; color: #ff3468" obj-model="obj: #hitEntityObj"></a-entity>

<a-entity visible="false" id="logo" obj-model="obj: #logoobj; mtl: #logomtl"></a-entity>
<a-entity id="ground"
geometry="primitive: box; width: 12; height: 0.01; depth: 12"
material="shader: flat; src: #floor">
</a-entity>
</a-entity>
<a-entity id="sky" geometry="primitive:sphere; radius:30; phiLength:360; phiStart:0; thetaLength:90" material="shader:flat; side:back; height:2048; src:#skymap; width:2048"></a-entity>

<a-entity id="hitEntityLeft" material="shader:flat; color: #ff3468" obj-model="obj: #hitEntityObj"></a-entity>
<a-entity id="hitEntityRight" material="shader:flat; color: #ff3468" obj-model="obj: #hitEntityObj"></a-entity>
<a-entity id="cameraRig">
<!-- camera -->
<a-entity id="acamera" camera look-controls orbit-controls></a-entity>
<a-entity id="acamera" camera wasd-controls look-controls orbit-controls></a-entity>
<!-- hand controls -->
<a-entity id="left-hand"
brush
Expand Down Expand Up @@ -178,7 +177,6 @@
</a-entity>
</a-entity>
</a-entity>
<a-entity id="sky" geometry="primitive:sphere; radius:30; phiLength:360; phiStart:0; thetaLength:90" material="shader:flat; side:back; height:2048; src:#skymap; width:2048"></a-entity>
</a-scene>
<a href="https://aframe.io/a-painter/"><div id="apainter-logo" class="hidden"></div><div id="apainter-author" style="display:none" class="hidden">authorname</div></a>
<div id="apainter-ui">
Expand Down
Loading