Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
playground
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
playground
Commits
927c9ea2
Commit
927c9ea2
authored
Jan 19, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0f46fce0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
App.js
test/src/App.js
+1
-1
main.js
test/src/game/main.js
+5
-14
No files found.
test/src/App.js
View file @
927c9ea2
...
@@ -21,7 +21,7 @@ const widgetConfig = {
...
@@ -21,7 +21,7 @@ const widgetConfig = {
}
}
function
App
()
{
function
App
()
{
const
[
widgetVisible
,
setWidgetVisible
]
=
useState
(
true
);
const
[
widgetVisible
]
=
useState
(
true
);
const
widgetRef
=
useRef
();
const
widgetRef
=
useRef
();
function
onReady
(
widget
)
{
function
onReady
(
widget
)
{
...
...
test/src/game/main.js
View file @
927c9ea2
...
@@ -4,20 +4,11 @@ import Root from './Root';
...
@@ -4,20 +4,11 @@ import Root from './Root';
class
GameStage
extends
WidgetBase
{
class
GameStage
extends
WidgetBase
{
onLaunched
()
{
onLaunched
()
{
let
label
=
new
TextField
();
// let label = new TextField();
label
.
text
=
'Hello CanvasWidget!'
;
// label.text = 'Hello CanvasWidget!';
label
.
fillColor
=
'#000'
;
// label.fillColor = '#000';
label
.
size
=
40
;
// label.size = 40;
this
.
addChild
(
label
);
// this.addChild(label);
// let img = new Sprite();
// img.x = 200;
// img.y = 300;
// img.texture = TextureCache['image'];
// img.anchorTexture.set(0.5, 0.5);
// this.addChild(img);
// Tween.get(img, { loop: true })
// .to({ rotation: 360 }, 30000);
this
.
addChild
(
new
Root
());
this
.
addChild
(
new
Root
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment