-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update camera
so it has mode
and startingPos
&& update orbital
so it has mode
and targetPos
#622
Conversation
Your Render PR Server URL is https://examples-mrjs-pr-622.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cou4gnmct0pc73aa1gcg. |
src/core/MRApp.js
Outdated
@@ -389,7 +389,23 @@ export class MRApp extends MRElement { | |||
} | |||
|
|||
this.camera.matrixWorldAutoUpdate = false; | |||
this.camera.position.set(0, 0, 1); | |||
|
|||
const startPosString = this.getAttribute('userPos'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i went with the userPos="x y z"
approach since it's the user's starting position
you actually don't need to do this! you can do {
mode: 'blah', // String
startPos: [x, y, z] // Array
} We use it for all the components. I would also switch |
good to know on that for future - and sounds good - update incoming for actual |
Signed-off-by: hanbollar <github@hannahbollar.com>
current progress - cam position works 👍 , working on orbital weird thing happening with orbital where it stays at original location until Untitled.mov |
was missing a update call for controls, all good ~ |
camera
so it has mode
and startingPos
&& update orbital so it has mode
and targetPos
camera
so it has mode
and startingPos
&& update orbital so it has mode
and targetPos
camera
so it has mode
and startingPos
&& update orbital
so it has mode
and targetPos
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
Signed-off-by: hanbollar <github@hannahbollar.com>
This looks good. In the future we should chance all the attributes on mr-app to start with |
Linking
...
Problem
Want a way to change the starting camera's position. also updating orbital to allow for user to note target position
Solution
updating camera from an attribute to
data-camera
and updating orbital as wellBreaking Change
updates both camera and orbital from one value to 'mode, pos' pairings
Notes
there's two main options for this fix:- keepcamera
as is where it's mode and add a starting position:camera:blah; startPos:"x y z"
- changecamera
to havecamera="mode:blah; startPos:'x y z'"
i'm implementing the former to not have to deal with'
vs"
inline. Additionally, usinguserPos
instead ofstartPos
since it's more about the user (ie to follow the main convention we're setting up in other cases already)Since this is adding a new example - when testing just directly head to https://localhost:8080/examples/camera.html or https://examples-mrjs-pr-622.onrender.com/examples/camera.html
Required to Merge
d.mov
camera
so it hasmode
andstartingPos
&& updateorbital
so it hasmode
andtargetPos
documentation#53@lobau
@hanbollar