• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

JavaScriptを色々あれこれしようとするがひたすら失敗を繰り返している


Commit MetaInfo

Révision43 (tree)
l'heure2016-12-09 17:18:26
Auteurtakoyaki_umaaaa

Message de Log

(empty log message)

Change Summary

Modification

--- HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/css/default.css (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/css/default.css (revision 43)
@@ -20,7 +20,7 @@
2020 user-select: none;
2121 font-family: 游明朝, YuMincho, ヒラギノ明朝 ProN W3, Hiragino Mincho ProN, HG明朝E, MS P明朝, MS 明朝, serif;
2222 -webkit-font-smoothing: antialiased;
23- -webkit-overflow-scrolling: touch;
23+// -webkit-overflow-scrolling: touch;
2424 }
2525
2626 .buttonstyle {
@@ -65,7 +65,7 @@
6565 background-color: transparent;
6666 }
6767 .DispField {
68- overflow: hidden;
68+ overflow: scroll;
6969 }
7070
7171 #FrameArea{
--- HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/index.html (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/index.html (revision 43)
@@ -20,6 +20,8 @@
2020 <button type=button class="pal" data-objid="pal" data-palid="2" title="設定画面を表示します">設定Drop</button>
2121 <button type=button class="pal" data-objid="pal" data-palid="3" title="アニメーションを停止します">アニメ停止</button>
2222 <button type=button class="pal" data-objid="pal" data-palid="4" >枠表示</button>
23+ <button type=button class="pal" data-objid="pal" data-palid="5">背景大</button>
24+ <button type=button class="pal" data-objid="pal" data-palid="6">背景小</button>
2325 <a href="#" id="save" download="DragDraw.dd" title="DragDraw.ddという名前でダウンロードフォルダに保存します">画像保存</a><br />
2426 <a href="#apparea">停止</a>
2527
@@ -103,6 +105,7 @@
103105 </fieldset>
104106 </div>
105107
108+ <script type="text/javascript" src="js/numeric-1.2.6.min.js"></script>
106109 <script type="text/javascript" src="js/Common.js"></script>
107110 <script type="text/javascript" src="js/Queue.js"></script>
108111 <script type="text/javascript" src="js/CommandObj.js"></script>
--- HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/js/Common.js (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/js/Common.js (revision 43)
@@ -439,3 +439,53 @@
439439 }
440440
441441
442+function matRotateX(rx) {
443+ var rad = degToRad(rx);
444+ var matrix = [
445+ [1, 0, 0, 0],
446+ [0, Math.cos(rad), -Math.sin(rad), 0],
447+ [0, Math.sin(rad), Math.cos(rad), 0],
448+ [0, 0, 0, 1]
449+ ];
450+ return matrix;
451+}
452+function matRotateY(rx) {
453+ var rad = degToRad(rx);
454+ var matrix = [
455+ [ Math.cos(rad), 0, Math.sin(rad), 0],
456+ [0, 1, 0, 0],
457+ [-Math.sin(rad), 0, Math.cos(rad), 0],
458+ [0, 0, 0, 1]
459+ ];
460+ return matrix;
461+}
462+function matRotateZ(rx) {
463+ var rad = degToRad(rx);
464+ var matrix = [
465+ [Math.cos(rad), -Math.sin(rad), 0, 0],
466+ [Math.sin(rad), Math.cos(rad), 0, 0],
467+ [0, 0, 1, 0],
468+ [0, 0, 0, 1]
469+ ];
470+ return matrix;
471+}
472+function matTranslate(x,y,z) {
473+ var rad = degToRad(rx);
474+ var matrix = [
475+ [1, 0, 0, x],
476+ [0, 1, 0, y],
477+ [0, 0, 1, z],
478+ [0, 0, 0, 1]
479+ ];
480+ return matrix;
481+}
482+function matPerspective(d) {
483+ var dist = -1.0 / parseFloat(d);
484+ var matrix = [
485+ [1, 0, 0, 0],
486+ [0, 1, 0, 0],
487+ [0, 0, 1, 0],
488+ [0, 0, dist, 1]
489+ ];
490+ return matrix;
491+}
--- HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/js/DispObj.js (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/js/DispObj.js (revision 43)
@@ -316,6 +316,23 @@
316316 evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる)
317317 evt.preventDefault(); // 要素既定のdefault動作を止める
318318
319+/* test
320+ let xy1 = rotateUD(0, -45, parseInt(evt.pageX), parseInt(evt.pageY));
321+ let xy2 = rotateZ(0, 0, 45, xy1[0], xy1[1]);
322+ this.startDragX = xy2[0];
323+ this.startDragY = xy2[1];
324+
325+ let xy0 = [parseInt(evt.pageX), parseInt(evt.pageY)];
326+ let matx = matRotateX(-45);
327+ let xx = numeric.dot(matx, [xy0[0],xy0[1],0,1]);
328+ let matz = matRotateZ(45);
329+ let xx2 = numeric.dot(matz, [xy1[0], xy1[1], 0, 1]);
330+ let xx3 = numeric.dot(matz, matx);
331+ let xx4 = numeric.dot(xx3, [xy0[0], xy0[1], 0, 1]);
332+ let matp = matPerspective(800);
333+ let xx5 = numeric.dot(matp, [xx4[0], xx4[1], 0, 1]);
334+*/
335+
319336 // 移動元として座標を保持
320337 this.startDragX = evt.pageX;
321338 this.startDragY = evt.pageY;
@@ -324,10 +341,23 @@
324341 window.partsFocus.setClingingPartner(this.DOMbase);
325342
326343 }
327- mouseMove(evt, target) {
344+ mouseMove(evt, xy) {
328345 evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる)
329346 evt.preventDefault(); // 要素既定のdefault動作を止める
330347
348+/* test
349+ let matp = matPerspective(1);
350+ let mati = numeric.inv(matp);
351+// let xx5 = numeric.dot(mati, [parseInt(evt.pageX), parseInt(evt.pageY), 0, 1]);
352+ let xy1 = rotateUD(0, -45, parseInt(evt.pageX), parseInt(evt.pageY));
353+// let xy1 = rotateUD(0, -45, xx5[0], xx5[1]);
354+ let xy2 = rotateZ(0, 0, 45, xy1[0], xy1[1]);
355+ let xx5 = numeric.dot(matp, [xy2[0], xy2[1], 0, 1]);
356+ this.endDragX = xx5[0];
357+ this.endDragY = xx5[1];
358+// this.endDragX = xy2[0];
359+// this.endDragY = xy2[1];
360+*/
331361 // 画像の仮移動
332362 this.endDragX = evt.pageX;
333363 this.endDragY = evt.pageY;
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
--- HtmlDrawApp/HTMLDrawApp/css/default.css (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/css/default.css (revision 43)
@@ -20,7 +20,7 @@
2020 user-select: none;
2121 font-family: 游明朝, YuMincho, ヒラギノ明朝 ProN W3, Hiragino Mincho ProN, HG明朝E, MS P明朝, MS 明朝, serif;
2222 -webkit-font-smoothing: antialiased;
23- -webkit-overflow-scrolling: touch;
23+// -webkit-overflow-scrolling: touch;
2424 }
2525
2626 .buttonstyle {
@@ -65,7 +65,7 @@
6565 background-color: transparent;
6666 }
6767 .DispField {
68- overflow: hidden;
68+ overflow: scroll;
6969 }
7070
7171 #FrameArea{
--- HtmlDrawApp/HTMLDrawApp/index.html (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/index.html (revision 43)
@@ -20,6 +20,8 @@
2020 <button type=button class="pal" data-objid="pal" data-palid="2" title="設定画面を表示します">設定Drop</button>
2121 <button type=button class="pal" data-objid="pal" data-palid="3" title="アニメーションを停止します">アニメ停止</button>
2222 <button type=button class="pal" data-objid="pal" data-palid="4" >枠表示</button>
23+ <button type=button class="pal" data-objid="pal" data-palid="5">背景大</button>
24+ <button type=button class="pal" data-objid="pal" data-palid="6">背景小</button>
2325 <a href="#" id="save" download="DragDraw.dd" title="DragDraw.ddという名前でダウンロードフォルダに保存します">画像保存</a><br />
2426 <a href="#apparea">停止</a>
2527
@@ -103,6 +105,7 @@
103105 </fieldset>
104106 </div>
105107
108+ <script type="text/javascript" src="js/numeric-1.2.6.min.js"></script>
106109 <script type="text/javascript" src="js/Common.js"></script>
107110 <script type="text/javascript" src="js/Queue.js"></script>
108111 <script type="text/javascript" src="js/CommandObj.js"></script>
--- HtmlDrawApp/HTMLDrawApp/js/Common.js (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/js/Common.js (revision 43)
@@ -439,3 +439,53 @@
439439 }
440440
441441
442+function matRotateX(rx) {
443+ var rad = degToRad(rx);
444+ var matrix = [
445+ [1, 0, 0, 0],
446+ [0, Math.cos(rad), -Math.sin(rad), 0],
447+ [0, Math.sin(rad), Math.cos(rad), 0],
448+ [0, 0, 0, 1]
449+ ];
450+ return matrix;
451+}
452+function matRotateY(rx) {
453+ var rad = degToRad(rx);
454+ var matrix = [
455+ [ Math.cos(rad), 0, Math.sin(rad), 0],
456+ [0, 1, 0, 0],
457+ [-Math.sin(rad), 0, Math.cos(rad), 0],
458+ [0, 0, 0, 1]
459+ ];
460+ return matrix;
461+}
462+function matRotateZ(rx) {
463+ var rad = degToRad(rx);
464+ var matrix = [
465+ [Math.cos(rad), -Math.sin(rad), 0, 0],
466+ [Math.sin(rad), Math.cos(rad), 0, 0],
467+ [0, 0, 1, 0],
468+ [0, 0, 0, 1]
469+ ];
470+ return matrix;
471+}
472+function matTranslate(x,y,z) {
473+ var rad = degToRad(rx);
474+ var matrix = [
475+ [1, 0, 0, x],
476+ [0, 1, 0, y],
477+ [0, 0, 1, z],
478+ [0, 0, 0, 1]
479+ ];
480+ return matrix;
481+}
482+function matPerspective(d) {
483+ var dist = -1.0 / parseFloat(d);
484+ var matrix = [
485+ [1, 0, 0, 0],
486+ [0, 1, 0, 0],
487+ [0, 0, 1, 0],
488+ [0, 0, dist, 1]
489+ ];
490+ return matrix;
491+}
--- HtmlDrawApp/HTMLDrawApp/js/DispObj.js (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/js/DispObj.js (revision 43)
@@ -316,6 +316,23 @@
316316 evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる)
317317 evt.preventDefault(); // 要素既定のdefault動作を止める
318318
319+/* test
320+ let xy1 = rotateUD(0, -45, parseInt(evt.pageX), parseInt(evt.pageY));
321+ let xy2 = rotateZ(0, 0, 45, xy1[0], xy1[1]);
322+ this.startDragX = xy2[0];
323+ this.startDragY = xy2[1];
324+
325+ let xy0 = [parseInt(evt.pageX), parseInt(evt.pageY)];
326+ let matx = matRotateX(-45);
327+ let xx = numeric.dot(matx, [xy0[0],xy0[1],0,1]);
328+ let matz = matRotateZ(45);
329+ let xx2 = numeric.dot(matz, [xy1[0], xy1[1], 0, 1]);
330+ let xx3 = numeric.dot(matz, matx);
331+ let xx4 = numeric.dot(xx3, [xy0[0], xy0[1], 0, 1]);
332+ let matp = matPerspective(800);
333+ let xx5 = numeric.dot(matp, [xx4[0], xx4[1], 0, 1]);
334+*/
335+
319336 // 移動元として座標を保持
320337 this.startDragX = evt.pageX;
321338 this.startDragY = evt.pageY;
@@ -324,10 +341,23 @@
324341 window.partsFocus.setClingingPartner(this.DOMbase);
325342
326343 }
327- mouseMove(evt, target) {
344+ mouseMove(evt, xy) {
328345 evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる)
329346 evt.preventDefault(); // 要素既定のdefault動作を止める
330347
348+/* test
349+ let matp = matPerspective(1);
350+ let mati = numeric.inv(matp);
351+// let xx5 = numeric.dot(mati, [parseInt(evt.pageX), parseInt(evt.pageY), 0, 1]);
352+ let xy1 = rotateUD(0, -45, parseInt(evt.pageX), parseInt(evt.pageY));
353+// let xy1 = rotateUD(0, -45, xx5[0], xx5[1]);
354+ let xy2 = rotateZ(0, 0, 45, xy1[0], xy1[1]);
355+ let xx5 = numeric.dot(matp, [xy2[0], xy2[1], 0, 1]);
356+ this.endDragX = xx5[0];
357+ this.endDragY = xx5[1];
358+// this.endDragX = xy2[0];
359+// this.endDragY = xy2[1];
360+*/
331361 // 画像の仮移動
332362 this.endDragX = evt.pageX;
333363 this.endDragY = evt.pageY;
--- HtmlDrawApp/HTMLDrawApp/js/main.js (revision 42)
+++ HtmlDrawApp/HTMLDrawApp/js/main.js (revision 43)
@@ -312,10 +312,15 @@
312312 elestyle.sheet.insertRule(dispobjRuleBefore + setStr + dispobjRuleAfter, 0);
313313 }
314314 break;
315- case 5:
316- let color = parseInt(evt.target.dataset.value);
317- setBkColorFocusedObject(color);
315+ case 5: // 背景大
316+ window.displayField.DOMobject.style.overflow = "scroll";
317+ window.frameArea.DOMobject.style.width = 1200 + 'px';
318+ window.frameArea.DOMobject.style.height = 600 + 'px';
318319 break;
320+ case 6: // 背景小
321+ window.frameArea.DOMobject.style.width = 600 + 'px';
322+ window.frameArea.DOMobject.style.height = 300 + 'px';
323+ break;
319324 }
320325 };
321326
--- HtmlDrawApp/doc/TextColorSample/クォータービュー.txt (revision 42)
+++ HtmlDrawApp/doc/TextColorSample/クォータービュー.txt (revision 43)
@@ -1,2 +1,3 @@
11 overflow: visible;
2+ transform-style: preserve-3d;
23 transform: translateX(0%) rotateX(45deg) rotateZ(-45deg);