のしメモ アプリ開発ブログ

Unityアプリとかロボットとか作ってるときに困ったこととかメモ

A-Frame

A-Frameのモデルロード完了のイベントを受け取る

A-Frameのobjモデル等のロード完了後にイベントが受け取れるがどう書けばいいかドキュメントに書いていなかったのでメモ A-Frameのobjのロードのドキュメント obj-model – A-Frame コード html側 <a-scene> <a-assets> <a-asset-item id="tree-obj" src="/path/to/tree.obj"></a-asset-item> <a-asset-item id="tree-mtl" src="/path/to/tree.mtl"></a-asset-item> </a-assets> </a-scene>

A-FrameでTextureがcross-originエラーで取得できないときの対処メモ

a-frameを使用した際にTextureの取得箇所でエラーがでた時の対処メモこんなエラー Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at http: {Texture URL} 原因 異なるドメインのファイル取得…