簡體   English   中英

Spark ar studio 我嘗試構建一個簡單的過濾器,但我的控制台上有這個問題:錯誤:未定義不是 function

[英]Spark ar studio i try t build a simple filter but i have this problem on my console:ERROR: undefined is not a function

當我嘗試運行控制台時,我在 spark ar studio 控制台上出現以下錯誤。 錯誤:未定義不是 function { "line": 13, "column": 25, "sourceURL": "script.js" }

import {quiz} from './quiz.js'

const Scene =require('Scene')
const Diagnostics = require('Diagnostics')
const Materials = require('Materials')
const TouchGestures = require('TouchGestures')

const root = Scene.root

let question = root.find('question')
let counter = root.find('counter')
let next = root.find('next')


let a1= root.find('a1')
let a2= root.find('a2')
let a3= root.find('a3')
let a4= root.find('a4')

let mats = [ 
        Materials.get('answer_bg1'),
        Materials.get('answer_bg2'),
        Materials.get('answer_bg3'),
        Materials.get('answer_bg4')
]

let rects = [
    root.find('answer_bg1'),
    root.find('answer_bg2'),
    root.find('answer_bg3'),
    root.find('answer_bg4'),

]
 let answers =[]
 let righAnswers=[]
 
 let selected = 0
 let questionNumber=0
 
 let q = quiz[questionNumber]
 
 question.text=q.question

從 Spark AR Studio v85 開始,當前的 JavaScript API 被棄用,取而代之的是異步 API。

這意味着某些 API 將被棄用,需要在您的項目中進行替換。 創建新項目時,應使用新的 API。

您可以在此處了解有關它的更多信息Scripting Javascript Promise In Spark AR For Beginners

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM