Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
224 views
in Technique[技术] by (71.8m points)

Can I import specific modules from aframe?

My website's speed is limited by importing the whole a-frame library which is huge using import aframe. I am only using a-frame to view a 360 image embedded on my web page. The components I use are:

<a-scene embedded style={aScene}>
  <a-sky src={canvasToFile()} rotation="0 -90 0" />
  <a-camera look-controls="reverseMouseDrag: true" />
</a-scene>

Is it possible for me to import only the specific components I need i.e. import { 'a-scene', 'a-sky', 'a-camera' } from aframe?

question from:https://stackoverflow.com/questions/65920328/can-i-import-specific-modules-from-aframe

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...