GithubHelp home page GithubHelp logo

Comments (2)

guiqi134 avatar guiqi134 commented on June 12, 2024 1

I think it's possible. Basically, you can look into the sceneBuilder.createAnimation() and Animation class under Scripts document.

Here is an example how you can define a linear camera movement from a start point to an end point:

# Add camera2 
camera2 = Camera("Camera2")
camera2.position = float3(-5.190841, 3.900723, 20.509645)
camera2.target = float3(-5.501971, 3.859276, 19.560183)
camera2.up = float3(0.000000, 1.000000, 0.000000)
camera2.focalLength = 35
camera2.focalDistance = 1000.0
camera2.apertureRadius = 0.0
sceneBuilder.addCamera(camera2)

# Add camera 2 animation
cameraDuration = 10 # in seconds 
cameraAnimation = sceneBuilder.createAnimation(camera2, "Camera2 Animation", cameraDuration)
tf_start = Transform()
tf_start.lookAt(camera2.position, camera2.target, camera2.up)
tf_end = Transform()
tf_end.lookAt(
    float3(-8.160987, 3.505056, 11.445773),
    float3(-8.472117, 3.463609, 10.496310),
    float3(0.000000, 1.000000, 0.000000)
)
cameraAnimation.addKeyframe(0, tf_start)
cameraAnimation.addKeyframe(cameraDuration, tf_end)

from falcor.

ychanu avatar ychanu commented on June 12, 2024

@guiqi134
Thanks to you, succeeded basic camera animation!
It has been really helpful.

I will refer to the code you provided and study documents further :)

from falcor.

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.