superframe | : package : A super collection of A-Frame components | Augmented Reality library
kandi X-RAY | superframe Summary
kandi X-RAY | superframe Summary
A super collection of A-Frame components.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of superframe
superframe Key Features
superframe Examples and Code Snippets
Community Discussions
Trending Discussions on superframe
QUESTION
I'm using A-Frame and A-Frame template-component.
I use template-component to load templates from <script id="..."> tag like in example.
I want to change the template on the fly using the el.setAttribute analogically like in this example.
My template contains a <sky> element with video as a source.
I can load one template and it works like a charm. I can pause, play it, and so on.
The issue appears when I want to switch the template to a new one that is using the same video resource, or load a new one and then return to the first one.
now I have 2 sounds - one without sync to the video.
One video is displayed but a second sound plays in the background. I also can verify that the sound is not coming from the displayed video. I can still play/pause it and its sound plays over the one in the background.
edited
I want to be able to modify not only the <sky> element but also some others, that's why I wanted to use the template-component. Let's also say that I don't know what assets would be finally used and I don't want to use an asset management system to load tens of Mb of videos/objects and others and suspend the user at a loading screen. As stated here:
The scene won’t render or initialize until the browser fetches (or errors out) all the assets or the asset system reaches the timeout.
To clarify a little bit more my intention but still keeping it simple, I want the user to be able to change the scene by choosing a prefab (assuming 15Mb per video even with 6-7 assets it may almost reach 100Mb), or by uploading one. And I would really like to avoid reloading the page as it is not an elegant solution for the users perspective.
My guess:I think the old video is not disposed of entirely. I tried using the three.js .dispose() method on various elements/ materials/ video itself, but with no luck.
I also tried using <a-video> as a source, and also deleting the elements before switching, but with the same result.
- How to properly remove elements loaded by template so that the video is not stored/ cached anywhere?
- Can I somehow set the autoplay="false" or similar to <sky> video?
- If my approach is entirely wrong, can you point me in the right direction?
ANSWER
Answered 2021-Apr-20 at 15:45QUESTION
I‘m using superframe‘s orbit-controls (https://github.com/supermedium/superframe/tree/master/components/orbit-controls) and I have a scene with two entities that the user can toggle on/off with a button. Whenever the user clicks on the button, I‘d like to reset the camera position to its initial state.
I've tried resetting the camera's world position like I normally would without using the orbit controls, but so far I haven't had any luck. Here's a jsfiddle of the situation: https://jsfiddle.net/e7akdgf1/5/
...ANSWER
Answered 2019-Jul-26 at 12:59You can change the position like this
QUESTION
If I follow instructions here and I have a game that changes the state over time, how do I reset the state?
Here's my attempt at pseudo code that does not work:
...ANSWER
Answered 2019-Jun-20 at 07:38Yeah, keep an initial state in a variable. Then if you want to replace Object.assign(state, initialState)
;
QUESTION
When using the log component, I want to disable the redundant logging on the console. I notice this appears to be supported by the component: https://github.com/supermedium/superframe/blob/master/components/log/index.js#L22
However I'm not sure how to set that system variable on my A-Frame scene?
...ANSWER
Answered 2019-May-20 at 08:36QUESTION
I am currently implementing a program that uses many tkinter frames and while subframe is being opened I want the superframe to be locked for the user (otherwise things will not work out). After some research I found the grab_set and grab_release method which worked quite fine.
However once the subframe (instanciated by Toplevel) calls the askstring the grab is "losed" and the user can interact with the superlevel window again. An example would be this (very simplified code):
...ANSWER
Answered 2017-Aug-10 at 21:53According to the notes in the tkinter library:
A grab directs all events to this and descendant widgets in the application.
I am not able so far to find any documentation that would explain why the grab_set()
is falling off after you finish submitting your askstring
but I would imaging it is because once the widget is gone the grab_set()
falls off. Just like if you were to close out the Toplevel
window.
In this case tl.grab_release()
does not appear to be needed as grab releases once the window closes.
From what I have tested if you reset the grab_set()
after the askstring
is done then it will still work properly.
You need to simply add tl.grab_set()
just below print(tk.simpledialog.askstring("askstring", "askstring"))
.
Modified code below:
QUESTION
How can I make the below frame, once loaded, to allow for the user to drag and scale the size? Is this possible with HTML/CSS/JS?
...ANSWER
Answered 2017-May-08 at 16:28src Responsive IFrames — The Right Way!
- remove width and height attributes
- set up a parent div for the iframe
make the containing div responsive, and the iframe with the following size/positioning rules:
iframe { position: absolute; top:0; left: 0; width: 100%; height: 100%; }
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install superframe
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page