我正在使用parcel,并遇到了Jelly.js并尝试按照指示进行导入
import $ from "jquery";
import 'jquery-scrollify';
import { Jelly } from 'jelly.js';
$(function(){
var options = {
paths: '#circle-path', // Shape we want to draw
pointsNumber: 25, // Number of points
maxDistance: 4, // Max distance among points
color: '#ff0019',
opacity: 0.27,
// centroid: '.centroid-text' // Element to move accordingly with the centroid of the shape
// debug: true // Uncomment this to see the points
};
/* Initializing jelly */
var jelly = new Jelly('.jelly-canvas', options);
});
但是它抛出了这个错误
未捕获的ReferenceError:未定义果冻
有什么想法吗?
答案 0 :(得分:0)
这是因为仅.jelly-canvas
元素不存在并且
import { Jelly } from 'jelly.js';
应该是
import Jelly from 'jelly.js';