Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add property updates to loaders #72

Closed
doxel-sander opened this issue Jul 3, 2024 · 1 comment
Closed

Add property updates to loaders #72

doxel-sander opened this issue Jul 3, 2024 · 1 comment

Comments

@doxel-sander
Copy link
Contributor

It's currently impossible to declare properties on the results of resources loaded with loaders. For example:

<three-mesh>
    <plane-geometry />
    <mesh-basic-material>
        <!-- I want to set the texture's anisotropy to 32, for example, but can't do so declaratively -->
        <texture-loader src="/example.png" attach="map" />
    </mesh-basic-material>
</three-mesh>

Update so that this behaves as expected:

<three-mesh>
    <plane-geometry />
    <mesh-basic-material>
        <!-- Any non-`src` and non-`attach` attribute should be set on the loaded resource -->
        <!-- The loaded resource itself should also be the element's `.instance` rather than the loader - we can set the loader to a new property `.loader` -->
        <texture-loader src="/example.png" attach="map" anisotropy="32" />
    </mesh-basic-material>
</three-mesh>
@doxel-sander
Copy link
Contributor Author

Done in #73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant