Skip to content

Commit

Permalink
text
Browse files Browse the repository at this point in the history
  • Loading branch information
lllyasviel committed Dec 25, 2017
1 parent 87e5f2a commit ee7d11f
Show file tree
Hide file tree
Showing 15 changed files with 222 additions and 10 deletions.
22 changes: 12 additions & 10 deletions under_construction/assets/scripts/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function loadLocalHint(uri) {
HTML_Canvas_hint.getContext("2d").clearRect(0, 0, HTML_Canvas_hint.width, HTML_Canvas_hint.height);
var hintNodeTexture = spHintNode.getComponent('cc.Sprite').spriteFrame.getTexture();
hintNodeTexture.initWithElement(HTML_Canvas_hint);
hintNodeTexture.handleLoadedTexture();
hintNodeTexture.handleLoadedTexture(true);

var tempDiv = document.getElementById("tempDivHint");
if (tempDiv === null) {
Expand All @@ -210,19 +210,21 @@ function loadLocalHint(uri) {
var img = document.getElementById('imgheadHint');
img.onload = function () {
if (this.complete) {
var w = parseFloat(this.width);
var h = parseFloat(this.height);
setTimeout(function () {
var w = parseFloat(img.width);
var h = parseFloat(img.height);

HTML_Canvas_hint.width = parseInt(w);
HTML_Canvas_hint.height = parseInt(h);
HTML_Canvas_hint.getContext("2d").drawImage(this, 0, 0, HTML_Canvas_hint.width, HTML_Canvas_hint.height);
HTML_Canvas_hint.width = parseInt(w);
HTML_Canvas_hint.height = parseInt(h);
HTML_Canvas_hint.getContext("2d").drawImage(img, 0, 0, HTML_Canvas_hint.width, HTML_Canvas_hint.height);

var hintNodeTex = spHintNode.getComponent('cc.Sprite').spriteFrame.getTexture();
hintNodeTex.initWithElement(HTML_Canvas_hint);
hintNodeTex.handleLoadedTexture(true);
var hintNodeTex = spHintNode.getComponent('cc.Sprite').spriteFrame.getTexture();
hintNodeTex.initWithElement(HTML_Canvas_hint);
hintNodeTex.handleLoadedTexture(true);


hasHint = true;
hasHint = true;
}, 500);
}
}
img.src = uri;
Expand Down
Binary file added web_code/assets/texture/clear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions web_code/assets/texture/clear.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"ver": "1.0.0",
"uuid": "6511e960-bd0c-4423-806b-54b4c36e2d98",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"clear": {
"ver": "1.0.3",
"uuid": "e41b94bc-f374-4ce3-b58f-c64cae3c2434",
"rawTextureUuid": "6511e960-bd0c-4423-806b-54b4c36e2d98",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 128,
"height": 128,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
Binary file added web_code/assets/texture/eraser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions web_code/assets/texture/eraser.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"ver": "1.0.0",
"uuid": "39c96e01-73d5-4a24-a151-5b581726759c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"eraser": {
"ver": "1.0.3",
"uuid": "618e308e-c346-4158-b456-07ff7c7ae7dd",
"rawTextureUuid": "39c96e01-73d5-4a24-a151-5b581726759c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 3,
"trimY": 0,
"width": 122,
"height": 128,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
Binary file added web_code/assets/texture/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions web_code/assets/texture/github.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"ver": "1.0.0",
"uuid": "6489523f-0da5-4bb7-855f-ee889a0169ae",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"github": {
"ver": "1.0.3",
"uuid": "1e999005-3002-43a5-889d-f0b4df11ec16",
"rawTextureUuid": "6489523f-0da5-4bb7-855f-ee889a0169ae",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 1,
"width": 128,
"height": 126,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
Binary file added web_code/assets/texture/hint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions web_code/assets/texture/hint.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"ver": "1.0.0",
"uuid": "8067bb52-a1f6-447d-9a61-c2ffe627f582",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"hint": {
"ver": "1.0.3",
"uuid": "9726eb13-68b0-4053-839b-a1a8a3e02f29",
"rawTextureUuid": "8067bb52-a1f6-447d-9a61-c2ffe627f582",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 21,
"height": 21,
"rawWidth": 21,
"rawHeight": 21,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
Binary file added web_code/assets/texture/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions web_code/assets/texture/loading.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"ver": "1.0.0",
"uuid": "d3d2abf6-d6ec-4bd1-b97d-b390e72502ac",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"loading": {
"ver": "1.0.3",
"uuid": "92e1e7c0-bc4d-4fd2-82ee-44694d832851",
"rawTextureUuid": "d3d2abf6-d6ec-4bd1-b97d-b390e72502ac",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 32,
"trimY": 0,
"width": 64,
"height": 128,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
Binary file added web_code/assets/texture/pencil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions web_code/assets/texture/pencil.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"ver": "1.0.0",
"uuid": "4b64e92a-7987-4e83-ae03-b4e882d86c72",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"pencil": {
"ver": "1.0.3",
"uuid": "994047c6-b97d-4314-b65e-242c4018dd6b",
"rawTextureUuid": "4b64e92a-7987-4e83-ae03-b4e882d86c72",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 128,
"height": 128,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
Binary file added web_code/assets/texture/right-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions web_code/assets/texture/right-arrow.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"ver": "1.0.0",
"uuid": "f3e484a6-e102-4f96-ab1a-3885cdb12154",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"right-arrow": {
"ver": "1.0.3",
"uuid": "30c8483d-f4b9-4bf4-a9dd-f92bc217f4b5",
"rawTextureUuid": "f3e484a6-e102-4f96-ab1a-3885cdb12154",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 6,
"trimY": 6,
"width": 116,
"height": 116,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

0 comments on commit ee7d11f

Please sign in to comment.