AudioAnalyser with three.js - three.js

https://glitch.com/edit/#!/pulseball?path=cube_audio_analyser2.0.html%3A1%3A0
I am trying to create an audio analyser in Three.js (see link above) also the sound file is in the assets. I am getting an error three.js:41273 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
So i have put in sound.resume() in the play function (see code) but i the error is still there i can click on the play and pause buttons and the track is played but i don't think the audio analyser is working. I have looked at the docs and some examples from Three.js and the web audio api copied the code from these sources but there is no reaction from the musical data to animate the cube. Could someone please help as I am sure what to do next.
thanks

Because of CORS restriction, it's not possible to load the audio file from glitch. I've slightly updated your code and use now an audio file from the official three.js repository. Check out how the frequency data are logged in the browser console.
https://orchid-iodized-action.glitch.me

Related

three.js fbxloader example 99% success

This example page https://threejs.org/examples/#webgl_loader_fbx shows a model bot dancing samba.
How can I get my hands on the model used by this page ?
I downloaded my own from mixamo.com and it gets loaded w/o problems, seems
to have all the animations and mixers, but I do not see the dancing bot character (the screen changes color to the colors of the bot once the scenes.add(object) is executed).
Am doing this with Angular6 and it really works very well with it.
Any help would be greatly appreciated.
The three.js FBX example models are hosted here: https://github.com/mrdoob/three.js/tree/dev/examples/models/fbx

Override image feed into Vuforia in Unity

I want to record the video feed captured from Vuforia then play the scene back, allowing for the tracked image marker to be enabled or disabled upon playback. I know Vuforia allows me to access camera properties with Vuforia.CameraDevice.Instance but there doesn't seem to be a way to override the incoming image with a prerecorded one.
I know I could record the state (position and rotation) of the objects during the recording but it seems more elegant for them to be tracking in realtime based off a prerecorded video feed. Thanks.
I attempted this as well, to no avail.
From: Is is possible to use Vuforia without a camera?
...but the Vuforia SDK prevents the use of any other source than the camera.
I guess the main reason for this is that the camera management is fully handled internally by the Vuforia SDK, probably in order to make it easier to use as managing the camera by ourselves is at best a boring task (lines and lines of code to repeat in each project...), at worst a huge pain in the ass (especially on Android where there are sometimes devices than don't behave as expected).

Facebook Open Graph Images are Low Quality For Rotated Images

I use the Facebook Open Graph to publish URLs from a website to their corresponding Facebook Page. The main image is specified using the Open Graph tag og:image. Sometimes the images show up on Facebook as a very zoomed-in, and granular/pixelated. Upon further examination, the images which do poorly appear to have been rotated (I noticed this because a Lightbox plugin I use isn't correctly rotating them, but all other software: browser, Mac Preview, Facebook are).
An example page from the site with the problem (click to zoom and see the orientation issue in that 3rd party library but that's another matter). This issue I'm trying to resolve on Facebook can be seen by using the Facebook Debugger against this page. (As a side-note, it's oriented correctly).
At first I thought I could perhaps fix this with og:image:width and og:image:height, but it had no effect (it did fix a different the pre-caching/crawling issue).
Note that providing the raw image URL directly into the Debugger works fine; the problem is only when providing this URL via the Open Graph tags.
My one workaround idea is to use my image processing library (sorl-thumbnail) to produce a version of the image which FB might like better.
What is the specific characteristic of these rotated images causing a problem and how do I work around it?
Turns out this is a legitimate Facebook bug. Kudos to them for responding and addressing it promptly.
https://developers.facebook.com/bugs/1080037355413437/

How to make thumbnails in wordpress play audio after click through stratus

I probably searched through the entire web but couldn't find any help on this. Before I ask the question I must mention that I am a complete novice in web development.
I went through a lot of websites that enable you to play audio through stratus after clicking on a thumbnail. Although websites like indieshuffle.com and themusicninja do not use stratus, I was wondering how they get their photos to play songs in their audio players.
Similarly, I don't want my thumbnails to link to the post but instead I want people to play the corresponding soundcloud track after clicking on the thumbnail. Also, if it is possible to have play/pause buttons on the thumbnails it will be great.
Of course, I have ajax and stratus as well as the full width audio player installed as plugins.
I am guessing this has to do with embedding the shortcode for the track somewhere in the image.
Please help!!!
since you are complete new your best bet here is an album plugin or something
that will let you attach an image and have a mp3 file to relate to, and be displayed without much knowledge in coding.

Dashcode question - OnClick image to fullscreen?

I have a web app I'm building in Dashcode, currently every thing is working as advertised. I'm using the browser template and was able to modify it a bit, got the xml working to connect images and their description. Now I want to add a simple OnClick event that sends the image to fullscreen but I can't find any documentation for that. I'm pretty sure this is easily done so I'm missing something here? Any help greatly appreciated.
Tom
Taking over the screen is a bit complicated (if your talking about a full screen experience like youtube), but full screen in the browser window is defiantly possible. The simplest method is to have the click event open a link to the image location. This would load the image in full resolution in the browser window. A more elegant approach would be to load the image url into the source of a image dashcode object. and have that objects visibility only appear overs the whole web app when the Oncick event occurs. If you are talking about a built in function in dashcode to achieve a full screen/browser image, your out of luck.

Resources