Giter VIP home page Giter VIP logo

Comments (7)

awe-media avatar awe-media commented on July 22, 2024

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.

awe-media avatar awe-media commented on July 22, 2024

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.

HumberSean avatar HumberSean commented on July 22, 2024

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.

binita12345 avatar binita12345 commented on July 22, 2024

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.

HumberSean avatar HumberSean commented on July 22, 2024

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.

binita12345 avatar binita12345 commented on July 22, 2024

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.

HumberSean avatar HumberSean commented on July 22, 2024

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)

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.