在浏览器中包含gltf管道

问题描述

我通过wzrd.in(https://wzrd.in/standalone/gltf-pipeline@latest)浏览了gltf管道。不幸的是,我无法将其导入到我的react应用程序中。

我尝试过:

const gltfPipeline = require('./Converter/gltf-pipeline')

import gltfPipeline from './Converter/gltf-pipeline'

import * as gltfPipeline from './Converter/gltf-pipeline'

但是我收到一个错误

./src/Components/Page/Models/Converter/gltf-pipeline.js
  Line 1:1:         Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 1:124:       'define' is not defined                                                no-undef
  Line 1:135:       'define' is not defined                                                no-undef
  Line 1:242:       Unexpected use of 'self'                                               no-restricted-globals
  Line 1:247:       Unexpected use of 'self'                                               no-restricted-globals
  Line 7:112:       Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:2623:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:2944:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:2973:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:4581:      Unexpected use of 'self'                                               no-restricted-globals
  Line 7:4586:      Unexpected use of 'self'                                               no-restricted-globals
  Line 7:4738:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:4909:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:5196:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:5861:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:8898:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:9718:      Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:11007:     Expected an assignment or function call and instead saw an expression  no-unused-expressions
  Line 7:11298:     Unexpected use of 'self'                                               no-restricted-globals
  Line 7:11303:     Unexpected use of 'self'                                               no-restricted-globals
  Line 7:11428:     Expected an assignment or function call and instead saw an expression  no-unused-expressions
...

有什么办法解决这个问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)