Giter Club home page Giter Club logo

testcodes's Introduction

とんこつテストコード

ちょっとしたテストコードをメモ代わりに置いてます。

testcodes's People

Contributors

tonkotsuboy avatar

Watchers

James Cloos avatar

testcodes's Issues

Twitterで議論中のAndroid4.1.2×three.jsの問題について

元スレッド
https://twitter.com/tonkotsuboy_com/status/704846328279363585

takahiro(John Smith) ‏@superhoge 21 時間21 時間前
@tonkotsuboy_com @gyoh_k 修正しました。件のAndroid4.1.2や他の端末で問題が直っているか確認してもらえますか。直っていたら、元々動いていたiOSでも引き続き正しく動いているか念のため見てもらえますかhttp://takahirox.github.io/test/examples/#webgl_animation_cloth

鹿野壮(Takeshi Kano) ‏@tonkotsuboy_com 21 時間21 時間前
@superhoge @gyoh_k 拝見しました。getShaderPrecisionFormatメソッドのエラーは消えました!ただ、http://takahirox.github.io/test/examples/webgl_animation_cloth.html  のデモ(元々がそうですが)requestAnimationFrame()メソッドを使っているので、ここでエラーが出ますね。
requestAnimationFrame()メソッドがAndroid4.1では非対応な為です。http://caniuse.com/#feat=requestanimationframe

デモを再生することに関して言えば、Android4.3以下のみsetInterval()等で代用すれば大丈夫そうですね。

screenshot_2016-03-03-16-02-24

takahiro(John Smith) ‏@superhoge
@tonkotsuboy_com @gyoh_k 確認ありがとうございます。requestAnimationFrame()の問題はまた別問題ですね。直すならばrequestAnimationFrame()非対応のデバイスでも動くようにexamplesを修正するというissueを投げて議論する必要があるでしょう。
ところで、そちらでrequestAnimationFrame()の部分を修正してデモを再生することは可能でしょうか?今回の修正方法だと(WebGLRendererの引数でprecisionを指定しない限り)precisionがhighpに設定されて、それがモバイルデバイスだと非対応の可能性があるので、修正の仕方を少し変えないといけないかもしれないと 気にしていて、とりあえず今対象としている4.1.2の端末ではどうなるか知りたいのです。まぁmediumpになるようにした方がいいと思っていまして、mrdoobとどう直すか少し話をしようとは思っています。

鹿野壮(Takeshi Kano) ‏@tonkotsuboy_com
@superhoge @gyoh_k そうですね。requestAnimationFrame()は別問題ですね。
試しにこちらでrequestAnimationFrame()を使って実装してみました。
http://tonkotsuboy.github.io/testCodes/160303_android4_webgl_fix/

バグが起こっていたうちの一端末Android4.4(元はAndroid4.0.*)では表示されるようになりました。

ccnes1zusaiix7o

しかし、 Android 4.1.2の方では "THREE.WebGLShader: Shader couldn't comile" というエラーにより表示できません。

screenshot_2016-03-03-17-34-19

takahiro(John Smith) ‏@superhoge 20 時間20 時間前
@tonkotsuboy_com @gyoh_k おそらくprecisionの問題ですね。WebGLRendererをnewしてるところの引数にprecision:'mediump'を追加して、4.1.2でもう一度試してもらうことってできますか?

鹿野壮(Takeshi Kano) ‏@tonkotsuboy_com
@superhoge @gyoh_k うーむ、変わらないですねえ。。
http://tonkotsuboy.github.io/testCodes/160303_android4_webgl_fix/

takahiro(John Smith) ‏@superhoge 19 時間19 時間前
@tonkotsuboy_com @gyoh_k コンパイルエラーのログってコンソールに出ませんでしたか?もしprecisionの問題ではないとすると、また別の問題にぶつかっている可能性があります。

鹿野壮(Takeshi Kano)
@superhoge @gyoh_k
コンパイルエラーは以前のものと全く同じです。

takahiro(John Smith)
@superhoge
@tonkotsuboy_com @gyoh_k 3つお願いがあります。件のAndroid4.1.2端末で

  1. 先のprecisionを指定したサンプル上でrenderer.getPrecision()の結果が'mediump'になっていることを確認してほしい
  2. このページを開いて https://www.browserleaks.com/webgl その結果を見せてほしい
  3. ここ http://takahirox.github.io/test/examples/index.html で 同じようにcompile errorになるか確認してほしい。(できればgeometry/cubeなどの簡単なサンプルで)

おそらくですがprecisionの問題ではないような気がしていて、また新たな別の問題にぶつかっている気がします。その場合、shaderプログラムのコードをdumpして怪しいところを探すなどの作業が必要になってくると思います。

元々のgetShaderPrecisionFormatがないことによるエラーは今回の修正で直っているので、PRを送ることで当初の問題は一旦クローズして、必要ならAndroid4.1.2でshaderのコンパイルエラーが起きたという新たなissueを投げるのがいいのではと思っています。

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.