{"id":18569452,"url":"https://github.com/timeu/processing-js-gwt","last_synced_at":"2025-04-10T06:32:14.681Z","repository":{"id":1386881,"uuid":"1355194","full_name":"timeu/processing-js-gwt","owner":"timeu","description":"GWT Wrapper for processing-js","archived":false,"fork":false,"pushed_at":"2020-10-13T09:52:44.000Z","size":4009,"stargazers_count":14,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T17:01:45.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"amatsuda/kaminari_themes","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timeu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-11T14:07:13.000Z","updated_at":"2023-09-08T16:28:30.000Z","dependencies_parsed_at":"2022-07-07T11:02:45.712Z","dependency_job_id":null,"html_url":"https://github.com/timeu/processing-js-gwt","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timeu%2Fprocessing-js-gwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timeu%2Fprocessing-js-gwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timeu%2Fprocessing-js-gwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timeu%2Fprocessing-js-gwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timeu","download_url":"https://codeload.github.com/timeu/processing-js-gwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248168325,"owners_count":21058816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T22:34:12.297Z","updated_at":"2025-04-10T06:32:14.252Z","avatar_url":"https://github.com/timeu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is ProcessingJs-GWT?\n\n\nProcessingJs-GWT is a thin Google Web Toolkit (GWT) wrapper that allows to use [processingjs][1] sketches in GWT applications.\n\n## How do I use it?\n\nFollowing steps are required:  \n\nEither create new interface that extends or create a class that implements the base interface `ProcessingInstance` and annotate it with `@JsType`. To interact with methods on the processing sketch define methods on that interface (i.e. `testMethod`):\n\n```JAVA\n@JsType\npublic interface MyCustomInstance extends ProcessingInstance {\n    String testMethod(String msg);\n}\n```\nLoad the Processing sketch either via `ExternalTextResource` or `URL` or pass it directly as a `String`:\n\n**Loading via URL**:\n```JAVA\nfinal Processing\u003cMyCustomInstance\u003e processing = new Processing\u003c\u003e();\nprocessing.load(safeUri,new Runnable() {\n    @Override\n    public void run() {\n        GWT.log(\"Sample initialized.\");\n        // Interact with sketch\n        processing.getInstance().textMethod(\"test\");\n    }\n}); \n```\n**Loading via ExternalTextResource**:\n```JAVA\ninterface ProcessingCodeBundle extends ClientBundle {\n    ProcessingCodeBundle INSTANCE = GWT.create(ProcessingCodeBundle.class);\n    \n    @Source(\"sample.pde\")\n    ExternalTextResource sampleCode();\n}\nfinal Processing\u003cMyCustomInstance\u003e processing = new Processing\u003c\u003e();\nprocessing.load(ProcessingCodeBundle.INSTANCE.sampleCode(),()-\u003e {\n    GWT.log(\"Sample initialized.\");\n    // Interact with sketch\n    processing.getInstance().textMethod(\"test\");\n}; \n```\nFor a more sophisticated example that shows how to interact with the Processing sketch (Callbacks, etc) refer to the [LDViewer visualization][6]\n\n\n## How do I install it?\n\nIf you're using Maven, you can add the following to your `\u003cdependencies\u003e`\nsection:\n\n```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.github.timeu.gwt-libs.processingjs-gwt\u003c/groupId\u003e\n      \u003cartifactId\u003eprocessingjs-gwt\u003c/artifactId\u003e\n      \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\nProcessingJs-GWT uses [GWT 2.8's][4] new [JSInterop feature][5] and thus it has to be enabled in the GWT compiler args.\nFor maven:\n```xml\n\u003ccompilerArgs\u003e\n    \u003ccompilerArg\u003e-generateJsInteropExports\u003c/compilerArg\u003e\n\u003c/compilerArgs\u003e\n```\nor passing it to the compiler via `-generateJsInteropExports`\n\nYou can also download the [jar][1] directly or check out the source using git\nfrom \u003chttps://github.com/timeu/processing-js-gwt.git\u003e and build it yourself. Once\nyou've installed ProcessingJs-GWT, be sure to inherit the module in your .gwt.xml\nfile like this:\n\n```xml\n    \u003cinherits name='com.github.timeu.gwtlibs.processingjsgwt.ProcessingJsGWT'/\u003e\n```\n\n## Where can I learn more?\n\n * Check out the [sample app][2] ([Source Code][3]) for a full example of using ProcessingJs-GWT.\n \n[0]: http://processingjs.org\n[1]: http://search.maven.org/remotecontent?filepath=com/github/timeu/dygraphs-gwt/dygraphs-gwt/1.0.0/dygraphs-gwt-1.0.0.jar\n[2]: https://timeu.github.io/processing-js-gwt\n[3]: https://github.com/timeu/processing-js-gwt/tree/master/processingjs-gwt-sample\n[4]: http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_0_BETA1\n[5]: https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0/edit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimeu%2Fprocessing-js-gwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimeu%2Fprocessing-js-gwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimeu%2Fprocessing-js-gwt/lists"}