Comments (5)
when i test selection in troika examples, there is differenct height between number/charcter and Chinese text, can u give me some suggestions to solve this problem, I wanna take part in your project.
from troika.
Currently i don't use the y value returned by getCaretAtPoint, instead , I align the origin of a plane mesh to the origin of Text, solve this problem, but it seems not perfect.
from troika.
Hi, @lojjic , I have complated a demo for in-place text editing, link, I wanna to contribute it to your repo, how do u think? And where I should put this text editing example in?
from troika.
Thanks for the report!
The caretTop and caretHeight are calculated here -- the difference is due to the Latin and Chinese font files containing different ascender/descender metrics. I'm open to changing how those values are chosen, if you know of a good reliable method that would make them match.
As for your example, I think keeping it external is best, it can stay on Stackblitz and maybe we can add a link to it in the documentation.
from troika.
I will append the demo link into the doc soon, and by the way, do u know how to calculate the font length before text.sync, i want to draw some lines and dots based on text length before drawing troika textππ
from troika.
Related Issues (20)
- dependency problems when creating a new react app
- Examples not using react functional HOT 1
- Text shaping: support glyph decomposition
- Render math equations from latex syntax? HOT 1
- R3F: Ade font style is not working on some glyphs HOT 5
- Example for troika-three-text has errors under typescript and at runtime HOT 3
- troika-three-text: Kerning is off HOT 9
- Discussion about a new feature---How can I control the width and height ratio (aspect ratio)? HOT 4
- Text.sync can't update the mesh smoothly when I excute sync method quickly HOT 3
- About fonts CDN HOT 3
- Can I call sync with async/await syntax? HOT 2
- Runtime error: 'webgl-sdf-generator' does not contain a default export (imported as 'createSDFGenerator'). HOT 1
- Emoji and Unicode support HOT 3
- Memory Issue with troika-three-text HOT 5
- troika-three-text: Indic shaping
- getCaretAtPoint(...) taking surrogate pairs into consideration HOT 2
- Support ligature caret positioning provided in font
- anchorY="bottom-baseline" not working since v0.48.0 HOT 2
- Glitches when used with Montserrat HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from troika.