???? ?? ??? ??
??? ??? ???? HTML5 ??? ??? ???? ???? ??(0,0)? ???? ?? ??? ????. ) ?? ???? ?. ??? ??? ??? ???? ???? ???? ?? ? ???? ??? ? ????.
??? 1:1 ????
??? ??? ??? ??? ??(1 :1 ??), ?? ???? ???? ??? ??? ?????.
function getMousePos(canvas, evt) { var rect = canvas.getBoundingClientRect(); return { x: evt.clientX - rect.left, y: evt.clientY - rect.top }; }
? ??? ???? ???? ??? ?????. ???? ???? ??? ?????. x ? y ??? ??? ??? ???? ??? ?????. ?? ??? ????? ??? ??? ???.
var canvas = document.getElementById("imgCanvas"); var context = canvas.getContext("2d"); function draw(evt) { var pos = getMousePos(canvas, evt); context.fillStyle = "#000000"; context.fillRect(pos.x, pos.y, 4, 4); }
??? ?? ??? ???
CSS ?? ???? ?? ??? ?? ??? ?? ???? ???? ??? ?? ?? ??? ?? ??? ?? ??? ?????.
function getMousePos(canvas, evt) { var rect = canvas.getBoundingClientRect(), // abs. size of element scaleX = canvas.width / rect.width, // relationship bitmap vs. element for x scaleY = canvas.height / rect.height; // relationship bitmap vs. element for y return { x: (evt.clientX - rect.left) * scaleX, // scale mouse coordinates after adjusting for element relativity y: (evt.clientY - rect.top) * scaleY // scale mouse coordinates after adjusting for element relativity }; }
???? ?? ???
??? ????? ?? ?? ?? ??? ?? ??? ?? ?? ?? ???? ?? ?? ??? ??? ?????. ?? ????? currentTransform ??? ?? ?? ??? ?? ???? ???? ?? Firefox? mozCurrentTransformInverted? ?? ???? ?????.
??? ?? ?? ??? ??? ?? ?? ???? ????? ???? ???? ?? ?? ?? ?????? ?????. ??? ?? ?? ???](https://github.com/bebraw/calcGeometryFromPointOnTransformedCanvas)
???? ??? ???? ??? ? ??? ??? ???? ??? ??? ??? ?????.
var pos = getMousePos(canvas, e); // get adjusted coordinates as described above var imatrix = matrix.inverse(); // obtain the inverse matrix somehow pos = imatrix.applyToPoint(pos.x, pos.y); // apply inverse matrix to adjusted coordinate context.fillStyle = "#000000"; context.fillRect(pos.x - 1, pos.y - 1, 2, 2);
?? currentTransform ??? ??? ??:
var pos = getMousePos(canvas, e); // get adjusted coordinates as described above var matrix = ctx.currentTransform; // W3C (future) var imatrix = matrix.invertSelf(); // invert // apply to point: var x = pos.x * imatrix.a + pos.y * imatrix.c + imatrix.e; var y = pos.x * imatrix.b + pos.y * imatrix.d + imatrix.f;
? ?????? ???? ????? ??? ?????. ??? ?? ???? ??? ?? MIT ????? ?? ??? ?? ??? ?????.
? ??? HTML5 ????? ?? ??? ??? ?? ??? ??????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

JavaScript? ??? ?? ????? ??? ?? ??? ??? ?? ?? ?? ????? ?? ???? ???? ?????. ??? ?? ???? ?? ??? ?? ??? ???? ???? ?? ?? ???? ???? ?????. ?? ??, ??? ? ?? ???? ??? (? : ??? null? ??) ?? ??? ????? ??????. ??? ??? ???? ??? ??? ????. closure?? ?? ??? ?? ??; ? ??? ??? ?? ?? ???? ?? ???? ????. V8 ??? ?? ???, ?? ??, ??/?? ???? ?? ??? ?? ??? ??? ????? ?? ??? ?? ??? ????. ?? ?? ???? ??? ??? ??? ??? ???? ????? ?? ?? ???? ?? ???????.

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

?? JavaScript ??? ??? ??? ?????? ?? ??? ?? ?? ??? ?? ???? ????. 1. ??? ???? ???? ?? ??? ?? ? ? ???? ??? ??? ?? ? ?? ????? ?????. 2. Angular? ?????? ??? ?? ???? ? ?? ?? ??? ??? ??? ???? ?????. 3. VUE? ???? ?? ??? ???? ?? ?? ??? ?????. ?? ?? ?? ??, ? ??, ???? ???? ? SSR? ???? ??? ??? ??? ???? ? ??? ?????. ???, ??? ??? ??? ????? ????. ??? ??? ??? ??? ?? ????.

?????, JavaScript ???! ?? ? JavaScript ??? ?? ?? ?????! ?? ?? ??? ??? ??? ? ????. Deno?? Oracle? ?? ??, ??? JavaScript ?? ??? ????, Google Chrome ???? ? ??? ??? ???? ?????. ?????! Deno Oracle? "JavaScript"??? ????? Oracle? ?? ??? ??? ??????. Node.js? Deno? ??? ? Ryan Dahl? ??? ?????? ???? ????? JavaScript? ??? ???? Oracle? ????? ???? ?????.

iife (?? invokedfunctionexpression)? ?? ??? ???? ?? ????? ??? ???? ?? ??? ????? ?? ??? ? ?????. ??? ?? ?? ??? ???? ? ?? ??? ??? ?? (function () {/code/}) ();. ?? ???? ??? ?????. 1. ?? ??? ??? ?? ???? ?? ??? ??? ?????. 2. ?? ??? ??? ???? ?? ?? ??? ????. 3. ?? ?? ??? ????? ?? ???? ???????? ?? ? ??. ???? ?? ???? ?? ??? ES6 ??? ??? ??? ?? ? ??? ????? ??? ? ???? ???????.

??? JavaScript?? ??? ??? ?????? ?? ???????. ?? ??, ?? ?? ? ??? ??? ?? ????? ????? ?????. 1. ?? ??? ??? ????? ???? ??. ()? ?? ??? ??? ?????. ?. ()? ?? ??? ?? ??? ??? ?? ? ? ????. 2. ?? ??? .catch ()? ???? ?? ??? ??? ?? ??? ??????, ??? ???? ???? ????? ??? ? ????. 3. Promise.all ()? ?? ????? (?? ?? ?? ? ??????? ??), Promise.Race () (? ?? ??? ?? ?) ? Promise.AllSettled () (?? ??? ???? ??)

Cacheapi? ?????? ?? ???? ??? ???? ???, ?? ??? ??? ?? ???? ? ??? ?? ? ???? ??? ??????. 1. ???? ????, ??? ??, ?? ?? ?? ???? ???? ??? ? ????. 2. ??? ?? ?? ??? ?? ? ? ????. 3. ?? ?? ?? ?? ?? ??? ??? ?? ?????. 4. ??? ???? ?? ?? ???? ?? ?? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 5. ?? ???? ??, ??? ??? ? ??? ??, ?? ??? ? ?? ???? ???? ???? ? ?? ?????. 6.?? ??? ?? ?? ?? ??, ???? ?? ? HTTP ?? ????? ?????? ???????.
