Code Monkey home page Code Monkey logo

nokotan / opensiv3d Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siv3d/opensiv3d

10.0 10.0 1.0 1.85 GB

[NO LONGER MAINTAINED] Experimental port of OpenSiv3D to Web

Home Page: https://siv3d.kamenokosoft.com

License: MIT License

C++ 84.72% Objective-C++ 0.89% CMake 1.06% HLSL 0.77% GLSL 1.93% JavaScript 0.39% C 9.45% AngelScript 0.15% Objective-C 0.03% HTML 0.10% Metal 0.01% WGSL 0.49%
cpp20 emscripten opensiv3d opensiv3d-web webassembly

opensiv3d's People

Contributors

agehama avatar azaika avatar chobby avatar dependabot[bot] avatar ebishu-0309 avatar falrnd avatar fuyutsubaki avatar hashitaku avatar kestrel-90r avatar kurokoji avatar luke256 avatar m4saka avatar mak1a avatar murakamishun avatar nokotan avatar para7 avatar raclamusi avatar reputeless avatar ryoga-exe avatar shirry0129 avatar sthairno avatar tana avatar taotao54321 avatar tetsurom avatar tomolatoon avatar voidproc avatar wynd2608 avatar yasai03 avatar yunba28 avatar yurkth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

skxatbj

opensiv3d's Issues

ブラウザの言語設定を取得する API

追加する機能の内容 | Describe the solution you'd like

Commented by @Reputeless on Siv3D Slack

ブラウザの言語設定を取得する API って作れますか?
日本語設定でない人には英語のコンテンツを表示したいです。

その機能の追加によって解決する問題 | Is your feature request related to a problem? Please describe.

日本語設定でない人には英語のコンテンツを表示したいです。

備考 | Additional context

Reported by @Reputeless

特定のキーをpreventDefault()する機能

追加する機能の内容 | Describe the solution you'd like
指定したキーをpreventDefault()したい

その機能の追加によって解決する問題 | Is your feature request related to a problem? Please describe.
Google Chromeには機能のショートカットがありますが、ゲームでキーボード操作を実装する際にこれらの機能が邪魔になることがあります。

  • 問題
    WASDキーで移動、Ctrlキーでダッシュなどを実装する際、現在のページを保存するオプションが開かれゲームが中断される。

  • 解決
    Ctrlキー+SキーなどpreventDefault()できればこの問題が解決されます。

ウィンドウサイズいっぱいに描画される問題

エラーの内容

ウィンドウの形状にかかわらず、ウィンドウサイズいっぱいに描画されます。

image

Uncaught TypeError: Options.setFramebufferSize is not a function
    at doResize (OpenSiv3Dv0_6ForWebTest.html:21:1039)
    at callRuntimeCallbacks (OpenSiv3Dv0_6ForWebTest.js:9:46906)
    at postRun (OpenSiv3Dv0_6ForWebTest.js:9:35135)
    at doRun (OpenSiv3Dv0_6ForWebTest.js:9:391619)
    at OpenSiv3Dv0_6ForWebTest.js:9:391759

再現方法

Visual Studio 用のセットアップガイドに従ってインストールして、何も変更せずビルド、実行しました。
Debug, Release にかかわらず発生します。

発生環境

  • OS: Windows 11 Home
  • GPU: Intel(R) UHD Graphics
  • ブラウザ: Chrome, Firefox, Edge など
  • Siv3D バージョン: 0.6.4

Safari 16.1 でアプリが無条件にクラッシュする

エラーの内容 | Describe the runtime error

アプリがクラッシュし、リロードループに入る

再現方法 | To Reproduce

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS: macOS Monterey
  • バージョン | Version: 12.6.1
  • GPU: -
  • ブラウザ (Web 版) | Browser: Safari 16.1

備考 | Additional context

[v0.6] オーディオファイルのデコード結果が正しくない

強化された Audio サンプルを実行したところ、
音声ファイルの長さや再生したときの再生スピードが実際と異なっていました。
デコード時や再生時のサンプリング周波数の設定がどこかで間違っている可能性があります。

分かりやすい再現方法:

  • example/windmill.mp3 example/test.mp3audio.lengthSec() が実際よりも長い
  • サンプリング周波数 22,050 Hz の Ogg ファイルを自前で用意してロードすると audio.sampleRate() で 44,100 Hz と表示されたり、実際の 2 倍速で再生されたりする

warning: Asyncify addlist contained a non-existing function name: * がビルド時に発生する

予期しない動作の内容 | Describe the unexpected behavior

再現方法 | To Reproduce

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS:
  • バージョン | Version:
  • GPU:
  • ブラウザ (Web 版) | Browser:

発生環境(モバイルの場合) | Smartphone (please complete the following information):

  • デバイス | Device:
  • OS:
  • バージョン | Version:
  • ブラウザ (Web 版) | Browser:

備考 | Additional context

Followed instructions on website, OpenSiv3D(0.6.4)Web project template does not build out of the box in Visual Studio 2022

**エラーの内容 | Followed instructions on website, OpenSiv3D(0.6.4)Web does not build out of the box

再現方法 | To Reproduce

  1. Followed https://siv3d.kamenokosoft.com/building/overview exactly.
  2. Error build output:
    1>emcc : error : Siv3DScript: No such file or directory ("Siv3DScript" was expected to be an input file, based on the commandline arguments provided) 1>Done building project "openSiv3Dv0_6ForWebTest.vcxproj" -- FAILED.

ビルド環境 | Develop environment (please complete the following information):

  • OS: Windows 10
  • 開発環境 | IDE: Visual Studio 2022 (new install)

備考 | Additional context
Also did a search, there is file that was installed that has that name. Closest is: libSiv3DScript.a, but that's of course a linux library. Is there a build step missing in your instructions?

Supress Warning that no texture is bound in forward3d.frag

エラーの内容 | Describe the runtime error

次の警告が表示される

no texture is bound in forward3d.frag

再現方法 | To Reproduce

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS:
  • バージョン | Version:
  • GPU:
  • ブラウザ (Web 版) | Browser:

発生環境(モバイルの場合) | Smartphone (please complete the following information):

  • デバイス | Device:
  • OS:
  • バージョン | Version:
  • ブラウザ (Web 版) | Browser:

備考 | Additional context

SIMD 対応版のみを提供する

追加する機能の内容 | Describe the solution you'd like

現状 Web 版では、非 SIMD 対応版のみを提供しているが、これを SIMD 対応版のみの提供にする

その機能の追加によって解決する問題 | Is your feature request related to a problem? Please describe.

  • 外部ライブラリsimde への依存を切ることができる
    • プリコンパイル済みヘッダの軽量化
    • ビルド時間の短縮

備考 | Additional context

実行環境のキーボードの利用可否を取得したい

キーボードが使えない実行環境で、Camera2D/3D の操作のためのミニ UI や、代替操作手法を提示するために、現在の実行環境を取得できる関数があると便利です。
どういう情報の取得が可能か意見を聞きたいです。それに基づいて API を提案します。

目標: v0.6.x

VS の Debug ビルドでアプリ実行時、ブラウザ画面上部にシーンに重なる赤いバーが表示される

予期しない動作の内容 | Describe the unexpected behavior
VS の Debug ビルドでアプリ実行時、ブラウザ画面上部にシーンに重なる赤いバー:
image

コンソールに出力されるエラーメッセージ:
mscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.
image

再現方法 | To Reproduce
Visual Studio を使って Debug ビルドででデフォルトサンプルをビルド → 実行

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS: Windows 11
  • バージョン | Version: 0.6.5
  • ブラウザ (Web 版) | Browser: Google Chrome

備考 | Additional context
Release ビルドでは発生せず。

ASYNCIFY_ADD への関数の追加が面倒

追加する機能の内容 | Describe the solution you'd like

その機能の追加によって解決する問題 | Is your feature request related to a problem? Please describe.

System::Update やサウンドデコードなど、ライブラリ内部で非同期が絡む関数を呼び出す関数をすべて ASYNCIFY_ADD に加えなくてもよくなる

備考 | Additional context

Related: emscripten-core/emscripten#13150

ビルドされるサイズが最小になる VS プロジェクトテンプレートの追加同梱

おそらく OpenSiv3D for Web 新規ユーザのほとんどが「ビルド後の出力ファイルサイズが大きい」と思う。

出力ファイルを削減する方法が用意されていることを示すために、プロジェクトテンプレートに「OpenSiv3D(v0.6.5)Web-min」のようなものがあっても良いかもしれない。

具体的には下記の通り。

  • example を含まない
  • Script / tiff など重要でないライブラリを含まない
  • フォントは resources/enginefont/min/siv3d-min.woff しか含まない
  • その他削れる engine は削っている

こうした説明をプロジェクトテンプレートの説明や Main.cpp に含め、「OpenSiv3D(v0.6.5)Web-min」というプロジェクトテンプレートを追加で提供するという提案です。

すごく軽量(図形や英数字 only)なミニアプリを開発・公開するのがスムーズになる利点もあります。

SimpleHTTP::Get() / Post() サンプルで期待した結果が得られない

予期しない動作の内容 | Describe the unexpected behavior

Siv3D チュートリアルの GET サンプル / POST サンプルともに期待した正常な結果が得られない。

再現方法 | To Reproduce

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS: Windows 11
  • バージョン | Version: v0.6.5r5
  • ブラウザ (Web 版) | Browser: Google Chrome

備考
ほかのプラットフォームでは発生せず

FillMode を Wireframe にしてもワイヤフレームで描画されない

ScopedRenderStates(2D|3D)RasterizerState::WireframeCullNone などを指定してもワイヤフレームで描画されず、普通に描画されます。

この問題によって、下の例やサンプル 36.13 複雑な 3D 形状を描くサンプル 36.21 ワイヤフレームで描画するなどが正しく動きません。

# include <Siv3D.hpp>

void Main()
{
	while (System::Update())
	{
		const ScopedRenderStates2D rasterizer{ RasterizerState::WireframeCullNone };
		
		Shape2D::Heart(200, Scene::Center()).draw(Palette::Skyblue);
	}
}

図1 OpenSiv3D for Web v0.6.6r1 での実行結果
図1 OpenSiv3D for Web v0.6.6r1 での実行結果

図2 OpenSiv3D v0.6.6 での実行結果(期待する結果)
図2 OpenSiv3D v0.6.6 での実行結果(期待する結果)

Windows で TextToSpeech が利用可能かどうかにかかわらず TextToSpeech unavailable という警告が出る

再現方法:
Siv3D Studio でデフォルトのサンプルプログラムを実行
Windows 11 / Chrome

期待される動作:
警告が出ない

実際の動作:
⚠️ TextToSpeech unavailable という警告が出力される

解決案:
① 警告が出ないよう実装を改善
② Web 版の TextToSpeech 機能を一旦無効化する

補足:
警告の出ない環境が見つからない。

Siv3D for Web アプリケーションローダを安定版/開発版で分ける

追加する機能の内容 | Describe the solution you'd like

WebAssembly Studio で使用している Siv3D.js に開発中のデグレが混じらないようにする

その機能の追加によって解決する問題 | Is your feature request related to a problem? Please describe.

WebAssembly Studio OpenSiv3D for Web 0.6 テンプレートが常に安定的に使えるようにする

備考 | Additional context

モバイル環境でテキスト入力中にバックスペースが反応しない/カーソル移動ができない

予期しない動作の内容 | Describe the unexpected behavior

再現方法 | To Reproduce

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS:
  • バージョン | Version:
  • GPU:
  • ブラウザ (Web 版) | Browser:

発生環境(モバイルの場合) | Smartphone (please complete the following information):

  • デバイス | Device:
  • OS:
  • バージョン | Version:
  • ブラウザ (Web 版) | Browser:

備考 | Additional context

SetMainLoop を使うと unreachable が発生する

エラーの内容 | Describe the runtime error

unreachable が発生する

再現方法 | To Reproduce

SetMainLoop を使う

発生環境(デスクトップの場合) | Desktop (please complete the following information):
発生環境(モバイルの場合) | Smartphone (please complete the following information):

全ての環境

備考 | Additional context

Asyncify + SetMainLoop は同時に使えないため

次の項目の対応を予定

  • SetMainLoop 自体の削除
  • SetMainLoop + Asyncify を使ったときにもっとわかりやすいエラーメッセージを表示する

Pointer Lock APIを用いたマウス操作

追加する機能の内容 | Describe the solution you'd like

Pointer Lock API を用いたマウスの固定及び移動量などの取得

その機能の追加によって解決する問題| Is your feature request related to a problem? Please describe.

Web版ではCursor::SetPos()が使えない
(ブラウザでマウスカーソルの位置を設定することはできない?)ので、マウスでの操作を行う際(3Dゲームでの視点移動など)に、画面端でマウスの移動が止まってしまいそれ以上操作ができない(Discordでの質問 )

Pointer Lock APIを用いることでカーソルを固定しマウスの移動量を取得できるため上記問題を解決出来る。

備考 | Additional context

(個人的な意見になりますが)
ポインタのロックと移動量の取得はWeb版に限らずOpenSiv3D本体でも扱うと思うので、これらの機能を通常版でも扱えればいいなぁと思います。

WebAssembly 自体が実行できない環境でのエラーメッセージ

追加する機能の内容 | Describe the solution you'd like

WebAssembly 自体のサポートがなかったり、そのブラウザで使えない WebAssembly の機能があったときに、
エラーメッセージを表示する

その機能の追加によって解決する問題 | Is your feature request related to a problem? Please describe.

古いブラウザや IE を使っている人対策になる

備考 | Additional context

Related: #9

スマホや iPad でシーンの下部が画面外にはみ出る

予期しない動作の内容 | Describe the unexpected behavior

スマホや iPad でシーンの下部 2〜5 % ほどが画面外にはみ出る

再現方法 | To Reproduce

発生環境(モバイルの場合) | Smartphone (please complete the following information):

  • デバイス | Device: Android, iPad
  • OS: Android, iOS
  • バージョン | Version: -
  • ブラウザ (Web 版) | Browser: -

備考 | Additional context

Reported by @Reputeless

wasm-ld : error : unable to find library -lpng

エラーの内容 | Describe the build error

1>wasm-ld : error : unable to find library -lpng
1>emcc : error : 'C:/Users/tas9n/AppData/Local/Programs/Emscripten/upstream/bin\wasm-ld.exe -o C:/Users/tas9n/program/C++/OpenSiv3D/Web/OpenSiv3Dv0_6ForWeb1/Emscripten/Debug/OpenSiv3Dv0_6ForWeb1.wasm Emscripten/Debug/Main.o C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib\libSiv3DScript.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib\libSiv3D.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/opencv\libopencv_objdetect.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/opencv\libopencv_photo.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/opencv\libopencv_imgproc.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/opencv\libopencv_core.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/harfbuzz\libharfbuzz.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/freetype\libfreetype.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/turbojpeg\libturbojpeg.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/giflib\libgif.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/webp\libwebp.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/opus\libopusfile.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/opus\libopus.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/tiff\libtiff.a -lpng C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/zlib\libz.a C:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/SDL2\libSDL2.a -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/freetype -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/giflib -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/harfbuzz -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/opencv -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/turbojpeg -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/webp -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/opus -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/tiff -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/libpng -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/zlib -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib/SDL2 -LC:/Users/tas9n/AppData/Local/Programs/OpenSiv3D(0.6.5)Web/lib -LC:\Users\tas9n\AppData\Local\Programs\Emscripten\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten C:\Users\tas9n\AppData\Local\Programs\Emscripten\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libvorbis.a C:\Users\tas9n\AppData\Local\Programs\Emscripten\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libogg.a -lGL-webgl2-full_es3 -lal -lhtml5 -lstubs-debug -lc-debug -ldlmalloc -lcompiler_rt -lc++ -lc++abi -lsockets -lwebgpu_cpp -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -emscripten-cxx-exceptions-allowed=InitSiv3D -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export-if-defined=fflush --export-if-defined=emscripten_stack_get_base --export-if-defined=emscripten_stack_get_end --export-if-defined=emscripten_stack_set_limits --export-if-defined=emscripten_stack_get_free --export-if-defined=emscripten_stack_init --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__wasm_call_ctors --export-if-defined=__errno_location --export-if-defined=getTempRet0 --export-if-defined=setTempRet0 --export-if-defined=__get_temp_ret --export-if-defined=__set_temp_ret --export-if-defined=__funcs_on_exit --export-if-defined=malloc --export-if-defined=free --export-if-defined=__cxa_is_pointer_type --export-if-defined=__cxa_can_catch --export-if-defined=setThrew --export-if-defined=ntohs --export-if-defined=htons --export-if-defined=__dl_seterr --export-if-defined=saveSetjmp --export-if-defined=emscripten_builtin_memalign --export-if-defined=memcpy --export-table -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=2147483648 --global-base=1024' failed (returned 1)
1>プロジェクト "OpenSiv3Dv0_6ForWeb1.vcxproj" のビルドが終了しました -- 失敗。

再現方法 | To Reproduce

公式サイト
https://siv3d.kamenokosoft.com/ja/building/overview
から手順通りEmscriptenのインストールからサンプルコードのビルドをしようとした際に以上のエラーが出ました。

ビルド環境 | Develop environment (please complete the following information):

  • OS: Windows 10 Home 21H2
  • 開発環境 | IDE: Visual Studio Community 2022 17.3.0

備考 | Additional context

warning: undefined symbol: * がビルド時に発生する

予期しない動作の内容 | Describe the unexpected behavior

再現方法 | To Reproduce

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS:
  • バージョン | Version:
  • GPU:
  • ブラウザ (Web 版) | Browser:

発生環境(モバイルの場合) | Smartphone (please complete the following information):

  • デバイス | Device:
  • OS:
  • バージョン | Version:
  • ブラウザ (Web 版) | Browser:

備考 | Additional context

[実行時エラー] ウィンドウの任意のリサイズ Window::Resize() をすると灰色の画面のまま

エラーの内容 | Describe the runtime error
Web 最新版、Windows + Google Chrome, ウィンドウの任意のリサイズ Window::Resize(1280, 720); をすると灰色の画面のままです。

再現方法 | To Reproduce
再現コード: https://gist.github.com/Reputeless/62de5ce914b8ba8f4e8b470c998b359c

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS: Windows 11
  • バージョン | Version: v0.6.4r0
  • GPU: GeForce RTX 3070
  • ブラウザ (Web 版) | Browser: Google Chrome

備考 | Additional context
他の環境では未検証です。

デフォルトで gzip 圧縮をかける

追加する機能の内容 | Describe the solution you'd like

ユーザーが何もしなくても(圧縮/サーバーの設定に知識がなくても)、ビルド時に自動的に gzip 圧縮をかけ、実行時にブラウザ側で自動的に展開する
Unity の Decompression Fallback と同等の機能

その機能の追加によって解決する問題 | Is your feature request related to a problem? Please describe.

配信サイズの縮小
(本来であれば配信サーバで設定すべきところを、Siv3D および Siv3D Web 初心者でも恩恵を受けられるようにする)

備考 | Additional context

`F1` キーでライセンス情報が安定して出るようにしたい

  • すでに F1 キーでライセンス情報のページを表示する機能自体は実装済み
  • ブラウザのデフォルトショートカットとぶつかるようなブラウザでは、ライセンスページが出たり出なかったりする
    • Google Chrome ではヘルプと衝突
  • 目的: あらゆるデスクトップ Web ブラウザで、F1 キーを押したとき必ずライセンスを表示したい
  • F1 キーのブラウザのデフォルトショートカットを無効化すると安定的にライセンスページが表示される
    • Web ブラウザの F1 キーショートカットをデフォルトで必ず無効化するのはどうか

TextBoxとTextEdit::activeが同期しない

予期しない動作の内容 | Describe the unexpected behavior
SimpleGUI::TextBoxでTextEditStateのactiveがtrueでもボックスをユーザーがクリックしないと文字入力を受け付けない
(青く描画はされるがキーボードは反応しない)

再現方法 | To Reproduce
通常通りSimpleGUI::TextBoxでボックスを生成、常にactive=trueの状態にして起動

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS: macOS
  • バージョン | Version: 10.15.7
  • GPU: Intel Iris Plus Graphics 1536 MB
  • ブラウザ (Web 版) | Browser: GoogleChrome

発生環境(モバイルの場合) | Smartphone (please complete the following information):

  • デバイス | Device:
  • OS:
  • バージョン | Version:
  • ブラウザ (Web 版) | Browser:

備考 | Additional context

スマホ横持ちをしたときに、画面が小さくなりすぎる

予期しない動作の内容 | Describe the unexpected behavior

スマホ横持ちをしたときに、コントロールバー (ミュートボタン + フルスクリーンボタン) がスクリーン下部を大きく占有し、
その結果、Siv3D の描画面が小さくなりすぎる

発生環境(モバイルの場合) | Smartphone (please complete the following information):

  • デバイス | Device: モバイル全般
  • OS: Android / iOS
  • バージョン | Version: -
  • ブラウザ (Web 版) | Browser: -

備考 | Additional context

  • #21 の解消後に顕在化した問題
  • #15 (comment) において、コントロールバー (ミュートボタン + フルスクリーンボタン) の非表示化に関する議論

[Web版] 実行時エラー

Env

  • Windows 10
  • Visual Studio 2019 Community
  • OpenSiv3D 0.4.3 for Web

About

チュートリアルに従い、Visual StudioでWeb版のデバッグを行ったところ、次のようなエラーが発生します。

image

AsyncHTTPTask の非互換な挙動

予期しない動作の内容 | Describe the unexpected behavior

関連: https://discord.com/channels/443310697397354506/998714158621147237/1038378601646673980

AsyncHTTPTask task; について、task.isReady()true を返したとき task.getResponse() することで、それ以降 task.isReady()false を返すようになるのが期待される動作ですが、Web 版では true のままです。

Web 版で下記のサンプルはファイルダウンロードに成功しますが、Texture の毎フレーム連続作成を行ってしまうためエラー終了します。

再現方法 | To Reproduce

# include <Siv3D.hpp>

void Main()
{
	const URL url = U"https://raw.githubusercontent.com/Siv3D/siv3d.docs.images/master/logo/logo.png";
	const FilePath saveFilePath = U"logo2.png";
	Texture texture;

	// ファイルの非同期ダウンロードを開始
	AsyncHTTPTask task = SimpleHTTP::SaveAsync(url, saveFilePath);

	while (System::Update())
	{
		// 非同期タスクが完了した
		if (task.isReady())
		{
			Print << Scene::FrameCount();

			// レスポンスが 200 (OK) なら
			if (task.getResponse().isOK())
			{
				texture = Texture{ saveFilePath };
			}
			else
			{
				Print << U"Failed.";
			}
		}

		if (texture)
		{
			texture.draw();
		}
	}
}

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS: Windows 11
  • バージョン | Version: v0.6.5r5
  • ブラウザ (Web 版) | Browser: Google Chrome

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.