Comments (2)
Hello @ctxwing
You can set initial zoom and camera angles with our options (initialZoom, yaw, pitch, pivot)
After when View3D's ready
event is triggered, which means your 3D model is loaded, you can apply animations with view3d.camera.reset()
.
You can use easing functions for the bouncing effect.
I didn't test the below script, but here's a rough way to how.
import View3D, { Pose } from "@egjs/view3d"
const view3D = new View3D(el, {
initialZoom: 0.7,
yaw: -20
})
function easeOutBack(x: number): number {
const c1 = 1.70158;
const c3 = c1 + 1;
return 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2);
}
view3D.on("ready", async () => {
// new pose to change
await camera.reset(300, easeOutBack, new Pose(0, 0, 1));
});
from egjs-view3d.
@WoodNeck .
sorry for late responding.. thats awesome.. thanks . I will try to appy. thanks again
from egjs-view3d.
Related Issues (20)
- Y axis cannot be moved HOT 2
- Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.json#overrides[0]': Cannot find module '@typescript-eslint/eslint-plugin' HOT 3
- Can I import glb files from memory into view3d? HOT 5
- I can't load view3D. HOT 2
- how to use plugins in vanilla javascript HOT 3
- how can i access model information HOT 2
- Loading new 3D model / setting iosSrc HOT 3
- Is this gjs-view3d support IE11 ? HOT 4
- Canvas get's blank after applying/removing CSS 'display: none' to wrapper element HOT 4
- Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'. HOT 1
- How to access THREE(three.js instance)? HOT 1
- Question: Is there a grid feature? HOT 1
- Disable negative rotation on the Y axis, is it possible to set via options? HOT 2
- New WebVR Plugin and Library Compilation HOT 2
- New Indexed DB Plugin
- ARButton only working in Safari on iOS HOT 2
- Right-click mouseRelease event does not "release" the model if the event happens outside of the browser window
- Problem with View3d
- requests for examples on view3d
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egjs-view3d.