Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change text of an object #48

Closed
1260811 opened this issue Aug 11, 2017 · 5 comments
Closed

Change text of an object #48

1260811 opened this issue Aug 11, 2017 · 5 comments

Comments

@1260811
Copy link

1260811 commented Aug 11, 2017

Hi, I'm using a text object and I want to change the word from one to two like it is was counting, it´s possible? I tried using awe.projection.update() function but it doesn't work.

@awe-media
Copy link
Owner

Hi @1260811 we'll add a feature request to make this work with update() in an upcoming release. But in the meantime you can do this directly using code like this.

var projection_child = awe.projections.view('s').get_mesh().children[0];
var projection_params = projection_child.geometry.parameters.parameters;
projection_child.geometry = new THREE.TextGeometry( "YOUR NEW TEXT HERE", projection_params );
awe.scene_needs_rendering = 1;

We'll leave this issue open in case anyone else needs this workaround in the meantime.

@1260811
Copy link
Author

1260811 commented Aug 14, 2017

does it work using a marker recognition?

@awe-media
Copy link
Owner

This is a separate question, but just add a listener for the 'ar_tracking_marker' event that is thrown when the tracking runs - see the source code here https://github.com/awe-media/awe.js/blob/master/examples/marker_ar/awe.marker_ar.js#L416

Inside your listener you can add the code shown above to create what you want.

@1260811
Copy link
Author

1260811 commented Aug 18, 2017

Thank you, but I'm begginer and I don't know where I must add it, could you write a example?

@awe-media
Copy link
Owner

This github repos is now focused on supporting the development of apps using awe.js on the awe.media platform. You can still access our older awe.js library as the deprecated branch, however we no longer support that code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants