Blink does not write on DOM anymore
This commit is contained in:
parent
43ea3bd386
commit
2f1f627214
@ -4,6 +4,10 @@ body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_medium"
|
||||
#ronin { background:#ddd; width:100%; height:100%; overflow:hidden; background-image:url(../media/graphics/grid.svg); background-position: 0px 0px;}
|
||||
#frame { width:50vw; height:50vh; overflow:hidden; position:fixed; left: calc(40vw + 15px); top:100px; background-image:url(../media/graphics/void.svg); background-position:0px 0px; }
|
||||
#frame > .layer { position:absolute; top:0px; left:0px; width:100%; height:100%;}
|
||||
|
||||
@keyframes blink { 0% {opacity: 1;} 50% {opacity: 0;} 100% {opacity: 1;} }
|
||||
|
||||
#frame > .layer.blink { animation: blink 0.1s; animation-iteration-count: infinite; }
|
||||
#overlay { position:absolute; z-index:1000;}
|
||||
#frame { cursor:none;}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
frame.resize 300x320
|
||||
frame.resize 300x300
|
||||
layer.fill #000000
|
||||
path:line_width 28
|
||||
path:line_cap butt
|
||||
@ -10,9 +10,5 @@ path:line_cap round
|
||||
path.stroke M120,60 a60,60 0 0,1 60,60 M240,120 a-60,60 0 0,1 -60,60 M180,240 a-60,-60 0 0,1 -60,-60 M60,180 a60,-60 0 0,1 60,-60
|
||||
path.stroke M120,90 a30,30 0 0,1 30,30 M210,120 a-30,30 0 0,1 -30,30 M180,210 a-30,-30 0 0,1 -30,-30 M90,180 a30,-30 0 0,1 30,-30
|
||||
magnet.grid 1x1 4,4
|
||||
type:size 11
|
||||
type:color #ffffff
|
||||
type:font "DIN Medium"
|
||||
type.write 45,280 "RONIN"
|
||||
type:font "DIN"
|
||||
type.write 85,280 "09"
|
||||
brush:color #72dec2
|
||||
brush:size 10
|
@ -5,7 +5,7 @@ path:line_width 10
|
||||
magnet.grid 15x15 4,4
|
||||
frame.select work
|
||||
~ OQUONIE
|
||||
path.stroke M45,60 l210,0 M45,240 l210,0 M255,60 a-15,15 0 0,0 -15,15 a-15,-15 0 0,0 -15,-15 M75,60 a-15,15 0 0,0 -15,15 a-15,-15 0 0,0 -15,-15 M255,240 a-15,-15 0 0,1 -15,-15 a-15,15 0 0,1 -15,15 M75,240 a-15,-15 0 0,1 -15,-15 a-15,15 0 0,1 -15,15 M60,75 l0,150 M240,75 l0,150 M60,150 l180,0
|
||||
~ path.stroke M45,60 l210,0 M45,240 l210,0 M255,60 a-15,15 0 0,0 -15,15 a-15,-15 0 0,0 -15,-15 M75,60 a-15,15 0 0,0 -15,15 a-15,-15 0 0,0 -15,-15 M255,240 a-15,-15 0 0,1 -15,-15 a-15,15 0 0,1 -15,15 M75,240 a-15,-15 0 0,1 -15,-15 a-15,15 0 0,1 -15,15 M60,75 l0,150 M240,75 l0,150 M60,150 l180,0
|
||||
~ THOUSAND ROOMS
|
||||
~ path.stroke M45,60 l210,0 M45,240 l210,0 M255,60 a-15,15 0 0,0 -15,15 a-15,-15 0 0,0 -15,-15 M75,60 a-15,15 0 0,0 -15,15 a-15,-15 0 0,0 -15,-15 M255,240 a-15,-15 0 0,1 -15,-15 a-15,15 0 0,1 -15,15 M75,240 a-15,-15 0 0,1 -15,-15 a-15,15 0 0,1 -15,15 M240,75 l0,150 M60,75 l0,150 M180,60 l0,180 M60,180 l180,0 M195,60 a-15,15 0 0,0 -15,15 a-15,-15 0 0,0 -15,-15 M165,240 a15,-15 0 0,0 15,-15 a15,15 0 0,0 15,15
|
||||
~ DONSOL
|
||||
|
15
presets/marabu.rin
Normal file
15
presets/marabu.rin
Normal file
@ -0,0 +1,15 @@
|
||||
frame.resize 300x300
|
||||
layer.fill #000000
|
||||
path:line_width 28
|
||||
path:line_cap butt
|
||||
magnet:color #f00
|
||||
magnet.grid 15x15 4,4
|
||||
frame.select logo
|
||||
~ path.stroke M60,60 l60,0 a60,60 0 0,1 60,60 M240,60 l0,60 a-60,60 0 0,1 -60,60 M240,240 l-60,0 a-60,-60 0 0,1 -60,-60 M60,240 l0,-60 a60,-60 0 0,1 60,-60 M90,240 l0,-60 a30,-30 0 0,1 30,-30 M60,90 l60,0 a30,30 0 0,1 30,30 M210,60 l0,60 a-30,30 0 0,1 -30,30 M240,210 l-60,0 a-30,-30 0 0,1 -30,-30
|
||||
~ path.stroke M45,60 l15,0 M45,90 l15,0 M210,45 l0,15 M240,45 l0,15 M255,210 l-15,0 M255,240 l-15,0 M90,255 l0,-15 M60,255 l0,-15
|
||||
~ path:line_cap round
|
||||
~ path.stroke M120,60 a60,60 0 0,1 60,60 M240,120 a-60,60 0 0,1 -60,60 M180,240 a-60,-60 0 0,1 -60,-60 M60,180 a60,-60 0 0,1 60,-60
|
||||
~ path.stroke M120,90 a30,30 0 0,1 30,30 M210,120 a-30,30 0 0,1 -30,30 M180,210 a-30,-30 0 0,1 -30,-30 M90,180 a30,-30 0 0,1 30,-30
|
||||
magnet.clear
|
||||
|
||||
brush:color #72dec2
|
@ -16,7 +16,6 @@ function Frame(rune)
|
||||
|
||||
this.install = function()
|
||||
{
|
||||
this.blink();
|
||||
this.select(new Command("frame.select background"));
|
||||
|
||||
// Canvas
|
||||
|
@ -182,8 +182,6 @@ function Layer(name,manager = null)
|
||||
|
||||
this.blink = function()
|
||||
{
|
||||
if(this.is_blinking == false){ return; }
|
||||
|
||||
this.element.style.display = this.element.style.display == "none" ? "block" : "none";
|
||||
this.element.setAttribute("class","layer blink")
|
||||
}
|
||||
}
|
@ -8,12 +8,13 @@ function Magnet(rune)
|
||||
this.add_setting(new Setting("color","#000000"));
|
||||
|
||||
this.add_method(new Method("grid",["rect","position"]));
|
||||
this.add_method(new Method("clear",[]));
|
||||
|
||||
this.grid = function(cmd,preview = false)
|
||||
{
|
||||
if(!cmd.rect()){ return 0, "Rect?"; }
|
||||
|
||||
if(!this.layer){ this.create_layer(); }
|
||||
if(!this.layer){ this.create_layer(true); }
|
||||
|
||||
this.layer.clear();
|
||||
this.draw_grid(cmd.rect(),cmd.position());
|
||||
@ -26,6 +27,14 @@ function Magnet(rune)
|
||||
return 1, preview ? "preview" : "ok";
|
||||
}
|
||||
|
||||
this.clear = function(cmd,preview = false)
|
||||
{
|
||||
this.layer.clear();
|
||||
|
||||
this.size = new Rect("1x1");
|
||||
this.rate = this.rate;
|
||||
}
|
||||
|
||||
this.draw_grid = function(rect,position)
|
||||
{
|
||||
if(!rect){ rect = new Rect("20x20"); }
|
||||
@ -69,7 +78,7 @@ function Magnet(rune)
|
||||
this.update_mouse = function(position)
|
||||
{
|
||||
if(this.size.width > 4 || this.size.height > 4){
|
||||
if(!this.layer){ this.create_layer(); }
|
||||
if(!this.layer){ this.create_layer(true); }
|
||||
this.layer.clear();
|
||||
this.draw_grid(this.size,this.rate);
|
||||
}
|
||||
|
@ -38,10 +38,11 @@ function Module(rune)
|
||||
return this.get_layer().context();
|
||||
}
|
||||
|
||||
this.create_layer = function()
|
||||
this.create_layer = function(blink = false)
|
||||
{
|
||||
this.layer = new Layer(this.constructor.name+".Preview",this);
|
||||
this.layer.element.setAttribute("style","z-index:7000");
|
||||
if(blink){ this.layer.blink(); }
|
||||
ronin.frame.add_layer(this.layer);
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ function Overlay(rune)
|
||||
|
||||
this.draw = function(position,rect)
|
||||
{
|
||||
if(!this.layer){ this.create_layer(); this.layer.is_blinking = true; }
|
||||
if(!this.layer){ this.create_layer(true); this.layer.is_blinking = true; }
|
||||
|
||||
if(!position){ position = new Position("0,0"); }
|
||||
|
||||
|
@ -10,7 +10,7 @@ function Type(rune)
|
||||
|
||||
this.write = function(cmd,preview = false)
|
||||
{
|
||||
if(!this.layer){ this.create_layer(); this.layer.is_blinking = true; }
|
||||
if(!this.layer){ this.create_layer(true); this.layer.is_blinking = true; }
|
||||
|
||||
this.layer.clear();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user