-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


SVG

, 22 2017 . 14:36 +
image


js . ( - ). , . . , .

image

->

raphael.js playground.js, SVG. (CPU 4 x 2.1 GHz) chromium 50 fps 40fps .

5 ( ). , , . , . , , ( , ).

. (?) . ( 3 10 ) , ( ). , . , , . ( , ).

500 2000. , , fps .

SVG c 11 . 5 (path) , 4 (path) , 1 (circle) 1 (path) .

image

json- . php . js. json, .

, ( , , , ), . NFS, . opengameart.org. Let the Games Begin(Section 31 Tech), alien swamp( , ).


image

.

{i: size_i, j: size_j, size: indent_in_cell}

, , , . .

, , indent_in_cell ( , )

image

, , ( radius, ) - . , 0.

path.

i. , path .



{i: size_i, j: size_j, width: width_in_cels}

i j , width . . , , 3. . , , path.

.


:

{
  s: racer.speed,
  r: racer.root,
  i: racer.coord.i,
  j: racer.coord.j,
  wait: 0,
}

s , root , i, j , , wait . :

    time: this.timer,
    human_time: racer.human_time,
    start_i: racer.start.i,
    start_j: racer.start.j,   
    road: settings.road,
    name: racer.name,
    color: racer.fill,

, time , , human_time hh:ss, start_i, start_j , road , , name , color .

. , , . , wait. 1 ,
.

wait ( ) , , , , wait.

wait. , . wait, . , wait , , . , ( ), .


. firefox fps, , , . , hromium , , chrom.

- , , . . , , 50 fps , , .

3000 4 .
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/331430/

:  

: [1] []
 

:
: 

: ( )

:

  URL