Total Pageviews

Wednesday, April 23, 2014

event.xyzRaw()

event.xRaw
វាផ្តល់នៅ acceleration ទាក់ទង់នឹង x-axis របស់ device’s screen ដែលស្ថិតនៅក្នុង portrait orientation។ នេះជាច្បាប់របស់ raw value ដែលទទួលបានពី device’s sensor។ no filtering or smoothing is applied to it
ចំណាំះ តំលៃរបស់វាទាក់ទង់នឹង device portrait orientation, វាទាក់ទង់នឹង current orientation របស់កម្មវិធី។ បើសិនជាកម្មវិធីរត់លើ landscape mode​វាត្រូវដាក់ជា 90 degree
សូមមើលកូដះ
local function onAccelerate( event )
    print( event.name, event.xRaw, event.yRaw, event.zRaw )
end
Runtime:addEventListener( "accelerometer", onAccelerate )

event.yRaw
វាផ្តល់នៅ acceleration ទាក់ទង់នឹង y-axis របស់ device’s screen ដែលស្ថិតនៅក្នុង portrait orientation។ នេះជាច្បាប់របស់ raw value ដែលទទួលបានពី device’s sensor។ no filtering or smoothing is applied to it
ចំណាំះ តំលៃរបស់វាទាក់ទង់នឹង device portrait orientation, វាទាក់ទង់នឹង current orientation របស់កម្មវិធី។ បើសិនជាកម្មវិធីរត់លើ landscape mode​វាត្រូវដាក់ជា 90 degree
សូមមើលកូដះ
local function onAccelerate( event )
    print( event.name, event.xRaw, event.yRaw, event.zRaw )
end
Runtime:addEventListener( "accelerometer", onAccelerate )



event.zRaw
វាផ្តល់នៅ acceleration ទាក់ទង់នឹង z-axis របស់ device’s screen ដែលស្ថិតនៅក្នុង portrait orientation។ នេះជាច្បាប់របស់ raw value ដែលទទួលបានពី device’s sensor។ no filtering or smoothing is applied to it
ចំណាំះ តំលៃរបស់វាទាក់ទង់នឹង device portrait orientation, វាទាក់ទង់នឹង current orientation របស់កម្មវិធី។ បើសិនជាកម្មវិធីរត់លើ landscape mode​វាត្រូវដាក់ជា 90 degree
សូមមើលកូដះ
local function onAccelerate( event )
    print( event.name, event.xRaw, event.yRaw, event.zRaw )
end
Runtime:addEventListener( "accelerometer", onAccelerate )




No comments:

Post a Comment