question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove <source> configuration API

See original GitHub issue

It’s pedantically correct but potential confusing - including requiring users to know/specify mime-types).

Instead, use a simpler, attribute-based approach. The main glTF resource can remain source, and we can have other optional attributes for source-usdz and potentially source-ml (or source-fbx).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
mikkohcommented, Mar 13, 2019

Sorry to bring this up way late in the game.

I would argue that you could infer the model type by the file extension if type is not provided. type should be optional.

<model-viewer> has some parallels to <video>. For example it displays content from multiple sources.

eg for video

<video>
    <source src="some.webm" type="video/webm" />
    <source src="some.mp4" type="video/mp4" />
    This browser does not support the HTML5 video element.
</video>

<model-viewer> could look like this:

<model-viewer>
    <source src="some.usdz" />
    <source src="some.glb" />
    All kinds of bad things happened and we can't do a thing
</model-viewer>

Also the naming of src and ios-src precludes some level of importance src is more important than the secondary ios-src. Also if USDZ is supported in the future by THREE natively do we still want to call it ios-src.

Doing this would allow for the follow:

  1. Handle an ever increasing number of potential sources that could be rendered
  2. Is inline with how <video> and <picture> work
  3. There’s no need to remember arbitrary attribute names eg src, ios-src, hologram-src??
1reaction
donmccurdycommented, Mar 13, 2019

A couple notes:

  1. .glb is the most efficient glTF packing option in nearly all cases - I don’t think you’d ever need both a .gltf and .glb to be specified.
  2. .drc is a geometry-only Draco file, unrelated to glTF, and it’s not widely used. glTF files using Draco compression still use the normal .glb or .gltf extensions. If a client doesn’t support Draco, we’d need some other indicator.

In general I don’t think <model-viewer/> can or should try to support very many formats – this gives users the impression that the format doesn’t matter, and that they should bring whatever they have and we’ll deal with it. Unfortunately many common formats (COLLADA, FBX, OBJ) are very inefficient for use on the web, and/or unreliable to parse, and IMO we’re setting our users up for a bad experience by heading in the direction of an ever increasing number of sources.

Nevertheless, the suggestion of src instead of *-src seems fine to me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gcloud api-gateway api-configs delete
Service catalog for admins managing internal enterprise solutions. ... Open source tool to provision Google Cloud resources with declarative configuration files.
Read more >
Delete a Source - Dremio docs
Delete a Source. Deprecated: Use the Catalog API instead. The Source API will be removed in a future release. This API deletes an...
Read more >
dotnet nuget remove source command - .NET CLI
The dotnet nuget remove source command removes an existing source from your NuGet configuration files.
Read more >
delete-source-server — AWS CLI 2.9.4 Command Reference
--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input...
Read more >
Delete Data Source Content in Data Cube (REST API: POST)
This operation deletes the content of a data source from Data Cube. The data source itself is not deleted using this API.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found