xr-auto-rotate-touchable-gltf.ts 739 B

12345678910111213141516
  1. import XrFrame from 'XrFrame';
  2. const xrFrameSystem = wx.getXrFrameSystem();
  3. const AutoRotateTouchableGLTFDefaultComponents: XrFrame.IEntityComponents = Object.assign({
  4. 'mesh-shape': {},
  5. 'auto-rotate': {}
  6. }, xrFrameSystem.GLTFDefaultComponents);
  7. const AutoRotateTouchableGLTFDataMapping: {[key: string]: string[];} = Object.assign({
  8. speed: ['auto-rotate', 'speed']
  9. }, xrFrameSystem.GLTFDataMapping);
  10. xrFrameSystem.registerElement('auto-rotate-touchable-gltf', class XRAutoRotateTouchableGLTF extends xrFrameSystem.Element {
  11. public readonly defaultComponents: XrFrame.IEntityComponents = AutoRotateTouchableGLTFDefaultComponents;
  12. public readonly dataMapping: {[key: string]: string[];} = AutoRotateTouchableGLTFDataMapping;
  13. });