kaboom
kaboom copied to clipboard
Not render objects in Wechat Mini Program
Version
v2000.1
What browsers are you seeing the problem on?
Other
What happened?
I adapted the WeChat Mini Program, and the code can run normally without any errors.
But no objects are rendered, and display a black screen.
What's the expected behavior?
Render all objects.
Minimum reproducable code
kaboom({
canvas: canvas,
width: 375,
height: 667
})
loadSprite("bean", "sprites/bean.png")
loadSprite("ghosty", "sprites/ghosty.png")
const player = add([
sprite("bean"),
pos(120, 80),
rotate(0),
origin("center"),
])
Live demo
No response
Is there an existing issue for this?
- [X] I've searched and there is no existing issue for this bug
You can explain more? What is Wechat Mini Program
Hi! Sorry for the late response. Does Wechat mini program support WebGL? Does other WebGL code / library work?
Hi! Sorry for the late response. Does Wechat mini program support WebGL? Does other WebGL code / library work?
Yes, It supoort WebGL, and cocos works fine.
Maybe related, but when opening even the simplest kaboom program in the WeChat browser all I get is "Script Error"
import kaboom from "kaboom";
kaboom()
Wondering if could have something to do with what I see on normal chrome:
The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ kaboom.ts:795
default @ kaboom.ts:817
(anonymous) @ wc-test.ts:24
Show 2 more frames
Also sometimes see violation warnings related to scroll-blocking.
Testing with kaboom 3000.0.2