model-viewer icon indicating copy to clipboard operation
model-viewer copied to clipboard

sampler.setOffset doesn't move my texture

Open xeiaaa opened this issue 3 years ago • 3 comments

Description

When i try to run sampler.setOffset, the texture doesn't move. setRotation and setScale does work correctly though. is there anything i missed? image

Here's my code for the slider

<Slider
          aria-label="slider-ex-1"
          defaultValue={0}
          mt={4}
          onChange={(e) => {
            const offset = {
              x: -e * 20,
              y: -e * 20,
            };
            console.log(sampler.offset);
            sampler.setOffset(offset);
          }}
        >
          <SliderTrack>
            <SliderFilledTrack />
          </SliderTrack>
          <SliderThumb />
        </Slider>

xeiaaa avatar Aug 16 '23 09:08 xeiaaa

Hmm, it seems to be working in our example. Can you find the difference between that and your site, or perhaps show us a minimal repro? Also, what MV version are you using?

elalish avatar Aug 17 '23 18:08 elalish

Hi @xeiaaa, is this still an issue for you? Can you share how to repro or any console logs that the behavior outputted?

diegoteran avatar Sep 21 '23 05:09 diegoteran

There were some recent changes in #4473 , I'll assume this fixes it since can't repro the error. Feel free to open an issue if it still doesn't work for you.

diegoteran avatar Sep 22 '23 23:09 diegoteran