最適な噴射角に設定されたウォシュレット
ケツに対して43度で噴射された温水は周囲に飛び散らないのだそうです。
/**
* Copyright o8que ( http://wonderfl.net/user/o8que )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/kpmg
*/
// forked from asou_jp's ウォシュレット
package
{
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
import flash.filters.BlurFilter;
import flash.geom.ColorTransform;
import flash.geom.Point;
[SWF(width="465", height="465", frameRate="60")]
/**
* 反省はしていない。
*/
public class Main extends Sprite
{
public function Main():void
{
with(graphics)
{
beginFill(0)
drawRect(0,0,465,465);
endFill();
}
var oshiri:Oshiri = new Oshiri();
oshiri.x = stage.stageWidth >> 1;
oshiri.y = stage.stageHeight >> 1
addChild( oshiri );
oshiri.y -= 80;
_bitmap = new Bitmap( new BitmapData(465, 465, true, 0) );
addChild( _bitmap );
_bitmapData = _bitmap.bitmapData;
addEventListener( Event.ENTER_FRAME, _enterFrameHandler );
}
private function _enterFrameHandler(e:Event):void
{
_create();
_bitmapData.colorTransform( _bitmapData.rect, new ColorTransform(1, 1, 1, 0.95));
_bitmapData.applyFilter( _bitmapData,_bitmapData.rect,new Point(), new BlurFilter(5,5,3) );
var len:int = _dots.length;
for ( var i:int = len-1; i >=0 ; i--)
{
var dot:MyPoint = _dots[i] as MyPoint;
_bitmapData.setPixel32( dot.x, dot.y, dot.color);
dot.x += dot.xv;
dot.y += dot.yv;
dot.xv *= 0.98;
dot.yv += 0.1;
if ( dot.y < 145 ) {
dot.xv = 0;
dot.yv = Math.random() * 5;
}
if ( dot.y > 465 ) _dots.splice(i, 1);
}
}
private function _create():void
{
for ( var i:int = 0; i < _loop; i++ )
{
_dots.push( new MyPoint() );
}
}
private var _loop:int = 30;
private var _dots:/*MyPoint*/Array = [];
private var _bitmapData:BitmapData;
private var _bitmap:Bitmap;
}
}
internal class MyPoint
{
public function MyPoint()
{
var speed:Number = Math.random() * 10 + 20;
var radian:Number = (43 + Math.random() * 1 + 179.5) * Math.PI / 180;
xv = speed * Math.cos(radian);
yv = speed * Math.sin(radian);
x = 540;
y = 465;
}
public var color:uint = 0xFFEEEFFF;
public var xv:Number;
public var yv:Number;
public var x:Number;
public var y:Number;
}
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.geom.Matrix;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
internal class Oshiri extends Sprite
{
private const _SIZE:Number = 100;
private const LINE_COLOR:uint = 0x666666;
private const FILL_COLOR:uint = 0xF8E0C6;
public function Oshiri():void
{
with (graphics)
{
lineStyle( 10, LINE_COLOR );
beginFill(FILL_COLOR)
drawCircle( -100, -100, 125 );
endFill()
beginFill(FILL_COLOR)
drawCircle( 100, -100, 125 );
endFill()
lineStyle(0, 0, 0);
beginFill(FILL_COLOR);
drawRect( -150, -400, 300, 375 );
endFill();
}
}
}