Skip to content

Commit

Permalink
fix for model location
Browse files Browse the repository at this point in the history
Signed-off-by: Hannah Bollar <[email protected]>
  • Loading branch information
hanbollar committed Feb 9, 2024
1 parent e208462 commit 6979efb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions samples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
<mr-a href="https://volumetrics.io" target="_blank" class="company">
volumetrics
</mr-a>
<mr-div class="logo">
<mr-model
class="logo"
id="logo-model"
src="/assets/models/logo.stl"
data-comp-instancing="type: animate;"
data-comp-spin="maxspeed: -0.002; acceleration: -0.000008;"
data-rotation="-22.91 17.1887 45.8366">
</mr-model>
</mr-div>
<mr-button onclick="spin()" class="spin-button">
spin
</mr-button>
Expand Down Expand Up @@ -104,10 +103,11 @@

// increases the maxspeed and acceleration of the animation component on the logo
function spin() {
let animationComp = model.components.get('animation')
if (animationComp !== undefined && animationComp !== null) {
model.components.set('animation', {maxspeed: animationComp.maxspeed * 10000, acceleration: animationComp.acceleration * 10000})
}
console.log('spin');
// let animationComp = model.components.get('animation')
// if (animationComp !== undefined && animationComp !== null) {
// model.components.set('animation', {maxspeed: animationComp.maxspeed * 10000, acceleration: animationComp.acceleration * 10000})
// }
}


Expand Down

0 comments on commit 6979efb

Please sign in to comment.