Skip to content

Enhance 3D Transform Support: Add Rotation and Scale #115

@yorkie

Description

@yorkie

Feature Request: Complete 3D Transform Support

Currently, JSAR only supports 3D translation for transforms. To align with standard web APIs and modern graphics needs, JSAR should also support rotation and scale properties in 3D transforms.

Motivation

  • Compatibility: Web standards (CSS, DOM) and 3D engines expect support for translation, rotation, and scaling in transforms.
  • Functionality: Many applications require rotation and scale for positioning 3D elements correctly in space.
  • Developer Experience: Improved API ergonomics and feature parity with existing web and graphics APIs.

Expected Behavior

  • Add support for rotation and scale in 3D transforms alongside existing translation.
  • Rotation should support axis-angle or quaternion representations, as well as euler angles if possible.
  • Scale should support uniform and non-uniform scaling.
  • API examples:
    element.style.transform = 'translate3d(x, y, z) rotate3d(x, y, z, angle) scale3d(sx, sy, sz)';
  • The implementation should be compatible with both DOM and graphics layers in JSAR.

Reference

Additional Context

This will enable advanced 3D positioning and animation features for JSAR content, bringing it closer to mainstream browser engines and 3D toolkits.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions