Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Initial placement behavior

オープン
#112 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
html
領域
frontend, web-dev

調査の方向性

まず、初期の entityTransform の配置と boundingBoxCenter/boundingBoxExtent のフィット動作を説明している既存の explainer セクションを読み、その後、提案されている object-fit の値を issue #110 と比較します。完了には、配置動作を選択するための合意された API と、更新された explainer のガイダンスが必要です。この issue では実装ファイルやテストは指定されていません。

索引モデルが issue の本文から書いたものです。

説明

Currently the explainer details how the model is placed (via it's entityTransform) to be centered in the portal view.

The initial entityTransform is set to center the view on the boundingBoxCenter, set back by boundingBoxExtent.z/2 so that the element resides entirely within the portal, and to fit the boundingingBoxExtent within the visible view. That is, to set a uniform scale such that the boundingBoxExtent.y fits within the model's portal height, and the boundingBoxExtent.x fits within the model's portal width.

This probably works as a good default.

However, there are use cases where a different behavior would make more sense, and having a way to achieve the desired result without having to manually adjust the entityTransform via JS would be useful.

One use case example, related to discussion of https://github.com/immersive-web/model-element/issues/110 involving identity scale, I may want my model to have it's entityTransform remain the identity scale (if not other parts of matrix), and have no desire to have it changed during the bounding fit process.

One reference for this would be the object-fit property, which has various values like fill, contain (analogous to existing model behavior), cover, none.
https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

@zachernuk

主要言語
HTML
スター
86
フォーク
14
平均マージ
2日 1時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

immersive-web/model-element のほかの issue

immersive-web/model-element の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。