Particle fountain: Difference between revisions

m
syntax highlighting fixup automation
m (syntax highlighting fixup automation)
Line 18:
{{libheader|SDL}}
{{trans|Raku}}
<langsyntaxhighlight lang="cpp">#include <SDL2/SDL.h>
 
#include <algorithm>
Line 254:
SDL_Quit();
return EXIT_SUCCESS;
}</langsyntaxhighlight>
 
=={{header|Julia}}==
{{trans|Raku}}
<langsyntaxhighlight lang="julia">using Dates, Colors, SimpleDirectMediaLayer.LibSDL2
 
mutable struct ParticleFountain
Line 384:
 
fountain()
</syntaxhighlight>
</lang>
 
=={{header|Perl}}==
<langsyntaxhighlight lang="perl">#!/usr/bin/perl
 
use strict; # https://rosettacode.org/wiki/Particle_fountain
Line 434:
}
$mw->after(1 => \&step);
}</langsyntaxhighlight>
 
=={{header|Phix}}==
Line 441:
{{libheader|Phix/online}}
You can run this online [http://phix.x10.mx/p2js/Particle_fountain.htm here].
<!--<langsyntaxhighlight Phixlang="phix">(phixonline)-->
<span style="color: #000080;font-style:italic;">--
-- demo\rosetta\Particle_fountain.exw
Line 566:
<span style="color: #000000;">main</span><span style="color: #0000FF;">()</span>
<!--</langsyntaxhighlight>-->
 
=={{header|Raku}}==
 
Has options to vary the direction at which the fountain sprays, the "spread" angle and the color of the emitted particles.
<syntaxhighlight lang="raku" line>
<lang perl6>
use NativeCall;
use SDL2::Raw;
Line 750:
}
}
</syntaxhighlight>
</lang>
 
[https://github.com/thundergnat/rc/blob/master/img/fountain-raku.mp4?raw=true Link to off-site .mp4 video]
Line 758:
{{libheader|DOME}}
{{libheader|Wren-dynamic}}
<langsyntaxhighlight lang="ecmascript">import "dome" for Window, Platform, Process
import "graphics" for Canvas, Color
import "math" for Math, Point
Line 896:
""")
 
var Game = ParticleDisplay.new(3000, 800, 800)</langsyntaxhighlight>
10,327

edits