Issue in changing the background of a scene in manim - manim

I can't seem to change the camera config in a scene in manim; i put the following code at the top of a scene:
CONFIG = {
"camera_config":{"background_color": "#003399"}
}
but the background doesn't change; is there something else needed to change the background?

Tried this from a GraphScene and it didn't work. What did work however was:
def construct(self):
self.camera.background_color = WHITE

I'm not sure if I am supposed to answer here or if I should edit the question, anyway I got it, it was because I put the CONFIG line after def construct(self)

Related

Is it possible to change color of bottom horizontal line of iPhone X series within app?

is it possible to change color of bottom horizontal line of iPhone X series within app(inside app only)? my client is asking to change color of this line, and i am not able to find any related topic or solution.
Thanks.
No, I don't think it is. That's drawn by the system, and is not part of your app. Apple does not let apps change things outside of that app's "sandbox".
Edit:
I found a long article on the subject online:
https://medium.freecodecamp.org/reverse-engineering-the-iphone-x-home-indicator-color-a4c112f84d34
It seems it's called the "home indicator" and this author supports my suspicion that you can't change its color.
Edit #2
As Matt points out, the color of the home indicator changes automatically. The system has logic in it that tries to keep enough contrast between the home indicator and the area around it so that it's clearly visible. See the article I linked for more on that subject than you probably wanted to know.
You can only remove it:
override var prefersHomeIndicatorAutoHidden: Bool {
return true
}
The color is applied automatically.

Removing default camera movement in SimpleApplication

I'm absolute beginner in UrhoSharp. I only wanted to implement some basic 3D stuff into my app. Everything works fine with SimpleApplication, the screen is supposed to be watched from one place and direction. When I touch the screen, the scene rotates however. How can I get rid of this behavior?
I wanted to try to override some function of SimpleApplication (probably OnUpdate) so I came with name CursedApplication replacing SimpleApplication everywhere. When I use
using CursedApplication = Urho.SimpleApplication;
everything still works. But what I supposed to be the equivalent
class CursedApplication : Urho.SimpleApplication
{
CursedApplication(ApplicationOptions options) : base(options)
{
}
}
breaks the application. Some idea how can I make things work? Or do I have to build my own scene logic without SimpleApplication?
Finally I found that this can be done with
app.Input.Enabled=false;
where app is instance of SimpleApplication.

PlaygroundBook liveView display a SceneView error

I am currently playing with PlaygroundBook. From the Doc, it says that you can use LiveView.swift to present a always-on View in the liveView. So I create a SceneViewController in the Source Folder. In the SceneViewController, I create a Sphere which lightingModel is physicallyBased, and I using a 3D map as the background contents.
Then in the LiveView.swift
import PlaygroundSupport
let page = PlaygroundPage.current
page.current.liveView = SceneViewController()
But when I run it in the iPad Air Playground. I get no error, but the liveView didn't show anything!
I spend many years finding errors. And I have try to create a new iOS Project using the same SceneViewController, and it work very well. I got no idea.
In the last, I try to change the lightingModel to .phong, and change the background to the white color.
Then the magic thing happened! The liveView now show a black sphere and the white background.
Why?
From the WWDC Session, I learn that I can use proxy to communicate with main process in Contents.swift and LiveView process.
So next, I make a extension.
extension SceneViewController: PlaygroundLiveViewMessageHandler {
public func receive(_ message: PlaygroundValue) {
if case let .string(_) = message {
changeColor()
}
}
}
And inside the Contents.swift, I create a new function
func addSky() {
if let proxy = page.liveView as? PlaygroundRemoteLiveViewProxy {
proxy.send(.string("addSky"))
}
}
And everyTime I call it, The liveView changed, see the image below. It's the same as The first time I try to use a 3D map as the background.
Does anyone know what does it happened ?

Corona SDK Easing outBounce

I'm having a bit of trouble with Corona's transitions with easing.
Here is my code:
transitionTime = 120
transition.to( newDot, { time = transitionTime, y = newDot.destination_y, transition=easing.outBounce } )
Unfortunately, it's not actually bouncing at all. It just seems to be moving normally. I'm not sure if I'm doing something wrong or if something else needs to be done before the easing transition will display.
Any help would be greatly appreciated!
Thank you!
I'm pretty sure that transition API never worked properly. What I always would do is make 2 transitions with one having a slight delay like so:
transition.to(newDot, {time=80,y = newDot.destination_y - 50})
transition.to(newDot, {delay=80, time=40, y=newDot.destination_y})
Just work with something like that so just change up the numbers to your liking. Hope this helps.
I think you are using old corona version.The easing properties inBounce, outBounce, inOutBounce, outInBounce are applied only in new versions of corona. These properties will not work in old one.

CCTurnOffTiles tints my CCSprites

Cocos2d-iPhone version 1.0.1.
I am using CCTurnOffTiles action on a CCSprite (.png image, not animated).
Sometimes, everything goes smoothly. Other times, the sprite seems to be tinted. The tint color seems to be mostly green.
My AppDelegate has the settings I was suggested here: CCLiquid renders my screen black
This is part of my original sprite:
And this is how it looks:
This is the action code:
id myAction = [[CCTurnOffTiles actionWithSize:ccg(35, 20) duration:0.7] reverse];
I use reverse because I want my tiles to turn ON rather than OFF. But I believe that the problem persists either way.
Why might this be happening?

Resources