aframevr / aframevr/aframe

xRotation for text.js

Open
#4,293 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

Would it be possible to add xRotation to text.js (https://github.com/aframevr/aframe/blob/v0.9.0/src/components/text.js)? I like to have rounded speech bubbles at the moment and have been using rotated short cylinders but this means I have to use a separate entity for the text and the speech bubble. If I could apply rotation to the text as a property of it then I could just use the one entity with the cylinder in the geometry.

I tried adding
xRotation:` {type: 'number', default: 0};
to the schema and
mesh.rotation.x = data.xRotation;
in the update layout function but either it didn't work or I didn't link to my test correctly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/components/text.js, linked in the issue, and inspect its schema and update layout function. Trace how the text mesh is created and updated, then verify that an xRotation property rotates the text while allowing it to remain in the same entity as the geometry.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, three.js
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.