Comments (6)
More specifically, for usage with globals, you'll probably want the textmesh-standalone umd file with its two dependencies:
https://cdn.jsdelivr.net/npm/[email protected]
https://cdn.jsdelivr.net/npm/[email protected]
https://cdn.jsdelivr.net/npm/[email protected]/dist/textmesh-standalone.umd.min.js
You should then be able to access the global troika_3d_text.TextMesh
I haven't tried this personally so lemme know if it doesn't work.
from troika.
Again. @lojjic, thank you for speedy holiday response.
My doh. Troika 3D Text rules!
Your project looks like it is going to be fun to investigate
from troika.
It's published in the public npm
repository so yes, a CDN like jsdelivr.net or unpkg.com that proxies npm modules should work.
from troika.
Thanks for speedy holiday reply. looking now.
from troika.
https://ta-troika-3d-text.glitch.me/
source:
https://glitch.com/edit/#!/ta-troika-3d-text?path=index.html%3A1%3A0
see line 228
error Uncaught Reference Error: TextMesh is not defined
from troika.
Yeah, like I wrote above if you're using globals then it's going to be at troika_3d_text.TextMesh
not just TextMesh
. Your glitch seems to work when you fix that and the missing argument to zoomObjectBoundingSphere.
Also keep in mind that the text layout is asynchronous, so the bounding sphere won't be accurate until after the sync completes.
from troika.
Related Issues (20)
- Util function getCaretAtPoint can't get the uniform text caret vertical position for number/character and Chinese text. HOT 5
- Runtime error: 'webgl-sdf-generator' does not contain a default export (imported as 'createSDFGenerator'). HOT 3
- 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
- Cloning a synced text still requires sync();
- [ Angular 17 ] - TS2307: Cannot find module 'troika-three-text' or its corresponding type declaratio HOT 1
- troika-three-text uncaught exception HOT 8
- Apply GLSL shader to only some letters
- Fix netlify links in documentation
- Cannot set property customDepthMaterial of #<InstancedUniformsMesh> which has only a getter
- LinearEncoding was not found in 'three'
- troika-three-text: mesh.textRenderInfo missing lineHeight and other font metrics HOT 3
- troika-three-text: First line of text is missing "top" spacing HOT 10
- How to draw many instance of plan with same texture but with different uvs.
- troika-three-text: possible to use in a webworker? HOT 6
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.