Thanks to visit codestin.com
Credit goes to github.com

Skip to content

T.Group position is ignored when experimental.async=true #1610

@Nickersoft

Description

@Nickersoft

Hey folks, noticing a rather odd bug in which the T.Group position attribute seems to be completely ignored when I enable Svelte's experimental async feature. Here is the component I'm testing on:

<script lang="ts">
  import { T } from "@threlte/core";
  import { RoundedBoxGeometry } from "@threlte/extras";
  import { Collider, RigidBody } from "@threlte/rapier";

  interface Props {
    position?: [number, number, number];
    velocity?: [number, number, number];
  }

  const { velocity = [0, 0, 0], position = [0, 0, 0] }: Props = $props();
</script>

<T.Group {position}>
  <RigidBody linearDamping={0.5} angularDamping={0.5} linearVelocity={velocity}>
    <T.Mesh castShadow>
      <RoundedBoxGeometry args={[1.5, 1.5, 1.5]} radius={0.2} />
      <T.MeshStandardMaterial color="white" />
    </T.Mesh>
    <Collider
      shape="cuboid"
      restitution={0.8}
      mass={0.5}
      args={[0.5, 0.5, 0.5]}
    />
  </RigidBody>
</T.Group>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions