This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// beatmania IIDX INFINITAS - 収録曲ページに目次を追加 | |
// https://p.eagate.573.jp/game/infinitas/2/music/index.html | |
let toc = document.createElement('div'); | |
toc.style.position = 'fixed'; | |
toc.style.top = '16px'; | |
toc.style.left = '16px'; | |
toc.style.width = '320px'; | |
toc.style.height = '80dvh'; | |
toc.style.backgroundColor = 'white'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Siv3D.hpp> // Siv3D v0.6.14 | |
#include <CoTaskLib.hpp> // CoTaskLib v0.2.0 | |
Co::Task<> Task1() | |
{ | |
Print << U"Start"; | |
co_await Co::Delay(1s); | |
Print << U"End"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // Siv3D v0.6.14 | |
# include <CoTaskLib.hpp> | |
template<class F> | |
Co::Task<> invokeAfter(const Duration& timeWait, F&& func) | |
{ | |
co_await Co::Delay(timeWait); | |
func(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // Siv3D v0.6.14 | |
# include <CoTaskLib.hpp> | |
class SequenceMan : public Co::SequenceBase<void> | |
{ | |
public: | |
SequenceMan(const Vec2& pos) | |
: pos_{ pos } | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include "tray.hpp" | |
# include <Siv3D.hpp> // Siv3D v0.6.14 | |
void DoTrayEvents() | |
{ | |
// 以下より拝借: | |
// https://github.com/Siv3D/OpenSiv3D/blob/db4b25a0b48ca8c2f7c0d8b4c071637873e818f7/Siv3D/src/Siv3D-Platform/WindowsDesktop/Siv3D/Siv3DMain.cpp#L66 | |
for (int32 i = 0; i < 100; ++i) | |
{ | |
MSG message = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.6.11 | |
void Main() | |
{ | |
Scene::SetBackground(ColorF{ 0 }); | |
while (System::Update()) | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.6.11 | |
struct CharacterFragment | |
{ | |
Vec2 pos; | |
double r; | |
Color color; | |
double angle; | |
double speed; | |
int motionType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.6.11 | |
// 【ルールと設定】 | |
// 主人公は、仮想空間に侵入してから 3 秒以内にターゲット(PC)をすべて破壊しなければならない。 | |
// 3 秒経過後、侵入者は防衛システムにより消去され、システムは初期状態にリセットされ、 | |
// 主人公の別個体が初めからミッションをやり直すことになる。 | |
// 主人公は「強い衝撃」を受けることにより *時間を少しだけ止められる* 能力があり、 | |
// 時間に制約がある本ミッションでは大いに役立つと思われるが、体力に限りがあるため無限にこの能力を使うことはできない。 | |
constexpr int StageCount = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.6.11 | |
void DrawText(StringView text, const Vec2& pos, const Vec2& scale, const Color& color, const Color& outlineColor, double outlineWidth, double letterSpacingScale) | |
{ | |
Vec2 penPos{ pos }; | |
{ | |
const auto& font = FontAsset(U"LI"); | |
const ScopedCustomShader2D shader{ Font::GetPixelShader(font.method(), TextStyle::Type::Outline) }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mergeInto(LibraryManager.library, { | |
$siv3dInputElement: null, | |
$siv3dDialogFileReader: null, | |
$siv3dDownloadLink: null, | |
siv3dInitDialog: function() { | |
siv3dInputElement = document.createElement("input"); | |
siv3dInputElement.type = "file"; | |
siv3dDialogFileReader = new FileReader(); |
NewerOlder