Untitled

mail@pastecode.io avatar
unknown
javascript
19 days ago
609 B
1
Indexable
Never

let modelviewer = document.getElementById('modelviewer')
// bu gercekten display() den gelenin id'si

let animations = modelviewer.model.animations
let animations_options = ['None',...animations.map(anim => anim.name)]

// bu animations_options'u Dropdown'da goster




// Dropdown'dan birsey secildi  ; picked_animation_name

let modelviewer = document.getElementById('modelviewer')
let picked_animation_index = -1
if (picked_animation_name != 'None')
    picked_animation_index = modelviewer.model.animations.findIndex(anim => anim.name==picked_animation_name)
viewer['auto_play'] = picked_animation_index
Leave a Comment