Comments (7)
All of the standard values you can set during the add()
should work. e.g.
- position
- rotation
- scale
For projections this should then also include
- geometry
- material
etc. too
If you find any that are unsupported or have any issues please let us know and we'll look into them.
from awe.js.
Also not that there's some syntactic sugar that lets you also call update off an object instead of having to call it from the class level.
e.g.
var poi = awe.pois.view("my_poi_id");
...
poi.update({ position:{ x:0, y:0, z:-500 } });
This just makes the code more readable but under the hood it's exactly the same call.
Hope that helps.
from awe.js.
Thank you for your reply. How do you use update to play/pause a video or change a texture? path does not seem to work as a property in update.
from awe.js.
I am getting same issue and i also want to change texture or play video as a animation. if u have any solution, please reply here.
Is texture property supported in awe.pois.update({data:{})?
from awe.js.
Hello,
Rob from awe.js was kind enough to respond. The text from his email is below (thanks again Rob!!). In my early tests play_video_texture is working for me with a 3 second test video. Good luck!
You can do this in a number of ways.
awe.projections.view(YOUR_ID_HERE).play_video_texture();
Or alternatively.
awe.projections.view(YOUR_ID_HERE).texture.play();
However the first option will check that it's a video texture first before it calls play().
NOTE: You need to put this call inside a user gesture event on mobile devices (e.g. Chrome and Safari) otherwise it fails silently.
Here's how you can do this inside and object click handler using the js/plugins/awe-standard-object_clicked_or_focused.js plugin included in our repos.
window.addEventListener('object_clicked', function(e) {
var my_projection = awe.projections.view(e.detail.projection_id);
my_projection.play_video_texture();
}, false);
Or you can just use a standard onclick event on an html element or similar.
from awe.js.
Above solution is not work for me. i want to use my projection id outside object click handler.
because i have to show animated butterfly by default.
thanks for your reply.
from awe.js.
As I understand it (through advice above from Rob, and other forums) the browser itself on a mobile device will not autoplay media. Media needs to be started as the result of a user interaction. On click is the most popular (and the only one I have tried), but the "user gesture event" referenced above suggests it might include the other events. End of story: media cannot autoplay on a device. Could you make your butterfly a 3d model instead of a video? I'm pretty sure that could be animated through awe.js.
from awe.js.
Related Issues (20)
- what can I pass in texture in awe.projections.add as displaying image? HOT 1
- how to animate or update image via texture using six different frames? HOT 1
- how to load .fbx file to animate an object? HOT 1
- Is texture property supported in awe.pois.update({data:{})? HOT 1
- how to unregister click event HOT 2
- Why object is going on beside of its actual position when an object is clicked/tapped? HOT 1
- how can i shake object from center on device? HOT 1
- object is appearing on another angle HOT 1
- Adding video texture to projections in an onclick event (Android) HOT 1
- texture not load HOT 1
- Use augmented reality in STEREO mode with AWE HOT 1
- Augmented Reality with camera active, with background black, for Hololens. HOT 1
- Non Mobile platform HOT 1
- Dispose method HOT 1
- Nothing HOT 1
- Text Example HOT 1
- How can I reload/update/change .obj model? HOT 2
- projection scale not working HOT 1
- Is there a function to manually run snapshot function HOT 5
- How do I link my AR scene to another scene in the same project?
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 awe.js.