GithubHelp home page GithubHelp logo

aframe-troika-text's People

Contributors

codyjasonbennett avatar dependabot[bot] avatar iansweeneyac avatar lojjic avatar msub2 avatar renovate-bot avatar renovate[bot] avatar utopiah avatar zach-capalbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aframe-troika-text's Issues

Animating opacity doesn't work

I was trying to give a flashing animation to the text
<a-troika-text animation="property: opacity; from:0; to: 1 ; loop: true; dur: 5000" color="#EF2D5E" value="Hello world!"></a-troika-text> Same code worked on normal But it's not working on troika-text,

Using another font in troika-text

When trying to load a new font URL into the text component I am getting an error that stops the text from rendering. When I use the regular font the render works fine, but when I change the font to Google Font's NotoSansSC and try to render some text (Hello), I get this error:

troika-worker-utils.esm.js:470
Uncaught (in promise) Error: Error in worker callModule call: Cannot read property '41' of undefined
at l. (troika-worker-utils.esm.js:470)
at Worker.t.onmessage (troika-worker-utils.esm.js:456)

The NotoSans font file is the .otf file directly downloaded from google fonts, it seems to load the font fine but it is when I load in a new text value that breaks the render.

How could a-troika-text-block for rich text e.g syntax highlighting work

Hi, <a-troika-text> is great but AFAICT can support only a single color or font or fontSize properties.

That's fine for most cases but if one has to display a block of text, e.g a commit, and in particular code, it becomes limiting. I'm wondering how this could be done right.

My initial ideal would be to :

  • make an empty entity,
  • sequentially append all the text to it with all the right properties, e.g color, font, fontSize, etc
  • wait for them to actually be added to the scene to have a geometry
  • get the width of every text entity added (using e.g Box3 bounding box)
  • for each text entity if offsetting is by the current position of the previous one does not go beyond the maximum length line, add it there, otherwise offset vertically

Feature: preloading font in a-assets

To avoid noticeable rendering delays when first using a font, we should add preloading capability. You can already handle the font file itself using <a-asset-item src="fontfile.woff">, but we can additionally allow pregeneration of glyph SDFs using the preloadFont() utility in troika-3d-text.

lots of `unsupported GPOS table LookupType` in log

Is there any way to disable/suppress these warnings?

[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5, x5)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5, x2)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 4 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 5 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5)
[Debug] unsupported GPOS table LookupType – 6 – "format" – 1 (dc85559f-cac5-4d24-82be-27d770c854d4, line 5, x3)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm rollup-plugin-node-resolve Available
npm rollup-plugin-terser Available

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • troika-three-text ^0.48.0
  • aframe 1.4.2
  • rollup 2.79.1
  • rollup-plugin-node-resolve 5.2.0
  • rollup-plugin-terser 7.0.2
  • aframe 1.1.x - 1.4.x

  • Check this box to trigger a request for Renovate to run again on this repository

`a-asset-item` for `font` not working ?

Even though I have
<a-asset-item id="cfont" src="font.ttf"></a-asset-item>
This does not work:
<a-troika-text value="Text" font="#cfont"></a-troika-text>
Yet this does work:
<a-troika-text value="Text" font="font.ttf"></a-troika-text>

Inconsistent bounding boxes

Hi,

I tried to repeat AdaRoseCannon/aframe-htmlmesh#4 here but it didn't work. I tried making a bounding box but the geometry was very different from what I expected, namely a square rather than a rectangle.

In the screenshot below I can show one that worked, the lower one, and one that didn't, despite using the same code

el = new THREE.BoxHelper( document.getElementById("locationreload").object3D.children[0], 0x00ff00 ); AFRAME.scenes[0].object3D.add(el)

image

Is somehow forcing a sync() necessary? Did I miss a step? Note that I did that via the console and seconds after the scene was displayed so I'm relatively confident everything was loaded, at least displayed as it should. I also noticed #38 before but again, I'm not doing it right after adding the element so not sure it would relevant here.

Anyway, what is the recommended way to add a background behind an entire element or part of it?

PS: I noticed https://protectwise.github.io/troika/troika-three-text/#carets-and-selection-ranges that could later on be useful to highlight words or lines but didn't dive in there before being able to have the entire element.

Text is wrecked on iOS

I was very excited for this component, but this is what I'm getting on iOS (both Safari and Chrome):

On macOS it looks fine:

Any idea why?

Line breaks and tabs not working

Hello!

Very promising component. I've just started experimenting with it and I noticed that line breaks and tabs are not supported with \n and \t within the value property.

<a-entity troika-text="value: Hello\nWorld!;"></a-entity>

image

I noticed it was in the documentation, so was hoping it would function as expected.

Should this be currently supported?

Thanks!

How to get height of a-troika-text?

Is it possible to fetch the height of an a-troika-text primitive that's wrapping? I have a background for the text that I'd like to resize to the entire text's current height.

`fill-opacity` causing broken up text

I recently tried using fill-opacity within an 8thwall / aframe project, and it caused the text to appear fragmented, like this:

This is on Android Chrome. (It is well in front of the blue element.)

This is on iPhone.

If I remove the fill-opacity attribute, it looks great.

Is this a known thing?

Not Working On ios 14.7.1

troika text is not displayed at all in my iPhone 7 ( ios 14.7.1) , tried both primitive & component methods, "Could not get webgl version 2 " error was there. So I have enabled webgl2 in safari's settings, But still text wasn't showing up.

a-text is working fine

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.