考虑一个模型:
model : Signal Model
以及以下两个信号:
clickPosition = Mouse.position
|> Signal.sampleOn Mouse.clicks
和:
dimensions = Window.dimensions
我想得到以下内容desiredSignal
:
(0,0) (30,20) (60,70)
clickPosition +------------+---------------------+---------
M0 M1 M2 M3
model +----+-------------------+------+------------
(600,800) (400,300) (200,800)
dimensions +-----------------+----------+---------------
D1 D2 D3
desiredSignal +------------+---------------------+---------
where:
D1 = ((0,0), M0, (600,800))
D2 = ((30,20), M1, (600,800))
D3 = ((60,70), M3, (200,800))
即我想 sampleOn clickPosition
,但保留采样值。
我怎么能那样做?