customparticle
importstatement: import qtquick.particles 2.0
inherits: particlepainter
properties
fragmentshader: string
vertexshader: string
detaileddescription
propertydocumentation
fragmentshader: string
片斷著色器的glsl原始碼。著色器像"varying highp vec2 qt_texcoord0"一樣要求紋理座標從頂點著色器經過。並在2d取樣器的source上取得的樣品。glsl是opengl的著色語言,如果不深入地了解圖形卡(gpu)的工作原理和學習glsl,則忽略掉這個元件。
vertexshader: string
頂點著色器的glsl原始碼。著色器像"varying highp vec2 qt_texcoord0"一樣沿著片斷著色器通過紋理座標。為了幫助寫乙個頂點著色器,下面的glsl**可裝填如我們的頂點著色器。為了正確地處理類似的**,請精研glsl。
attributehighp vec2 qt_particlepos;
attributehighp vec2 qt_particletex;
attributehighp vec4 qt_particledata; // x =time, y = lifespan, z = size, w = endsize
attributehighp vec4 qt_particlevec; // x,y = constant velocity, z,w = acceleration
attributehighp float qt_particler;
uniform highpmat4 qt_matrix;
uniformhighp float qt_timestamp;
varyinghighp vec2 qt_texcoord0;
voiddefaultmain()
defaultmain() 是預設著色器的相同**,我們稱它為基本粒子功能並在其上新增定製變化來影響粒子。注意著色器只負責模擬粒子的運動,它的粒子資料只有開始位置和產卵時間。
QML型別說明 AnimatedSprite
animatedsprite importstatement import qtquick2.2 inherits item properties currentframe int framecount int frameduration int frameheight int framerate ...
QML型別說明 AudioSample
audiosample importstatement import qtaudioengine1.0 since qt 5.0 inherits item properties loaded bool name string preloaded bool signals loadedchanged...
QML型別說明 BluetoothService
bluetoothservice importstatement import qtbluetooth 5.2 since qt 5.2 properties deviceaddress string devicename string registered string servicedescri...