2
爲了能夠使用最新的Three.JS,我希望有人經歷過這個問題,因爲Google沒有給我任何東西。Ashima Perlin噪聲着色器不能與最新版本的Three.JS一起工作
我使用阿詩瑪Perlin雜着色器(見例子) - http://www.clicktorelease.com/blog/experiments-with-perlin-noise
我能得到這個工作完全正常,如果我使用three.js所的48版本(最新的是59)。
嘗試使用最近的這個版本我得到這個錯誤:
ERROR: 0:301: 'objectMatrix' : undeclared identifier
ERROR: 0:301: 'objectMatrix' : left of '[' is not of type array, matrix, or vector
ERROR: 0:301: 'xyz' : field selection requires structure, vector, or matrix on left hand side
ERROR: 0:301: 'objectMatrix' : left of '[' is not of type array, matrix, or vector
ERROR: 0:301: 'xyz' : field selection requires structure, vector, or matrix on left hand side
ERROR: 0:301: 'objectMatrix' : left of '[' is not of type array, matrix, or vector
ERROR: 0:301: 'xyz' : field selection requires structure, vector, or matrix on left hand side
ERROR: 0:301: 'constructor' : not enough data provided for construction
three.min.js:40
這通常是一些我會調試,修復和推動與git別人,但我沒有的C知識或着色器知識來調試這個。
井釋放48與58(目前)是很久以前。您需要按照https://github.com/mrdoob/three.js/wiki/Migration上的遷移指南和/或https://github.com/mrdoob/three.js上的更改指南來更新您的代碼。如果您發佈代碼或jsfiddle,可以提供一些幫助。 – gaitat