This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| $(document).ready(function() { | |
| $("#phone").mask("+7 (999) 99-99-999", {autoclear: false}); | |
| $("#phone").click(function(){ | |
| if($("#phone").val()=="+7 (___) __-__-___") { | |
| $('#phone')[0].selectionStart = 4; | |
| $('#phone')[0].selectionEnd = 4; | |
| } | |
| }) | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var checkCollisions = function(rect1, rect2) { | |
| var xOverlap = Math.abs(rect1.x - rect2.x) <= Math.max(rect1.width, rect2.width); | |
| var yOverlap = Math.abs(rect1.y - rect2.y) <= Math.max(rect1.height, rect2.height); | |
| return xOverlap && yOverlap; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shapes.point.x = shapes.point.x + shapes.point.velocity * Math.cos(angle / 180 * Math.PI); | |
| shapes.point.y = shapes.point.y + shapes.point.velocity * Math.sin(angle / 180 * Math.PI); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isObject(obj) { | |
| return obj?.constructor.name === 'Object'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return obj !== null && typeof obj === 'object' && !Array.isArray(obj); |
OlderNewer