Replies: 1 comment
-
You're hacking MV outside of our public API, so we can't provide support. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is the beginning of my code
In short, after this code, texture models are loaded and so on.
And one of the most important aspects is the slider, which changes the position of the models,
but this method does not work if you do not connect it to the viewer.auto-rotation = true.
As I understand it, this is an environment/rendering communication problem
``
importing {ModelViewerElement } from '@google/model-viewer";
import * as THREE from "three";
importing a ViewModal from "./viewmodal.js";
import { GLTFLoader } from "../node_modules/three/examples/jsm/loaders/GLTFLoader.js";
const viewer = new ModelViewerElement();
let viewModal = new ViewModal();
const gltfLoader = new GLTFLoader();
const scene = viewer[Object.getOwnPropertySymbols(viewer).find(e => e.description === "scene")];
console.log(scene);
const slider = document.getElementById(this slider);
slider.addEventListener('input', () => {
let the value be = parseFloat(slider.value);
let newPosition = value * 1 - 0;
model.position.setY(new position);
console.log(value)
console.log(model)
});
}
Why is my attribute change not working?
We use Lit Element to create our web component that groups attribute changes and processes them asynchronously to improve performance. If you need to reflect an attribute change before performing the next action, use await mvElement.updateComplete;. A common example is changing animationName and calling play().
``
Help please.
Beta Was this translation helpful? Give feedback.
All reactions