≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Responsive html in CC
Posted by:
(you are not logged in)
Enter the missing letter in: "Internationa?"
(you are not logged in)
Text:
[quote][b]csp-games[/b] wrote: addListener and matchMedia I don't know - this is far from how I code, sorry but I can't help you with these. But one thing people misunderstand is: "do something before start drawing" isn't meant to be executed only once at game start, but (correct me if I'm wrong) every frame BEFORE the frame is rendered. It gives us a way to insert JS at this position in the pipeline, that may have diffrent implications compared to a behavior. That may be useful in respect to collision handler, but also to access the canvas pixels. For example the WebGL command to copy the canvas to an array gave me a black screen in the array, when executed in the behaviour with onAnimate every frame. Only after I used this: [code] <script type="text/javascript" src="copperlichtdata/copperlicht.js"></script> <script type="text/javascript"> function onFrameDrawing() { var mywidth=dd__canvas.width; var myheight=dd__canvas.height; var myheight2=myheight-4; dd__gl.readPixels(0, 0, mywidth, myheight, dd__gl.RGBA, dd__gl.UNSIGNED_BYTE, myarr,0); // copy cc canvas to array } ccbRegisterOnFrameEvent(onFrameDrawing); </script> </head> right in the html page head, it worked and array myarr contained the rgba data of the canvas. That was for an 80x80 pixel canvas (don't ask), so I had these globals: myarr=new Uint8Array(80*80*4); dd__canvas = document.getElementById('3darea'); dd__gl = dd__canvas.getContext('webgl2', {preserveDrawingBuffer: true}); [/code][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact