From e1ec3a2ab4b55ca980cc068dc5d115227ac8865d Mon Sep 17 00:00:00 2001 From: Brandel Zachernuk Date: Mon, 8 Jul 2024 16:04:02 -0700 Subject: [PATCH 01/18] fleshed out the examples and added a couple more --- images/bounding-box.svg | 145 +++++++++++++++++++++++++++++++++++++++ index.html | 147 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 291 insertions(+), 1 deletion(-) create mode 100644 images/bounding-box.svg diff --git a/images/bounding-box.svg b/images/bounding-box.svg new file mode 100644 index 0000000..864949e --- /dev/null +++ b/images/bounding-box.svg @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.3 + + + 2 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + r + + diff --git a/index.html b/index.html index 747225c..1313479 100644 --- a/index.html +++ b/index.html @@ -106,6 +106,60 @@

Examples

+

+ Loading and parsing +

+

+ A model element whose source path resolves to a valid resource + dispatch a `load` event upon the successful fetching and + presentation of the resource data. If the asset fails to resolve, + for instance due to an invalid URL, a failure to retrieve the bytes, + or a failure in the parsing process, the element will dispatch an + `error` event. +

+

+ Processing model contents +

+

+ A 3D asset file contains positional data for the surfaces and objects + within it. Following the successful processing of a model resource, the + {{model/boundingBox}} attribute references a + [[\DOMBoundingBoxReadOnly]] internal slot, which + is a nullable [=map=] of whose values are {{DOMPoint}}s. + The slot contains four entries: +

+
+
"min"
+
A {{DOMPoint}} representing the minimum dimension, in world + space, that the contents of a model occupies.
+
"max"
+
A {{DOMPoint}} representing the maximum dimension, in world + space, that the contents of a model occupies.
+
"center"
+
A {{DOMPoint}} representing the mean of the min and max + dimensions, in world space, of the bounding box that the contents of + a model occupies.
+
"radius"
+
A floating-point number representing the radius of effective + bounding sphere from the center of the box. +
+
+

+ If a model does not contain a valid resource, the [[\DOMBoundingBoxReadOnly]] internal slot is null. +

+

+
+ +
Visual aid demonstrating the extent of an object's bounding box
+
+

Adding a model to a document

@@ -115,7 +169,7 @@

document:

-           <model src="3d-assets/car"></model>
+           <model src="3d-assets/teapot"></model>
          

By using content negotiation the user agent relies on the server to @@ -125,18 +179,109 @@

Enabling interactivity

+ +

+ Programmatic view control +

+

Supporting multiple formats

+

Providing fallback content for legacy user agents

+ +

+ Providing an image-based light (IBL) +

+

Making `model` accessible

+
From d4850aab679d9beea5a83b2a81495177808303d6 Mon Sep 17 00:00:00 2001 From: Brandel Zachernuk Date: Wed, 10 Jul 2024 17:12:31 -0700 Subject: [PATCH 02/18] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 1313479..00af006 100644 --- a/index.html +++ b/index.html @@ -112,7 +112,7 @@

A model element whose source path resolves to a valid resource dispatch a `load` event upon the successful fetching and - presentation of the resource data. If the asset fails to resolve, + presentation of the resource data. If the asset fails to load, for instance due to an invalid URL, a failure to retrieve the bytes, or a failure in the parsing process, the element will dispatch an `error` event. From c762cf45ad5c88a7e0f8b9ba7d2f79cfe55b68d2 Mon Sep 17 00:00:00 2001 From: Brandel Zachernuk Date: Wed, 10 Jul 2024 17:12:41 -0700 Subject: [PATCH 03/18] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 00af006..f703f37 100644 --- a/index.html +++ b/index.html @@ -113,7 +113,7 @@

A model element whose source path resolves to a valid resource dispatch a `load` event upon the successful fetching and presentation of the resource data. If the asset fails to load, - for instance due to an invalid URL, a failure to retrieve the bytes, + for instance due to an invalid URL, a failure to fetch, or a failure in the parsing process, the element will dispatch an `error` event.

From f9a657b26ad799d06db107051a692eb644b8eaab Mon Sep 17 00:00:00 2001 From: Brandel Zachernuk Date: Wed, 10 Jul 2024 17:12:50 -0700 Subject: [PATCH 04/18] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index f703f37..b91d6ab 100644 --- a/index.html +++ b/index.html @@ -114,7 +114,7 @@

dispatch a `load` event upon the successful fetching and presentation of the resource data. If the asset fails to load, for instance due to an invalid URL, a failure to fetch, - or a failure in the parsing process, the element will dispatch an + or a failure in the source format's parsing process, the user agent dispatches an `error` event.

From 7c0993b657610722d7e23b347fa8bd9b881a5811 Mon Sep 17 00:00:00 2001 From: Brandel Zachernuk Date: Wed, 10 Jul 2024 17:13:19 -0700 Subject: [PATCH 05/18] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.html b/index.html index b91d6ab..a738a8f 100644 --- a/index.html +++ b/index.html @@ -117,6 +117,14 @@

or a failure in the source format's parsing process, the user agent dispatches an `error` event.

+

Processing model contents

From 5420d3aa2dcf89bd51e2e0dfd43d95d896fa12ca Mon Sep 17 00:00:00 2001 From: Brandel Zachernuk Date: Wed, 10 Jul 2024 17:13:31 -0700 Subject: [PATCH 06/18] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index a738a8f..4542251 100644 --- a/index.html +++ b/index.html @@ -131,7 +131,7 @@

A 3D asset file contains positional data for the surfaces and objects within it. Following the successful processing of a model resource, the - {{model/boundingBox}} attribute references a + {{Model}}'s {{Model/boundingBox}} attribute references a [[\DOMBoundingBoxReadOnly]] internal slot, which is a nullable [=map=] of whose values are {{DOMPoint}}s. The slot contains four entries: From b77cce92407fd398d7fe053e01d18a0687337fcc Mon Sep 17 00:00:00 2001 From: Brandel Zachernuk Date: Wed, 10 Jul 2024 17:13:47 -0700 Subject: [PATCH 07/18] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 4542251..03e937c 100644 --- a/index.html +++ b/index.html @@ -187,7 +187,7 @@

Enabling interactivity

- From 25db3a00561c27fda3281fdb4e59b82ebad2af2a Mon Sep 17 00:00:00 2001 From: Brandel Zachernuk Date: Mon, 5 Aug 2024 14:20:00 -0700 Subject: [PATCH 17/18] revised the bounding box representation to be based on two DOMPoint objects, updated the diagram to reflect this priority --- images/bounding-box.svg | 192 ++++++++++++++++++---------------------- index.html | 32 ++----- 2 files changed, 93 insertions(+), 131 deletions(-) diff --git a/images/bounding-box.svg b/images/bounding-box.svg index 864949e..b019177 100644 --- a/images/bounding-box.svg +++ b/images/bounding-box.svg @@ -1,75 +1,72 @@ - + + viewBox="0 0 756.7 370.6" style="enable-background:new 0 0 756.7 370.6;" xml:space="preserve"> - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + 1.3 @@ -80,66 +77,45 @@ 1 - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - r + (0, 0.5, -0.25) diff --git a/index.html b/index.html index 616f1c4..0d0ddf9 100644 --- a/index.html +++ b/index.html @@ -131,39 +131,25 @@

A 3D asset file contains positional data for the surfaces and objects within it. Following the successful processing of a model resource, the - {{Model}}'s {{Model/boundingBox}} attribute references a - [[\DOMBoundingBoxReadOnly]] internal slot, which - is a nullable [=map=] of whose values are {{DOMPoint}}s. - The slot contains four entries: + {{Model}}'s Bounding box information is conveyed in the + {{Model/boundingBoxCenter}} attribute and the + {{Model/boundingBoxExtent}} attribute, both presented as three- + dimensional {{DOMPointReadOnly}} objects.

-
-
"min"
-
A {{DOMPoint}} representing the minimum dimension, in world - space, that the contents of a model occupies.
-
"max"
-
A {{DOMPoint}} representing the maximum dimension, in world - space, that the contents of a model occupies.
-
"center"
-
A {{DOMPoint}} representing the mean of the min and max - dimensions, in world space, of the bounding box that the contents of - a model occupies.
-
"radius"
-
A floating-point number representing the radius of effective - bounding sphere from the center of the box. -
-

- If a model does not contain a valid resource, the [[\DOMBoundingBoxReadOnly]] internal slot is null. + If a model does not contain a valid resource, the attributes referring + to the extent and center of the bounding box are null.

-
Visual aid demonstrating the extent of an object's bounding box
+
Visual aid demonstrating the center and extent of an + object's bounding box