Shooting the breeze Millride Field Target Club  
Go Back   Shooting the breeze > The Chat > Hunter / Field Target

Hunter / Field Target Anything metal target related...

Reply
 
Thread Tools Display Modes
  #191  
Old 1st August 2016, 12:27 PM
Ceathreamhnan's Avatar
Ceathreamhnan Ceathreamhnan is offline
WHFTA Champion 2013
 
Join Date: Nov 2011
Member of: Dunfermline
Location: Stirling
Posts: 706
Default

Brian, any chance the dink dot could be a lighter colour to stand out against the dark red? Using a high res laptop screen now I struggle to see it at all.
__________________
It's the Indian not the Arrow
Reply With Quote
  #192  
Old 1st August 2016, 09:04 PM
Brian.Samson's Avatar
Brian.Samson Brian.Samson is offline
Allowed in Sales
 
Join Date: Jun 2009
Member of: Pontefract, Doncaster Airgun Range
Location: Doncaster
Posts: 2,741
Default

I will if I can find some time.. don't hold your breath though, I'm mega busy at the moment.
Reply With Quote
  #193  
Old 26th May 2017, 07:24 PM
sstyle sstyle is offline
Member
 
Join Date: Dec 2016
Location: Moscow, Russia
Posts: 32
Default

Brian awesome JS work! BUT there is a mistake. A killzone (4cm) should be equals to 1 point of mildot on 40m distance and 24x mag. Now it is not.

upd: sorry, as you wrote in #183 post: x16 - true mag.



And you can make it works with a touch devices:
Quote:
crosshair.js:
self.canvas.addEventListener("touchmove", function(e){ _onCrossTouchMove.call(self,e);}, false);

var _onCrossTouchMove = function(e) {
// Only deal with one finger
if(e.touches.length == 1){
// Get the information for finger #1
var touch = e.touches[0];
//alert(touch.pageX + "px");
e.preventDefault();
e.stopPropagation();
target.canvas.style.left = (touch.pageX*-1) + "px";
target.canvas.style.cursor = 'none';
}
};
Also I recommend to disable a click events for a touch devices, and add a button:

Quote:
crosshair.js:
if(screen.width > 1100){
self.canvas.addEventListener('mousemove', function(e) { _onCrossMouseMove.call(self,e);},false);
self.canvas.addEventListener('click', function(e) { _onShotTaken.call(self,e);},false );
}
document.getElementById("mobfire").addEventListener('click', function(e) { _onShotTaken.call(self,e);},false );

index.html: button class="btn btn-success btn-lg" id="mobfire" style="position: absolute; top:500px;left:600px;z-index:999" ..Fire!... /button

Last edited by sstyle; 26th May 2017 at 08:13 PM.
Reply With Quote
  #194  
Old 26th May 2017, 07:55 PM
sstyle sstyle is offline
Member
 
Join Date: Dec 2016
Location: Moscow, Russia
Posts: 32
Default

One more thing: Sightron (MOA-2) Rectile:

Quote:
crosshairdata.js:
data.push(
{
id: "moa2",
opacity: 0.8,
thickPost : {
display: false,
lineThickness:0.8,
endPostAngle: 90, // 90 is no angled end.
horizontal : {
distanceMoA: 17.19
},
vertical : {
displayTop: false,
displayBottom: false,
distanceMoA: 17.19
}
},
thinLine : {
lineThickness : 0.075
},
horizontalPoints: [
{ distanceMoA: -2, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -4, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -6, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -8, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -10, style: 'line', length: 4, width: 0.075 },
{ distanceMoA: 2, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: 4, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: 6, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: 8, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: 10, style: 'line', length: 4, width: 0.075 },
],
verticalPoints: [
{ distanceMoA: -2, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -4, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -6, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -8, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -10, style: 'line', length: 4, width: 0.075 },
{ distanceMoA: -12, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -14, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -16, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -18, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: -20, style: 'line', length: 4, width: 0.075 },
{ distanceMoA: 2, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: 4, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: 6, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: 8, style: 'line', length: 2, width: 0.075 },
{ distanceMoA: 10, style: 'line', length: 4, width: 0.075 },
]
});

Last edited by sstyle; 26th May 2017 at 08:17 PM.
Reply With Quote
  #195  
Old 26th May 2017, 08:08 PM
Brian.Samson's Avatar
Brian.Samson Brian.Samson is offline
Allowed in Sales
 
Join Date: Jun 2009
Member of: Pontefract, Doncaster Airgun Range
Location: Doncaster
Posts: 2,741
Default

Nice work, thanks

I'll have to create a git repo and you can do a pull request.

It was only thrown together for a bit of fun while Leanne was in hospital, gave me something to do while waiting around
__________________
Brian's Webshop
Reply With Quote
  #196  
Old 26th May 2017, 08:12 PM
sstyle sstyle is offline
Member
 
Join Date: Dec 2016
Location: Moscow, Russia
Posts: 32
Default

Nice! But I am not so professional as you ) I am a backend developer. But I hope I can add some features to this project
Reply With Quote
  #197  
Old 26th May 2017, 08:20 PM
Brian.Samson's Avatar
Brian.Samson Brian.Samson is offline
Allowed in Sales
 
Join Date: Jun 2009
Member of: Pontefract, Doncaster Airgun Range
Location: Doncaster
Posts: 2,741
Default

If you know how to use Git, I've pushed the code onto a public repo

https://github.com/bsamson/WindTrainer

Create a branch and a pull request and I can add your code into the master branch and release it

p.s. I'm not a front end dev either - .NET C# - I can get by with JS if I really have to
__________________
Brian's Webshop
Reply With Quote
  #198  
Old 26th May 2017, 08:20 PM
sstyle sstyle is offline
Member
 
Join Date: Dec 2016
Location: Moscow, Russia
Posts: 32
Default

Ok, sure I use a git.

And one more fix:

wind speed in m/s

crosshair.js:

Quote:
if( settings.data.Units === "m"){
ctx.fillText( Math.round((windSpeed * 0.45) * 10) / 10 + " m/s", circleCentreX,circleCentreY-50 );
}else{
ctx.fillText( windSpeed + " mph", circleCentreX,circleCentreY-50 );
}
Reply With Quote
  #199  
Old 26th May 2017, 08:32 PM
Brian.Samson's Avatar
Brian.Samson Brian.Samson is offline
Allowed in Sales
 
Join Date: Jun 2009
Member of: Pontefract, Doncaster Airgun Range
Location: Doncaster
Posts: 2,741
Default

Adding your Sightron ret and I'll add the m/s wind speed thing.

Might need a more robust test for a mobile device than (screen.width > 1100) though, before adding touch support.

I'll push the ret and m/s features to master and you can have a play

Bri
__________________
Brian's Webshop
Reply With Quote
  #200  
Old 26th May 2017, 08:36 PM
sstyle sstyle is offline
Member
 
Join Date: Dec 2016
Location: Moscow, Russia
Posts: 32
Default

Sure! Git commits - done.

(screen.width > 1100) - disables a mouse click on the devices with a small screens. There is no mouse..so...

Last edited by sstyle; 26th May 2017 at 08:41 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Super secret Gahtering song 2013 scutter UKAHFT Official Forum 13 9th December 2012 05:29 PM
Shooting in Wind Sparky Tips, tricks and tutorials 52 28th February 2011 05:08 PM
READING THE WIND or Shooting In The Breeze PeteM Hunter / Field Target 13 13th October 2010 08:29 PM
millride wind chink Hunter / Field Target 18 21st August 2009 10:37 PM
Reading wind ? FUBAR Hunter / Field Target 32 23rd July 2009 08:05 PM


All times are GMT. The time now is 03:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
shooting-the-breeze.com Skin design and concept by Attitude