Skip to content

Split Transform3D component union type into components #6831

@Wumpf

Description

@Wumpf

Remaining todo items:


// Two possibilities:
// - Only legal to set one of them
// - Or apply them all in deterministic order
archetype Transform {
    mat4: Option<Mat4>,
    translation: Option<Translation3>,
    mat3: Option<Mat3>,
    rotation: Option<Rotation3D>,
    scale3: Option<Scale3D>,
    scale: Option<Scale>,
}

Old proposal

How to handle OutOfTreeTransform:

Introduce a new boolean component that coerces a transform batch to be out of tree. OutOfTreeTransform { enabled: bool }
if one encounters several several parent transforms and if they have the OutOfTreeTransform == false the viewer issues a warning and resolves in a best effort manner

To consider: The fallback provider for OutOfTreeTransform can be clever and look at transform counts, automatically assuming true if there's several transforms.

Drawback: Can no longer have out of tree transform side by side with in-tree transforms

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions