Jump to content

Flemming

Members
  • Content Count

    47
  • Joined

  • Last visited

  1. Nevermind! I must admit that this isn't the right solution for my project. Now i'm forced to go native with three.js. It must be the eseast and best bumpmap visualizer for the web. It would be nice if three.js was completely wrapped but i can't wait anymore.
  2. Hi Is it possible to get NormalMapFilter.js wrapped ? I would like to recreate this cool demo in sms: http://www.goodboydigital.com/pixijs/examples/20/ In case you will do it, the necessary files are in the attachment. Thanks Flemming pixi-normalmap.zip
  3. Ok - the Mega Demo showed me how to do it. I just changed it to a TW3GraphicControl, and it works fine now :-)
  4. Hi I started a project with the ArcSpiral demo as template. Now i realized that i want some forms and form-navigation. I tried adding this to TApplication.ApplicationStarting: FFormMain := TFormMain.Create(Display.View); FFormMain.Name := 'Main'; RegisterFormInstance(FFormMain, True); ... but how do i navigate between the form and the game-app ?
  5. 1. When i search with "Find in files" i allways get the "Not found" info messagebox, even when there is a search result ? 2. The "whole words" checkbox is not working ! 3. In the right of the messagebox there's a "Auto Hide" button. Clicking it gives me the error: "Control 'CustomDockPanel_PopupPanel' has no parent window" - and then i get this error every time i do a seach.
  6. Hi I can't find out where to find TRect in ver. 2.1 beta-2 ? It's not in smartCL.System ?
  7. Hi I can't get Web Worker running in Chrome ? Have tried the demo to.
  8. A little change here ! In the process of implementing the code in the Worker i realized that i could'n use btoa() and atob() !? So i replaced them with the functions from System.Encoding.pas. Do you know why they are not supported in sms workers ?
  9. I finally came to a solution that works. I tried to compare the encoding speed of System.Encoding.pas with the javascript btoa and found the javascript to be about 6 times faster. So i came up with this : // ---------------------------------- In the Worker thread TMyImageData = Record width : integer; height : integer; data : JUInt8ClampedArray; end; function Base64Encode_MyImageData(MyImgData:TMyImageData):string; var data,w,h : variant; begin w:=MyImgData.width; h:=MyImgData.height; data:=MyImgData.data; asm var w1 = (@w & 0xFF); var w2 = ((@w >&
  10. @kdtop3 thanks for your links ! It gives me an idea on how the base64 decoding works, but in respect to performance a javascript written decoder would be preferred. I want to transfer image data to a worker for imageprocessing and back again, and i try to do that without the use of DOM dependend objects in the worker. My samplecode is only to ensure that the encoding/decoding works. It would be nice if i could use base64 but im not sure how to do that in the worker without a canvas class ? If i can parse it to a TW3ImageData or some kind of array it would be fine.
  11. It should work ! The width, height and data are correctly parsed to the H2 handle, but i can't access the properties through imgdata2 ?
  12. I started out using the base64 solution, but then i found out that the Web Worker have no access the the DOM objects. I need to make some pixel processing in the Worker and the common java-solution for that is using the ImageData class. I dont know how to decode the base64 string in the Worker without a DOM object ? Im not sure about how the JSON part should work in this case, but could it possibly have something to do with the sms-classes being encoded with the ImageData.data part ? I tried using the handle but doesn seem to work either : ... H:=imgdata.Handle; asm @mT
  13. Hi I want to parse the content of a TW3ImageData with JSON for the use with Web Worker. But something is not working in the JSON/ImageData convertion. I made a little test sample : procedure TForm1.W3Button3Click(Sender: TObject); var imgdata, imgdata2: TW3ImageData; cont: TW3GraphicContext; canv: TW3Canvas; mText: string; begin img := TW3Image.Create(self); img.LoadFromURL('res/red3.png'); img.OnLoad := procedure (Sender: TObject) var i: integer; begin if img.Ready then
  14. Thanks André !!! :-) Can't wait to try it out ! Hopefully i will get it working, but anyway it's definitely worth a try ;-)
  15. I have been following the progress in Leap Motion the past year, but haven't bought it yet because of the lack of pascal support. If you guys would wrap it i'll buy it right away ! There's so many oportunitys for making cutting edge development with the Leap controller ! :-)
×
×
  • Create New...