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

feat(app): Add Environment, allowing it to mount sub-components and Lightformer via FBO #382

Merged
merged 8 commits into from
Apr 18, 2024

Conversation

hawk86104
Copy link
Contributor

Modified at: #374
Preview: https://hawk86104.github.io/#/plugins/skyBox/newEnvironment
&& https://hawk86104.github.io/#/plugins/industry4/showLambo
image

modifying the Environment, enabling us to replicate R3F use cases using Vue3

<Suspense>
    <Environment :blur="1" background :far="10000">
        <Lightformer :intensity="0.75" :rotation-x="Math.PI / 2" :position="[0, 5, -9]" :scale="[10, 10, 1]" />
        <Lightformer :intensity="4" :rotation-y="Math.PI / 2" :position="[-5, 1, -1]" :scale="[20, 0.1, 1]" />
        <Lightformer :rotation-y="Math.PI / 2" :position="[-5, -1, -1]" :scale="[20, 0.5, 1]" />
        <Lightformer :rotation-y="-Math.PI / 2" :position="[10, 1, 0]" :scale="[20, 11, 1]" />

        <Levioso :speed="5" :floatFactor="2" :rotationFactor="2">
            <Lightformer form="ring" color="red" :intensity="1" :scale="10" :position="[-15, 4, -18]" />
        </Levioso>

        <TresGroup :rotation="[0, 0.5, 0]">
            <TresGroup ref="group">
                <Lightformer v-for="( i, x ) in lightFormerPositions " :key="i" form="circle" :intensity="2"
                    :rotation="[Math.PI / 2, 0, 0]" :position="[x, 4, i * 4]" :scale="[3, 1, 1]" />
            </TresGroup>
        </TresGroup>

        <TresMesh :scale="[100, 100, 100]">
            <TresSphereGeometry :args="[1, 64, 64]" />
            <TresMeshNormalMaterial />
        </TresMesh>
    </Environment>
</Suspense>

Copy link

stackblitz bot commented Apr 11, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Member

@JaimeTorrealba JaimeTorrealba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks for this, I just drop little comments.

But important I don't see the documentation for this one, please remember to add it.

@JaimeTorrealba JaimeTorrealba added p2-nice-to-have Not breaking anything but nice to have (priority) feature New feature or request labels Apr 16, 2024
@hawk86104
Copy link
Contributor Author

Maybe It's already refined

@JaimeTorrealba JaimeTorrealba merged commit 5da4c07 into Tresjs:main Apr 18, 2024
1 check passed
@JaimeTorrealba
Copy link
Member

@hawk86104 Thanks man :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants