silexlabs / cocktail Goto Github PK
View Code? Open in Web Editor NEWAn HTML/CSS rendering engine for the Haxe language
Home Page: http://www.silexlabs.org/haxe/cocktail/
License: Other
An HTML/CSS rendering engine for the Haxe language
Home Page: http://www.silexlabs.org/haxe/cocktail/
License: Other
tried to embed the following asset, but it does not seem possible for now:
http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F16530992&auto_play=false&show_artwork=true&color=2b877f
de zabojad :
J'ai du aussi modifier un fichier dans cocktail : cocktail.resource.as3.ImageLoader
A la ligne 72, j'ai rajouté :
loadingContext.checkPolicyFile = true;
Sinon le cross domain ne fonctionne pas en flash.
it should look like :
ide = new ImageDOMElement()
ide.onLoad = myCallBack;
ide.load("http://127.0.0.1/image.jpg");
[...]
function myCallBack(ImageDOMElement ide):void
{
}
Such a method can be really useful.
cf.
=> app black background
=> header tile
for graphic dom object : radial gradient width/height and rotation isn't consistent in flash and js.
dom object : linear gradient ratio is slighlty different in AS/JS. The matrix in Flash must also be scaled to the box whereas it is not in JS.
We must find a higher abstraction for these as implementation is quite different for these. Maybe add a matrix attribute for graphic dom object which will be used each time a rendering method such as endFill or drawImage is called ?
You told me you would understand Yannick
For the keyboard, the ascii code is not returned in JS because it is supposed to only be returned in "keypress" events and not "keydown" or "keyUp". Add a listener for "keypress" when keyDown and keyUp events are raised ?
Wait for the refactoring of the event system to correct
cf. header back button
Add a utils method in js when appliying a CSS3 style to check all vendor specific properties until one exists.
The class "NativeElementManager" is defined in cocktail/nativeElement/NativeElementManager.hx instead of cocktail/nativeElement/abstract
The different class names could be better (creator, manager, path manager...)
Implement a smooth attribute on ImageDOMObject
Issue only exists in AS3 version
When a parent has its position set to inlineblock, with:
-child1 set to block and with width defined
-child2 set to block with width = auto
=> the width of the parent and child2 are set to browser width instead of child1's width
Une majuscule dans un nom de package, c'est bizarre...
De plus, le core de cocktail fait partie de Cocktail donc ne serait-ce pas mieux d'avoir toutes les classes du coeur dans cocktail.core au lieu de cocktailCore ?
the star and polygon are always drawn at the same point, that should be 0,0 but actually seems more like 5,5.
By composition ?
Some classes don't use setter/getter wehn manipulating property buf instead method like setX/getX
The BodyDOMElement class creates a viewport but it's not reachable from outside the class.
Why would that happen ?
the use of a provided domElement instead of instantiating it is not implemented in any ResourceLoader but ImageLoader
Par exemple, le listener pour "mouseDown" ne devrait être appliqué que quand "onMouseDown" est setté
Pose problême de cross domain en JS
I need to access the URL of the VM or publication
In flash it is:
flash.Lib.current.loaderInfo.url.substr(0, flash.Lib.current.loaderInfo.url.lastIndexOf("/"));
In js it is:
window.location.href.toString()
When using the following code, the GraphicDOMElement is not filled correctly with the tile image:
graphic.style.height = DimensionStyleValue.length(px(43));
//graphic.height = 43;
graphic.style.width = DimensionStyleValue.percent(100);
graphic.beginFill(FillStyleValue.bitmap(image, true));
graphic.drawRect(0, 0, graphic.width, graphic.height);
graphic.endFill();
graphic.alpha = 1;
The height of the tile image is 43, but the image is repeated on width (correct), but also on height (incorrect).
adding: "graphic.height = 43;" solves the problem
For instance for image, an ImageDOMElement should be returned immediately, once the picture is loaded it must be updated. If width, height or other attributes are set before picture is done loading, they ust not be changed
When loading multiple small image using the same callback, the callback is called only for the first image.
Check the iphone demo (ApplicationStructure.hx) to reproduce the issue.
No more silent errors like in the webapp demo
For now, throw an error, and in the future, detect and correct the errors
Create a typedef for it ? Use a third-party lib for typedef ?
Create abstract class for ImageLoader, ContainerLoader... to be coherent with the rest of the API
et supprimer variable statique NULL
Ou plutôt remplacer NULL par 0 puisque les valueurs utilisés sont re-calculé ensuite (par exemple quand style height est a "auto")
In all the package but the resource package, all of the .hx files at the root of the package are meant to be imported by users of Cocktail. The ResourceData and ResourceLoader files at the root of the resource package must only be used by the package itself. Where do we put the them ? For ResourceLoader, we can move it in an "abstract" package and rename it "AbstractResourceLoader"
de zabojad :
Je viens de remarquer que quand je fais :
ResourceLoaderManager.loadImage(imageDOMElement.src, onMainPictureLoaded, function(err){}, currentMainImage);
currentMainImage n'est pas remplacé en flash non plus, l'ancienne image qu'il contenait reste à l'écran et c'est crado... De la façon dont je comprend la méthode loadImage et la possibilité de passer en paramètre un ImageDOMElement, il me semble que c'est un bug...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.