Giter Site home page Giter Site logo

Comments (6)

lojjic avatar lojjic commented on August 16, 2024 1

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.

theo-armour avatar theo-armour commented on August 16, 2024 1

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.

lojjic avatar lojjic commented on August 16, 2024

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.

theo-armour avatar theo-armour commented on August 16, 2024

@lojjic

Thanks for speedy holiday reply. looking now.

from troika.

theo-armour avatar theo-armour commented on August 16, 2024

@lojjic

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.

lojjic avatar lojjic commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.