Giter Site home page Giter Site logo

Comments (3)

fq-selbach avatar fq-selbach commented on June 11, 2024

I just noticed that there is a related issue: #23

Would you be interested in a PR to add the described solution as presenter option?

from 3dhop.

fq-selbach avatar fq-selbach commented on June 11, 2024

I've quickly implemented a speed scaling factor:

presenter.js:

var dragSpeedFactor = this._scene.config.dragSpeedFactor || 1.0;
if(ui.dragDeltaX(button) != 0) this.x += (ui.cursorDeltaX/(500 / dragSpeedFactor));
if(ui.dragDeltaY(button) != 0) this.y += (ui.cursorDeltaY/(500 / dragSpeedFactor));

index.html:

presenter.setScene({
  ...,
  config: {
	  dragSpeedFactor: 2.0
  }
});

Works pretty well :-). I'm not sure about the name ('dragSpeedFactor') and the option section ('config') yet. Any ideas? ^^

from 3dhop.

potenziani avatar potenziani commented on June 11, 2024

Hi @fq-selbach,

many thanks for reporting this issue and for your tip. We just integrated into the DEVELOPMENT code (commit bae3e10) a similar solution (a multiplicative factor for customizing trackballs' dragging speed). You can control this interaction from the trackballs declaration in setScene, specifying the optional dragSpeed parameter, in this way:

presenter.setScene({
  ...
  trackball: {
    type : ...,
    trackOptions : {
      ...
    },
    dragSpeed: 1.0
  }
});

Default value is 1.0; any bigger number means a faster-dragging interaction, while smaller means a slower one.

from 3dhop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.