Skip to content

Commit

Permalink
bookmark animation for GIS functionality finsihed apart from
Browse files Browse the repository at this point in the history
actually calling spice function and transforming surfaces #379
  • Loading branch information
RebeccaNowak committed Feb 28, 2024
1 parent 8e0b772 commit 04b34b1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/PRo3D.Core/SequencedBookmarks/BookmarkAnimations.fs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ module BookmarkAnimations =
let pathWithPausing (m : SequencedBookmarks)
(lenses : BookmarkLenses<'a>)
(outerModel : 'a) =
let aspectRatio = m.resolutionX.value / m.resolutionY.value
let bookmarks = orderedLoadedBookmarks m
let animations =
bookmarks
Expand Down
13 changes: 6 additions & 7 deletions src/PRo3D.Core/SequencedBookmarks/SequencedBookmarksApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ module SequencedBookmarksApp =
let m = selectSBookmark m firstBookmark
match m.animationSettings.useGlobalAnimation with
| true ->
pathWithPausing m lenses outerModel//smoothPathAllBookmarks m lenses outerModel //does not work with focal length
//smoothPathAllBookmarks m lenses outerModel //removed because it does not work with focal length
pathWithPausing m lenses outerModel
| false ->
pathWithPausing m lenses outerModel
| None ->
Expand Down Expand Up @@ -662,20 +663,18 @@ module SequencedBookmarksApp =
)

let viewSnapshotGUI (model:AdaptiveSequencedBookmarks) =
// recording not in use because as it is, it only works on
// hardware that allows PRo3D to run smoothly
let startRecordingButton =
button [clazz "ui icon button"; onMouseClick (fun _ -> StartRecording )] [
i [clazz "red circle icon"] [] ]


let stopRecordingButton =
button [clazz "ui icon button"; onMouseClick (fun _ -> StopRecording )] [
i [clazz "red stop icon"] [] ]


let recordingButton =
let recordingButton =
model.isRecording |> AVal.map (fun r -> if r then stopRecordingButton else startRecordingButton)
|> AList.ofAValSingle

let generateButton =
button [clazz "ui icon button"; onMouseClick (fun _ -> GenerateSnapshots )] [
i [clazz "camera icon"] [] ]
Expand Down
21 changes: 20 additions & 1 deletion src/PRo3D.Viewer/Viewer/ViewerLenses.fs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,26 @@ module ViewerLenses =
| Some state ->
Optic.set _sceneState state m
| None -> m
updateSceneState sb m
let m = updateSceneState sb m

let m =
match sb.observationInfo with
| Some info ->
match info.valuesIfComplete with
| Some (t, o, r) ->
// call spice function and transform surfaces here!
Log.line "[Debug] Call to spice function with
target: %s observer: %s reference frame: %s
time: %s"
t.Value o.Value r.spiceName.Value (string info.time.date)
m
| None ->
m
| None ->
m

m

match sb with
| SequencedBookmark.LoadedBookmark loaded ->
update loaded
Expand Down

0 comments on commit 04b34b1

Please sign in to comment.