fixed js bug in index
parent
a2c7987159
commit
b048aaa762
@ -1,104 +0,0 @@
|
||||
/* https://codepen.io/josfabre/pen/EBMWwW */
|
||||
|
||||
body {
|
||||
background-color: #CCC;
|
||||
padding: 60px;
|
||||
}
|
||||
|
||||
.bubble {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
font-family: "Press Start 2P", cursive;
|
||||
font-size: 16px;
|
||||
line-height: 1.3em;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
padding: 4px;
|
||||
box-shadow: 0 -4px #fff, 0 -8px #000, 4px 0 #fff, 4px -4px #000, 8px 0 #000, 0 4px #fff, 0 8px #000, -4px 0 #fff, -4px 4px #000, -8px 0 #000, -4px -4px #000, 4px 4px #000;
|
||||
box-sizing: border-box;
|
||||
width: 200px;
|
||||
}
|
||||
.bubble::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bubble.shadow {
|
||||
box-shadow: 0 -4px #fff, 0 -8px #000, 4px 0 #fff, 4px -4px #000, 8px 0 #000, 0 4px #fff, 0 8px #000, -4px 0 #fff, -4px 4px #000, -8px 0 #000, -4px -4px #000, 4px 4px #000, 4px 12px rgba(0, 0, 0, 0.1), 12px 4px rgba(0, 0, 0, 0.1), 8px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.bubble.mini {
|
||||
width: 110px;
|
||||
font-size: 16px;
|
||||
padding: 4px;
|
||||
font-family: monospace;
|
||||
}
|
||||
.bubble.medium {
|
||||
width: 350px;
|
||||
}
|
||||
.bubble.large {
|
||||
width: 560px;
|
||||
font-size: 24px;
|
||||
text-align: left;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.bubble.grow {
|
||||
width: initial;
|
||||
}
|
||||
.bubble.top::after {
|
||||
height: 4px;
|
||||
width: 4px;
|
||||
top: -8px;
|
||||
left: 32px;
|
||||
box-shadow: 0 -4px #000, 0 -8px #000, 0 -12px #000, 0 -16px #000, -4px -12px #000, -8px -8px #000, -12px -4px #000, -4px -4px #fff, -8px -4px #fff, -4px -8px #fff, -4px 0 #fff, -8px 0 #fff, -12px 0 #fff;
|
||||
}
|
||||
.bubble.right::after {
|
||||
height: 4px;
|
||||
width: 4px;
|
||||
top: 84px;
|
||||
right: -8px;
|
||||
background: white;
|
||||
box-shadow: 4px -4px #fff, 4px 0 #fff, 8px 0 #fff, 0 -8px #fff, 4px 4px #000, 8px 4px #000, 12px 4px #000, 16px 4px #000, 12px 0 #000, 8px -4px #000, 4px -8px #000, 0 -4px #fff;
|
||||
}
|
||||
.bubble.bottom::after {
|
||||
height: 4px;
|
||||
width: 4px;
|
||||
bottom: -8px;
|
||||
left: 32px;
|
||||
box-shadow: 0 4px #000, 0 8px #000, 0 12px #000, 0 16px #000, -4px 12px #000, -8px 8px #000, -12px 4px #000, -4px 4px #fff, -8px 4px #fff, -4px 8px #fff, -4px 0 #fff, -8px 0 #fff, -12px 0 #fff;
|
||||
}
|
||||
.bubble.left::after {
|
||||
height: 4px;
|
||||
width: 4px;
|
||||
top: 20px;
|
||||
left: -8px;
|
||||
background: white;
|
||||
box-shadow: -4px -4px #fff, -4px 0 #fff, -8px 0 #fff, 0 -8px #fff, -4px 4px #000, -8px 4px #000, -12px 4px #000, -16px 4px #000, -12px 0 #000, -8px -4px #000, -4px -8px #000, 0 -4px #fff;
|
||||
}
|
||||
|
||||
.bubble textarea {
|
||||
width: 100%;
|
||||
height: 6em;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.bubble textarea:focus {
|
||||
outline: none !important;
|
||||
border: none;
|
||||
/* box-shadow: 0 0 10px #719ECE; */
|
||||
}
|
||||
|
||||
|
||||
canvas.creature {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
image-rendering: optimizeSpeed;
|
||||
image-rendering: -moz-crisp-edges;
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
image-rendering: -o-crisp-edges;
|
||||
image-rendering: pixelated;
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
border: none;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
canvas {
|
||||
image-rendering: optimizeSpeed;
|
||||
image-rendering: -moz-crisp-edges;
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
image-rendering: -o-crisp-edges;
|
||||
image-rendering: pixelated;
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
border: 1px solid black;
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
var stage = new createjs.Stage('canvas');
|
||||
|
||||
// var shape = new createjs.Shape();
|
||||
// shape.graphics.beginFill('red').drawRect(0, 0, 120, 120);
|
||||
// stage.addChild(shape);
|
||||
// stage.update();
|
||||
|
||||
var ss = new createjs.SpriteSheet({
|
||||
frames: {
|
||||
width: 16,
|
||||
height: 16,
|
||||
regX: 0,
|
||||
regY: 0,
|
||||
spacing: 0,
|
||||
margin: 0,
|
||||
count: 6
|
||||
},
|
||||
animations: {stand: 0, run: [0, 3]},
|
||||
images: [document.querySelector("#creature-src")]
|
||||
});
|
||||
|
||||
var sprite = new createjs.Sprite(ss, "stand");
|
||||
sprite.scaleY = sprite.scaleX = 4;
|
||||
stage.addChild(sprite);
|
||||
|
||||
sprite.on("click", function() { sprite.gotoAndPlay("jump"); });
|
||||
|
||||
createjs.Ticker.on("tick", stage);
|
@ -1,14 +0,0 @@
|
||||
{% extends "call/base.html" %}
|
||||
{% load static %}
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" href="{% static 'call/walk.css' %}">
|
||||
<script src="{% static 'EaselJS-1.0.0/lib/easeljs.js' %}"></script>
|
||||
<script src="{% static 'TweenJS-1.0.0/lib/tweenjs.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{object}} {{object.image}} {{object.image.url}}
|
||||
<div><img id="creature-src" src="{{object.image.url}}"></div>
|
||||
<canvas id="canvas" width="550" height="250" style="border: 1px dotted gray"></canvas>
|
||||
<script src="{% static 'call/walk.js' %}"></script>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue